HDK
|
#include <GT_GEOVertexRefine.h>
Public Member Functions | |
GT_GEOVertexRefine (const GT_GEOPrimitive &prim, const GT_GEOAttributeFilter &filter, bool do_point_attributes, int psize=3, bool user_defined_N=false) | |
~GT_GEOVertexRefine () | |
const GT_AttributeListHandle & | getGTAttributes () const |
Get the attribute handle. More... | |
GA_AttributeRefMap | bindAttributeHandle (int segment) |
void | extractVertices (int segment, const GA_AttributeRefMap &hlist, const GA_Offset *vertices, GA_Size nvertices) |
void | fillCurveVertices (int segment, const GEO_Curve *curve, const UT_FloatArray &uvals) |
Fill attributes for a curve. More... | |
void | setN (int segment, const UT_Vector3 *N, GA_Size nvertices) |
Refine points/vertices into unique data arrays (not shared by the detail).
This class can be used to create point/vertex attributes for refined primitives. The way to use this would be to:
Definition at line 48 of file GT_GEOVertexRefine.h.
GT_GEOVertexRefine::GT_GEOVertexRefine | ( | const GT_GEOPrimitive & | prim, |
const GT_GEOAttributeFilter & | filter, | ||
bool | do_point_attributes, | ||
int | psize = 3 , |
||
bool | user_defined_N = false |
||
) |
Create an attribute list for vertices (and optionally points). The psize
specifies the tuple size for P and is only valid when adding point attributes too. If user_defined_N
is true, the N attribute will be added if it's not found on points/vertices. Also, the N attribute will not be picked up for refinement (relying on the user to set the values properly).
This creates the attribute handle list. Refinement of vertex attributes is a separate process.
GT_GEOVertexRefine::~GT_GEOVertexRefine | ( | ) |
GA_AttributeRefMap GT_GEOVertexRefine::bindAttributeHandle | ( | int | segment | ) |
Bind the attributes to the attribute handle list. The handle list should be cleared of entries before calling this. The method returns the primitive associated with the segment.
void GT_GEOVertexRefine::extractVertices | ( | int | segment, |
const GA_AttributeRefMap & | hlist, | ||
const GA_Offset * | vertices, | ||
GA_Size | nvertices | ||
) |
Extract the attribute values from the vertices, creating GT data arrays for the attribute data. This fills out the data arrays on the attribute list handle
void GT_GEOVertexRefine::fillCurveVertices | ( | int | segment, |
const GEO_Curve * | curve, | ||
const UT_FloatArray & | uvals | ||
) |
Fill attributes for a curve.
|
inline |
Get the attribute handle.
Definition at line 68 of file GT_GEOVertexRefine.h.
void GT_GEOVertexRefine::setN | ( | int | segment, |
const UT_Vector3 * | N, | ||
GA_Size | nvertices | ||
) |
Set the N attribute for vertices. This should only be called if user_defined_N
was set in the constructor. It must be called after extractVertices
.