13 #ifndef __GEO_TriMesh__
14 #define __GEO_TriMesh__
47 bool saveH9(std::ostream &os,
bool binary,
74 bool isDegenerate()
const override;
79 { setNumVertices(nvertices); }
91 GA_DereferenceStatus dereferencePoint(
GA_Offset point,
92 bool dry_run=
false)
override;
94 bool dry_run=
false)
override;
101 virtual int deleteVertex(
GA_Size num);
124 {
return myVertexList.size(); }
128 UT_ASSERT_P(index >= 0 && index < myVertexList.size());
129 return myVertexList(index);
139 {
return getVertexElement(i); }
142 {
return getVertexElement(i); }
145 {
return getVertexElement(i); }
148 {
return getVertexElement(i); }
152 if (i < myVertexList.entries())
153 wireVertex(myVertexList(i), pt);
157 virtual bool vertexApply(
bool (*apply)(
GA_Offset vtx,
void *),
158 void *
data = 0) const final;
162 void unitLengthToUnitPair(
163 float ulength,
float vlength,
164 float &uparm,
float &vparm) const override;
165 void unitLengthToUnitPair(
166 float ulength,
float vlength,
167 float &uparm,
float &vparm,
168 float tolerance) const override;
170 void unitToUnitLengthPair(
171 float uparm,
float vparm,
172 float &ulength,
float &vlength) const override;
184 bool destroy_existing = true,
185 bool update_topology = true);
196 virtual bool savePrivateH9(std::ostream &os,
bool binary)
const = 0;
197 virtual bool loadPrivateH9(
UT_IStream &is) = 0;
201 virtual bool validate()
const;
210 bool append_pointsss =
true);
221 myVertexList.set(i, myVertexList(j));
222 myVertexList.set(j, tmp);
225 bool evaluatePointRefMap(
232 float u,
float v = 0,
233 unsigned du=0,
unsigned dv=0)
const override
236 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()
const GLuint GLenum const void * binary
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
bool saveH9(std::ostream &os, bool binary, const UT_Array< GA_AttribSaveDataH9 > &prim_attribs, const UT_Array< GA_AttribSaveDataH9 > &vtx_attribs) const override
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
Class to store JSON objects as C++ objects.
Container class for all geometry.
GLubyte GLubyte GLubyte GLubyte w
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)
FMT_CONSTEXPR auto find(Ptr first, Ptr last, T value, Ptr &out) -> bool