GEO_PrimTube Class Reference

#include <GEO_PrimTube.h>

Inheritance diagram for GEO_PrimTube:

GEO_Quadric GEO_Primitive GA_Primitive GU_PrimTube

List of all members.

Public Member Functions

 GEO_PrimTube (GEO_Detail *d, GA_Offset offset=GA_INVALID_OFFSET)
 ~GEO_PrimTube ()
virtual int64 getMemoryUsage () const
 Report approximate memory usage.
virtual int getBBox (UT_BoundingBox *bbox) const
virtual void addToBSphere (UT_BoundingSphere *bsphere) const
virtual GEO_Primitivecopy (int preserve_shared_pts=0) const
virtual void copyPrimitive (const GEO_Primitive *src, GEO_Point **ptredirect)
virtual void copyUnwiredForMerge (const GA_Primitive *src, const GA_MergeMap &map)
virtual int hasGuideEdge (int edgeid, UT_Vector4 &a, UT_Vector4 &b) const
virtual int hasXsectPoint (int pointid, UT_Vector4 &p) const
unsigned endcaps (void) const
void setEndCaps (int onOff)
float getTaper (void) const
void setTaper (float t)
float getCaptureRegionWeight (const UT_Vector3 &pos, const GA_ROAttributeRef &tubeCaptAtrOffset) const
virtual fpreal calcVolume (const UT_Vector3 &refpt) const
virtual fpreal calcArea () const
virtual fpreal calcPerimeter () const
virtual const GA_PrimitiveJSONgetJSON () const

Static Public Member Functions

static float computeCaptureRegionWeight (const UT_Vector3 &pos, float bcap, float tcap, float taperx, float taperz, float min_weight, float max_weight)

Protected Member Functions

 GEO_PrimTube (const GA_MergeMap &map, GEO_Detail &detail, GA_Offset offset, const GEO_PrimTube &src)
virtual void copyOffsetPrimitive (const GEO_Primitive *src, int basept)
virtual bool savePrivateH9 (ostream &os, bool binary) const
virtual bool loadPrivateH9 (UT_IStream &is)
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, uint du, uint dv) const
virtual int evaluatePointV4 (UT_Vector4 &pos, float u, float v=0, unsigned du=0, unsigned dv=0) const
virtual int localIntrinsicTupleSize (const GA_IntrinsicEval &eval) const
virtual int localGetIntrinsicF (const GA_IntrinsicEval &eval, fpreal *v, GA_Size size) const
virtual int localSetIntrinsicF (const GA_IntrinsicEval &eval, const fpreal *v, GA_Size size)
virtual int localGetIntrinsicI (const GA_IntrinsicEval &eval, int64 *v, GA_Size size) const
virtual int localSetIntrinsicI (const GA_IntrinsicEval &eval, const int64 *v, GA_Size size)

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_PrimTube &d)


Detailed Description

Definition at line 78 of file GEO_PrimTube.h.


Constructor & Destructor Documentation

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

GEO_PrimTube::~GEO_PrimTube (  ) 

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


Member Function Documentation

virtual void GEO_PrimTube::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_PrimTube::buildFamilyMask (  )  [inline, static, protected]

Return the family mask for all quadric sub-classes.

Reimplemented from GEO_Quadric.

Definition at line 136 of file GEO_PrimTube.h.

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

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

Reimplemented from GEO_Primitive.

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

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

Reimplemented from GEO_Primitive.

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

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

Reimplemented from GEO_Primitive.

static float GEO_PrimTube::computeCaptureRegionWeight ( const UT_Vector3 pos,
float  bcap,
float  tcap,
float  taperx,
float  taperz,
float  min_weight,
float  max_weight 
) [static]

virtual GEO_Primitive* GEO_PrimTube::copy ( int  preserve_shared_pts = 0  )  const [virtual]

Reimplemented from GEO_Quadric.

virtual void GEO_PrimTube::copyOffsetPrimitive ( const GEO_Primitive src,
int  basept 
) [protected, virtual]

Reimplemented from GEO_Quadric.

virtual void GEO_PrimTube::copyPrimitive ( const GEO_Primitive src,
GEO_Point **  ptredirect 
) [virtual]

Reimplemented from GEO_Quadric.

virtual void GEO_PrimTube::copyUnwiredForMerge ( const GA_Primitive src,
const GA_MergeMap map 
) [virtual]

Copy the specified primitive as part of the merge. The source primitive will be of the same type.

Since the vertex offsets will change for the merged geometry, the map should be used to lookup the new vertex offsets. For example

    map.mapDestFromSource( GA_ATTRIB_VERTEX, source_vertex );

See also:
GA_MergeMap

Reimplemented from GEO_Quadric.

unsigned GEO_PrimTube::endcaps ( void   )  const [inline]

Definition at line 103 of file GEO_PrimTube.h.

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

Implements GEO_Primitive.

virtual int GEO_PrimTube::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_PrimTube::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.

float GEO_PrimTube::getCaptureRegionWeight ( const UT_Vector3 pos,
const GA_ROAttributeRef tubeCaptAtrOffset 
) const

virtual const GA_PrimitiveJSON* GEO_PrimTube::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.

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

Report approximate memory usage.

Implements GA_Primitive.

float GEO_PrimTube::getTaper ( void   )  const [inline]

Definition at line 105 of file GEO_PrimTube.h.

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

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

Implements GEO_Quadric.

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

Reimplemented from GEO_Primitive.

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

Reimplemented from GEO_Primitive.

virtual bool GEO_PrimTube::loadPrivateH9 ( UT_IStream is  )  [protected, virtual]

Reimplemented from GEO_Quadric.

virtual int GEO_PrimTube::localGetIntrinsicF ( const GA_IntrinsicEval eval,
fpreal v,
GA_Size  size 
) const [protected, virtual]

Intrinsic evaluation

Reimplemented from GEO_Quadric.

virtual int GEO_PrimTube::localGetIntrinsicI ( const GA_IntrinsicEval eval,
int64 v,
GA_Size  size 
) const [protected, virtual]

Intrinsic evaluation

Reimplemented from GA_Primitive.

virtual int GEO_PrimTube::localIntrinsicTupleSize ( const GA_IntrinsicEval eval  )  const [protected, virtual]

Intrinsic evaluation

Reimplemented from GEO_Quadric.

virtual int GEO_PrimTube::localSetIntrinsicF ( const GA_IntrinsicEval eval,
const fpreal v,
GA_Size  size 
) [protected, virtual]

Intrinsic evaluation

Reimplemented from GEO_Quadric.

virtual int GEO_PrimTube::localSetIntrinsicI ( const GA_IntrinsicEval eval,
const int64 v,
GA_Size  size 
) [protected, virtual]

Intrinsic evaluation

Reimplemented from GA_Primitive.

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

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

See also:
GA_IntrinsicManager

Reimplemented from GEO_Quadric.

virtual bool GEO_PrimTube::savePrivateH9 ( ostream &  os,
bool  binary 
) const [protected, virtual]

Reimplemented from GEO_Quadric.

void GEO_PrimTube::setEndCaps ( int  onOff  )  [inline]

Definition at line 104 of file GEO_PrimTube.h.

void GEO_PrimTube::setTaper ( float  t  )  [inline]

Definition at line 106 of file GEO_PrimTube.h.


Friends And Related Function Documentation

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

Definition at line 184 of file GEO_PrimTube.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