Tramway SDK
Public Attributes | List of all members
tram::Render::Bone Struct Reference

Bone for a 3D models skeleton. More...

#include <render/animation.h>

Public Attributes

name_t name
 Unique identifier for the bone. More...
 
int32_t parent = -1
 Parent index of the bone. More...
 
vec3 head = {0.0f, 0.0f, 0.0f}
 Origin of the bone. More...
 
vec3 tail = {1.0f, 1.0f, 1.0f}
 Direction of the bone. More...
 
float roll = 0.0f
 Rotation of the bone. More...
 

Detailed Description

Bone for a 3D models skeleton.

The name property identifies a bone and is referenced in animations. The parent property is used to construct the skeletal hierarchy. The head, tail and roll properties are used to construct the bone's local space within the local space of the 3D model.

Member Data Documentation

◆ head

tram::Render::Bone::head = {0.0f, 0.0f, 0.0f}

Origin of the bone.

Position in model space. The bone will rotate and scale around this point.

◆ name

tram::Render::Bone::name

Unique identifier for the bone.

Must be unique in the context of a skeleton. This name is how Animation keyframes will reference the bone.

◆ parent

tram::Render::Bone::parent = -1

Parent index of the bone.

This index is in the context of a skeleton. If set to an index of some other bone, this bone will move together with the parent bone. Can be set to -1 if you don't want the bone to move with any other bone, and instead want it to move with the models origin or for bones with no parents, i.e. root bones.

◆ roll

tram::Render::Bone::roll = 0.0f

Rotation of the bone.

Determines the rotation of the bone around its z axis. This is used to determine in which direction the x and y axis of the bone local space will be pointing in.

See also
tram::Render::Animation
https://racenis.github.io/tram-sdk/documentation/render/animation.html

◆ tail

tram::Render::Bone::tail = {1.0f, 1.0f, 1.0f}

Direction of the bone.

Position in model space. The vector going from the head of the bone to the tail of the bone will be used as the z axis of the bone.


The documentation for this struct was generated from the following files: