HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GEO_PrimVolumeXform Class Reference

#include <GEO_PrimVolume.h>

Public Types

enum  SamplingType {
  NON_SQUARE = 0, X_AXIS, Y_AXIS, Z_AXIS,
  MAX_AXIS, BY_SIZE
}
 

Public Member Functions

UT_Vector3 toVoxelSpace (UT_Vector3 pos) const
 
UT_Vector3 fromVoxelSpace (UT_Vector3 pos) const
 
UT_Matrix3 toVoxelSpaceJacobian (UT_Vector3 pos) const
 
UT_Matrix3 fromVoxelSpaceJacobian (UT_Vector3 pos) const
 
void transform (const UT_Matrix4 &xform)
 
void transform (const UT_Matrix4D &xform)
 
void toVoxelSpace (UT_BoundingBox &box) const
 
void fromVoxelSpace (UT_BoundingBox &box) const
 
bool isTapered () const
 Returns if the transform is flagged as having a taper. More...
 
UT_Vector3R computeSize () const
 Compute the size for this transform (relative to myCenter) More...
 
void init ()
 
bool operator== (const GEO_PrimVolumeXform &x) const
 
void getTransform4 (UT_Matrix4F &matx) const
 
void getTransform4 (UT_Matrix4D &matx) const
 
void save (std::ostream &os, bool binary=false) const
 
bool load (UT_IStream &is)
 

Static Public Member Functions

static SamplingType samplingType (int i)
 Convert the "uniformsamples" parm menu item index to a sampling type. More...
 
static UT_Vector3R computeResolution (SamplingType sampling_type, const UT_Vector3R &non_uniform_divs, fpreal uniform_divs, fpreal div_size, fpreal z_div_scale, UT_Vector3R &size_inout, int twod_axis=-1)
 
static GEO_PrimVolumeXform frustumSpaceTransform (const UT_Vector3R &size, const UT_Vector3R &center, fpreal taper_x, fpreal taper_y)
 Compute a space transform from center, size, and taper. More...
 
static GEO_PrimVolumeXform cameraFrustum (fpreal focal, fpreal aperture, const UT_Vector2R &image_res, fpreal pixel_aspect, bool is_ortho, fpreal ortho_zoom, fpreal clip_near, fpreal clip_far, bool use_cam_window, const UT_BoundingRectR &cam_window, const UT_BoundingRectR &cam_crop, const UT_BoundingRectR &window, const UT_Matrix4R &post_xform, const GEO_Detail *match_src)
 

Public Attributes

UT_Matrix3 myXform
 
UT_Matrix3 myInverseXform
 
UT_Vector3 myCenter
 
bool myHasTaper
 
float myTaperX
 
float myTaperY
 

Detailed Description

Stores the transform associated with a volume, allowing the to/from code to be inlined outside of this library.

Examples:
SIM/GAS_NetVDBSliceExchange.C.

Definition at line 33 of file GEO_PrimVolume.h.

Member Enumeration Documentation

Enumerator
NON_SQUARE 
X_AXIS 
Y_AXIS 
Z_AXIS 
MAX_AXIS 
BY_SIZE 

Definition at line 237 of file GEO_PrimVolume.h.

Member Function Documentation

static GEO_PrimVolumeXform GEO_PrimVolumeXform::cameraFrustum ( fpreal  focal,
fpreal  aperture,
const UT_Vector2R image_res,
fpreal  pixel_aspect,
bool  is_ortho,
fpreal  ortho_zoom,
fpreal  clip_near,
fpreal  clip_far,
bool  use_cam_window,
const UT_BoundingRectR cam_window,
const UT_BoundingRectR cam_crop,
const UT_BoundingRectR window,
const UT_Matrix4R post_xform,
const GEO_Detail match_src 
)
static

Compute a space transform from camera settings. The ortho_zoom parameter is only used when is_ortho = true.

static UT_Vector3R GEO_PrimVolumeXform::computeResolution ( SamplingType  sampling_type,
const UT_Vector3R non_uniform_divs,
fpreal  uniform_divs,
fpreal  div_size,
fpreal  z_div_scale,
UT_Vector3R size_inout,
int  twod_axis = -1 
)
static

Compute the resolution (and size) from a common set of parameters. If twod_axis is one of [0,1,2], then that axis clamped to a divisions of 1 and a size of 0. The number of divisions is returned with size set to div_size multiplied by divisions before the z_div_scale.

UT_Vector3R GEO_PrimVolumeXform::computeSize ( ) const

Compute the size for this transform (relative to myCenter)

UT_Vector3 GEO_PrimVolumeXform::fromVoxelSpace ( UT_Vector3  pos) const
inline
Examples:
SIM/GAS_NetVDBSliceExchange.C.

Definition at line 70 of file GEO_PrimVolume.h.

void GEO_PrimVolumeXform::fromVoxelSpace ( UT_BoundingBox box) const
inline

Definition at line 203 of file GEO_PrimVolume.h.

UT_Matrix3 GEO_PrimVolumeXform::fromVoxelSpaceJacobian ( UT_Vector3  pos) const
inline

Definition at line 137 of file GEO_PrimVolume.h.

static GEO_PrimVolumeXform GEO_PrimVolumeXform::frustumSpaceTransform ( const UT_Vector3R size,
const UT_Vector3R center,
fpreal  taper_x,
fpreal  taper_y 
)
static

Compute a space transform from center, size, and taper.

void GEO_PrimVolumeXform::getTransform4 ( UT_Matrix4F matx) const

Returns the un-tapered matrix4 corresponding to fromVoxelSpace().

void GEO_PrimVolumeXform::getTransform4 ( UT_Matrix4D matx) const

Returns the un-tapered matrix4 corresponding to fromVoxelSpace().

void GEO_PrimVolumeXform::init ( )
inline

Definition at line 294 of file GEO_PrimVolume.h.

bool GEO_PrimVolumeXform::isTapered ( ) const
inline

Returns if the transform is flagged as having a taper.

Definition at line 231 of file GEO_PrimVolume.h.

bool GEO_PrimVolumeXform::load ( UT_IStream is)
bool GEO_PrimVolumeXform::operator== ( const GEO_PrimVolumeXform x) const
inline

Definition at line 304 of file GEO_PrimVolume.h.

static SamplingType GEO_PrimVolumeXform::samplingType ( int  i)
inlinestatic

Convert the "uniformsamples" parm menu item index to a sampling type.

Definition at line 248 of file GEO_PrimVolume.h.

void GEO_PrimVolumeXform::save ( std::ostream &  os,
bool  binary = false 
) const
UT_Vector3 GEO_PrimVolumeXform::toVoxelSpace ( UT_Vector3  pos) const
inline

Definition at line 37 of file GEO_PrimVolume.h.

void GEO_PrimVolumeXform::toVoxelSpace ( UT_BoundingBox box) const
inline

Definition at line 182 of file GEO_PrimVolume.h.

UT_Matrix3 GEO_PrimVolumeXform::toVoxelSpaceJacobian ( UT_Vector3  pos) const
inline

Definition at line 103 of file GEO_PrimVolume.h.

void GEO_PrimVolumeXform::transform ( const UT_Matrix4 xform)
inline

Definition at line 166 of file GEO_PrimVolume.h.

void GEO_PrimVolumeXform::transform ( const UT_Matrix4D xform)
inline

Definition at line 174 of file GEO_PrimVolume.h.

Member Data Documentation

UT_Vector3 GEO_PrimVolumeXform::myCenter

Definition at line 315 of file GEO_PrimVolume.h.

bool GEO_PrimVolumeXform::myHasTaper

Definition at line 316 of file GEO_PrimVolume.h.

UT_Matrix3 GEO_PrimVolumeXform::myInverseXform

Definition at line 314 of file GEO_PrimVolume.h.

float GEO_PrimVolumeXform::myTaperX

Definition at line 317 of file GEO_PrimVolume.h.

float GEO_PrimVolumeXform::myTaperY

Definition at line 317 of file GEO_PrimVolume.h.

UT_Matrix3 GEO_PrimVolumeXform::myXform

Definition at line 314 of file GEO_PrimVolume.h.


The documentation for this class was generated from the following file: