11 #ifndef __GEO_PrimSphere_H__
12 #define __GEO_PrimSphere_H__
20 #define GEO_SPHERE_XSECT_XP 0
21 #define GEO_SPHERE_XSECT_XN 1
22 #define GEO_SPHERE_XSECT_YP 2
23 #define GEO_SPHERE_XSECT_YN 3
24 #define GEO_SPHERE_XSECT_ZP 4
25 #define GEO_SPHERE_XSECT_ZN 5
27 #define GEO_SPHERE_GUIDEEDGE_X 0
28 #define GEO_SPHERE_GUIDEEDGE_Y 1
29 #define GEO_SPHERE_GUIDEEDGE_Z 2
47 float v = 0,
float w = 0)
const override;
100 unsigned du,
unsigned dv)
const override;
103 unsigned du=0,
unsigned dv=0)
const override;
fpreal calcPerimeter() const override
fpreal calcVolume(const UT_Vector3 &) const override
static GA_Offset buildBlock(GA_Detail &detail, GA_Size nspheres, bool append_points=true)
GLboolean GLboolean GLboolean GLboolean a
GEO_PrimSphere(GEO_Detail *d, GA_Offset offset=GA_INVALID_OFFSET)
SYS_FORCE_INLINE TO_T UTverify_cast(FROM_T from)
fpreal calcArea() const override
exint GA_Size
Defines the bit width for index and offset types in GA.
#define GA_INVALID_OFFSET
~GEO_PrimSphere() override
static GA_IntrinsicManager::Registrar registerIntrinsics(GA_PrimitiveDefinition &defn)
static GA_Offset buildBlock(GA_Detail &detail, GA_PrimitiveTypeId type, GA_Size nprims, bool append_points=true)
virtual const GA_PrimitiveJSON * getJSON() const =0
Provide a JSON interface to a primitive.
static GA_PrimitiveFamilyMask buildFamilyMask()
A handle to simplify manipulation of multiple attributes.
GLboolean GLboolean GLboolean b
static GEO_PrimSphere * build(GA_Detail &detail, GA_Offset existing_ptoff=GA_INVALID_OFFSET)
static const UT_Array< GA_AttribSaveDataH9 > & theEmptySaveAttribs
Convience objects to pass as arguments to saveH9()/loadH9().
bool saveH9(std::ostream &os, bool binary, const UT_Array< GA_AttribSaveDataH9 > &prim_attribs, const UT_Array< GA_AttribSaveDataH9 > &vtx_attribs) const override
static GA_PrimitiveFamilyMask buildFamilyMask()
Return the family mask for all quadric sub-classes.
virtual int evaluateNormalVector(UT_Vector3 &nml, float u, float v=0, float w=0) const
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.
GLubyte GLubyte GLubyte GLubyte w
friend std::ostream & operator<<(std::ostream &os, const GEO_PrimSphere &d)
Definition of a geometric primitive.
bool getBBox(UT_BoundingBox *bbox) const override=0
virtual bool hasGuideEdge(int edgeid, UT_Vector3 &a, UT_Vector3 &b) const
static GA_IntrinsicManager::Registrar registerIntrinsics(GA_PrimitiveDefinition &defn)
static GEO_Quadric * build(GA_Detail &detail, GA_PrimitiveTypeId type, GA_Offset existing_ptoff=GA_INVALID_OFFSET)
virtual int evaluatePointV4(UT_Vector4 &pos, float u, float v=0, unsigned du=0, unsigned dv=0) const
virtual bool hasXsectPoint(int pointid, UT_Vector3 &p) const