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

#include <GEO_CaptureData.h>

Public Member Functions

 GEO_CaptureData ()
 
 ~GEO_CaptureData ()
 
void initialize (const UT_String &sop_path, float capture_frame, int num_pts=0, int num_regions=0, int num_entries_per_pnt=0)
 
unsigned int getNumRegions () const
 
const UT_StringregionPath (unsigned i) const
 
const UT_Matrix4regionXform (unsigned i) const
 
int regionID (unsigned i) const
 
int regionPrimNum (unsigned i) const
 
float taperX (unsigned i) const
 
float taperZ (unsigned i) const
 
float topCap (unsigned i) const
 
float botCap (unsigned i) const
 
float minWeight (unsigned i) const
 
float maxWeight (unsigned i) const
 
int changeString (const char *from, const char *to, bool fullword)
 
void updateRegionPath (unsigned int i, const UT_String &new_path, int new_op_id)
 
int findRegion (const UT_String &region_path, unsigned primnum) const
 returns the CaptureData index for the given OP path/ID More...
 
int findRegion (int OPuniqueID, unsigned primnum) const
 
void getRegionList (int OPuniqueID, UT_IntArray &regions) const
 
int appendRegion (int opID, const UT_String &path, int tube_prim_num, const UT_Matrix4 &xform, float taperx, float taperz, float bot_cap, float top_cap, float min_weight, float max_weight)
 create space for new region and return the new index More...
 
int saveOverrideFile (const UT_String &filename, const GA_PointGroup *pt_group=0, const GEO_Detail *gdp=0, int binary=0) const
 
int saveOverrideFile (std::ostream &os, const GA_PointGroup *pt_group=0, const GEO_Detail *gdp=0, int binary=0) const
 
bool loadOverrideFile (const char *filename, int &line_num)
 
void appendSortedPtEntry (GA_Index point_num, int idx, float weight)
 
void sortAndNormalizePtWeights ()
 Sort and normalize weights. More...
 
int getNumEntriesPerPt () const
 
int getNumStoredPts () const
 
void transferToGdp (GEO_Detail *gdp, bool destroy, float blend, bool relative_skel_root) const
 
int transferFromGdp (const GEO_Detail *gdp, const GA_PointGroup *pt_group)
 
float getPointWeight (int point_idx, int region_idx, int *prev_array_idx=NULL)
 
int getDetailDataFromGdp (const GEO_Detail *gdp)
 

Static Public Member Functions

static void parsePointData (const float *data, int idx, int &region_idx, float &weight)
 
static int constructCaptureRegionDetailData (const char *cregion_name, const UT_Matrix4 &parent_xform, const GEO_Detail *tube_gdp, GEO_CaptureBoneStorage &tube_data)
 

Detailed Description

Definition at line 90 of file GEO_CaptureData.h.

Constructor & Destructor Documentation

GEO_CaptureData::GEO_CaptureData ( )
GEO_CaptureData::~GEO_CaptureData ( )

Member Function Documentation

int GEO_CaptureData::appendRegion ( int  opID,
const UT_String path,
int  tube_prim_num,
const UT_Matrix4 xform,
float  taperx,
float  taperz,
float  bot_cap,
float  top_cap,
float  min_weight,
float  max_weight 
)

create space for new region and return the new index

void GEO_CaptureData::appendSortedPtEntry ( GA_Index  point_num,
int  idx,
float  weight 
)
inline

Per point Data methodsadds a non-zero weighted point entry. assumes that we're inserting in sorted order without duplicates.

Definition at line 243 of file GEO_CaptureData.h.

float GEO_CaptureData::botCap ( unsigned  i) const
inline

Definition at line 119 of file GEO_CaptureData.h.

int GEO_CaptureData::changeString ( const char *  from,
const char *  to,
bool  fullword 
)
static int GEO_CaptureData::constructCaptureRegionDetailData ( const char *  cregion_name,
const UT_Matrix4 parent_xform,
const GEO_Detail tube_gdp,
GEO_CaptureBoneStorage tube_data 
)
static

constructs a capture region detail attribute data using the given parameters into tube_data which must have GB_AttributeCaptureRegion::getBoneSize() number of floats

int GEO_CaptureData::findRegion ( const UT_String region_path,
unsigned  primnum 
) const

returns the CaptureData index for the given OP path/ID

int GEO_CaptureData::findRegion ( int  OPuniqueID,
unsigned  primnum 
) const
int GEO_CaptureData::getDetailDataFromGdp ( const GEO_Detail gdp)
int GEO_CaptureData::getNumEntriesPerPt ( ) const
inline

Definition at line 170 of file GEO_CaptureData.h.

unsigned int GEO_CaptureData::getNumRegions ( ) const
inline

Capture Region Methods

Definition at line 103 of file GEO_CaptureData.h.

int GEO_CaptureData::getNumStoredPts ( ) const
inline

Definition at line 171 of file GEO_CaptureData.h.

float GEO_CaptureData::getPointWeight ( int  point_idx,
int  region_idx,
int prev_array_idx = NULL 
)

Retrieves the weight of the point at the specified index. The weight corresponds to the region at region_idx index.

Parameters
prev_array_idx- an optional speed optimization param. If this is called in a loop for consecutive points, set to 0 initially and pass the same variable to this function while in the loop.
void GEO_CaptureData::getRegionList ( int  OPuniqueID,
UT_IntArray regions 
) const
void GEO_CaptureData::initialize ( const UT_String sop_path,
float  capture_frame,
int  num_pts = 0,
int  num_regions = 0,
int  num_entries_per_pnt = 0 
)
bool GEO_CaptureData::loadOverrideFile ( const char *  filename,
int line_num 
)
float GEO_CaptureData::maxWeight ( unsigned  i) const
inline

Definition at line 123 of file GEO_CaptureData.h.

float GEO_CaptureData::minWeight ( unsigned  i) const
inline

Definition at line 121 of file GEO_CaptureData.h.

static void GEO_CaptureData::parsePointData ( const float *  data,
int  idx,
int region_idx,
float &  weight 
)
static

verb method to get the region data out of the raw float array data from a gdp's detail attribute

int GEO_CaptureData::regionID ( unsigned  i) const
inline

Definition at line 109 of file GEO_CaptureData.h.

const UT_String& GEO_CaptureData::regionPath ( unsigned  i) const
inline

Definition at line 105 of file GEO_CaptureData.h.

int GEO_CaptureData::regionPrimNum ( unsigned  i) const
inline

Definition at line 111 of file GEO_CaptureData.h.

const UT_Matrix4& GEO_CaptureData::regionXform ( unsigned  i) const
inline

Definition at line 107 of file GEO_CaptureData.h.

int GEO_CaptureData::saveOverrideFile ( const UT_String filename,
const GA_PointGroup pt_group = 0,
const GEO_Detail gdp = 0,
int  binary = 0 
) const
int GEO_CaptureData::saveOverrideFile ( std::ostream &  os,
const GA_PointGroup pt_group = 0,
const GEO_Detail gdp = 0,
int  binary = 0 
) const
void GEO_CaptureData::sortAndNormalizePtWeights ( )

Sort and normalize weights.

float GEO_CaptureData::taperX ( unsigned  i) const
inline

Definition at line 113 of file GEO_CaptureData.h.

float GEO_CaptureData::taperZ ( unsigned  i) const
inline

Definition at line 115 of file GEO_CaptureData.h.

float GEO_CaptureData::topCap ( unsigned  i) const
inline

Definition at line 117 of file GEO_CaptureData.h.

int GEO_CaptureData::transferFromGdp ( const GEO_Detail gdp,
const GA_PointGroup pt_group 
)
void GEO_CaptureData::transferToGdp ( GEO_Detail gdp,
bool  destroy,
float  blend,
bool  relative_skel_root 
) const

puts our data into the given gdp's point and detail attributes returns 1 on success, 0 otherwise transferToGdp doesn't have any failure case so doesn't return anything.

void GEO_CaptureData::updateRegionPath ( unsigned int  i,
const UT_String new_path,
int  new_op_id 
)

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