XformOp.h
Go to the documentation of this file.
//-*****************************************************************************
//
// Copyright (c) 2009-2012,
// Sony Pictures Imageworks, Inc. and
// Industrial Light & Magic, a division of Lucasfilm Entertainment Company Ltd.
//
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above
// copyright notice, this list of conditions and the following disclaimer
// in the documentation and/or other materials provided with the
// distribution.
// * Neither the name of Sony Pictures Imageworks, nor
// Industrial Light & Magic nor the names of their contributors may be used
// to endorse or promote products derived from this software without specific
// prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
//-*****************************************************************************
#ifndef Alembic_AbcGeom_XformOp_h
#define Alembic_AbcGeom_XformOp_h
#include <Alembic/Util/Export.h>
#include <Alembic/AbcGeom/Foundation.h>
#include <set>
namespace Alembic {
namespace AbcGeom {
namespace ALEMBIC_VERSION_NS {
enum MatrixHint
{
kMatrixHint = 0,
kMayaShearHint = 1
};
enum RotateHint
{
kRotateHint = 0,
kRotateOrientationHint = 1
};
enum ScaleHint
{
kScaleHint = 0
};
enum TranslateHint
{
kTranslateHint = 0,
kScalePivotPointHint = 1,
kScalePivotTranslationHint = 2,
kRotatePivotPointHint = 3,
kRotatePivotTranslationHint = 4
};
class ALEMBIC_EXPORT XformOp
{
public:
XformOp();
XformOp( const XformOperationType iType,
const Alembic::Util::uint8_t iHint = 0 );
XformOp( const Alembic::Util::uint8_t iEncodedOp );
XformOperationType getType() const;
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 );
// synthetic getters return by value
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;
private:
XformOperationType m_type;
Alembic::Util::uint8_t m_hint;
std::vector<double> m_channels;
std::set<Alembic::Util::uint32_t> m_animChannels;
private:
friend class IXformSchema;
};
typedef std::vector < XformOp > XformOpVec;
} // End namespace ALEMBIC_VERSION_NS
using namespace ALEMBIC_VERSION_NS;
} // End namespace AbcGeom
} // End namespace Alembic
#endif
Foundation.h
Export.h
ALEMBIC_EXPORT
#define ALEMBIC_EXPORT
Definition: Export.h:51
ALEMBIC_VERSION_NS
#define ALEMBIC_VERSION_NS
Definition: Foundation.h:105
Alembic::AbcGeom::ALEMBIC_VERSION_NS::IXformSchema
Definition: IXform.h:52
Alembic::AbcGeom::ALEMBIC_VERSION_NS::XformOp
Xform Operation This class holds the data about a particular transform operation, but does not hold t...
Definition: XformOp.h:121
Alembic::AbcGeom::ALEMBIC_VERSION_NS::XformOp::getZRotation
double getZRotation() const
Alembic::AbcGeom::ALEMBIC_VERSION_NS::XformOp::getNumChannels
std::size_t getNumChannels() const
Alembic::AbcGeom::ALEMBIC_VERSION_NS::XformOp::isScaleOp
bool isScaleOp() const
Alembic::AbcGeom::ALEMBIC_VERSION_NS::XformOp::setXRotation
void setXRotation(const double iAngle)
Alembic::AbcGeom::ALEMBIC_VERSION_NS::XformOp::setVector
void setVector(const Abc::V3d &iVec)
Alembic::AbcGeom::ALEMBIC_VERSION_NS::XformOp::isXAnimated
bool isXAnimated() const
Alembic::AbcGeom::ALEMBIC_VERSION_NS::XformOp::getTranslate
Abc::V3d getTranslate() const
Alembic::AbcGeom::ALEMBIC_VERSION_NS::XformOp::XformOp
XformOp(const XformOperationType iType, const Alembic::Util::uint8_t iHint=0)
Alembic::AbcGeom::ALEMBIC_VERSION_NS::XformOp::getDefaultChannelValue
double getDefaultChannelValue(std::size_t iIndex) const
Alembic::AbcGeom::ALEMBIC_VERSION_NS::XformOp::getOpEncoding
Alembic::Util::uint8_t getOpEncoding() const
Alembic::AbcGeom::ALEMBIC_VERSION_NS::XformOp::setYRotation
void setYRotation(const double iAngle)
Alembic::AbcGeom::ALEMBIC_VERSION_NS::XformOp::isRotateZOp
bool isRotateZOp() const
Alembic::AbcGeom::ALEMBIC_VERSION_NS::XformOp::getXRotation
double getXRotation() const
Alembic::AbcGeom::ALEMBIC_VERSION_NS::XformOp::isTranslateOp
bool isTranslateOp() const
Alembic::AbcGeom::ALEMBIC_VERSION_NS::XformOp::isRotateXOp
bool isRotateXOp() const
Alembic::AbcGeom::ALEMBIC_VERSION_NS::XformOp::setHint
void setHint(const Alembic::Util::uint8_t iHint)
Alembic::AbcGeom::ALEMBIC_VERSION_NS::XformOp::isChannelAnimated
bool isChannelAnimated(std::size_t iIndex) const
Alembic::AbcGeom::ALEMBIC_VERSION_NS::XformOp::getYRotation
double getYRotation() const
Alembic::AbcGeom::ALEMBIC_VERSION_NS::XformOp::isZAnimated
bool isZAnimated() const
Alembic::AbcGeom::ALEMBIC_VERSION_NS::XformOp::getAngle
double getAngle() const
Alembic::AbcGeom::ALEMBIC_VERSION_NS::XformOp::XformOp
XformOp(const Alembic::Util::uint8_t iEncodedOp)
Alembic::AbcGeom::ALEMBIC_VERSION_NS::XformOp::setChannelValue
void setChannelValue(std::size_t iIndex, double iVal)
Alembic::AbcGeom::ALEMBIC_VERSION_NS::XformOp::getHint
Alembic::Util::uint8_t getHint() const
Alembic::AbcGeom::ALEMBIC_VERSION_NS::XformOp::isMatrixOp
bool isMatrixOp() const
Alembic::AbcGeom::ALEMBIC_VERSION_NS::XformOp::getScale
Abc::V3d getScale() const
Alembic::AbcGeom::ALEMBIC_VERSION_NS::XformOp::setType
void setType(const XformOperationType iType)
Alembic::AbcGeom::ALEMBIC_VERSION_NS::XformOp::isYAnimated
bool isYAnimated() const
Alembic::AbcGeom::ALEMBIC_VERSION_NS::XformOp::isRotateOp
bool isRotateOp() const
Alembic::AbcGeom::ALEMBIC_VERSION_NS::XformOp::setAngle
void setAngle(const double iAngle)
Alembic::AbcGeom::ALEMBIC_VERSION_NS::XformOp::setMatrix
void setMatrix(const Abc::M44d &iMatrix)
Alembic::AbcGeom::ALEMBIC_VERSION_NS::XformOp::isAngleAnimated
bool isAngleAnimated() const
Alembic::AbcGeom::ALEMBIC_VERSION_NS::XformOp::getAxis
Abc::V3d getAxis() const
Alembic::AbcGeom::ALEMBIC_VERSION_NS::XformOp::XformOp
XformOp()
Alembic::AbcGeom::ALEMBIC_VERSION_NS::XformOp::setZRotation
void setZRotation(const double iAngle)
Alembic::AbcGeom::ALEMBIC_VERSION_NS::XformOp::setAxis
void setAxis(const Abc::V3d &iAxis)
Alembic::AbcGeom::ALEMBIC_VERSION_NS::XformOp::setTranslate
void setTranslate(const Abc::V3d &iTrans)
Alembic::AbcGeom::ALEMBIC_VERSION_NS::XformOp::getType
XformOperationType getType() const
Get the type of transform operation. (Translate, Rotate, Scale, Matrix)
Alembic::AbcGeom::ALEMBIC_VERSION_NS::XformOp::getMatrix
Abc::M44d getMatrix() const
Alembic::AbcGeom::ALEMBIC_VERSION_NS::XformOp::getVector
Abc::V3d getVector() const
Alembic::AbcGeom::ALEMBIC_VERSION_NS::XformOp::getChannelValue
double getChannelValue(std::size_t iIndex) const
Alembic::AbcGeom::ALEMBIC_VERSION_NS::XformOp::setScale
void setScale(const Abc::V3d &iScale)
Alembic::AbcGeom::ALEMBIC_VERSION_NS::XformOp::isRotateYOp
bool isRotateYOp() const
Alembic::AbcGeom::ALEMBIC_VERSION_NS::XformOperationType
XformOperationType
Enum that indicates the type of transformational operation. This enum is used when encoding and decod...
Definition: Foundation.h:71
Alembic::AbcGeom::ALEMBIC_VERSION_NS::TranslateHint
TranslateHint
The Translation identifier hint. Some 3d packages (like Maya) have multiple transformation operations...
Definition: XformOp.h:95
Alembic::AbcGeom::ALEMBIC_VERSION_NS::kRotatePivotTranslationHint
@ kRotatePivotTranslationHint
Definition: XformOp.h:111
Alembic::AbcGeom::ALEMBIC_VERSION_NS::kScalePivotTranslationHint
@ kScalePivotTranslationHint
Definition: XformOp.h:104
Alembic::AbcGeom::ALEMBIC_VERSION_NS::kTranslateHint
@ kTranslateHint
Default, regular translation.
Definition: XformOp.h:97
Alembic::AbcGeom::ALEMBIC_VERSION_NS::kRotatePivotPointHint
@ kRotatePivotPointHint
Translation used for rotating around the pivot point.
Definition: XformOp.h:107
Alembic::AbcGeom::ALEMBIC_VERSION_NS::kScalePivotPointHint
@ kScalePivotPointHint
Translation used for scaling around a pivot point.
Definition: XformOp.h:100
Alembic::AbcGeom::ALEMBIC_VERSION_NS::RotateHint
RotateHint
The Rotate identifier hint. Some 3d packages (like Maya) have multiple rotation operations that are m...
Definition: XformOp.h:68
Alembic::AbcGeom::ALEMBIC_VERSION_NS::kRotateOrientationHint
@ kRotateOrientationHint
Definition: XformOp.h:74
Alembic::AbcGeom::ALEMBIC_VERSION_NS::kRotateHint
@ kRotateHint
Default regular rotation.
Definition: XformOp.h:70
Alembic::AbcGeom::ALEMBIC_VERSION_NS::XformOpVec
std::vector< XformOp > XformOpVec
Definition: XformOp.h:244
Alembic::AbcGeom::ALEMBIC_VERSION_NS::MatrixHint
MatrixHint
The Matrix identifier hint. Some 3d packages (like Maya) may have certain transformation operations t...
Definition: XformOp.h:54
Alembic::AbcGeom::ALEMBIC_VERSION_NS::kMayaShearHint
@ kMayaShearHint
Matrix represents Maya's version of Shear.
Definition: XformOp.h:59
Alembic::AbcGeom::ALEMBIC_VERSION_NS::kMatrixHint
@ kMatrixHint
Regular Matrix.
Definition: XformOp.h:56
Alembic::AbcGeom::ALEMBIC_VERSION_NS::ScaleHint
ScaleHint
The Scale identifier hint. Some 3d packages (like Maya) have multiple transformation operations that ...
Definition: XformOp.h:83
Alembic::AbcGeom::ALEMBIC_VERSION_NS::kScaleHint
@ kScaleHint
Default, regular scale.
Definition: XformOp.h:85
Alembic
Alembic namespace ...
Definition: ArchiveInfo.h:46