HDK
|
#include <TimeSampling.h>
Public Member Functions | |
TimeSampling (const TimeSamplingType &iTimeSamplingType, const std::vector< chrono_t > &iSampleTimes) | |
TimeSampling (chrono_t iTimePerCycle, chrono_t iStartTime) | |
TimeSampling (const TimeSampling ©) | |
TimeSampling () | |
bool | operator== (const TimeSampling &iRhs) const |
size_t | getNumStoredTimes () const |
const std::vector< chrono_t > & | getStoredTimes () const |
TimeSamplingType | getTimeSamplingType () const |
chrono_t | getSampleTime (index_t iIndex) const |
std::pair< index_t, chrono_t > | getFloorIndex (chrono_t iTime, index_t iNumSamples) const |
std::pair< index_t, chrono_t > | getCeilIndex (chrono_t iTime, index_t iNumSamples) const |
std::pair< index_t, chrono_t > | getNearIndex (chrono_t iTime, index_t iNumSamples) const |
Protected Attributes | |
TimeSamplingType | m_timeSamplingType |
std::vector< chrono_t > | m_sampleTimes |
The TimeSampling class's whole job is to report information about the time values that are associated with the samples that were written to a property. Most of the time, the sampling will be uniform or cyclic, in which case this is mostly an algorithmic interface to the small sample times buffer. In the case where the sampling is truly acyclic, this class acts as an accessor to that array of times.
Definition at line 57 of file TimeSampling.h.
Alembic::AbcCoreAbstract::ALEMBIC_VERSION_NS::TimeSampling::TimeSampling | ( | const TimeSamplingType & | iTimeSamplingType, |
const std::vector< chrono_t > & | iSampleTimes | ||
) |
The TimeSampling class is really a portable interface, usable via aggregation, that the SimplePropertyReaders and Writers (and their derived classes) can use to provide consistent time-sampling introspection to clients.
iSampleTimes | The number of time samples per cycle |
Alembic::AbcCoreAbstract::ALEMBIC_VERSION_NS::TimeSampling::TimeSampling | ( | chrono_t | iTimePerCycle, |
chrono_t | iStartTime | ||
) |
Convenience constructor which creates uniform time sampling with the specified time per cycle and the specified start time.
Alembic::AbcCoreAbstract::ALEMBIC_VERSION_NS::TimeSampling::TimeSampling | ( | const TimeSampling & | copy | ) |
Alembic::AbcCoreAbstract::ALEMBIC_VERSION_NS::TimeSampling::TimeSampling | ( | ) |
std::pair<index_t, chrono_t> Alembic::AbcCoreAbstract::ALEMBIC_VERSION_NS::TimeSampling::getCeilIndex | ( | chrono_t | iTime, |
index_t | iNumSamples | ||
) | const |
Find the smallest valid index that has a time greater than the given time. Invalid to call this with zero samples. If the maximum sample time is less than iTime, index numSamples-1 will be returned.
std::pair<index_t, chrono_t> Alembic::AbcCoreAbstract::ALEMBIC_VERSION_NS::TimeSampling::getFloorIndex | ( | chrono_t | iTime, |
index_t | iNumSamples | ||
) | const |
Find the largest valid index that has a time less than or equal to the given time. Invalid to call this with zero samples. If the minimum sample time is greater than iTime, index 0 will be returned.
std::pair<index_t, chrono_t> Alembic::AbcCoreAbstract::ALEMBIC_VERSION_NS::TimeSampling::getNearIndex | ( | chrono_t | iTime, |
index_t | iNumSamples | ||
) | const |
Find the valid index with the closest time to the given time. Invalid to call this with zero samples.
|
inline |
Get the number of stored times. This is same as the samples per cycle in the time sampling type except for acyclic time sampling. There will always be at least one sample because a start time is always needed.
Definition at line 87 of file TimeSampling.h.
chrono_t Alembic::AbcCoreAbstract::ALEMBIC_VERSION_NS::TimeSampling::getSampleTime | ( | index_t | iIndex | ) | const |
Get the time of any sample it is invalid to call this for out-of-range indices.
|
inline |
Definition at line 92 of file TimeSampling.h.
|
inline |
Definition at line 97 of file TimeSampling.h.
|
inline |
Definition at line 77 of file TimeSampling.h.
|
protected |
Definition at line 130 of file TimeSampling.h.
|
protected |
A TimeSamplingType This is "Uniform", "Cyclic", or "Acyclic".
Definition at line 128 of file TimeSampling.h.