10 #ifndef __GD_Primitive_H__
11 #define __GD_Primitive_H__
34 virtual int evaluatePoint(
UT_Vector3 &pos,
float u,
35 unsigned du = 0)
const;
43 virtual int visibleBaryCenter(
float &uctr,
float &vctr)
const;
56 #if !GA_PRIMITIVE_VERTEXLIST
60 #if !GA_PRIMITIVE_VERTEXLIST
63 void *
data = 0)
const = 0;
75 {
return GA_Primitive::registerIntrinsics(definition); }
86 void jsonSave(std::ostream &os)
const;
static GA_IntrinsicManager::Registrar registerIntrinsics(GA_PrimitiveDefinition &definition)
SYS_FORCE_INLINE GA_Size getVertexCount() const
Return the number of vertices used by this primitive.
friend std::ostream & operator<<(std::ostream &os, const GD_Primitive &d)
OIIO_UTIL_API bool copy(string_view from, string_view to, std::string &err)
exint GA_Size
Defines the bit width for index and offset types in GA.
GU_API GA_Offset getParent(const GU_Detail *gdp, const GA_Offset &node)
#define GA_INVALID_OFFSET
virtual bool isDegenerate() const =0
Is the primitive degenerate.
static const UT_Array< GA_AttribSaveDataH9 > & theEmptySaveAttribs
Convience objects to pass as arguments to saveH9()/loadH9().
virtual GA_PrimCompat::TypeMask getPrimitiveId() const
void addPointRefToGroup(GA_PointGroup &grp) const
GA_API const UT_StringHolder transform
virtual bool saveH9(std::ostream &os, bool binary, const UT_Array< GA_AttribSaveDataH9 > &prim_attribs, const UT_Array< GA_AttribSaveDataH9 > &vtx_attribs) const
bool vertexApply(bool(*apply)(GA_Offset vtx, void *), void *data=nullptr) const
Definition of a geometric primitive.