13 #ifndef __GEO_VolumeElementBase__
14 #define __GEO_VolumeElementBase__
34 virtual GA_Size getFaceCount()
const = 0;
38 virtual int getFaceIndexCount(
GA_Size faceno)
const = 0;
46 virtual GA_Size getEdgeCount()
const = 0;
49 virtual void getEdgeIndices(
GA_Size edgeno,
int &e0,
int &e1)
const = 0;
52 for (
GA_Size i = 0, nedge = getEdgeCount(); i < nedge; ++i)
55 getEdgeIndices(i, i0, i1);
58 if ((edge.
p0() == p0 && edge.
p1() == p1) ||
59 (edge.
p0() == p1 && edge.
p1() == p0))
67 for (
int i = 0, nedge = getEdgeCount(); i < nedge; ++i)
70 getEdgeIndices(i, i0, i1);
81 for (
int i = 0, nedge = getEdgeCount(); i < nedge; ++i)
84 getEdgeIndices(i, i0, i1);
87 if (!apply_func(i0, i1) || !apply_func(i1, i0))
99 #if !GA_PRIMITIVE_VERTEXLIST
103 void *
data = 0)
const;
124 const int *primpointnumbers);
143 float u,
float v = 0,
144 unsigned du=0,
unsigned dv=0)
const override
SYS_FORCE_INLINE GA_Offset getPointOffset(GA_Size i) const
virtual UT_Vector3 baryCenter() const
virtual UT_Vector3D computeNormalD() const =0
int evaluatePointV4(UT_Vector4 &pos, float u, float v=0, unsigned du=0, unsigned dv=0) const override
#define SYS_DEPRECATED_PUSH_DISABLE()
#define SYS_DEPRECATED_POP_DISABLE()
UT_Function< bool(const GA_Edge &edge)> GA_IterateEdgesFunc
GA_EdgeT< GA_Offset, false > GA_Edge
exint GA_Size
Defines the bit width for index and offset types in GA.
virtual UT_Vector3 computeNormal() const =0
Return a normal vector for the primitive.
#define GA_INVALID_OFFSET
void iterateEdgesByVertex(GA_IterateEdgesByVertexFunc apply_func) const override
virtual UT_Vector3D baryCenterD() const
static GA_PrimitiveFamilyMask buildFamilyMask()
UT_Function< bool(GA_Size, GA_Size)> GA_IterateEdgesByVertexFunc
SYS_FORCE_INLINE GEO_VolumeElementBase(GA_Detail *d, GA_Offset offset=GA_INVALID_OFFSET)
A handle to simplify manipulation of multiple attributes.
void addPointRefToGroup(GA_PointGroup &grp) const
virtual bool evaluateBaryCenterRefMap(GA_Offset result_vtx, GA_AttributeRefMap &map) const
bool hasEdge(const GA_Edge &edge) const override
Method to determine if a primitive has an edge (undirected).
virtual bool vertexApply(bool(*apply)(GA_Offset vtx, void *), void *data=0) const
virtual bool getBBox(UT_BoundingBox *bbox) const =0
virtual bool evaluatePointRefMap(GA_Offset result_vtx, GA_AttributeRefMap &map, fpreal u, fpreal v=0, uint du=0, uint dv=0) const =0
virtual void addToBSphere(UT_BoundingSphere *bsphere) const
Container class for all geometry.
static GA_IntrinsicManager::Registrar registerIntrinsics(GA_PrimitiveDefinition &defn)
void iterateEdges(GA_IterateEdgesFunc apply_func) const override
Definition of a geometric primitive.
static GA_IntrinsicManager::Registrar registerIntrinsics(GA_PrimitiveDefinition &defn)
virtual int evaluatePointV4(UT_Vector4 &pos, float u, float v=0, unsigned du=0, unsigned dv=0) const