HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
GU_PackedSequence Class Referenceabstract

The base class for a sequence of packed geometry. More...

#include <GU_PackedSequence.h>

+ Inheritance diagram for GU_PackedSequence:

Classes

class  InstanceKey
 
class  SingleItemKey
 
class  TimeSample
 

Public Types

enum  WrapMode { WRAP_CYCLE, WRAP_CLAMP, WRAP_STRICT, WRAP_MIRROR }
 
- Public Types inherited from GU_PackedImpl
typedef fpreal(GU_PackedImpl::* FloatGetter )(const GU_PrimPacked *) const
 
typedef void(GU_PackedImpl::* FloatSetter )(const GU_PrimPacked *, fpreal)
 
typedef GA_Size(GU_PackedImpl::* IntGetter )(const GU_PrimPacked *) const
 
typedef void(GU_PackedImpl::* IntSetter )(GU_PrimPacked *, GA_Size)
 
typedef bool(GU_PackedImpl::* BoolGetter )(const GU_PrimPacked *) const
 
typedef void(GU_PackedImpl::* BoolSetter )(GU_PrimPacked *, bool)
 
typedef const char
*(GU_PackedImpl::* 
StringGetter )(const GU_PrimPacked *) const
 
typedef void(GU_PackedImpl::* StringSetter )(GU_PrimPacked *, const char *)
 
typedef std::string(GU_PackedImpl::* StdStringGetter )(const GU_PrimPacked *) const
 
typedef void(GU_PackedImpl::* StdStringSetter )(GU_PrimPacked *, const std::string &)
 
typedef UT_StringHolder(GU_PackedImpl::* StringHolderGetter )(const GU_PrimPacked *) const
 
typedef void(GU_PackedImpl::* StringHolderSetter )(GU_PrimPacked *, const UT_StringHolder &)
 
typedef fpreal(GU_PackedImpl::* FloatTupleGetter )(const GU_PrimPacked *, exint) const
 
typedef void(GU_PackedImpl::* FloatTupleSetter )(GU_PrimPacked *, exint, fpreal)
 
typedef GA_Size(GU_PackedImpl::* IntTupleGetter )(const GU_PrimPacked *, exint) const
 
typedef void(GU_PackedImpl::* IntTupleSetter )(GU_PrimPacked *, exint, GA_Size)
 
typedef bool(GU_PackedImpl::* BoolTupleGetter )(const GU_PrimPacked *, exint) const
 
typedef void(GU_PackedImpl::* BoolTupleSetter )(GU_PrimPacked *, exint, bool)
 
typedef const char
*(GU_PackedImpl::* 
StringTupleGetter )(const GU_PrimPacked *, exint) const
 
typedef void(GU_PackedImpl::* StringTupleSetter )(GU_PrimPacked *, exint, const char *)
 
typedef std::string(GU_PackedImpl::* StdStringTupleGetter )(const GU_PrimPacked *, exint) const
 
typedef void(GU_PackedImpl::* StdStringTupleSetter )(GU_PrimPacked *, exint, const std::string &)
 
typedef UT_StringHolder(GU_PackedImpl::* StringHolderTupleGetter )(const GU_PrimPacked *, exint) const
 
typedef void(GU_PackedImpl::* StringHolderTupleSetter )(GU_PrimPacked *, exint, const UT_StringHolder &)
 
typedef void(GU_PackedImpl::* F32VectorGetter )(const GU_PrimPacked *, fpreal32 *, exint) const
 
typedef void(GU_PackedImpl::* F32VectorSetter )(GU_PrimPacked *, const fpreal32 *, exint)
 
typedef void(GU_PackedImpl::* F64VectorGetter )(const GU_PrimPacked *, fpreal64 *, exint) const
 
typedef void(GU_PackedImpl::* F64VectorSetter )(GU_PrimPacked *, const fpreal64 *, exint)
 
typedef void(GU_PackedImpl::* I32VectorGetter )(const GU_PrimPacked *, int32 *, exint) const
 
typedef void(GU_PackedImpl::* I32VectorSetter )(GU_PrimPacked *, const int32 *, exint)
 
typedef void(GU_PackedImpl::* I64VectorGetter )(const GU_PrimPacked *, int64 *, exint) const
 
typedef void(GU_PackedImpl::* I64VectorSetter )(GU_PrimPacked *, const int64 *, exint)
 
typedef void(GU_PackedImpl::* BVectorGetter )(const GU_PrimPacked *, bool *, exint) const
 
typedef void(GU_PackedImpl::* BVectorSetter )(GU_PrimPacked *, const bool *, exint)
 
typedef void(GU_PackedImpl::* StringArrayGetter )(const GU_PrimPacked *, UT_StringArray &) const
 
typedef void(GU_PackedImpl::* StringArraySetter )(GU_PrimPacked *, const UT_StringArray &)
 

Public Member Functions

 GU_PackedSequence ()
 
 GU_PackedSequence (const GU_PackedSequence &src)
 
virtual ~GU_PackedSequence ()
 
virtual exint sequenceSize () const =0
 Subclass returns the number of pieces of geometry in the sequence. More...
 
exint intrinsicSequenceSize (const GU_PrimPacked *prim) const
 
GU_ConstDetailHandle getBlendedDetail (fpreal t) const
 Get a detail handle representing the interpolated sub-frame geometry. More...
 
virtual InstanceKey getInstanceKey (exint quantize_steps) const
 
InstanceKey getUniqueInstanceKey (exint quantize_steps) const
 
virtual bool isValid () const
 
virtual bool getBounds (UT_BoundingBox &box) const
 
virtual bool getRenderingBounds (UT_BoundingBox &box) const
 
virtual void getVelocityRange (UT_Vector3 &min, UT_Vector3 &max) const
 
virtual void getWidthRange (fpreal &min, fpreal &max) const
 
virtual bool unpack (GU_Detail &destgdp) const
 
virtual GU_ConstDetailHandle getPackedDetail (GU_PackedContext *c=nullptr) const
 
fpreal index () const
 
exint wrappedIndex () const
 
fpreal intrinsicIndex (const GU_PrimPacked *prim) const
 
UT_StringHolder wrapModeLabel () const
 
UT_StringHolder intrinsicWrapModeLabel (const GU_PrimPacked *prim) const
 
WrapMode wrapMode () const
 
void setIndex (GU_PrimPacked *prim, fpreal f)
 
void setWrapMode (GU_PrimPacked *prim, WrapMode w)
 
void setWrapMode (GU_PrimPacked *prim, const UT_StringHolder &mode)
 
- Public Member Functions inherited from GU_PackedImpl
 GU_PackedImpl ()
 
 GU_PackedImpl (const GU_PackedImpl &src)
 
virtual ~GU_PackedImpl ()
 
virtual GU_PackedFactorygetFactory () const =0
 Get the factory associated with this procedural. More...
 
virtual GU_PackedImplcopy () const =0
 Create a copy of this resolver. More...
 
virtual void clearData ()=0
 
virtual bool load (GU_PrimPacked *prim, const UT_Options &options, const GA_LoadMap &map)=0
 Give a UT_Options of load data, create resolver data for the primitive. More...
 
virtual bool supportsJSONLoad () const
 
virtual bool loadFromJSON (GU_PrimPacked *prim, const UT_JSONValueMap &options, const GA_LoadMap &map)
 
virtual void update (GU_PrimPacked *prim, const UT_Options &options)=0
 
virtual bool saveSharedData (UT_JSONWriter &w, GA_SaveMap &map, GA_GeometryIndex *geometryIndex) const
 
virtual bool loadSharedData (int load_data_type, const GA_SharedLoadData *item)
 
virtual bool save (UT_Options &options, const GA_SaveMap &map) const =0
 Copy the resolver data into the UT_Options for saving. More...
 
virtual bool loadUnknownToken (const char *token, UT_JSONParser &p, const GA_LoadMap &map)
 
virtual void getPrimitiveName (const GU_PrimPacked *prim, UT_WorkBuffer &wbuf) const
 
virtual bool getLocalTransform (UT_Matrix4D &m) const
 
virtual bool unpackWithContext (GU_Detail &destgdp, GU_PackedContext &context) const
 
virtual bool unpackWithStyler (GU_Detail &destgdp, STY_StylerGroup &prim_styler_group, const STY_Styler &parent_styler) const
 
virtual void forceLoad () const
 
virtual bool isLoaded () const
 
virtual bool unpackUsingPolygons (GU_Detail &destgdp) const
 
bool pointInstanceTransform () const
 
bool intrinsicPointInstanceTransform (const GU_PrimPacked *prim) const
 
void setPointInstanceTransform (GU_PrimPacked *prim, bool b)
 Set whether point instancing should be used. More...
 
void topologyDirty ()
 Indicate that topology and attributes are dirty. More...
 
GU_PrimPackedgetPrim ()
 
const GU_PrimPackedgetPrim () const
 
virtual int64 getMemoryUsage (bool inclusive) const =0
 Report memory usage (includes all shared memory) More...
 
virtual void countMemory (UT_MemoryCounter &counter, bool inclusive) const =0
 
virtual bool saveCachedBBox () const
 
int64 intrinsic3Tuple (const GU_PrimPacked *prim) const
 
int64 intrinsic6Tuple (const GU_PrimPacked *prim) const
 
int64 intrinsic9Tuple (const GU_PrimPacked *prim) const
 
int64 intrinsic16Tuple (const GU_PrimPacked *prim) const
 
std::string intrinsicPrimitiveName (const GU_PrimPacked *prim) const
 
const char * intrinsicFactoryName (const GU_PrimPacked *prim) const
 
const char * intrinsicFactoryLabel (const GU_PrimPacked *prim) const
 
void intrinsicPackedBox (const GU_PrimPacked *prim, fpreal64 *vals, exint sz) const
 
void intrinsicPackedRenderBox (const GU_PrimPacked *prim, fpreal64 *vals, exint sz) const
 
void intrinsicPivot (const GU_PrimPacked *prim, fpreal64 *vals, exint sz) const
 
void intrinsicSetPivot (GU_PrimPacked *prim, const fpreal64 *vals, exint sz)
 
void intrinsicPrimTransform (const GU_PrimPacked *prim, fpreal64 *vals, exint sz) const
 
void intrinsicSetPrimTransform (GU_PrimPacked *prim, const fpreal64 *v, exint sz)
 
void intrinsicPackedTransform (const GU_PrimPacked *prim, fpreal64 *v, exint sz) const
 
void intrinsicFullTransform (const GU_PrimPacked *prim, fpreal64 *v, exint sz) const
 
const char * intrinsicViewportLOD (const GU_PrimPacked *prim) const
 
void intrinsicSetViewportLOD (GU_PrimPacked *prim, const char *lod)
 

Protected Member Functions

bool getTimeSample (TimeSample &sample, fpreal t) const
 
bool getTimeSample (TimeSample &sample) const
 
virtual GU_ConstDetailHandle sequencePointCloud (exint index) const =0
 Subclass method to get point geometry for the n'th item. More...
 
virtual GU_ConstDetailHandle sequenceGeometry (exint index) const =0
 Subclass to return the geometry for the n'th item. More...
 
void storeData (UT_Options &options) const
 
virtual bool sequenceBounds (exint index, UT_BoundingBox &box) const =0
 
virtual void sequenceVelocityRange (exint index, UT_Vector3 &min, UT_Vector3 &max) const =0
 
virtual void sequenceWidthRange (exint index, fpreal &min, fpreal &max) const =0
 
bool updateData (GU_PrimPacked *prim, const UT_JSONValueMap &options)
 
bool updateData (GU_PrimPacked *prim, const UT_Options &options)
 
- Protected Member Functions inherited from GU_PackedImpl
void copyPrimitiveGroups (GU_Detail &dest, bool force=false) const
 
bool unpackToDetail (GU_Detail &destgdp, GU_Detail *src, bool do_transform=true) const
 
bool unpackToDetail (GU_Detail &destgdp, const GU_Detail *src, bool do_transform=true) const
 
bool unpackToDetail (GU_Detail &destgdp, const GU_ConstDetailHandle &gdh, bool do_transform=true) const
 Unpack the source detail handle. More...
 
virtual UT_Vector3 getBaryCenter () const
 Optional method to compute centroid (default uses bounding box) More...
 
virtual fpreal computeVolume (const UT_Vector3 &refpt) const
 Optional method to calculate volume (default uses bounding box) More...
 
virtual fpreal computeArea () const
 Optional method to calculate surface area (default uses bounding box) More...
 
virtual fpreal computePerimeter () const
 Optional method to calculate perimeter (default uses bounding box) More...
 
void setBoxCache (const UT_BoundingBox &box) const
 Set the bounding box cache for the primitive. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from GU_PackedImpl
static bool computeVelocityRange (const GU_Detail *gdp, UT_Vector3 &vmin, UT_Vector3 &vmax)
 
static bool computeWidthRange (const GU_Detail *gdp, fpreal &wmin, fpreal &wmax)
 
- Static Protected Member Functions inherited from GU_PackedImpl
template<typename T >
static bool import (const UT_JSONValueMap &options, const UT_StringRef &key, T &value)
 
template<typename T >
static bool import (const UT_Options &options, const UT_StringRef &key, T &value)
 

Detailed Description

The base class for a sequence of packed geometry.

Definition at line 22 of file GU_PackedSequence.h.

Member Enumeration Documentation

Enumerator
WRAP_CYCLE 
WRAP_CLAMP 
WRAP_STRICT 
WRAP_MIRROR 

Definition at line 25 of file GU_PackedSequence.h.

Constructor & Destructor Documentation

GU_PackedSequence::GU_PackedSequence ( )
GU_PackedSequence::GU_PackedSequence ( const GU_PackedSequence src)
inline

Definition at line 125 of file GU_PackedSequence.h.

virtual GU_PackedSequence::~GU_PackedSequence ( )
virtual

Member Function Documentation

GU_ConstDetailHandle GU_PackedSequence::getBlendedDetail ( fpreal  t) const

Get a detail handle representing the interpolated sub-frame geometry.

virtual bool GU_PackedSequence::getBounds ( UT_BoundingBox box) const
virtual

Implementation of API on GU_PackedImpl

Implements GU_PackedImpl.

virtual InstanceKey GU_PackedSequence::getInstanceKey ( exint  quantize_steps) const
virtual

Method to get an identifying key for the item. This is used to create shared instances where possible. By default, the key will be a unique string.

Reimplemented in GU_PackedDiskSequence.

virtual GU_ConstDetailHandle GU_PackedSequence::getPackedDetail ( GU_PackedContext c = nullptr) const
virtual

Implementation of API on GU_PackedImpl

Reimplemented from GU_PackedImpl.

virtual bool GU_PackedSequence::getRenderingBounds ( UT_BoundingBox box) const
virtual

Implementation of API on GU_PackedImpl

Implements GU_PackedImpl.

bool GU_PackedSequence::getTimeSample ( TimeSample sample,
fpreal  t 
) const
protected

Get time sample. Returns false if the index is invalid. The time sample will be initialized with the two indices for blending as well as the blending amount.

bool GU_PackedSequence::getTimeSample ( TimeSample sample) const
inlineprotected

Definition at line 188 of file GU_PackedSequence.h.

InstanceKey GU_PackedSequence::getUniqueInstanceKey ( exint  quantize_steps) const

Make a unique instance key for this primitive. This can be used to prevent any possible sharing of

virtual void GU_PackedSequence::getVelocityRange ( UT_Vector3 min,
UT_Vector3 max 
) const
virtual

Implementation of API on GU_PackedImpl

Implements GU_PackedImpl.

virtual void GU_PackedSequence::getWidthRange ( fpreal min,
fpreal max 
) const
virtual

Implementation of API on GU_PackedImpl

Implements GU_PackedImpl.

fpreal GU_PackedSequence::index ( void  ) const
inline

Member data accessors for intrinsics

Definition at line 166 of file GU_PackedSequence.h.

fpreal GU_PackedSequence::intrinsicIndex ( const GU_PrimPacked prim) const
inline

Member data accessors for intrinsics

Definition at line 173 of file GU_PackedSequence.h.

exint GU_PackedSequence::intrinsicSequenceSize ( const GU_PrimPacked prim) const
inline

Definition at line 136 of file GU_PackedSequence.h.

UT_StringHolder GU_PackedSequence::intrinsicWrapModeLabel ( const GU_PrimPacked prim) const
inline

Member data accessors for intrinsics

Definition at line 175 of file GU_PackedSequence.h.

virtual bool GU_PackedSequence::isValid ( ) const
virtual

Implementation of API on GU_PackedImpl

Implements GU_PackedImpl.

Reimplemented in GU_PackedDiskSequence.

virtual bool GU_PackedSequence::sequenceBounds ( exint  index,
UT_BoundingBox box 
) const
protectedpure virtual

Methods to get information about individual items in the sequence Subclass method to query the bounding box for the given item

Implemented in GU_PackedDiskSequence.

virtual GU_ConstDetailHandle GU_PackedSequence::sequenceGeometry ( exint  index) const
protectedpure virtual

Subclass to return the geometry for the n'th item.

Implemented in GU_PackedDiskSequence.

virtual GU_ConstDetailHandle GU_PackedSequence::sequencePointCloud ( exint  index) const
protectedpure virtual

Subclass method to get point geometry for the n'th item.

Implemented in GU_PackedDiskSequence.

virtual exint GU_PackedSequence::sequenceSize ( ) const
pure virtual

Subclass returns the number of pieces of geometry in the sequence.

Implemented in GU_PackedDiskSequence.

virtual void GU_PackedSequence::sequenceVelocityRange ( exint  index,
UT_Vector3 min,
UT_Vector3 max 
) const
protectedpure virtual

Methods to get information about individual items in the sequence Subclass method to query the bounding box for the given item

Implemented in GU_PackedDiskSequence.

virtual void GU_PackedSequence::sequenceWidthRange ( exint  index,
fpreal min,
fpreal max 
) const
protectedpure virtual

Methods to get information about individual items in the sequence Subclass method to query the bounding box for the given item

Implemented in GU_PackedDiskSequence.

void GU_PackedSequence::setIndex ( GU_PrimPacked prim,
fpreal  f 
)

Member data accessors for intrinsics

void GU_PackedSequence::setWrapMode ( GU_PrimPacked prim,
WrapMode  w 
)

Member data accessors for intrinsics

void GU_PackedSequence::setWrapMode ( GU_PrimPacked prim,
const UT_StringHolder mode 
)

Member data accessors for intrinsics

void GU_PackedSequence::storeData ( UT_Options options) const
protected
virtual bool GU_PackedSequence::unpack ( GU_Detail destgdp) const
virtual

Implementation of API on GU_PackedImpl

Implements GU_PackedImpl.

bool GU_PackedSequence::updateData ( GU_PrimPacked prim,
const UT_JSONValueMap options 
)
protected

update index/wrap from the options (returns true if data changed)

bool GU_PackedSequence::updateData ( GU_PrimPacked prim,
const UT_Options options 
)
protected

update index/wrap from the options (returns true if data changed)

WrapMode GU_PackedSequence::wrapMode ( ) const
inline

Member data accessors for intrinsics

Definition at line 177 of file GU_PackedSequence.h.

UT_StringHolder GU_PackedSequence::wrapModeLabel ( ) const

Member data accessors for intrinsics

exint GU_PackedSequence::wrappedIndex ( ) const
inline

Member data accessors for intrinsics

Definition at line 167 of file GU_PackedSequence.h.


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