13 #ifndef __GEO_TriMesh__
14 #define __GEO_TriMesh__
46 bool saveH9(std::ostream &os,
bool binary,
73 bool isDegenerate()
const override;
78 { setNumVertices(nvertices); }
90 GA_DereferenceStatus dereferencePoint(
GA_Offset point,
91 bool dry_run=
false)
override;
93 bool dry_run=
false)
override;
123 {
return myVertexList.size(); }
127 UT_ASSERT_P(index >= 0 && index < myVertexList.size());
128 return myVertexList(index);
138 {
return getVertexElement(i); }
141 {
return getVertexElement(i); }
144 {
return getVertexElement(i); }
147 {
return getVertexElement(i); }
151 if (i < myVertexList.entries())
152 wireVertex(myVertexList(i), pt);
156 virtual bool vertexApply(
bool (*apply)(
GA_Offset vtx,
void *),
161 void unitLengthToUnitPair(
162 float ulength,
float vlength,
163 float &uparm,
float &vparm)
const override;
164 void unitLengthToUnitPair(
165 float ulength,
float vlength,
166 float &uparm,
float &vparm,
167 float tolerance)
const override;
169 void unitToUnitLengthPair(
170 float uparm,
float vparm,
171 float &ulength,
float &vlength)
const override;
183 bool destroy_existing = true,
184 bool update_topology = true);
195 virtual bool savePrivateH9(std::ostream &os,
bool binary)
const = 0;
196 virtual bool loadPrivateH9(
UT_IStream &is) = 0;
200 virtual bool validate()
const;
209 bool appendPoints =
true);
220 myVertexList.set(i, myVertexList(j));
221 myVertexList.set(j, tmp);
224 bool evaluatePointRefMap(
231 float u,
float v = 0,
232 unsigned du=0,
unsigned dv=0)
const override
235 bool evaluateBaryCenterRefMap(
void setVertexPoint(GA_Size i, GA_Offset pt)
static GA_IntrinsicManager::Registrar registerIntrinsics(GA_PrimitiveDefinition &defn)
Used to pass options and map offset values during saving.
*get result *(waiting if necessary)*A common idiom is to fire a bunch of sub tasks at the and then *wait for them to all complete We provide a helper class
#define SYS_DEPRECATED_PUSH_DISABLE()
#define SYS_DEPRECATED_POP_DISABLE()
SYS_FORCE_INLINE GEO_TriMesh(GA_Detail *d, GA_Offset offset=GA_INVALID_OFFSET)
JSON reader class which handles parsing of JSON or bJSON files.
Class which writes ASCII or binary JSON streams.
Abstract base class for a range membership query object.
exint GA_Size
Defines the bit width for index and offset types in GA.
#define GA_INVALID_OFFSET
SYS_FORCE_INLINE GA_Offset getFastVertexOffset(GA_Size index) const
GLint GLenum GLsizei GLint GLsizei const void * data
const GLuint GLenum const void * binary
bool saveH9(std::ostream &os, bool binary, const UT_Array< GA_AttribSaveDataH9 > &prim_attribs, const UT_Array< GA_AttribSaveDataH9 > &vtx_attribs) const override
GLubyte GLubyte GLubyte GLubyte w
A handle to simplify manipulation of multiple attributes.
SYS_FORCE_INLINE GA_Offset vertexPoint(GA_Size i) const
SYS_FORCE_INLINE GA_Offset vertexPoint(GA_Offset vertex) const
Given a vertex, return the point it references.
#define SYS_DEPRECATED_HDK(__V__)
GA_Detail & getDetail() const
Get the geometry being loaded.
void swapVertices(GA_Size i, GA_Size j)
static const UT_Array< GA_AttribSaveDataH9 > & theEmptySaveAttribs
Convience objects to pass as arguments to saveH9()/loadH9().
GA_Size findVertex(GA_Offset vtx) const
return the index of a vertex within our vertex list
FMT_CONSTEXPR bool find(Ptr first, Ptr last, T value, Ptr &out)
GLuint GLuint GLsizei count
Class to store JSON objects as C++ objects.
Container class for all geometry.
SYS_FORCE_INLINE GA_Size getFastVertexCount() const
Definition of a geometric primitive.
friend std::ostream & operator<<(std::ostream &os, const GEO_TriMesh &d)
static GA_IntrinsicManager::Registrar registerIntrinsics(GA_PrimitiveDefinition &defn)
int evaluatePointV4(UT_Vector4 &pos, float u, float v=0, unsigned du=0, unsigned dv=0) const override
virtual GA_Size getMinVertexCount() const
virtual int evaluatePointV4(UT_Vector4 &pos, float u, float v=0, unsigned du=0, unsigned dv=0) const
SYS_FORCE_INLINE void setSize(GA_Size nvertices)