NewSkeleton creates and returns a pointer to a new Skeleton.
()
| 18 | |
| 19 | // NewSkeleton creates and returns a pointer to a new Skeleton. |
| 20 | func NewSkeleton() *Skeleton { |
| 21 | |
| 22 | sk := new(Skeleton) |
| 23 | sk.boneMatrices = make([]math32.Matrix4, 0) |
| 24 | sk.bones = make([]*core.Node, 0) |
| 25 | return sk |
| 26 | } |
| 27 | |
| 28 | // AddBone adds a bone to the skeleton along with an optional inverseBindMatrix. |
| 29 | func (sk *Skeleton) AddBone(node *core.Node, inverseBindMatrix *math32.Matrix4) { |