GEO_PrimSphere Class Reference

#include <GEO_PrimSphere.h>

Inheritance diagram for GEO_PrimSphere:

GEO_Quadric GEO_Primitive GA_Primitive GEO_PrimMetaBall GEO_PrimMetaSQuad GU_PrimSphere GU_PrimMetaBall GU_PrimMetaSQuad

List of all members.

Public Member Functions

 GEO_PrimSphere (GEO_Detail *d, GA_Offset offset=GA_INVALID_OFFSET)
virtual ~GEO_PrimSphere ()
virtual int64 getMemoryUsage () const
 Report approximate memory usage.
virtual int evaluateNormalVector (UT_Vector3 &nml, float u, float v=0) const
virtual int getBBox (UT_BoundingBox *bbox) const
virtual void addToBSphere (UT_BoundingSphere *bsphere) const
virtual int hasGuideEdge (int edgeid, UT_Vector4 &a, UT_Vector4 &b) const
virtual int hasXsectPoint (int pointid, UT_Vector4 &p) const
virtual fpreal calcVolume (const UT_Vector3 &refpt) const
virtual fpreal calcArea () const
virtual fpreal calcPerimeter () const
virtual const GA_PrimitiveJSONgetJSON () const

Protected Member Functions

 GEO_PrimSphere (const GA_MergeMap &map, GEO_Detail &detail, GA_Offset offset, const GEO_PrimSphere &src)
virtual void getUnitBoundingBox (UT_BoundingBox &box) const
 Return a bounding box for the "unit" primitive (i.e. untransformed).
virtual bool evaluatePointRefMap (GA_Offset result_vtx, GA_AttributeRefMap &hlist, fpreal u, fpreal v, unsigned du, unsigned dv) const
virtual int evaluatePointV4 (UT_Vector4 &pos, float u, float v=0, unsigned du=0, unsigned dv=0) const

Static Protected Member Functions

static GA_PrimitiveFamilyMask buildFamilyMask ()
 Return the family mask for all quadric sub-classes.
static
GA_IntrinsicManager::Registrar 
registerIntrinsics (GA_PrimitiveDefinition &defn)

Friends

ostream & operator<< (ostream &os, const GEO_PrimSphere &d)


Detailed Description

Definition at line 39 of file GEO_PrimSphere.h.


Constructor & Destructor Documentation

GEO_PrimSphere::GEO_PrimSphere ( GEO_Detail d,
GA_Offset  offset = GA_INVALID_OFFSET 
)

virtual GEO_PrimSphere::~GEO_PrimSphere (  )  [virtual]

GEO_PrimSphere::GEO_PrimSphere ( const GA_MergeMap map,
GEO_Detail detail,
GA_Offset  offset,
const GEO_PrimSphere src 
) [inline, protected]

Definition at line 66 of file GEO_PrimSphere.h.


Member Function Documentation

virtual void GEO_PrimSphere::addToBSphere ( UT_BoundingSphere bsphere  )  const [virtual]

Enlarge the bounding sphere with the primitive's bounds. By default, this will enlarge the bounding sphere by the primitive's bounding box (i.e. getBBox()). It may be possible to have a tighter bound (i.e. the vertex hull for many primitives is a much better metric).

Reimplemented from GEO_Primitive.

static GA_PrimitiveFamilyMask GEO_PrimSphere::buildFamilyMask (  )  [inline, static, protected]

Return the family mask for all quadric sub-classes.

Reimplemented from GEO_Quadric.

Reimplemented in GEO_PrimMetaBall, and GEO_PrimMetaSQuad.

Definition at line 72 of file GEO_PrimSphere.h.

virtual fpreal GEO_PrimSphere::calcArea (  )  const [virtual]

If the method isn't known, or doesn't make sense, we return 0.

Reimplemented from GEO_Primitive.

virtual fpreal GEO_PrimSphere::calcPerimeter (  )  const [virtual]

If the method isn't known, or doesn't make sense, we return 0.

Reimplemented from GEO_Primitive.

virtual fpreal GEO_PrimSphere::calcVolume ( const UT_Vector3  )  const [virtual]

If the method isn't known, or doesn't make sense, we return 0.

Reimplemented from GEO_Primitive.

virtual int GEO_PrimSphere::evaluateNormalVector ( UT_Vector3 nml,
float  u,
float  v = 0 
) const [virtual]

Reimplemented from GEO_Primitive.

virtual bool GEO_PrimSphere::evaluatePointRefMap ( GA_Offset  result_vtx,
GA_AttributeRefMap hlist,
fpreal  u,
fpreal  v,
unsigned  du,
unsigned  dv 
) const [protected, virtual]

virtual int GEO_PrimSphere::evaluatePointV4 ( UT_Vector4 pos,
float  u,
float  v = 0,
unsigned  du = 0,
unsigned  dv = 0 
) const [protected, virtual]

Evaluate the position for the given parametric coordinates (with the given derivatives). Return 0 if successful, or -1 if failure. The default implementation returns {0,0,0,0};

Reimplemented from GEO_Primitive.

virtual int GEO_PrimSphere::getBBox ( UT_BoundingBox bbox  )  const [virtual]

Compute the bounding box of the primitive. Return 0 if unable to compute bounds (1 on successful computation)

Implements GEO_Quadric.

virtual const GA_PrimitiveJSON* GEO_PrimSphere::getJSON (  )  const [virtual]

This method returns the JSON interface for saving/loading the primitive If the method returns a NULL pointer, then the primitive will not be saved to geometry files (and thus cannot be loaded).

Implements GA_Primitive.

Reimplemented in GEO_PrimMetaBall, and GEO_PrimMetaSQuad.

virtual int64 GEO_PrimSphere::getMemoryUsage (  )  const [virtual]

Report approximate memory usage.

Implements GA_Primitive.

Reimplemented in GEO_PrimMetaBall, and GEO_PrimMetaSQuad.

virtual void GEO_PrimSphere::getUnitBoundingBox ( UT_BoundingBox box  )  const [protected, virtual]

Return a bounding box for the "unit" primitive (i.e. untransformed).

Implements GEO_Quadric.

virtual int GEO_PrimSphere::hasGuideEdge ( int  edgeid,
UT_Vector4 a,
UT_Vector4 b 
) const [virtual]

Reimplemented from GEO_Primitive.

virtual int GEO_PrimSphere::hasXsectPoint ( int  pointid,
UT_Vector4 p 
) const [virtual]

Reimplemented from GEO_Primitive.

static GA_IntrinsicManager::Registrar GEO_PrimSphere::registerIntrinsics ( GA_PrimitiveDefinition defn  )  [inline, static, protected]

All subclasses should call this method to register the sphere intrinsics.

See also:
GA_AttributeIntrinsic

Reimplemented from GEO_Quadric.

Reimplemented in GEO_PrimMetaBall, and GEO_PrimMetaSQuad.

Definition at line 79 of file GEO_PrimSphere.h.


Friends And Related Function Documentation

ostream& operator<< ( ostream &  os,
const GEO_PrimSphere d 
) [friend]

Definition at line 97 of file GEO_PrimSphere.h.


The documentation for this class was generated from the following file:

Generated on Thu Jan 31 00:31:11 2013 for HDK by  doxygen 1.5.9