HDK
|
#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_String & | regionPath (unsigned i) const |
const UT_Matrix4 & | regionXform (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 ®ion_path, int prim_num) const |
returns the CaptureData index for the given OP path/ID More... | |
int | findRegion (int OPuniqueID, int prim_num) const |
void | getRegionList (int OPuniqueID, UT_IntArray ®ions) 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 ®ion_idx, float &weight) |
static int | constructCaptureRegionDetailData (const char *cregion_name, const UT_Matrix4 &parent_xform, const GEO_Detail *tube_gdp, GEO_CaptureBoneStorage &tube_data) |
Definition at line 91 of file GEO_CaptureData.h.
GEO_CaptureData::GEO_CaptureData | ( | ) |
GEO_CaptureData::~GEO_CaptureData | ( | ) |
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
Per point Data methodsadds a non-zero weighted point entry. assumes that we're inserting in sorted order without duplicates.
Definition at line 244 of file GEO_CaptureData.h.
|
inline |
Definition at line 120 of file GEO_CaptureData.h.
int GEO_CaptureData::changeString | ( | const char * | from, |
const char * | to, | ||
bool | fullword | ||
) |
|
static |
constructs a capture region detail attribute data using the given parameters into tube_data which must have GB_AttributeCaptureRegion::getBoneSize() number of floats
returns the CaptureData index for the given OP path/ID
int GEO_CaptureData::getDetailDataFromGdp | ( | const GEO_Detail * | gdp | ) |
|
inline |
Definition at line 171 of file GEO_CaptureData.h.
|
inline |
Capture Region Methods
Definition at line 104 of file GEO_CaptureData.h.
|
inline |
Definition at line 172 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.
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 | ||
) |
|
inline |
Definition at line 124 of file GEO_CaptureData.h.
|
inline |
Definition at line 122 of file GEO_CaptureData.h.
|
static |
verb method to get the region data out of the raw float array data from a gdp's detail attribute
|
inline |
Definition at line 110 of file GEO_CaptureData.h.
|
inline |
Definition at line 106 of file GEO_CaptureData.h.
|
inline |
Definition at line 112 of file GEO_CaptureData.h.
|
inline |
Definition at line 108 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.
|
inline |
Definition at line 114 of file GEO_CaptureData.h.
|
inline |
Definition at line 116 of file GEO_CaptureData.h.
|
inline |
Definition at line 118 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 | ||
) |