All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Alembic::AbcGeom::ALEMBIC_VERSION_NS::XformOp Class Reference

Xform Operation This class holds the data about a particular transform operation, but does not hold the actual data to calculate a 4x4 matrix. It holds the type of operation (Translate, Rotate, Scale, Matrix), a hint about the type which can be interpreted by packages like Maya, and what particular parts of the operations can change over time. More...

#include <XformOp.h>

Public Member Functions

 XformOp ()
 XformOp (const XformOperationType iType, const Alembic::Util::uint8_t iHint=0)
 XformOp (const Alembic::Util::uint8_t iEncodedOp)
XformOperationType getType () const
 Get the type of transform operation. (Translate, Rotate, Scale, Matrix) More...
void setType (const XformOperationType iType)
Alembic::Util::uint8_t getHint () const
void setHint (const Alembic::Util::uint8_t iHint)
bool isXAnimated () const
bool isYAnimated () const
bool isZAnimated () const
bool isAngleAnimated () const
bool isChannelAnimated (std::size_t iIndex) const
std::size_t getNumChannels () const
double getDefaultChannelValue (std::size_t iIndex) const
double getChannelValue (std::size_t iIndex) const
void setChannelValue (std::size_t iIndex, double iVal)
void setVector (const Abc::V3d &iVec)
void setTranslate (const Abc::V3d &iTrans)
void setScale (const Abc::V3d &iScale)
void setAxis (const Abc::V3d &iAxis)
void setAngle (const double iAngle)
void setMatrix (const Abc::M44d &iMatrix)
void setXRotation (const double iAngle)
void setYRotation (const double iAngle)
void setZRotation (const double iAngle)
Abc::V3d getVector () const
Abc::V3d getTranslate () const
Abc::V3d getScale () const
Abc::V3d getAxis () const
double getAngle () const
Abc::M44d getMatrix () const
double getXRotation () const
double getYRotation () const
double getZRotation () const
bool isTranslateOp () const
bool isScaleOp () const
bool isRotateOp () const
bool isMatrixOp () const
bool isRotateXOp () const
bool isRotateYOp () const
bool isRotateZOp () const
Alembic::Util::uint8_t getOpEncoding () const


class IXformSchema

Detailed Description

Xform Operation This class holds the data about a particular transform operation, but does not hold the actual data to calculate a 4x4 matrix. It holds the type of operation (Translate, Rotate, Scale, Matrix), a hint about the type which can be interpreted by packages like Maya, and what particular parts of the operations can change over time.

Definition at line 120 of file XformOp.h.

Constructor & Destructor Documentation

Alembic::AbcGeom::ALEMBIC_VERSION_NS::XformOp::XformOp ( )
Alembic::AbcGeom::ALEMBIC_VERSION_NS::XformOp::XformOp ( const XformOperationType  iType,
const Alembic::Util::uint8_t  iHint = 0 
Alembic::AbcGeom::ALEMBIC_VERSION_NS::XformOp::XformOp ( const Alembic::Util::uint8_t  iEncodedOp)

Member Function Documentation

double Alembic::AbcGeom::ALEMBIC_VERSION_NS::XformOp::getAngle ( ) const
Abc::V3d Alembic::AbcGeom::ALEMBIC_VERSION_NS::XformOp::getAxis ( ) const
double Alembic::AbcGeom::ALEMBIC_VERSION_NS::XformOp::getChannelValue ( std::size_t  iIndex) const
double Alembic::AbcGeom::ALEMBIC_VERSION_NS::XformOp::getDefaultChannelValue ( std::size_t  iIndex) const

For every channel, there's a default value. Typically, for each op type, it's the same across channels. But matrix ops have different defaults to allow the identity matrix to be defaulted (most channels there are 0.0, the determinant channels are 1.0).

Alembic::Util::uint8_t Alembic::AbcGeom::ALEMBIC_VERSION_NS::XformOp::getHint ( ) const

Get the MatrixHint, RotateHint, TranslateHint, or ScaleHint to help disambiguate certain options that may have the same type.

Abc::M44d Alembic::AbcGeom::ALEMBIC_VERSION_NS::XformOp::getMatrix ( ) const
std::size_t Alembic::AbcGeom::ALEMBIC_VERSION_NS::XformOp::getNumChannels ( ) const

Get the number of components that this operation has based on the type. Translate and Scale have 3, Rotate has 4 and Matrix has 16, and single-axis rotate ops (rotateX, rotateY, rotateZ) have 1.

Alembic::Util::uint8_t Alembic::AbcGeom::ALEMBIC_VERSION_NS::XformOp::getOpEncoding ( ) const

Function for returning the combined encoded type and hint. The type is in the first four bits, the hint in the second.

This is not really intended for use by human clients of this class.

Abc::V3d Alembic::AbcGeom::ALEMBIC_VERSION_NS::XformOp::getScale ( ) const
Abc::V3d Alembic::AbcGeom::ALEMBIC_VERSION_NS::XformOp::getTranslate ( ) const
XformOperationType Alembic::AbcGeom::ALEMBIC_VERSION_NS::XformOp::getType ( ) const

Get the type of transform operation. (Translate, Rotate, Scale, Matrix)

Abc::V3d Alembic::AbcGeom::ALEMBIC_VERSION_NS::XformOp::getVector ( ) const
double Alembic::AbcGeom::ALEMBIC_VERSION_NS::XformOp::getXRotation ( ) const
double Alembic::AbcGeom::ALEMBIC_VERSION_NS::XformOp::getYRotation ( ) const
double Alembic::AbcGeom::ALEMBIC_VERSION_NS::XformOp::getZRotation ( ) const
bool Alembic::AbcGeom::ALEMBIC_VERSION_NS::XformOp::isAngleAnimated ( ) const

Returns whether the angle component (index 3) is animated. Since Scale and Translate do not have an angle component, false is returned for those types. Only meaningful on read.

bool Alembic::AbcGeom::ALEMBIC_VERSION_NS::XformOp::isChannelAnimated ( std::size_t  iIndex) const

Returns whether a particular channel is animated. Scale and Translate only have 3 channels, Rotate has 4, and Matrix has 16. Indices greater than the number of channels will return false. Only meaningful on read.

bool Alembic::AbcGeom::ALEMBIC_VERSION_NS::XformOp::isMatrixOp ( ) const
bool Alembic::AbcGeom::ALEMBIC_VERSION_NS::XformOp::isRotateOp ( ) const
bool Alembic::AbcGeom::ALEMBIC_VERSION_NS::XformOp::isRotateXOp ( ) const
bool Alembic::AbcGeom::ALEMBIC_VERSION_NS::XformOp::isRotateYOp ( ) const
bool Alembic::AbcGeom::ALEMBIC_VERSION_NS::XformOp::isRotateZOp ( ) const
bool Alembic::AbcGeom::ALEMBIC_VERSION_NS::XformOp::isScaleOp ( ) const
bool Alembic::AbcGeom::ALEMBIC_VERSION_NS::XformOp::isTranslateOp ( ) const
bool Alembic::AbcGeom::ALEMBIC_VERSION_NS::XformOp::isXAnimated ( ) const

Returns whether the x component (index 0) is animated. Only meaningful on read.

bool Alembic::AbcGeom::ALEMBIC_VERSION_NS::XformOp::isYAnimated ( ) const

Returns whether the y component (index 1) is animated. Only meaningful on read.

bool Alembic::AbcGeom::ALEMBIC_VERSION_NS::XformOp::isZAnimated ( ) const

Returns whether the z component (index 2) is animated. Only meaningful on read.

void Alembic::AbcGeom::ALEMBIC_VERSION_NS::XformOp::setAngle ( const double  iAngle)
void Alembic::AbcGeom::ALEMBIC_VERSION_NS::XformOp::setAxis ( const Abc::V3d iAxis)
void Alembic::AbcGeom::ALEMBIC_VERSION_NS::XformOp::setChannelValue ( std::size_t  iIndex,
double  iVal 

Set a single channel; will throw if iIndex is greater than numchannels - 1.

void Alembic::AbcGeom::ALEMBIC_VERSION_NS::XformOp::setHint ( const Alembic::Util::uint8_t  iHint)

Set the hint, if it is an illegal value for the type, then the hint is set to the default, 0.

void Alembic::AbcGeom::ALEMBIC_VERSION_NS::XformOp::setMatrix ( const Abc::M44d iMatrix)
void Alembic::AbcGeom::ALEMBIC_VERSION_NS::XformOp::setScale ( const Abc::V3d iScale)
void Alembic::AbcGeom::ALEMBIC_VERSION_NS::XformOp::setTranslate ( const Abc::V3d iTrans)
void Alembic::AbcGeom::ALEMBIC_VERSION_NS::XformOp::setType ( const XformOperationType  iType)

Set the type of transform operation. (Translate, Rotate, Scale, Matrix) Setting the type resets the hint, and sets all the channels to static.

void Alembic::AbcGeom::ALEMBIC_VERSION_NS::XformOp::setVector ( const Abc::V3d iVec)
void Alembic::AbcGeom::ALEMBIC_VERSION_NS::XformOp::setXRotation ( const double  iAngle)
void Alembic::AbcGeom::ALEMBIC_VERSION_NS::XformOp::setYRotation ( const double  iAngle)
void Alembic::AbcGeom::ALEMBIC_VERSION_NS::XformOp::setZRotation ( const double  iAngle)

Friends And Related Function Documentation

friend class IXformSchema

The IXform can tell the op if its channels are animated by directly inserting keys into the m_animChannels set.

Definition at line 240 of file XformOp.h.

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