template<UnsignedInt dimensions>
Magnum::Trade::SkinData class new in Git master

Skin data.

Provides access to skin properties used for skeletal animations. Populated instances of this class are returned from AbstractImporter::skin2D() or skin3D() and can be passed to AbstractSceneConverter::add(const SkinData3D&, Containers::StringView) and overloads. Similarly to other Trade types, the internal representation is fixed upon construction and doesn't allow any modification afterwards.

Constructors, destructors, conversion operators

SkinData(Containers::Array<UnsignedInt>&& jointData, Containers::Array<MatrixTypeFor<dimensions, Float>>&& inverseBindMatrixData, const void* importerState = nullptr) explicit noexcept
Constructor.
SkinData(std::initializer_list<UnsignedInt> joints, std::initializer_list<MatrixTypeFor<dimensions, Float>> inverseBindMatrices, const void* importerState = nullptr) explicit
SkinData(DataFlags jointDataFlags, Containers::ArrayView<const UnsignedInt> jointData, DataFlags inverseBindMatrixDataFlags, Containers::ArrayView<const MatrixTypeFor<dimensions, Float>> inverseBindMatrixData, const void* importerState = nullptr) explicit noexcept
Construct a non-owned skin data.
SkinData(const SkinData<dimensions>&) deleted
Copying is not allowed.
SkinData(SkinData<dimensions>&& other) noexcept
Move constructor.

Public functions

auto operator=(const SkinData<dimensions>&) -> SkinData<dimensions>& deleted
Copying is not allowed.
auto operator=(SkinData<dimensions>&& other) -> SkinData<dimensions>& noexcept
Move assignment.
auto joints() const -> Containers::ArrayView<const UnsignedInt>
Joint IDs.
auto inverseBindMatrices() const -> Containers::ArrayView<const MatrixTypeFor<dimensions, Float>>
Inverse bind matrices.
auto releaseJointData() -> Containers::Array<UnsignedInt>
Release joint data storage.
auto releaseInverseBindMatrixData() -> Containers::Array<MatrixTypeFor<dimensions, Float>>
Release inverse bind matrix data storage.
auto importerState() const -> const void*
Importer-specific state.

Function documentation

template<UnsignedInt dimensions>
Magnum::Trade::SkinData<dimensions>::SkinData(Containers::Array<UnsignedInt>&& jointData, Containers::Array<MatrixTypeFor<dimensions, Float>>&& inverseBindMatrixData, const void* importerState = nullptr) explicit noexcept

Constructor.

Parameters
jointData IDs of objects that act as joints
inverseBindMatrixData Inverse bind matrix for each joint
importerState Importer-specific state

The jointData and inverseBindMatrixData arrays are expected to have the same size.

template<UnsignedInt dimensions>
Magnum::Trade::SkinData<dimensions>::SkinData(std::initializer_list<UnsignedInt> joints, std::initializer_list<MatrixTypeFor<dimensions, Float>> inverseBindMatrices, const void* importerState = nullptr) explicit

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

template<UnsignedInt dimensions>
Magnum::Trade::SkinData<dimensions>::SkinData(DataFlags jointDataFlags, Containers::ArrayView<const UnsignedInt> jointData, DataFlags inverseBindMatrixDataFlags, Containers::ArrayView<const MatrixTypeFor<dimensions, Float>> inverseBindMatrixData, const void* importerState = nullptr) explicit noexcept

Construct a non-owned skin data.

Parameters
jointDataFlags Ignored. Used only for a safer distinction from the owning constructor.
jointData IDs of objects that act as joints
inverseBindMatrixDataFlags Ignored. Used only for a safer distinction from the owning constructor.
inverseBindMatrixData Inverse bind matrix for each joint
importerState Importer-specific state

The jointData and inverseBindMatrixData arrays are expected to have the same size.

template<UnsignedInt dimensions>
Containers::ArrayView<const UnsignedInt> Magnum::Trade::SkinData<dimensions>::joints() const

Joint IDs.

IDs of objects that act as joints.

template<UnsignedInt dimensions>
Containers::ArrayView<const MatrixTypeFor<dimensions, Float>> Magnum::Trade::SkinData<dimensions>::inverseBindMatrices() const

Inverse bind matrices.

Transforms each joint to the initial state for skinning to be applied. The returned array has the same size as joints().

template<UnsignedInt dimensions>
Containers::Array<UnsignedInt> Magnum::Trade::SkinData<dimensions>::releaseJointData()

Release joint data storage.

Releases the ownership of the joint ID array. The material then behaves like if it has no joints.

template<UnsignedInt dimensions>
Containers::Array<MatrixTypeFor<dimensions, Float>> Magnum::Trade::SkinData<dimensions>::releaseInverseBindMatrixData()

Release inverse bind matrix data storage.

Releases the ownership of the inverse bind matrix array. The material then behaves like if it has no matrices.