ModelAnimation.GetFramePose() added #466
This commit is contained in:
parent
98ce816ab8
commit
dce94f509d
1 changed files with 6 additions and 0 deletions
|
@ -937,6 +937,12 @@ func (m ModelAnimation) GetBones() []BoneInfo {
|
||||||
return unsafe.Slice(m.Bones, m.BoneCount)
|
return unsafe.Slice(m.Bones, m.BoneCount)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// GetFramePose returns the Transform for a specific bone at a specific frame
|
||||||
|
func (m ModelAnimation) GetFramePose(frame, bone int) Transform {
|
||||||
|
framePoses := unsafe.Slice(m.FramePoses, m.FrameCount)
|
||||||
|
return unsafe.Slice(framePoses[frame], m.BoneCount)[bone]
|
||||||
|
}
|
||||||
|
|
||||||
// RayCollision type - ray hit information
|
// RayCollision type - ray hit information
|
||||||
type RayCollision struct {
|
type RayCollision struct {
|
||||||
Hit bool
|
Hit bool
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue