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
 
void toVoxelSpace (UT_BoundingBox &box) const
 
void fromVoxelSpace (UT_BoundingBox &box) const
 
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.

Definition at line 31 of file GEO_PrimVolume.h.

Member Enumeration Documentation

Enumerator
NON_SQUARE 
X_AXIS 
Y_AXIS 
Z_AXIS 
MAX_AXIS 
BY_SIZE 

Definition at line 145 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

Definition at line 68 of file GEO_PrimVolume.h.

void GEO_PrimVolumeXform::fromVoxelSpace ( UT_BoundingBox box) const
inline

Definition at line 114 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 ( void  )
inline

Definition at line 202 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 212 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 156 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 35 of file GEO_PrimVolume.h.

void GEO_PrimVolumeXform::toVoxelSpace ( UT_BoundingBox box) const
inline

Definition at line 93 of file GEO_PrimVolume.h.

Member Data Documentation

UT_Vector3 GEO_PrimVolumeXform::myCenter

Definition at line 223 of file GEO_PrimVolume.h.

bool GEO_PrimVolumeXform::myHasTaper

Definition at line 224 of file GEO_PrimVolume.h.

UT_Matrix3 GEO_PrimVolumeXform::myInverseXform

Definition at line 222 of file GEO_PrimVolume.h.

float GEO_PrimVolumeXform::myTaperX

Definition at line 225 of file GEO_PrimVolume.h.

float GEO_PrimVolumeXform::myTaperY

Definition at line 225 of file GEO_PrimVolume.h.

UT_Matrix3 GEO_PrimVolumeXform::myXform

Definition at line 222 of file GEO_PrimVolume.h.


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