15 #ifndef __GEO_CaptureData__
16 #define __GEO_CaptureData__
30 #define GEO_CAPTUREDATA_DEFAULT_VALUE -1.0F
50 int changeString(
const char *from,
const char *to,
bool fullword )
51 {
return myPath.changeString( from, to, fullword ); }
59 int getID()
const {
return myID; }
76 {
return !(*
this == d); }
98 float capture_frame,
int num_pts=0,
int num_regions=0,
99 int num_entries_per_pnt=0 );
107 {
return myRegionData(i).getPath();}
109 {
return myRegionData(i).getXform();}
111 {
return myRegionData(i).getID();}
113 {
return myRegionData(i).getPrimNum(); }
115 {
return myRegionData(i).getXtaper(); }
117 {
return myRegionData(i).getZtaper(); }
119 {
return myRegionData(i).getTopCapHeight(); }
121 {
return myRegionData(i).getBotCapHeight(); }
123 {
return myRegionData(i).getMinWeight(); }
125 {
return myRegionData(i).getMaxWeight(); }
127 int changeString(
const char *from,
const char *to,
130 void updateRegionPath(
unsigned int i,
135 int findRegion(
const UT_String ®ion_path,
int prim_num)
const;
136 int findRegion(
int OPuniqueID,
int prim_num)
const;
138 void getRegionList(
int OPuniqueID,
UT_IntArray ®ions)
const;
143 float taperx,
float taperz,
144 float bot_cap,
float top_cap,
145 float min_weight,
float max_weight );
151 int saveOverrideFile( std::ostream &os,
158 bool loadOverrideFile(
const char *
filename,
int &line_num );
166 void appendSortedPtEntry(
GA_Index point_num,
int idx,
float weight);
169 void sortAndNormalizePtWeights();
178 bool relative_skel_root )
const;
183 static void parsePointData(
const float *
data,
int idx,
184 int ®ion_idx,
float &weight );
192 float getPointWeight(
int point_idx,
int region_idx,
int *prev_array_idx = NULL);
197 static int constructCaptureRegionDetailData(
198 const char *cregion_name,
203 int getDetailDataFromGdp(
const GEO_Detail *gdp );
206 bool loadOverrideFile(
UT_IStream &is,
int &line_num );
208 int savePointEntry(std::ostream &os,
int i,
const float *pt_data,
212 void computeSkelRootPath(
UT_String &root_path )
const;
214 bool relative_skel_root,
218 int getPointDataFromGdp(
const GEO_Detail *gdp,
230 float myCaptureFrame;
235 int myMaxEntriesPerPt;
249 || point_num >= myPtEntry.
last().pt_num);
251 if (myPtEntry.
entries() == 0 || point_num != myPtEntry.
last().pt_num)
254 myPtEntry.
last().pt_num = point_num;
255 myPtEntry.
last().num_entries = 0;
258 myPtData.
append(
float(idx));
261 myPtEntry.
last().num_entries++;
262 if (myPtEntry.
last().num_entries > myMaxEntriesPerPt)
263 myMaxEntriesPerPt = myPtEntry.
last().num_entries;
GT_API const UT_StringHolder filename
GEO_CaptureData_PtAtr_Entry
const UT_String & getPath() const
int getNumEntriesPerPt() const
float getMinWeight() const
void setXform(const UT_Matrix4 &xf)
const GLuint GLenum const void * binary
void setTopCapHeight(float h)
GLsizei const GLchar *const * path
GLdouble GLdouble GLdouble z
Convenience class to store a bone capture region.
int regionPrimNum(unsigned i) const
void setMaxWeight(float m)
const UT_Matrix4 & getXform() const
float getBotCapHeight() const
int regionID(unsigned i) const
vint4 blend(const vint4 &a, const vint4 &b, const vbool4 &mask)
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
int getNumStoredPts() const
float getMaxWeight() const
std::string OIIO_UTIL_API replace(string_view str, string_view pattern, string_view replacement, bool global=false)
float getTopCapHeight() const
void setPath(const UT_String &path)
bool operator!=(const GEO_CaptureRegionData &d) const
OPENVDB_API void initialize()
Global registration of native Grid, Transform, Metadata and Point attribute types. Also initializes blosc (if enabled).
SYS_DECLARE_LEGACY_TR(GU_Detail)
GA_Size GA_Index
Define the strictness of GA_Offset/GA_Index.
float topCap(unsigned i) const
const UT_Matrix4 & regionXform(unsigned i) const
exint entries() const
Alias of size(). size() is preferred.
unsigned int getNumRegions() const
GLfloat GLfloat GLfloat GLfloat h
float botCap(unsigned i) const
float taperX(unsigned i) const
LeafData & operator=(const LeafData &)=delete
int changeString(const char *from, const char *to, bool fullword)
void setXZtapers(float x, float z)
float maxWeight(unsigned i) const
void appendSortedPtEntry(GA_Index point_num, int idx, float weight)
const UT_String & regionPath(unsigned i) const
float taperZ(unsigned i) const
void setMinWeight(float m)
float minWeight(unsigned i) const
void setBotCapHeight(float h)