HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GU_PackedDiskSequence Class Reference

Geometry file procedural. More...

#include <GU_PackedDiskSequence.h>

+ Inheritance diagram for GU_PackedDiskSequence:

Public Types

using this_type = GU_PackedDiskSequence
 
using parent_type = GU_PackedSequence
 
using CacheItem = GU_PackedDisk::CacheItem
 
- Public Types inherited from GU_PackedSequence
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 UT_OptionsHolder(GU_PackedImpl::* DictGetter )(const GU_PrimPacked *) const
 
typedef void(GU_PackedImpl::* DictSetter )(GU_PrimPacked *, const UT_OptionsHolder &)
 
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 UT_OptionsHolder(GU_PackedImpl::* DictTupleGetter )(const GU_PrimPacked *, exint) const
 
typedef void(GU_PackedImpl::* DictTupleSetter )(GU_PrimPacked *, exint, const UT_OptionsHolder &)
 
typedef const std::string
&(GU_PackedImpl::* 
StdStringTupleGetter )(const GU_PrimPacked *, exint) const
 
typedef void(GU_PackedImpl::* StdStringTupleSetter )(GU_PrimPacked *, exint, const std::string &)
 
typedef const 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 &)
 
typedef void(GU_PackedImpl::* DictArrayGetter )(const GU_PrimPacked *, UT_Array< UT_OptionsHolder > &) const
 
typedef void(GU_PackedImpl::* DictArraySetter )(GU_PrimPacked *, const UT_Array< UT_OptionsHolder > &)
 

Public Member Functions

 GU_PackedDiskSequence ()
 
 GU_PackedDiskSequence (const GU_PackedDiskSequence &src)
 
 ~GU_PackedDiskSequence () override
 
UT_StringHolder filename (exint index) const
 
GU_ConstDetailHandle getPointCloud () const
 
InstanceKey getInstanceKey (exint quanize_steps) const override
 
GU_ConstDetailHandle getClosestGeometry (fpreal t) const
 
GU_PackedFactorygetFactory () const override
 
GU_PackedImplcopy () const override
 
void clearData () override
 
bool isValid () const override
 
bool load (GU_PrimPacked *prim, const UT_Options &options, const GA_LoadMap &map) override
 
bool supportsJSONLoad () const override
 
bool loadFromJSON (GU_PrimPacked *prim, const UT_JSONValueMap &options, const GA_LoadMap &map) override
 
void update (GU_PrimPacked *prim, const UT_Options &options) override
 
bool save (UT_Options &options, const GA_SaveMap &map) const override
 
bool isLoaded () const override
 
int64 getMemoryUsage (bool inclusive) const override
 Report memory usage (includes all shared memory) More...
 
void countMemory (UT_MemoryCounter &counter, bool inclusive) const override
 
void filenames (UT_StringArray &files) const
 
void intrinsicFilenames (const GU_PrimPacked *prim, UT_StringArray &files) const
 
void setFilenames (GU_PrimPacked *prim, const UT_StringArray &files)
 
- Public Member Functions inherited from GU_PackedSequence
 GU_PackedSequence ()
 
 GU_PackedSequence (const GU_PackedSequence &src)
 
 ~GU_PackedSequence () override
 
exint intrinsicSequenceSize (const GU_PrimPacked *prim) const
 
GU_ConstDetailHandle getBlendedDetail (fpreal t) const
 Get a detail handle representing the interpolated sub-frame geometry. More...
 
InstanceKey getUniqueInstanceKey (exint quantize_steps) const
 
bool isValid () const override
 
bool getBounds (UT_BoundingBox &box) const override
 
bool getRenderingBounds (UT_BoundingBox &box) const override
 
void getVelocityRange (UT_Vector3 &min, UT_Vector3 &max) const override
 
void getWidthRange (fpreal &min, fpreal &max) const override
 
bool unpack (GU_Detail &destgdp, const UT_Matrix4D *transform) const override
 
GU_ConstDetailHandle getPackedDetail (GU_PackedContext *c=nullptr) const override
 
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 ()
 
virtual ~GU_PackedImpl ()
 
 GU_PackedImpl (const GU_PackedImpl &src)=default
 
GU_PackedImploperator= (const GU_PackedImpl &src)=default
 
virtual bool saveSharedData (UT_JSONWriter &w, GA_SaveMap &map, GA_GeometryIndex *geo_index) const
 
virtual bool loadSharedData (int load_data_type, const GA_SharedLoadData *item)
 
virtual bool loadUnknownToken (const char *token, UT_JSONParser &p, const GA_LoadMap &map)
 
bool getBoundsCached (UT_BoundingBox &box) const
 
virtual bool getVisibleBounds (UT_BoundingBox &box) const
 
bool getVisibleBoundsCached (UT_BoundingBox &box) const
 
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 GU_PrimPacked *prim) const
 
bool unpack (GU_Detail &destgdp, const GU_PrimPacked *prim) const
 
virtual bool unpackWithStyler (GU_Detail &destgdp, STY_StylerGroup &prim_styler_group, const STY_Styler &parent_styler, const GU_PrimPacked *prim) const
 
virtual void forceLoad () const
 
virtual bool unpackUsingPolygons (GU_Detail &destgdp, const GU_PrimPacked *prim) 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...
 
virtual bool saveCachedBBox () const
 
virtual void setFacesetAttribute (const UT_StringHolder &s)
 
virtual const UT_StringHolderfacesetAttribute () const
 
virtual void setAttributeNameMap (const GEO_PackedNameMapPtr &m)
 
virtual const
GEO_PackedNameMapPtr
attributeNameMap () const
 
virtual void setSharedNameMapData (GA_SharedDataHandlePtr s)
 
SYS_FORCE_INLINE bool isShared () const
 
SYS_FORCE_INLINE GU_PackedImplcopyIfShared ()
 
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)
 
- Public Member Functions inherited from UT_IntrusiveRefCounter< GU_PackedImpl >
SYS_FORCE_INLINE UT_IntrusiveRefCounter () noexcept
 Default constructor: Sets counter to 0. More...
 
SYS_FORCE_INLINE UT_IntrusiveRefCounter (const UT_IntrusiveRefCounter &) noexcept
 Copy constructor: Sets counter to 0. More...
 
UT_IntrusiveRefCounteroperator= (const UT_IntrusiveRefCounter &) noexcept
 Assignment operator: Does not modify counter. More...
 
SYS_FORCE_INLINE uint32 use_count () const noexcept
 Return current counter. More...
 
SYS_FORCE_INLINE bool conditionalAddRef () noexcept
 

Static Public Member Functions

static GU_PrimPackedpackedDiskSequence (GU_Detail &dest, const UT_StringArray &filenames, fpreal index, WrapMode wrap)
 
static void install (GA_PrimitiveFactory *prim)
 Install the procedural. More...
 
static GA_PrimitiveTypeId typeId ()
 Get the type ID for the GU_PackedDiskSequence primitive type. More...
 
- 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)
 

Protected Member Functions

template<typename T >
bool loadFrom (GU_PrimPacked *prim, const T &options, const GA_LoadMap &map)
 
exint sequenceSize () const override
 Subclass returns the number of pieces of geometry in the sequence. More...
 
bool sequenceBounds (exint index, UT_BoundingBox &box) const override
 
bool sequenceVisibleBounds (exint index, UT_BoundingBox &box) const override
 
void sequenceVelocityRange (exint index, UT_Vector3 &min, UT_Vector3 &max) const override
 
void sequenceWidthRange (exint index, fpreal &min, fpreal &max) const override
 
GU_ConstDetailHandle sequencePointCloud (exint index) const override
 Subclass method to get point geometry for the n'th item. More...
 
GU_ConstDetailHandle sequenceGeometry (exint index) const override
 Subclass to return the geometry for the n'th item. More...
 
- Protected Member Functions inherited from GU_PackedSequence
bool getTimeSample (TimeSample &sample, fpreal t) const
 
bool getTimeSample (TimeSample &sample) const
 
void storeData (UT_Options &options) const
 
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
virtual bool unpackWithPrim (GU_Detail &destgdp, const UT_Matrix4D *transform, const GU_PrimPacked *prim) const
 
const UT_BoundingBoxboxCache () const
 
void setBoxCache (const UT_BoundingBox &b)
 
template<typename T >
void setBoxCache (const T b[6])
 
void clearBoxCache ()
 
bool unpackToDetail (GU_Detail &destgdp, GU_Detail *src, const UT_Matrix4D *transform) const
 
bool unpackToDetail (GU_Detail &destgdp, const GU_Detail *src, const UT_Matrix4D *transform) const
 
bool unpackToDetail (GU_Detail &destgdp, const GU_ConstDetailHandle &gdh, const UT_Matrix4D *transform) 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...
 
- Protected Member Functions inherited from UT_IntrusiveRefCounter< GU_PackedImpl >
SYS_FORCE_INLINE ~UT_IntrusiveRefCounter ()
 Destructor: Only derived classes can destruct this. More...
 

Protected Attributes

UT_Array< CacheItemmyCache
 

Additional Inherited Members

- Static Protected Member Functions inherited from GU_PackedImpl
static void copyPrimitiveGroups (GU_Detail &dest, const GU_Detail &src, GA_Offset src_offset, bool force=false)
 
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)
 
- Static Protected Attributes inherited from GU_PackedImpl
static const GEO_PackedNameMapPtr theNullPackedNameMapPtr
 

Detailed Description

Geometry file procedural.

Definition at line 23 of file GU_PackedDiskSequence.h.

Member Typedef Documentation

Constructor & Destructor Documentation

GU_PackedDiskSequence::GU_PackedDiskSequence ( )
GU_PackedDiskSequence::GU_PackedDiskSequence ( const GU_PackedDiskSequence src)
GU_PackedDiskSequence::~GU_PackedDiskSequence ( )
override

Member Function Documentation

void GU_PackedDiskSequence::clearData ( )
overridevirtual

Implementation of GU_PackedImpl interface

Implements GU_PackedImpl.

GU_PackedImpl* GU_PackedDiskSequence::copy ( ) const
overridevirtual

Implementation of GU_PackedImpl interface

Implements GU_PackedImpl.

void GU_PackedDiskSequence::countMemory ( UT_MemoryCounter counter,
bool  inclusive 
) const
overridevirtual

Count memory usage using a UT_MemoryCounter in order to count shared memory correctly.

Implements GU_PackedImpl.

UT_StringHolder GU_PackedDiskSequence::filename ( exint  index) const
void GU_PackedDiskSequence::filenames ( UT_StringArray files) const

Member data accessors for intrinsics

GU_ConstDetailHandle GU_PackedDiskSequence::getClosestGeometry ( fpreal  t) const
GU_PackedFactory* GU_PackedDiskSequence::getFactory ( ) const
overridevirtual

Implementation of GU_PackedImpl interface

Implements GU_PackedImpl.

InstanceKey GU_PackedDiskSequence::getInstanceKey ( exint  quantize_steps) const
overridevirtual

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 from GU_PackedSequence.

int64 GU_PackedDiskSequence::getMemoryUsage ( bool  inclusive) const
overridevirtual

Report memory usage (includes all shared memory)

Implements GU_PackedImpl.

GU_ConstDetailHandle GU_PackedDiskSequence::getPointCloud ( ) const
static void GU_PackedDiskSequence::install ( GA_PrimitiveFactory prim)
static

Install the procedural.

void GU_PackedDiskSequence::intrinsicFilenames ( const GU_PrimPacked prim,
UT_StringArray files 
) const
inline

Member data accessors for intrinsics

Definition at line 84 of file GU_PackedDiskSequence.h.

bool GU_PackedDiskSequence::isLoaded ( ) const
overridevirtual

Implementation of GU_PackedImpl interface

Reimplemented from GU_PackedImpl.

bool GU_PackedDiskSequence::isValid ( ) const
overridevirtual

Implementation of GU_PackedImpl interface

Implements GU_PackedImpl.

bool GU_PackedDiskSequence::load ( GU_PrimPacked prim,
const UT_Options options,
const GA_LoadMap map 
)
inlineoverridevirtual

Implementation of GU_PackedImpl interface

Implements GU_PackedImpl.

Definition at line 55 of file GU_PackedDiskSequence.h.

template<typename T >
bool GU_PackedDiskSequence::loadFrom ( GU_PrimPacked prim,
const T options,
const GA_LoadMap map 
)
protected
bool GU_PackedDiskSequence::loadFromJSON ( GU_PrimPacked prim,
const UT_JSONValueMap options,
const GA_LoadMap map 
)
inlineoverridevirtual

Implementation of GU_PackedImpl interface

Reimplemented from GU_PackedImpl.

Definition at line 61 of file GU_PackedDiskSequence.h.

static GU_PrimPacked* GU_PackedDiskSequence::packedDiskSequence ( GU_Detail dest,
const UT_StringArray filenames,
fpreal  index,
WrapMode  wrap 
)
static

Convenience method to create a packed primitive in the destination detail.

Returns a NULL pointer if the process fails.

Examples:
packedprim/packedprim.C.
bool GU_PackedDiskSequence::save ( UT_Options options,
const GA_SaveMap map 
) const
overridevirtual

Implementation of GU_PackedImpl interface

Implements GU_PackedImpl.

bool GU_PackedDiskSequence::sequenceBounds ( exint  index,
UT_BoundingBox box 
) const
overrideprotectedvirtual

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

Implements GU_PackedSequence.

GU_ConstDetailHandle GU_PackedDiskSequence::sequenceGeometry ( exint  index) const
overrideprotectedvirtual

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

Implements GU_PackedSequence.

GU_ConstDetailHandle GU_PackedDiskSequence::sequencePointCloud ( exint  index) const
overrideprotectedvirtual

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

Implements GU_PackedSequence.

exint GU_PackedDiskSequence::sequenceSize ( ) const
overrideprotectedvirtual

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

Implements GU_PackedSequence.

void GU_PackedDiskSequence::sequenceVelocityRange ( exint  index,
UT_Vector3 min,
UT_Vector3 max 
) const
overrideprotectedvirtual

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

Implements GU_PackedSequence.

bool GU_PackedDiskSequence::sequenceVisibleBounds ( exint  index,
UT_BoundingBox box 
) const
overrideprotectedvirtual

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

Implements GU_PackedSequence.

void GU_PackedDiskSequence::sequenceWidthRange ( exint  index,
fpreal min,
fpreal max 
) const
overrideprotectedvirtual

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

Implements GU_PackedSequence.

void GU_PackedDiskSequence::setFilenames ( GU_PrimPacked prim,
const UT_StringArray files 
)

Member data accessors for intrinsics

bool GU_PackedDiskSequence::supportsJSONLoad ( ) const
inlineoverridevirtual

Implementation of GU_PackedImpl interface

Reimplemented from GU_PackedImpl.

Definition at line 60 of file GU_PackedDiskSequence.h.

static GA_PrimitiveTypeId GU_PackedDiskSequence::typeId ( )
inlinestatic

Get the type ID for the GU_PackedDiskSequence primitive type.

Definition at line 46 of file GU_PackedDiskSequence.h.

void GU_PackedDiskSequence::update ( GU_PrimPacked prim,
const UT_Options options 
)
overridevirtual

Implementation of GU_PackedImpl interface

Implements GU_PackedImpl.

Member Data Documentation

UT_Array<CacheItem> GU_PackedDiskSequence::myCache
protected

Definition at line 120 of file GU_PackedDiskSequence.h.


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