Alembic: Alembic::AbcCoreAbstract::ALEMBIC_VERSION_NS::ArraySample Class Reference

Alembic 1.8.11

Loading...
Searching...
No Matches
Alembic::AbcCoreAbstract::ALEMBIC_VERSION_NS::ArraySample Class Reference

`#include <ArraySample.h>`

Inheritance diagram for Alembic::AbcCoreAbstract::ALEMBIC_VERSION_NS::ArraySample:

## Public Types
typedef ArraySample | this_type
typedef ArraySampleKey | Key
typedef Key | key_type

## Public Member Functions
| ArraySample ()
| ArraySample (const void *iData, const DataType &iDataType, const Dimensions &iDims)
const void * | getData () const
const DataType & | getDataType () const
const Dimensions & | getDimensions () const
size_t | size () const
Key | getKey () const
bool | valid () const
void | reset ()

## Detailed Description

The ArraySample class is a reference to a block of memory corresponding to an array of instances of DataTypes. The array may be multi-rank, with different sizes in each dimension, but with its data ultimately stored contiguously. The class is basically just a bundle of a memory address, stored as a void*, a DataType, and a Dimension.

The ArraySample itself does not pretend to own the data referred to memory address "data". It is just a reference. For data retention mgmt, see the note on ArraySamplePtr below.

## Constructor & Destructor Documentation

## ◆ ArraySample() [1/2]

Alembic::AbcCoreAbstract::ALEMBIC_VERSION_NS::ArraySample::ArraySample | ( |  | ) |
| inline

Default constructor creates NULL bytes with degenerate dimensions. ...

## ◆ ArraySample() [2/2]

Alembic::AbcCoreAbstract::ALEMBIC_VERSION_NS::ArraySample::ArraySample | ( | const void * | iData,
|  | const DataType & | iDataType,
|  | const Dimensions & | iDims )
| inline

Explicit constructor takes bytes and dims by reference and creates its own reference to them.

## Member Function Documentation

## ◆ getData()

const void * Alembic::AbcCoreAbstract::ALEMBIC_VERSION_NS::ArraySample::getData | ( |  | ) | const
| inline

Using Default Copy Constructor Using Default Assignment Operator

Return the data as a raw pointer ...

## ◆ getDataType()

const DataType & Alembic::AbcCoreAbstract::ALEMBIC_VERSION_NS::ArraySample::getDataType | ( |  | ) | const
| inline

Return the datatype. ...

## ◆ getDimensions()

const Dimensions & Alembic::AbcCoreAbstract::ALEMBIC_VERSION_NS::ArraySample::getDimensions | ( |  | ) | const
| inline

Return the dimensions ...

## ◆ getKey()

ArraySample::Key Alembic::AbcCoreAbstract::ALEMBIC_VERSION_NS::ArraySample::getKey | ( |  | ) | const

Compute the Key. This is a calculation.

## ◆ reset()

void Alembic::AbcCoreAbstract::ALEMBIC_VERSION_NS::ArraySample::reset | ( |  | ) |
| inline

Reset the array sample to an empty, invalid state. Basically the same as calling *this = ArraySample();

## ◆ size()

size_t Alembic::AbcCoreAbstract::ALEMBIC_VERSION_NS::ArraySample::size | ( |  | ) | const
| inline

Return the "size", which is getDimensions().numPoints() ...

## ◆ valid()

bool Alembic::AbcCoreAbstract::ALEMBIC_VERSION_NS::ArraySample::valid | ( |  | ) | const
| inline

Return if it is valid. An empty ArraySample is valid. however, an ArraySample that is empty and has a scalar dimension is invalid. This is how we discriminate between setting a sample of length zero (useful in particle systems) vs. indicating an invalid sample (NULL).

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

- AbcCoreAbstract/ArraySample.h
- AbcCoreAbstract/ArraySample.cpp