HDK
|
#include <GABC_IObject.h>
Public Types | |
enum | { GABC_LOAD_LEAN_AND_MEAN = 0x00, GABC_LOAD_ARBS = 0x01, GABC_LOAD_FACESETS = 0x02, GABC_LOAD_HOUDINI = 0x04, GABC_LOAD_FULL = 0xff, GABC_LOAD_FORCE_UNTRANSFORMED = 0x1000, GABC_LOAD_IGNORE_VISIBILITY = 0x2000, GABC_LOAD_GL_OPTIMIZED = 0x4000, GABC_LOAD_USE_GL_CACHE = 0x8000, GABC_LOAD_NO_PACKED_ATTRIBS = 0x10000 } |
using | M44d = Alembic::Abc::M44d |
using | IObject = Alembic::Abc::IObject |
using | ObjectHeader = Alembic::Abc::ObjectHeader |
using | ICompoundProperty = Alembic::Abc::ICompoundProperty |
using | PropertyHeader = Alembic::Abc::PropertyHeader |
using | TimeSamplingPtr = Alembic::Abc::TimeSamplingPtr |
using | GeometryScope = Alembic::AbcGeom::GeometryScope |
using | CompoundPropertyReaderPtr = Alembic::Abc::CompoundPropertyReaderPtr |
Public Member Functions | |
GABC_IObject () | |
GABC_IObject (const GABC_IObject &obj) | |
GABC_IObject (const GABC_IArchivePtr &arch, const IObject &obj) | |
~GABC_IObject () override | |
exint | getNumChildren () const |
Return the number of children. More... | |
GABC_IObject | getParent () const |
Get the parent. More... | |
const ObjectHeader & | getHeader () const |
Get my header. More... | |
const ObjectHeader & | getChildHeader (exint i) const |
Get the child header. More... | |
std::string | getName () const |
Get the name of the object. More... | |
const std::string & | getFullName () const |
Get the full name of the object. More... | |
std::string | getSourcePath () const |
exint | getPointCount (fpreal t) const |
Get the number of points in the shape. More... | |
bool | valid () const |
Test validity. More... | |
GABC_IObject & | operator= (const GABC_IObject &src) |
Assignment operator. More... | |
GABC_NodeType | nodeType () const |
Query the type of this node. More... | |
GABC_NodeType | getChildNodeType (exint i) const |
Query the type of a child node. More... | |
bool | isMayaLocator () const |
Query whether the node is a Maya locator. More... | |
GABC_VisibilityType | visibility (bool &animated, fpreal t, bool check_parent=false) const |
Query visibility. More... | |
GEO_AnimationType | getAnimationType (bool include_transform) const |
bool | getBoundingBox (UT_BoundingBox &box, fpreal t, bool &isConstant) const |
Get the bounding box. Returns false if there are no bounds defined. More... | |
bool | getRenderingBoundingBox (UT_BoundingBox &box, fpreal t) const |
UT_StringHolder | getAttributes (const GEO_PackedNameMapPtr &namemap, int load_style, GT_Owner owner) const |
UT_StringHolder | getFaceSets (const UT_StringHolder &attrib, fpreal t, int load_style) const |
GT_PrimitiveHandle | getPrimitive (const GA_Detail *gdp, const GA_Offset primoff, fpreal t, GEO_AnimationType &atype, const GEO_PackedNameMapPtr &namemap, const UT_StringHolder &facesetAttrib, int load_style=GABC_LOAD_FULL) const |
GT_PrimitiveHandle | updatePrimitive (const GT_PrimitiveHandle &src, const GA_Detail *gdp, const GA_Offset primoff, fpreal new_time, const GEO_PackedNameMapPtr &namemap, const UT_StringHolder &facesetAttrib, int load_style=GABC_LOAD_FULL) const |
GT_PrimitiveHandle | getPointCloud (fpreal t, GEO_AnimationType &a) const |
GT_PrimitiveHandle | getBoxGeometry (fpreal t, GEO_AnimationType &a) const |
GT_PrimitiveHandle | getCentroidGeometry (fpreal t, GEO_AnimationType &a) const |
bool | isTransformAnimated () const |
Check whether the transform (or parent transforms) is animated. More... | |
exint | getNumGeometryProperties () const |
Query the number of geometry properties. More... | |
GT_DataArrayHandle | getGeometryProperty (exint index, fpreal t, std::string &name, GeometryScope &scope, GEO_AnimationType &atype) const |
GT_DataArrayHandle | convertIProperty (ICompoundProperty &arb, const PropertyHeader &head, fpreal time, const GEO_PackedNameMapPtr &namemap, GEO_AnimationType *atype=NULL, exint expected_size=-1) const |
GT_DataArrayHandle | getPosition (fpreal t, GEO_AnimationType &atype) const |
Get position property from shape node. More... | |
GT_DataArrayHandle | getVelocity (fpreal t, GEO_AnimationType &atype) const |
Get velocity property from shape node. More... | |
GT_DataArrayHandle | getWidth (fpreal t, GEO_AnimationType &atype) const |
Get the width property from the shape node (curves/points) More... | |
GT_DataArrayHandle | getGeometryProperty (const std::string &name, fpreal t, GeometryScope &scope, GEO_AnimationType &atype) const |
exint | getNumUserProperties () const |
Get number of user properties for this node. More... | |
GT_DataArrayHandle | getUserProperty (exint index, fpreal t, std::string &name, GEO_AnimationType &atype) const |
GT_DataArrayHandle | getUserProperty (const std::string &name, fpreal t, GEO_AnimationType &atype) const |
TimeSamplingPtr | timeSampling () const |
Access the time sampling pointer. More... | |
exint | numSamples () const |
fpreal | clampTime (fpreal input_time) const |
Clamp the time to the animated time range. More... | |
bool | getPropertiesHash (int64 &hash) const |
ICompoundProperty | getUserProperties () const |
Get the user properties for this node. More... | |
std::string | getChildrenHash () const |
Get the aggregated child objects hash if it exists. More... | |
GABC_IObject | getChild (exint index) const |
GABC_IObject | getChild (const std::string &name) const |
void | purge () override |
bool | localTransform (fpreal t, UT_Matrix4D &xform, bool &isConstant, bool &inheritsXform) const |
bool | localTransform (fpreal t, M44d &xform, bool &isConstant, bool &inheritsXform) const |
const IObject & | object () const |
![]() | |
GABC_IItem (const GABC_IArchivePtr &arch=NULL) | |
GABC_IItem (const GABC_IItem &src) | |
virtual | ~GABC_IItem () |
GABC_IItem & | operator= (const GABC_IItem &src) |
const GABC_IArchivePtr & | archive () const |
void | setArchive (const GABC_IArchivePtr &a) |
Static Public Member Functions | |
static void | init () |
Initialize (called by GABC_IArchive) More... | |
Friends | |
class | GABC_IArchive |
This class wraps an Alembic IObject and provides convenience methods that allow thread-safe access to its data.
Do not grab and hold onto the contained IObject as this may cause referencing issues on archives.
Definition at line 61 of file GABC_IObject.h.
using GABC_NAMESPACE::GABC_IObject::CompoundPropertyReaderPtr = Alembic::Abc::CompoundPropertyReaderPtr |
Definition at line 71 of file GABC_IObject.h.
Definition at line 70 of file GABC_IObject.h.
Definition at line 67 of file GABC_IObject.h.
Definition at line 65 of file GABC_IObject.h.
using GABC_NAMESPACE::GABC_IObject::M44d = Alembic::Abc::M44d |
Definition at line 64 of file GABC_IObject.h.
Definition at line 66 of file GABC_IObject.h.
Definition at line 68 of file GABC_IObject.h.
Definition at line 69 of file GABC_IObject.h.
anonymous enum |
Definition at line 154 of file GABC_IObject.h.
GABC_NAMESPACE::GABC_IObject::GABC_IObject | ( | ) |
GABC_NAMESPACE::GABC_IObject::GABC_IObject | ( | const GABC_IObject & | obj | ) |
GABC_NAMESPACE::GABC_IObject::GABC_IObject | ( | const GABC_IArchivePtr & | arch, |
const IObject & | obj | ||
) |
|
override |
Clamp the time to the animated time range.
GT_DataArrayHandle GABC_NAMESPACE::GABC_IObject::convertIProperty | ( | ICompoundProperty & | arb, |
const PropertyHeader & | head, | ||
fpreal | time, | ||
const GEO_PackedNameMapPtr & | namemap, | ||
GEO_AnimationType * | atype = NULL , |
||
exint | expected_size = -1 |
||
) | const |
Convert an arbitrary property to a GT_DataArray. This handles indexed array types as well as straight data types.
This is a convenience method to extract an array given the compound property and the property header.
If supplied, the animation type is filled out.
GEO_AnimationType GABC_NAMESPACE::GABC_IObject::getAnimationType | ( | bool | include_transform | ) | const |
Get animation type for this node.
UT_StringHolder GABC_NAMESPACE::GABC_IObject::getAttributes | ( | const GEO_PackedNameMapPtr & | namemap, |
int | load_style, | ||
GT_Owner | owner | ||
) | const |
bool GABC_NAMESPACE::GABC_IObject::getBoundingBox | ( | UT_BoundingBox & | box, |
fpreal | t, | ||
bool & | isConstant | ||
) | const |
Get the bounding box. Returns false if there are no bounds defined.
GT_PrimitiveHandle GABC_NAMESPACE::GABC_IObject::getBoxGeometry | ( | fpreal | t, |
GEO_AnimationType & | a | ||
) | const |
Get a representation of the bounding box. This doesn't include any attributes.
GT_PrimitiveHandle GABC_NAMESPACE::GABC_IObject::getCentroidGeometry | ( | fpreal | t, |
GEO_AnimationType & | a | ||
) | const |
Get a point for the centroid of the bounding box. This doesn't include any attributes.
GABC_IObject GABC_NAMESPACE::GABC_IObject::getChild | ( | exint | index | ) | const |
Get the given child
GABC_IObject GABC_NAMESPACE::GABC_IObject::getChild | ( | const std::string & | name | ) | const |
Get the given child
|
inline |
Get the child header.
Definition at line 102 of file GABC_IObject.h.
GABC_NodeType GABC_NAMESPACE::GABC_IObject::getChildNodeType | ( | exint | i | ) | const |
Query the type of a child node.
std::string GABC_NAMESPACE::GABC_IObject::getChildrenHash | ( | ) | const |
Get the aggregated child objects hash if it exists.
UT_StringHolder GABC_NAMESPACE::GABC_IObject::getFaceSets | ( | const UT_StringHolder & | attrib, |
fpreal | t, | ||
int | load_style | ||
) | const |
|
inline |
Get the full name of the object.
Definition at line 109 of file GABC_IObject.h.
GT_DataArrayHandle GABC_NAMESPACE::GABC_IObject::getGeometryProperty | ( | exint | index, |
fpreal | t, | ||
std::string & | name, | ||
GeometryScope & | scope, | ||
GEO_AnimationType & | atype | ||
) | const |
Lookup the data array for the Nth geometry property at the given time.
name
parameter is filled out with the property namescope
parameter is filled out with the property scopeatype
parameter is filled out with the animation type GT_DataArrayHandle GABC_NAMESPACE::GABC_IObject::getGeometryProperty | ( | const std::string & | name, |
fpreal | t, | ||
GeometryScope & | scope, | ||
GEO_AnimationType & | atype | ||
) | const |
Lookup the data array for the named geometry property at the given time.
scope
parameter is filled out with the property scopeatype
parameter is filled out with the animation type
|
inline |
Get my header.
Definition at line 99 of file GABC_IObject.h.
|
inline |
Get the name of the object.
Definition at line 106 of file GABC_IObject.h.
exint GABC_NAMESPACE::GABC_IObject::getNumChildren | ( | ) | const |
Return the number of children.
exint GABC_NAMESPACE::GABC_IObject::getNumGeometryProperties | ( | ) | const |
Query the number of geometry properties.
exint GABC_NAMESPACE::GABC_IObject::getNumUserProperties | ( | ) | const |
Get number of user properties for this node.
|
inline |
Get the parent.
Definition at line 91 of file GABC_IObject.h.
GT_PrimitiveHandle GABC_NAMESPACE::GABC_IObject::getPointCloud | ( | fpreal | t, |
GEO_AnimationType & | a | ||
) | const |
Get a representation of the point cloud. This doesn't include any attributes.
Get the number of points in the shape.
GT_DataArrayHandle GABC_NAMESPACE::GABC_IObject::getPosition | ( | fpreal | t, |
GEO_AnimationType & | atype | ||
) | const |
Get position property from shape node.
GT_PrimitiveHandle GABC_NAMESPACE::GABC_IObject::getPrimitive | ( | const GA_Detail * | gdp, |
const GA_Offset | primoff, | ||
fpreal | t, | ||
GEO_AnimationType & | atype, | ||
const GEO_PackedNameMapPtr & | namemap, | ||
const UT_StringHolder & | facesetAttrib, | ||
int | load_style = GABC_LOAD_FULL |
||
) | const |
Get a representation of the shape. If the GA_Detail
pointer is non-NULL, the primitive attributes will be added as GT arrays.
bool GABC_NAMESPACE::GABC_IObject::getPropertiesHash | ( | int64 & | hash | ) | const |
Alembic's 128b prop hash wang'hashed to 64b. Returns false if no hash exists (getPropertiesHash() returns false, such as for HDF5).
bool GABC_NAMESPACE::GABC_IObject::getRenderingBoundingBox | ( | UT_BoundingBox & | box, |
fpreal | t | ||
) | const |
Get the bounding box for rendering (includes the "width" attribute for curves and points).
std::string GABC_NAMESPACE::GABC_IObject::getSourcePath | ( | ) | const |
Get the source of instanced geometry. The path to this object is returned if the geometry is not instanced.
ICompoundProperty GABC_NAMESPACE::GABC_IObject::getUserProperties | ( | ) | const |
Get the user properties for this node.
GT_DataArrayHandle GABC_NAMESPACE::GABC_IObject::getUserProperty | ( | exint | index, |
fpreal | t, | ||
std::string & | name, | ||
GEO_AnimationType & | atype | ||
) | const |
Lookup the data array for the Nth geometry property at the given time.
name
parameter is filled out with the property nameatype
parameter is filled out with the animation type GT_DataArrayHandle GABC_NAMESPACE::GABC_IObject::getUserProperty | ( | const std::string & | name, |
fpreal | t, | ||
GEO_AnimationType & | atype | ||
) | const |
Lookup the data array for the Nth geometry property at the given time.
name
parameter is filled out with the property nameatype
parameter is filled out with the animation type GT_DataArrayHandle GABC_NAMESPACE::GABC_IObject::getVelocity | ( | fpreal | t, |
GEO_AnimationType & | atype | ||
) | const |
Get velocity property from shape node.
GT_DataArrayHandle GABC_NAMESPACE::GABC_IObject::getWidth | ( | fpreal | t, |
GEO_AnimationType & | atype | ||
) | const |
Get the width property from the shape node (curves/points)
|
static |
Initialize (called by GABC_IArchive)
bool GABC_NAMESPACE::GABC_IObject::isMayaLocator | ( | ) | const |
Query whether the node is a Maya locator.
bool GABC_NAMESPACE::GABC_IObject::isTransformAnimated | ( | ) | const |
Check whether the transform (or parent transforms) is animated.
bool GABC_NAMESPACE::GABC_IObject::localTransform | ( | fpreal | t, |
UT_Matrix4D & | xform, | ||
bool & | isConstant, | ||
bool & | inheritsXform | ||
) | const |
Get the local transform for the node. This is an identity matrix
bool GABC_NAMESPACE::GABC_IObject::localTransform | ( | fpreal | t, |
M44d & | xform, | ||
bool & | isConstant, | ||
bool & | inheritsXform | ||
) | const |
Get the local transform for the node. This is an identity matrix
GABC_NodeType GABC_NAMESPACE::GABC_IObject::nodeType | ( | ) | const |
Query the type of this node.
exint GABC_NAMESPACE::GABC_IObject::numSamples | ( | ) | const |
|
inline |
Member data access
Definition at line 295 of file GABC_IObject.h.
GABC_IObject& GABC_NAMESPACE::GABC_IObject::operator= | ( | const GABC_IObject & | src | ) |
Assignment operator.
|
overridevirtual |
Interface from GABC_IItem
Implements GABC_NAMESPACE::GABC_IItem.
TimeSamplingPtr GABC_NAMESPACE::GABC_IObject::timeSampling | ( | ) | const |
Access the time sampling pointer.
GT_PrimitiveHandle GABC_NAMESPACE::GABC_IObject::updatePrimitive | ( | const GT_PrimitiveHandle & | src, |
const GA_Detail * | gdp, | ||
const GA_Offset | primoff, | ||
fpreal | new_time, | ||
const GEO_PackedNameMapPtr & | namemap, | ||
const UT_StringHolder & | facesetAttrib, | ||
int | load_style = GABC_LOAD_FULL |
||
) | const |
Update primitive time. Given a primitive created by getPrimitive()
, update the transform/attribute arrays with values from the new time.
|
inline |
Test validity.
Definition at line 124 of file GABC_IObject.h.
GABC_VisibilityType GABC_NAMESPACE::GABC_IObject::visibility | ( | bool & | animated, |
fpreal | t, | ||
bool | check_parent = false |
||
) | const |
Query visibility.
|
friend |
Definition at line 311 of file GABC_IObject.h.