AlembicPointsReader (object)

The AlembicPointsReader specializes the AlembicObjectReader interface for reading AlembicIPoints data. It can be created using the AlembicArchiveReader.getPoints method.

AlembicPointsReader AlembicPointsReader AlembicPointsReader AlembicBaseObjectReader AlembicBaseObjectReader AlembicPointsReader->AlembicBaseObjectReader AlembicGeometryReader AlembicGeometryReader AlembicPointsReader->AlembicGeometryReader AlembicObjectReader AlembicObjectReader AlembicBaseObjectReader->AlembicObjectReader

/*
** Example: AlembicPointsReader
*/

require AlembicWrapper;
require FileIO;

operator entry() {
  
  FilePath path = FilePath('${FABRIC_SCENE_GRAPH_DIR}/Python/Apps/Resources/Alembic/fireworks.abc').expandEnvVars();

  AlembicArchiveReader archive(path.string());
  String pointsPaths[] = archive.getPathsOfType('Points');

  for(Size i=0;i<pointsPaths.size();i++) {

    AlembicPointsReader points = archive.getPoints(pointsPaths[i]);
    report('samples: '+points.getNumSamples());

    GeometryAttributes attr = GeometryAttributes();
    points.readSample(4.3, attr);

    report(attr.size());

    Ref<Vec3Attribute> positions = attr.getPositions();
    report(positions.values[4]);
    report(positions.values[12]);
  }

}

/*
** Output:

samples: 100
7445
{x:+5.155878,y:+14.84549,z:+11.09661}
{x:-0.847283,y:-2.014423,z:-2.528754}

*/

Methods

  AlembicPointsReader ( in AlembicPointsReader other )
  AlembicPointsReader ()
Boolean areSelfBoundsConstant ? ()
AlembicPointsReader clone ? ()
SInt32 getNumSamples ? ()
String getPath ? ()
AlembicIPointsSample getSampleA ? ()
AlembicIPointsSample getSampleB ? ()
AlembicIPointsSchema getSchema ? ()
Box3 getSelfBounds ! ( in Float64 time, io Boolean isConstant )
AlembicTimeSampling getTimeSampling ? ()
  readSample ! ( in Float64 time, io Geometry geom )
  readSample ! ( in Float64 time, io GeometryAttributes attributes )
  readSamplePoints ! ( in Float64 time, io Points points )
  reset ! ()
Boolean valid ? ()

Methods in detail

AlembicPointsReader ( in AlembicPointsReader other )

copy constructor


AlembicPointsReader ()

default constructor


Boolean AlembicPointsReader.areSelfBoundsConstant? ()

Returns true if the bounds of this object, excluding the children, are constant


AlembicPointsReader AlembicPointsReader.clone? ()

clone method


SInt32 AlembicPointsReader.getNumSamples? ()

returns the number of samples of this reader


String AlembicPointsReader.getPath? ()

returns the full path of the wrapped AlembicIPoints


AlembicIPointsSample AlembicPointsReader.getSampleA? ()

returns the first sample used by this reader


AlembicIPointsSample AlembicPointsReader.getSampleB? ()

returns the second sample used by this reader


AlembicIPointsSchema AlembicPointsReader.getSchema? ()

returns the schema of this reader


Box3 AlembicPointsReader.getSelfBounds! ( in Float64 time, io Boolean isConstant )

returns the bounding box


AlembicTimeSampling AlembicPointsReader.getTimeSampling? ()

returns the timesampling of this reader


AlembicPointsReader.readSample! ( in Float64 time, io Geometry geom )

Reads a geometry sample at a given time


AlembicPointsReader.readSample! ( in Float64 time, io GeometryAttributes attributes )

reads a sample at a given time. this will properly interpolate between samples. the result is stored in the provided GeometryAttributes.


AlembicPointsReader.readSamplePoints! ( in Float64 time, io Points points )

the result is stored in the provided Points.


AlembicPointsReader.reset! ()

clears all pointers and releases all alembic containers


Boolean AlembicPointsReader.valid? ()

returns true if this reader wraps a valid AlembicIPoints