AlembicXformReader (object)¶
The AlembicXformReader specializes the AlembicObjectReader interface for reading AlembicIXform data. It can be created using the AlembicArchiveReader.getXform method.
/*
** Example: AlembicXformReader
*/
require AlembicWrapper;
require FileIO;
operator entry() {
FilePath path = FilePath('${FABRIC_SCENE_GRAPH_DIR}/Python/Apps/Resources/Alembic/hierarchy.abc').expandEnvVars();
AlembicArchiveReader archive(path.string());
String xformPaths[] = archive.getPathsOfType('Xform');
for(Size i=0;i<xformPaths.size();i++) {
AlembicXformReader xform = archive.getXform(xformPaths[i]);
report('samples: '+xform.getNumSamples());
Xfo m = xform.readSample(2.4);
report(m.tr);
}
}
/*
** Output:
samples: 100
{x:+0.758976,y:+0.0,z:+2.390652}
samples: 100
{x:-0.758976,y:+0.0,z:-2.390652}
samples: 100
{x:+0.758976,y:+0.0,z:+2.390652}
samples: 100
{x:+7.29038,y:+0.0,z:-3.518709}
samples: 100
{x:-5.112164,y:+0.0,z:+5.5977}
samples: 100
{x:-7.401941,y:+0.0,z:-10.38721}
*/
Methods¶
AlembicXformReader ( in AlembicXformReader other ) | |
AlembicXformReader () | |
Boolean | areSelfBoundsConstant ? () |
AlembicXformReader | clone ? () |
Box3 | getBounds ! ( in Float64 time, io Boolean isConstant ) |
Box3 | getChildBounds ! ( in Float64 time ) |
SInt32 | getNumSamples ? () |
String | getPath ? () |
AlembicXformSample | getSample ? () |
AlembicIXformSchema | getSchema ? () |
Float64[] | getTimes ? () |
Float64[] | getTimesFromHierarchy ! () |
Xfo | readSample ! ( in Float64 time ) |
Xfo | readSampleGlobal ! ( in Float64 time ) |
Xfo[] | readSamples ! ( in Float64 times[] ) |
Xfo[] | readSamplesGlobal ! ( in Float64 times[] ) |
reset ! () | |
Boolean | valid ? () |
Methods in detail¶
AlembicXformReader ( in AlembicXformReader other )
copy constructor
default constructor
Boolean AlembicXformReader.areSelfBoundsConstant? ()
returns true if the bounds are constant
AlembicXformReader AlembicXformReader.clone? ()
clone method
Box3 AlembicXformReader.getBounds! ( in Float64 time, io Boolean isConstant )
returns the bounds of this object, including all children and this Xform, if any
Box3 AlembicXformReader.getChildBounds! ( in Float64 time )
returns the bounding box
SInt32 AlembicXformReader.getNumSamples? ()
returns the number of samples of this reader
String AlembicXformReader.getPath? ()
returns the full path of the wrapped AlembicIXform
AlembicXformSample AlembicXformReader.getSample? ()
returns the first (and only) sample used by this reader
AlembicIXformSchema AlembicXformReader.getSchema? ()
returns the schema of this reader
Float64[] AlembicXformReader.getTimes? ()
returns the timesampling of this reader
Float64[] AlembicXformReader.getTimesFromHierarchy! ()
returns the longest timesampling in the hierarchy for this xform
Xfo AlembicXformReader.readSample! ( in Float64 time )
reads a sample at a given time. this will properly interpolate between samples.
Xfo AlembicXformReader.readSampleGlobal! ( in Float64 time )
reads a sample at a given time and project to global space. this will properly interpolate between samples.
Xfo[] AlembicXformReader.readSamples! ( in Float64 times[] )
reads several sample at given times. this will properly interpolate between samples.
Xfo[] AlembicXformReader.readSamplesGlobal! ( in Float64 times[] )
reads several samples at given times and project to global space. this will properly interpolate between samples.
AlembicXformReader.reset! ()
clears all pointers and releases all alembic containers
Boolean AlembicXformReader.valid? ()
returns true if this reader wraps a valid AlembicIXform