Module ssbh_data::mesh_data[][src]

Structs

AttributeData
BoneInfluence
MeshData

The data associated with a Mesh file. Supported versions are 1.8 and 1.10.

MeshObjectData
VertexWeight

Enums

AttributeError

Errors while reading mesh attribute data.

AttributeUsage
DataType
MeshError

Errors while creating a Mesh from MeshObjectData.

VectorData

Functions

create_mesh
get_attribute_name

Gets the name of the mesh attribute. This uses the attribute names array, which can be assumed to contain a single value that is unique with respect to the other attributes for the mesh object.

read_attributes_by_usage

Read data for all attributes of the given usage for mesh_object.

read_colorsets

Returns all the colorset attributes for the specified mesh_object. u8 values are converted to f32 by normalizing to the range 0.0 to 1.0.

read_mesh_objects
read_texture_coordinates

Returns all the texture coordinate attributes for the specified mesh_object. The v coordinate is transformed to 1.0 - v if flip_vertical is true.

transform_points

Transform the elements in data with transform. Transform is assumed to be in row-major order. The elements are treated as points in homogeneous coordinates by temporarily setting the 4th component to 1.0f32. The returned result has the same component count as data. For VectorData::Vector4, the 4th component is preserved for the returned result.

transform_vectors

Transform the elements in data with transform. Transform is assumed to be in row-major order. The elements are treated as vectors in homogeneous coordinates by temporarily setting the 4th component to 0.0f32. The returned result has the same component count as data. For VectorData::Vector4, the 4th component is preserved for the returned result.