Magnum::Trade::MeshObjectData3D class

Three-dimensional mesh object data.

Provides access to material information for given mesh instance.

Base classes

class ObjectData3D
Three-dimensional object data.

Constructors, destructors, conversion operators

MeshObjectData3D(std::vector<UnsignedInt> children, const Matrix4& transformation, UnsignedInt instance, Int material, const void* importerState = nullptr) explicit
Construct with combined transformation.
MeshObjectData3D(std::vector<UnsignedInt> children, const Vector3& translation, const Quaternion& rotation, const Vector3& scaling, UnsignedInt instance, Int material, const void* importerState = nullptr) explicit
Construct with separate transformations.
MeshObjectData3D(const MeshObjectData3D&) deleted
Copying is not allowed.
MeshObjectData3D(MeshObjectData3D&&) noexcept defaulted
Move constructor.

Public functions

auto operator=(const MeshObjectData3D&) -> MeshObjectData3D& deleted
Copying is not allowed.
auto operator=(MeshObjectData3D&&) noexcept -> MeshObjectData3D& defaulted
Move assignment.
auto material() const -> Int
Material ID.

Function documentation

Magnum::Trade::MeshObjectData3D::MeshObjectData3D(std::vector<UnsignedInt> children, const Matrix4& transformation, UnsignedInt instance, Int material, const void* importerState = nullptr) explicit

Construct with combined transformation.

Parameters
children Child objects
transformation Transformation (relative to parent)
instance Instance ID
material Material ID or -1
importerState Importer-specific state

Creates object with mesh instance type.

Magnum::Trade::MeshObjectData3D::MeshObjectData3D(std::vector<UnsignedInt> children, const Vector3& translation, const Quaternion& rotation, const Vector3& scaling, UnsignedInt instance, Int material, const void* importerState = nullptr) explicit

Construct with separate transformations.

Parameters
children Child objects
translation Translation (relative to parent)
rotation Rotation (relative to parent)
scaling Scaling (relative to parent)
instance Instance ID
material Material ID or -1
importerState Importer-specific state

Creates object with mesh instance type.

Int Magnum::Trade::MeshObjectData3D::material() const

Material ID.

Returns -1 if the object has no material assigned.