HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
GABC_NAMESPACE::GABC_Util Class Reference

#include <GABC_Util.h>

Classes

class  ArchiveEventHandler
 Event functor called when an archive is flushed from the cache. More...
 
class  CollisionResolver
 Class to efficiently find a new name when a collision is detected. More...
 
class  Walker
 

Public Types

typedef Alembic::Abc::index_t index_t
 
typedef Alembic::Abc::chrono_t chrono_t
 
typedef
Alembic::Abc::TimeSamplingPtr 
TimeSamplingPtr
 
typedef Alembic::Abc::V3d V3d
 
typedef Alembic::Abc::Box3d Box3d
 
typedef Alembic::Abc::M44d M44d
 
typedef
Alembic::Abc::ICompoundProperty 
ICompoundProperty
 
typedef
Alembic::Abc::OCompoundProperty 
OCompoundProperty
 
typedef
Alembic::Abc::OScalarProperty 
OScalarProperty
 
typedef
Alembic::Abc::OArrayProperty 
OArrayProperty
 
typedef
Alembic::Abc::ObjectReaderPtr 
ObjectReaderPtr
 
typedef UT_SharedPtr
< ArchiveEventHandler
ArchiveEventHandlerPtr
 
typedef UT_Map< std::string,
GABC_OProperty * > 
PropertyMap
 
typedef std::pair< std::string,
GABC_OProperty * > 
PropertyMapInsert
 
typedef std::vector< std::stringPathList
 

Static Public Member Functions

static const char * getAlembicCompileNamespace ()
 Get Alembic namespace name as string. More...
 
static Box3d getBox (const UT_BoundingBox &box)
 Create a Box3d from a UT_BoundingBox. More...
 
static UT_BoundingBox getBox (const Box3d &box)
 Create a UT_BoundingBox from a Box3d. More...
 
static void clearCache (const char *filename=NULL)
 
static void setFileCacheSize (int nfiles)
 Set the cache size. More...
 
static int fileCacheSize ()
 Get the file cache size. More...
 
static bool addEventHandler (const std::string &filename, const ArchiveEventHandlerPtr &handler)
 
static GABC_IObject findObject (const std::string &filename, const std::string &objectpath)
 Find a given GABC_IObject in an Alembic file. More...
 
static GABC_IObject findObject (const std::string &filename, ObjectReaderPtr reader)
 
static const PathListgetObjectList (const std::string &filename, bool include_face_sets=false)
 Return a list of all the objects in an Alembic file. More...
 
static UT_Matrix4D getM (const M44d &m)
 Create a UT_Matrix4D from an M44d. More...
 
static M44d getM (const UT_Matrix4D &m)
 Create an M44d from a UT_Matrix4D. More...
 
static bool getLocalTransform (const std::string &filename, const std::string &objectpath, fpreal sample_time, UT_Matrix4D &xform, bool &isConstant, bool &inheritsXform)
 
static bool getWorldTransform (const std::string &filename, const std::string &objectpath, fpreal sample_time, UT_Matrix4D &xform, bool &isConstant, bool &inheritsXform)
 
static bool getWorldTransform (const GABC_IObject &object, fpreal sample_time, UT_Matrix4D &xform, bool &isConstant, bool &inheritsXform)
 
static bool isTransformAnimated (const GABC_IObject &object)
 Test whether an object is static or has an animated transform. More...
 
static GABC_VisibilityType getVisibility (const GABC_IObject &object, fpreal sample_time, bool &animated, bool check_parent)
 Get the visibility for a GABC_IObject. More...
 
static bool walk (const std::string &filename, Walker &walker)
 
static bool walk (const std::string &filename, Walker &walker, const UT_StringArray &objects)
 
static bool walk (const std::string &filename, Walker &walker, const UT_Set< std::string > &objects)
 
static bool isABCPropertyAnimated (ICompoundProperty arb)
 
static bool isABCPropertyConstant (ICompoundProperty arb)
 
static bool importUserPropertyDictionary (UT_JSONWriter *data_writer, UT_JSONWriter *meta_writer, const GABC_IObject &obj, fpreal time)
 
static bool exportUserPropertyDictionary (UT_AutoJSONParser &meta_data, UT_AutoJSONParser &vals_data, PropertyMap &up_map, OCompoundProperty *ancestor, GABC_OError &err, const GABC_OOptions &ctx)
 
static fpreal getSampleIndex (fpreal t, const TimeSamplingPtr &itime, exint nsamp, index_t &i0, index_t &i1)
 

Static Public Attributes

static const UT_StringHolder theLockGeometryParameter
 
static const UT_StringHolder theUserPropsValsAttrib
 
static const UT_StringHolder theUserPropsMetaAttrib
 

Detailed Description

Definition at line 49 of file GABC_Util.h.

Member Typedef Documentation

typedef Alembic::Abc::Box3d GABC_NAMESPACE::GABC_Util::Box3d

Definition at line 59 of file GABC_Util.h.

typedef Alembic::Abc::M44d GABC_NAMESPACE::GABC_Util::M44d

Definition at line 60 of file GABC_Util.h.

Definition at line 71 of file GABC_Util.h.

Definition at line 70 of file GABC_Util.h.

typedef Alembic::Abc::V3d GABC_NAMESPACE::GABC_Util::V3d

Definition at line 58 of file GABC_Util.h.

Member Function Documentation

static bool GABC_NAMESPACE::GABC_Util::addEventHandler ( const std::string filename,
const ArchiveEventHandlerPtr handler 
)
static

Add an event handler to be notified of events on the given filename The method returns false if the archive hasn't been loaded yet.

static void GABC_NAMESPACE::GABC_Util::clearCache ( const char *  filename = NULL)
static

Clear the cache. If no filename is given, the entire cache will be cleared.

static bool GABC_NAMESPACE::GABC_Util::exportUserPropertyDictionary ( UT_AutoJSONParser meta_data,
UT_AutoJSONParser vals_data,
PropertyMap up_map,
OCompoundProperty ancestor,
GABC_OError err,
const GABC_OOptions ctx 
)
static

Export user properties from two JSON dictionaries (one containing values, the other containing metadata used to interpret the values) to GABC_OProperties, and store them in the given map.

static int GABC_NAMESPACE::GABC_Util::fileCacheSize ( )
static

Get the file cache size.

static GABC_IObject GABC_NAMESPACE::GABC_Util::findObject ( const std::string filename,
const std::string objectpath 
)
static

Find a given GABC_IObject in an Alembic file.

static GABC_IObject GABC_NAMESPACE::GABC_Util::findObject ( const std::string filename,
ObjectReaderPtr  reader 
)
static
static const char* GABC_NAMESPACE::GABC_Util::getAlembicCompileNamespace ( )
static

Get Alembic namespace name as string.

static Box3d GABC_NAMESPACE::GABC_Util::getBox ( const UT_BoundingBox box)
inlinestatic

Create a Box3d from a UT_BoundingBox.

Definition at line 195 of file GABC_Util.h.

static UT_BoundingBox GABC_NAMESPACE::GABC_Util::getBox ( const Box3d box)
inlinestatic

Create a UT_BoundingBox from a Box3d.

Definition at line 201 of file GABC_Util.h.

static bool GABC_NAMESPACE::GABC_Util::getLocalTransform ( const std::string filename,
const std::string objectpath,
fpreal  sample_time,
UT_Matrix4D xform,
bool &  isConstant,
bool &  inheritsXform 
)
static

Get the local transform for a given node in an Alembic file. The isConstant flag will be true if the local transform is constant (even if parent transforms are non-constant).

static UT_Matrix4D GABC_NAMESPACE::GABC_Util::getM ( const M44d m)
inlinestatic

Create a UT_Matrix4D from an M44d.

Definition at line 246 of file GABC_Util.h.

static M44d GABC_NAMESPACE::GABC_Util::getM ( const UT_Matrix4D m)
inlinestatic

Create an M44d from a UT_Matrix4D.

Definition at line 251 of file GABC_Util.h.

static const PathList& GABC_NAMESPACE::GABC_Util::getObjectList ( const std::string filename,
bool  include_face_sets = false 
)
static

Return a list of all the objects in an Alembic file.

static fpreal GABC_NAMESPACE::GABC_Util::getSampleIndex ( fpreal  t,
const TimeSamplingPtr itime,
exint  nsamp,
index_t i0,
index_t i1 
)
static

Gets the samples indices (i0 and i1) corresponding to time 't'. The bias for blending the samples is returned.

static GABC_VisibilityType GABC_NAMESPACE::GABC_Util::getVisibility ( const GABC_IObject object,
fpreal  sample_time,
bool &  animated,
bool  check_parent 
)
static

Get the visibility for a GABC_IObject.

static bool GABC_NAMESPACE::GABC_Util::getWorldTransform ( const std::string filename,
const std::string objectpath,
fpreal  sample_time,
UT_Matrix4D xform,
bool &  isConstant,
bool &  inheritsXform 
)
static

Get the world transform for a given node in an Alembic file. If the given node is a shape node, the transform up to its parent will be computed. If the transform is constant (including all parents), the isConstant flag will be set.

The method returns false if there was an error computing the transform.

static bool GABC_NAMESPACE::GABC_Util::getWorldTransform ( const GABC_IObject object,
fpreal  sample_time,
UT_Matrix4D xform,
bool &  isConstant,
bool &  inheritsXform 
)
static

Get the world transform for a GABC_IObject in an Alembic file. If the given node is a shape node, the transform up to its parent will be returned.

static bool GABC_NAMESPACE::GABC_Util::importUserPropertyDictionary ( UT_JSONWriter data_writer,
UT_JSONWriter meta_writer,
const GABC_IObject obj,
fpreal  time 
)
static

Import user properties into two JSON dictionaries, one containing values and another containing the metadata for the properties.

static bool GABC_NAMESPACE::GABC_Util::isABCPropertyAnimated ( ICompoundProperty  arb)
static

Check whether or not an Alembic compound property (like arbGeomParams or user properties) is constant/animated over time.

static bool GABC_NAMESPACE::GABC_Util::isABCPropertyConstant ( ICompoundProperty  arb)
static
static bool GABC_NAMESPACE::GABC_Util::isTransformAnimated ( const GABC_IObject object)
static

Test whether an object is static or has an animated transform.

static void GABC_NAMESPACE::GABC_Util::setFileCacheSize ( int  nfiles)
static

Set the cache size.

static bool GABC_NAMESPACE::GABC_Util::walk ( const std::string filename,
Walker walker 
)
static

Walk the tree in an alembic file. Returns false if traversal was interrupted, otherwise returns true.

static bool GABC_NAMESPACE::GABC_Util::walk ( const std::string filename,
Walker walker,
const UT_StringArray objects 
)
static

Process a list of unique objects in an Alembic file (including their children)

static bool GABC_NAMESPACE::GABC_Util::walk ( const std::string filename,
Walker walker,
const UT_Set< std::string > &  objects 
)
static

Member Data Documentation

const UT_StringHolder GABC_NAMESPACE::GABC_Util::theLockGeometryParameter
static

Definition at line 351 of file GABC_Util.h.

const UT_StringHolder GABC_NAMESPACE::GABC_Util::theUserPropsMetaAttrib
static

Definition at line 353 of file GABC_Util.h.

const UT_StringHolder GABC_NAMESPACE::GABC_Util::theUserPropsValsAttrib
static

Definition at line 352 of file GABC_Util.h.


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