AlembicPointsReader.kl

Types

AlembicPointsReader (object)

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

/*
** 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 ? ()