HDK
|
#include <GEO_PrimPoly.h>
Static Public Member Functions | |
static GEO_PrimPoly * | build (GA_Detail *gdp, GA_Size nvertices, bool open=false, bool appendpts=true) |
static GA_Offset | buildBlock (GA_Detail *detail, const UT_Vector3 *points, const GA_Size npoints, const GEO_PolyCounts &polygonsizelist, const int *polygonpointnumbers, const bool closed=true) |
static GA_Offset | buildBlock (GA_Detail *detail, const UT_Vector3 *points, const GA_Size npoints, const GA_PolyCounts &polygonsizelist, const int *polygonpointnumbers, const bool closed=true) |
static GA_Offset | buildBlock (GA_Detail *detail, const GA_Offset startpt, const GA_Size npoints, const GEO_PolyCounts &polygonsizelist, const int *polygonpointnumbers, const bool closed=true) |
static GA_Offset | buildBlock (GA_Detail *detail, const GA_Offset startpt, const GA_Size npoints, const GA_PolyCounts &polygonsizelist, const int *polygonpointnumbers, const bool closed=true) |
Static Public Member Functions inherited from GEO_Face | |
static void | unitToRealAdjust (float *uunit, float *ureal, int ulen, int num) |
static fpreal | getIndices (fpreal c, int &c1, int &c2, int max_index, int wrap) |
static void | fillBreakVals (const GA_Basis &ub, UT_Array< float > &uvals, int ustartidx, int ustopidx, int ulod, bool wrap) |
static bool | getUniformStep (const UT_Span< const float > &vals, int idx, int nextidx, fpreal &step) |
Static Public Member Functions inherited from GEO_Primitive | |
static GA_PrimCompat::TypeMask | getPrimitiveMaskH9 (const char *maskstr) |
Static Public Member Functions inherited from GA_Primitive | |
static SYS_FORCE_INLINE GA_PrimCompat::TypeMask | primCompatMaskFromTypeId (int type_id) |
Static Protected Member Functions | |
static GA_PrimitiveFamilyMask | buildFamilyMask () |
static GA_IntrinsicManager::Registrar | registerIntrinsics (GA_PrimitiveDefinition &defn) |
Static Protected Member Functions inherited from GEO_Face | |
static GA_PrimitiveFamilyMask | buildFamilyMask () |
static GA_Offset | buildBlock (GA_PrimitiveTypeId type, GA_Detail *detail, const GA_Offset startpt, const GA_Size npoints, const GEO_PolyCounts &facesizelist, const int *facepointnumbers, const bool closed=true) |
static GA_Offset | buildBlock (GA_PrimitiveTypeId type, GA_Detail *detail, const GA_Offset startpt, const GA_Size npoints, const GA_PolyCounts &facesizelist, const int *facepointnumbers, const bool closed=true) |
Static Protected Member Functions inherited from GEO_TriMesh | |
static GA_PrimitiveFamilyMask | buildFamilyMask () |
static GA_IntrinsicManager::Registrar | registerIntrinsics (GA_PrimitiveDefinition &defn) |
Static Protected Member Functions inherited from GEO_Primitive | |
static GA_IntrinsicManager::Registrar | registerIntrinsics (GA_PrimitiveDefinition &defn) |
Friends | |
class | GU_PrimitiveFactory |
std::ostream & | operator<< (std::ostream &os, const GEO_PrimPoly &d) |
Additional Inherited Members | |
Public Types inherited from GEO_Primitive | |
using | NormalComp = NormalCompT< float > |
using | NormalCompArray = NormalCompArrayT< float > |
using | NormalCompAttr = NormalCompAttrT< float > |
using | NormalCompBuffered = NormalCompBufferedT< float > |
using | NormalCompD = NormalCompT< double > |
using | NormalCompArrayD = NormalCompArrayT< double > |
using | NormalCompAttrD = NormalCompAttrT< double > |
using | NormalCompBufferedD = NormalCompBufferedT< double > |
Public Types inherited from GA_Primitive | |
enum | GA_DereferenceStatus { GA_DEREFERENCE_FAIL, GA_DEREFERENCE_OK, GA_DEREFERENCE_DEGENERATE, GA_DEREFERENCE_DESTROY } |
Static Public Attributes inherited from GEO_Primitive | |
static const UT_Array < GA_AttribSaveDataH9 > & | theEmptySaveAttribs |
Convience objects to pass as arguments to saveH9()/loadH9(). More... | |
Protected Attributes inherited from GA_Primitive | |
GA_OffsetList | myVertexList |
Definition at line 25 of file GEO_PrimPoly.h.
|
inline |
NOTE: The constructor should only be called from subclass constructors.
Definition at line 32 of file GEO_PrimPoly.h.
|
inline |
This constructor is for making a representation of a polygon on the stack, so that you can call GU_PrimPoly functions on the polygon without needing the detail to allocate one.
Definition at line 40 of file GEO_PrimPoly.h.
Reimplemented from GEO_TriMesh.
|
overridevirtual |
Implements GEO_Face.
|
static |
Builds a GEO_PrimPoly with nvertices vertices, and optionally adds a point to the detail for each vertex.
|
static |
Builds npoints new points with the specified positions, and then creates polygons that use those points, as dictated by polygonsizelist and polygonpointnumbers, in parallel. polygonpointnumbers lists the numbers of the points used by each polygon, relative to the first point created by this method. The offset of the first polygon is returned, and the rest are at consecutive offsets. All polygonpointnumbers must be between 0 (inclusive) and npoints (exclusive).
NOTE: It's not strictly necessary that the polygons being created use all of the points created.
|
static |
Builds npoints new points with the specified positions, and then creates polygons that use those points, as dictated by polygonsizelist and polygonpointnumbers, in parallel. polygonpointnumbers lists the numbers of the points used by each polygon, relative to the first point created by this method. The offset of the first polygon is returned, and the rest are at consecutive offsets. All polygonpointnumbers must be between 0 (inclusive) and npoints (exclusive).
NOTE: It's not strictly necessary that the polygons being created use all of the points created.
|
inlinestatic |
Builds polygons using the specified range of point offsets, as dictated by polygonsizelist and polygonpointnumbers, in parallel. polygonpointnumbers lists the offsets of the points used by each polygon MINUS startpt, i.e. they are offsets relative to startpt, not indices relative to startpt. The offset of the first polygon is returned, and the rest are at consecutive offsets. All polygonpointnumbers must be between 0 (inclusive) and npoints (exclusive).
NOTE: Existing primitives are allowed to be using the points in the specified range already, and the polygons being created do not need to use all of the points in the range. However, these cases may impact performance.
Definition at line 179 of file GEO_PrimPoly.h.
|
inlinestatic |
Builds polygons using the specified range of point offsets, as dictated by polygonsizelist and polygonpointnumbers, in parallel. polygonpointnumbers lists the offsets of the points used by each polygon MINUS startpt, i.e. they are offsets relative to startpt, not indices relative to startpt. The offset of the first polygon is returned, and the rest are at consecutive offsets. All polygonpointnumbers must be between 0 (inclusive) and npoints (exclusive).
NOTE: Existing primitives are allowed to be using the points in the specified range already, and the polygons being created do not need to use all of the points in the range. However, these cases may impact performance.
Definition at line 196 of file GEO_PrimPoly.h.
|
inlinestaticprotected |
Definition at line 247 of file GEO_PrimPoly.h.
|
inlineoverrideprotectedvirtual |
Reimplemented from GEO_Primitive.
Reimplemented in GU_PrimPoly.
Definition at line 323 of file GEO_PrimPoly.h.
|
finaloverridevirtual |
Finds the weightings of the vertices that will compute an interior point given the u,v,w coordinates. The offsets are into the gdp's vertex list, not indices into this primitive's vertex list. Weights are normalized. Note this cannot be used to recover the Position as it often has special case logic (as in spheres, or rational splines), in those cases use evaluateInteriorPoint(UT_Vector4 &pos, ...) It has the advantage over the other evaluateInteriorPoints in that it allows you to avoid creating any temporary vertices. Behaviour for non-sublcassed types is to return the 0th vertex.
Reimplemented from GEO_Face.
|
inlineoverrideprotectedvirtual |
Implements GEO_Primitive.
Reimplemented in GU_PrimPoly.
Definition at line 291 of file GEO_PrimPoly.h.
|
inlineoverrideprotectedvirtual |
Implements GEO_Primitive.
Reimplemented in GU_PrimPoly.
Definition at line 298 of file GEO_PrimPoly.h.
|
overridevirtual |
Count memory usage using a UT_MemoryCounter in order to count shared memory correctly. NOTE: This should always include sizeof(*this).
Reimplemented from GA_Primitive.
Reimplemented from GEO_TriMesh.
|
overridevirtual |
Implements GEO_Face.
|
overrideprotectedvirtual |
Reimplemented from GEO_Primitive.
|
overrideprotectedvirtual |
Reimplemented from GEO_Primitive.
void GEO_PrimPoly::flipEdge | ( | GEO_PrimPoly * | that, |
GA_Size | i, | ||
GA_Size | j, | ||
GA_ElementWranglerCache & | wranglers | ||
) |
Flips a shared edge of two triangles | j+2 j+2 i+1 | / \ /|\ | / \ / | \ | / that\ / t|t \ | j----—j+1 flips to j h|h i | i+1\ this/i \ a|i / | \ / |s/ | \ / |/ | i+2 j+1 i+2 |
i and j are indices into this and that, respectively, and are on opposite ends of the common edge, which is (i, i+1) in this and (j, j+1) in the opposite direction in that. The vertex i+1 in this is moved to where j+2 is in that. The vertex j+1 in that is moved to where i+2 is in this. NOTE: Vertex attributes will be copied from j+2 onto i+1, and from i+2 onto j+1. NOTE: The two triangles must be in the same detail.
|
overridevirtual |
Return the next and previous vertex on the "boundary" of the primitive (as understood by the primitive) relative to a given vertex. These are needed to maintain half-edge topology attributes. They must be implemented for primitives that realize a notion of a boundary composed of one or more closed cycles of vertices if we want to be able to use hedges to quickly move from such a primitive to another sharing an edge with it. A GA_INVALID_OFFSET for prev_vtx or next_vtx means that either the primitive doesn't care about hedges, the input vertex is not a boundary vertex in the primitive (or not a vertex at all), or vtx is at an end of a boundary (e.g. open polys).
Reimplemented from GA_Primitive.
|
overridevirtual |
This method returns the JSON interface for saving/loading the primitive If the method returns a NULL pointer, then the primitive will not be saved to geometry files (and thus cannot be loaded).
Implements GA_Primitive.
|
overridevirtual |
Report approximate memory usage.
Reimplemented from GA_Primitive.
|
overridevirtual |
Implements GEO_Face.
|
inlineoverridevirtual |
Implements GA_Primitive.
Definition at line 44 of file GEO_PrimPoly.h.
Reimplemented from GEO_TriMesh.
|
inlineoverrideprotectedvirtual |
|
inlineoverrideprotectedvirtual |
Reimplemented from GEO_Primitive.
Reimplemented in GU_PrimPoly.
Definition at line 304 of file GEO_PrimPoly.h.
bool GEO_PrimPoly::isConvex | ( | float | tolerance = 0.0001F | ) | const |
Determine if the polygon is convex.
|
overridevirtual |
Is the primitive degenerate.
Reimplemented from GEO_Face.
bool GEO_PrimPoly::isPlanar | ( | float | tolerance = 0.0001F | ) | const |
Determine if the polygon is planar.
|
overrideprotectedvirtual |
Implements GEO_Face.
Implements GEO_Face.
Definition at line 279 of file GEO_PrimPoly.h.
Implements GEO_Face.
Definition at line 282 of file GEO_PrimPoly.h.
|
inlinestaticprotected |
All subclasses should call this method to register the curve intrinsics.
Definition at line 253 of file GEO_PrimPoly.h.
|
overrideprotectedvirtual |
Implements GEO_Face.
|
overridevirtual |
Steal a vertex from its current primitive and insert it into our vertex list.
vtx | Vertex to be stolen |
insert_before_vtx | (Optional) the vertex before which to insert the stolen vertex If unspecified (negative) or if the vertex doesn't exist, the stolen vertex is appended at the end of the vertex list. |
Reimplemented from GEO_TriMesh.
|
inlineoverridevirtual |
Primitives that implement getAdjacentBoundaryVertices must respond true to supportsHedge().
Reimplemented from GA_Primitive.
Definition at line 125 of file GEO_PrimPoly.h.
|
overridevirtual |
Reimplemented from GEO_Face.
Reimplemented from GEO_Face.
|
overridevirtual |
Implements GEO_Face.
|
friend |
Definition at line 338 of file GEO_PrimPoly.h.
|
friend |
Definition at line 329 of file GEO_PrimPoly.h.