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

#include <GABC_IObject.h>

+ Inheritance diagram for GABC_NAMESPACE::GABC_IObject:

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 (const GABC_IArchivePtr &arch, const std::string &objectpath)
 
virtual ~GABC_IObject ()
 
exint getNumChildren () const
 Return the number of children. More...
 
GABC_IObject getParent () const
 Get the parent. More...
 
ObjectHeader getHeader () const
 Get my header. More...
 
ObjectHeader getChildHeader (exint i) const
 Get the child header. More...
 
std::string getName () const
 Get the name of the object. More...
 
const std::stringgetFullName () 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_IObjectoperator= (const GABC_IObject &src)
 Assignment operator. More...
 
GABC_NodeType nodeType () const
 Query the type of this 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 GEO_Primitive *prim, 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 GEO_Primitive *prim, 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 getLocalTransform (UT_Matrix4D &xform, fpreal t, GEO_AnimationType &atype, bool &inherits) const
 
bool getWorldTransform (UT_Matrix4D &xform, fpreal t, GEO_AnimationType &atype) 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...
 
GABC_IObject getChild (exint index) const
 
GABC_IObject getChild (const std::string &name) const
 
virtual void purge ()
 
bool worldTransform (fpreal t, UT_Matrix4D &xform, bool &isConstant, bool &inheritsXform) const
 
bool worldTransform (fpreal t, M44d &xform, bool &isConstant, bool &inheritsXform) const
 
bool localTransform (fpreal t, UT_Matrix4D &xform, bool &isConstant, bool &inheritsXform) const
 
bool localTransform (fpreal t, M44d &xform, bool &isConstant, bool &inheritsXform) const
 
const std::stringobjectPath () const
 
const IObjectobject () const
 
- Public Member Functions inherited from GABC_NAMESPACE::GABC_IItem
 GABC_IItem (const GABC_IArchivePtr &arch=NULL)
 
 GABC_IItem (const GABC_IItem &src)
 
virtual ~GABC_IItem ()
 
GABC_IItemoperator= (const GABC_IItem &src)
 
const GABC_IArchivePtrarchive () const
 
void setArchive (const GABC_IArchivePtr &a)
 

Static Public Member Functions

static void init ()
 Initialize (called by GABC_IArchive) More...
 

Friends

class GABC_IArchive
 

Detailed Description

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.

Member Typedef Documentation

using GABC_NAMESPACE::GABC_IObject::M44d = Alembic::Abc::M44d

Definition at line 64 of file GABC_IObject.h.

Member Enumeration Documentation

anonymous enum
Enumerator
GABC_LOAD_LEAN_AND_MEAN 
GABC_LOAD_ARBS 
GABC_LOAD_FACESETS 
GABC_LOAD_HOUDINI 
GABC_LOAD_FULL 
GABC_LOAD_FORCE_UNTRANSFORMED 
GABC_LOAD_IGNORE_VISIBILITY 
GABC_LOAD_GL_OPTIMIZED 
GABC_LOAD_USE_GL_CACHE 
GABC_LOAD_NO_PACKED_ATTRIBS 

Definition at line 153 of file GABC_IObject.h.

Constructor & Destructor Documentation

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 
)
GABC_NAMESPACE::GABC_IObject::GABC_IObject ( const GABC_IArchivePtr arch,
const std::string objectpath 
)
virtual GABC_NAMESPACE::GABC_IObject::~GABC_IObject ( )
virtual

Member Function Documentation

fpreal GABC_NAMESPACE::GABC_IObject::clampTime ( fpreal  input_time) const

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.

Note
This only checks animation types of intrinsic properties
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

ObjectHeader GABC_NAMESPACE::GABC_IObject::getChildHeader ( exint  i) const
inline

Get the child header.

Definition at line 103 of file GABC_IObject.h.

UT_StringHolder GABC_NAMESPACE::GABC_IObject::getFaceSets ( const UT_StringHolder attrib,
fpreal  t,
int  load_style 
) const
const std::string& GABC_NAMESPACE::GABC_IObject::getFullName ( ) const
inline

Get the full name of the object.

Definition at line 110 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.

  • The name parameter is filled out with the property name
  • The scope parameter is filled out with the property scope
  • The atype 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.

  • The scope parameter is filled out with the property scope
  • The atype parameter is filled out with the animation type
ObjectHeader GABC_NAMESPACE::GABC_IObject::getHeader ( ) const
inline

Get my header.

Definition at line 100 of file GABC_IObject.h.

bool GABC_NAMESPACE::GABC_IObject::getLocalTransform ( UT_Matrix4D xform,
fpreal  t,
GEO_AnimationType atype,
bool &  inherits 
) const

Get local transform for the object. For shape objects, this will return an identity transform. The animation type only considers the local transform (not all the parent transforms).

The transform will be blended between samples if the time doesn't align perfectly with a sample point.

std::string GABC_NAMESPACE::GABC_IObject::getName ( void  ) const
inline

Get the name of the object.

Definition at line 107 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.

GABC_IObject GABC_NAMESPACE::GABC_IObject::getParent ( ) const
inline

Get the parent.

Definition at line 92 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.

exint GABC_NAMESPACE::GABC_IObject::getPointCount ( fpreal  t) const

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 GEO_Primitive prim,
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 GEO_Primitive 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.

  • The name parameter is filled out with the property name
  • The atype 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.

  • The name parameter is filled out with the property name
  • The atype 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)

bool GABC_NAMESPACE::GABC_IObject::getWorldTransform ( UT_Matrix4D xform,
fpreal  t,
GEO_AnimationType atype 
) const

Get world transform for the object. The animation type includes all parent transforms.

The transform will be blended between samples if the time doesn't align perfectly with a sample point.

static void GABC_NAMESPACE::GABC_IObject::init ( )
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
const IObject& GABC_NAMESPACE::GABC_IObject::object ( ) const
inline

Member data access

Definition at line 322 of file GABC_IObject.h.

const std::string& GABC_NAMESPACE::GABC_IObject::objectPath ( ) const
inline

Member data access

Definition at line 321 of file GABC_IObject.h.

GABC_IObject& GABC_NAMESPACE::GABC_IObject::operator= ( const GABC_IObject src)

Assignment operator.

virtual void GABC_NAMESPACE::GABC_IObject::purge ( )
virtual

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 GEO_Primitive prim,
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.

bool GABC_NAMESPACE::GABC_IObject::valid ( ) const
inline

Test validity.

Definition at line 125 of file GABC_IObject.h.

GABC_VisibilityType GABC_NAMESPACE::GABC_IObject::visibility ( bool &  animated,
fpreal  t,
bool  check_parent = false 
) const

Query visibility.

bool GABC_NAMESPACE::GABC_IObject::worldTransform ( fpreal  t,
UT_Matrix4D xform,
bool &  isConstant,
bool &  inheritsXform 
) const

Get the world transform for the node. This includes all it's parent transforms.

bool GABC_NAMESPACE::GABC_IObject::worldTransform ( fpreal  t,
M44d xform,
bool &  isConstant,
bool &  inheritsXform 
) const

Get the world transform for the node. This includes all it's parent transforms.

Friends And Related Function Documentation

friend class GABC_IArchive
friend

Definition at line 335 of file GABC_IObject.h.


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