11 #ifndef __GEO_PrimTriBezier__
12 #define __GEO_PrimTriBezier__
31 #if !GA_PRIMITIVE_VERTEXLIST
38 return *theDefinition;
44 void fillArray(
int fakeorder,
UT_Vector4 *array)
const;
45 void fillArray(
int fakeorder,
const GA_Offset *results,
84 #if !GA_PRIMITIVE_VERTEXLIST
91 void setOrder(
int order);
105 bool dry_run=
false)
override;
107 bool dry_run=
false)
override;
109 #if GA_PRIMITIVE_VERTEXLIST
117 virtual void beginVertex(const_iterator &i)
const;
118 virtual void nextVertex(const_iterator &i)
const;
123 if (i < myVertexList.entries())
130 {
return getRawIndex(row, col,
myOrder); }
132 {
return (order - row)*(order-row-1)/2 + col; }
143 i = getRawIndex(i, j);
144 if (i < myVertexList.entries())
148 #if !GA_PRIMITIVE_VERTEXLIST
150 virtual void stashed(
bool beingstashed,
155 void *
data = 0)
const;
163 template <
typename T>
164 bool evaluateMesh(
int ndivs,
177 bool appendPts =
true);
184 void normal(NormalComp &output)
const override;
185 void normal(NormalCompD &output)
const override;
188 #if !GA_PRIMITIVE_VERTEXLIST
195 template <
typename T>
198 template <
typename T,
typename NORMALCOMP>
199 void internalComputeNormal(NORMALCOMP &output)
const;
205 virtual
bool savePrivateH9(std::ostream & ,
int )
const
211 virtual bool validate()
const;
219 {
return vertexPoint(getRawIndex(i, j)); }
226 GA_Size i = getRawIndex(i1, j1);
230 myVertexList.set(j, tmp);
233 #if !GA_PRIMITIVE_VERTEXLIST
238 #if !GA_PRIMITIVE_VERTEXLIST
250 float u,
float v = 0,
251 unsigned du=0,
unsigned dv = 0)
const override;
262 friend class GU_PrimitiveFactory;
fpreal calcPerimeter() const override
GA_Offset vertexPoint(GA_Size i, GA_Size j) const
bool saveH9(std::ostream &os, bool binary, const UT_Array< GA_AttribSaveDataH9 > &prim_attribs, const UT_Array< GA_AttribSaveDataH9 > &vtx_attribs) const override
virtual GEO_Primitive * copy(int preserve_shared_pts=0) const
SYS_FORCE_INLINE GA_Offset getPointOffset(GA_Size i) const
virtual UT_Vector3 baryCenter() const
SYS_FORCE_INLINE GA_Detail & getDetail() const
virtual void copyPrimitive(const GEO_Primitive *src)=0
virtual void clearForDeletion()
Used to pass options and map offset values during saving.
SYS_FORCE_INLINE GA_Size getVertexCount() const
Return the number of vertices used by this primitive.
const GA_PrimitiveDefinition & getTypeDef() const override
virtual void computeInteriorPointWeights(UT_Array< GA_Offset > &vtxlist, UT_Array< float > &weightlist, fpreal u, fpreal v, fpreal w) const
virtual UT_Vector3D computeNormalD() const =0
#define SYS_DEPRECATED_PUSH_DISABLE()
#define SYS_DEPRECATED_POP_DISABLE()
virtual void copySubclassData(const GA_Primitive *source)
const GLuint GLenum const void * binary
fpreal calcVolume(const UT_Vector3 &) const override
virtual GA_DereferenceStatus dereferencePoint(GA_Offset point, bool dry_run=false)=0
JSON reader class which handles parsing of JSON or bJSON files.
void reverse() override=0
Reverse the order of vertices.
#define GA_DECLARE_INTRINSICS(OVERRIDE)
Class which writes ASCII or binary JSON streams.
Abstract base class for a range membership query object.
void swapVertices(GA_Size i1, GA_Size j1, GA_Size i2, GA_Size j2)
virtual int64 getMemoryUsage() const
fpreal calcArea() const override
UT_Vector3 getPos3(GA_Size i, GA_Size j) const
virtual void swapVertexOffsets(const GA_Defragment &defrag)
void wireVertex(GA_Offset vertex, GA_Offset point)
exint GA_Size
Defines the bit width for index and offset types in GA.
virtual bool loadH9(UT_IStream &is, const UT_Array< GA_AttribLoadDataH9 > &prim_attribs, const UT_Array< GA_AttribLoadDataH9 > &vtx_attribs)
virtual UT_Vector3 computeNormal() const =0
Return a normal vector for the primitive.
#define GA_INVALID_OFFSET
virtual void normal(NormalComp &output) const =0
GA_OffsetList myVertexList
void setVertexPoint(GA_Size i, GA_Offset pt)
virtual bool isDegenerate() const =0
Is the primitive degenerate.
friend std::ostream & operator<<(std::ostream &os, const GEO_PrimTriBezier &d)
void setPos3(GA_Size i, GA_Size j, const UT_Vector3 &pos) const
SYS_FORCE_INLINE UT_Vector3 getPos3(GA_Size i) const
GA_Size getRawIndex(GA_Size row, GA_Size col, int order) const
virtual void countMemory(UT_MemoryCounter &counter) const
virtual const GA_PrimitiveJSON * getJSON() const =0
GLsizei GLsizei GLchar * source
Provide a JSON interface to a primitive.
GLdouble GLdouble GLint GLint order
A handle to simplify manipulation of multiple attributes.
Defragmentation of IndexMaps.
SYS_FORCE_INLINE GA_Offset vertexPoint(GA_Offset vertex) const
Given a vertex, return the point it references.
void addPointRefToGroup(GA_PointGroup &grp) const
virtual GA_DereferenceStatus dereferencePoints(const GA_RangeMemberQuery &pt_q, bool dry_run=false)=0
virtual bool saveH9(std::ostream &os, bool binary, const UT_Array< GA_AttribSaveDataH9 > &prim_attribs, const UT_Array< GA_AttribSaveDataH9 > &vtx_attribs) const
SYS_FORCE_INLINE void setPos3(GA_Size i, const UT_Vector3 &pos) const
virtual bool evaluateBaryCenterRefMap(GA_Offset result_vtx, GA_AttributeRefMap &map) const
GA_OffsetList myVertexList
virtual bool vertexApply(bool(*apply)(GA_Offset vtx, void *), void *data=0) const
GLfloat GLfloat GLfloat GLfloat h
GA_Offset getPointOffset(GA_Size i, GA_Size j) const
GEO_PrimTriBezier(GA_Detail *d, GA_Offset offset=GA_INVALID_OFFSET)
GA_Offset getVertexOffset(GA_Size i, GA_Size j) const
virtual int detachPoints(GA_PointGroup &grp)=0
static const UT_Array< GA_AttribSaveDataH9 > & theEmptySaveAttribs
Convience objects to pass as arguments to saveH9()/loadH9().
virtual bool getBBox(UT_BoundingBox *bbox) const =0
GLint GLint GLint GLint j2
SYS_FORCE_INLINE GA_Offset getVertexOffset(GA_Size primvertexnum) const
Class to store JSON objects as C++ objects.
virtual bool evaluatePointRefMap(GA_Offset result_vtx, GA_AttributeRefMap &map, fpreal u, fpreal v=0, uint du=0, uint dv=0) const =0
static GA_PrimitiveFamilyMask buildFamilyMask()
virtual void addToBSphere(UT_BoundingSphere *bsphere) const
GA_Offset vertexPoint(GA_Size i) const
Container class for all geometry.
virtual GEO_Primitive * convert(GEO_ConvertParms &parms, GA_PointGroup *usedpts=0)=0
GLubyte GLubyte GLubyte GLubyte w
Specialization of GA_ROGenericHandle for GA_ATTRIB_VERTEX offsets.
GLenum GLenum GLsizei void * row
Definition of a geometric primitive.
void setVertexPoint(GA_Size i, GA_Size j, GA_Offset pt)
virtual int evaluatePointV4(UT_Vector4 &pos, float u, float v=0, unsigned du=0, unsigned dv=0) const
virtual GEO_Primitive * convertNew(GEO_ConvertParms &parms)=0
virtual void stashed(bool beingstashed, GA_Offset offset=GA_INVALID_OFFSET)
GA_Size getRawIndex(GA_Size row, GA_Size col) const
virtual bool loadPrivateH9(UT_IStream &)