mdl

package
v0.0.0-...-3830b07 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 21, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MAXSTUDIOBONES = 128 // total bones actually used
	MAXSTUDIOVERTS = 2048
)

Variables

This section is empty.

Functions

This section is empty.

Types

type MdlData

type MdlData struct {
	BaseBuf         *byte
	BaseBufSl       []byte
	Hdr             *studio.Hdr
	Bones           *byte
	BoneControllers *byte
	BBoxes          *byte
	SeqDescs        *byte
	SeqGroups       *byte
	BodyParts       *byte
	Attachments     *byte
	Textures        *byte
	SkinRefs        *byte
}

unpacked mdl data

func NewMdlData

func NewMdlData(buf []byte) *MdlData

func (*MdlData) GetAttachment

func (md *MdlData) GetAttachment(idx int) *studio.Attachment

func (*MdlData) GetBBox

func (md *MdlData) GetBBox(idx int) *studio.BBox

func (*MdlData) GetBodyPart

func (md *MdlData) GetBodyPart(idx int) *studio.BodyPart

func (*MdlData) GetBone

func (md *MdlData) GetBone(idx int) *studio.Bone

func (*MdlData) GetBoneController

func (md *MdlData) GetBoneController(idx int) *studio.BoneController

func (*MdlData) GetNumBodyParts

func (md *MdlData) GetNumBodyParts() int32

func (*MdlData) GetNumBoneControllers

func (md *MdlData) GetNumBoneControllers() int32

func (*MdlData) GetNumBones

func (md *MdlData) GetNumBones() int32

func (*MdlData) GetNumSeq

func (md *MdlData) GetNumSeq() int32

func (*MdlData) GetNumTextures

func (md *MdlData) GetNumTextures() int32

func (*MdlData) GetSeqDesc

func (md *MdlData) GetSeqDesc(idx int) *studio.SeqDesc

func (*MdlData) GetSeqGroup

func (md *MdlData) GetSeqGroup(idx int) *studio.SeqGroup

func (*MdlData) GetSkinRef

func (md *MdlData) GetSkinRef(idx int) *int16

func (*MdlData) GetTexture

func (md *MdlData) GetTexture(idx int) *studio.Texture

func (*MdlData) GetTextureIndex

func (md *MdlData) GetTextureIndex() int32

type MdlModel

type MdlModel struct {
	// contains filtered or unexported fields
}

calc utility

func NewMdlModel

func NewMdlModel(mdd *MdlData) *MdlModel

func (*MdlModel) AdvanceFrame

func (mm *MdlModel) AdvanceFrame(dt float32)

func (*MdlModel) CalcBoneAdj

func (mm *MdlModel) CalcBoneAdj()

func (*MdlModel) CalcBonePosition

func (mm *MdlModel) CalcBonePosition(frame int, s float32, pbone *studio.Bone, panim *studio.Anim, pos *studio.Vec3)

func (*MdlModel) CalcBoneQuaternion

func (mm *MdlModel) CalcBoneQuaternion(frame int, s float32, pbone *studio.Bone, panim *studio.Anim, q *studio.Vec4)

func (*MdlModel) CalcRotations

func (mm *MdlModel) CalcRotations(pos *[MAXSTUDIOBONES]studio.Vec3, q *[MAXSTUDIOBONES]studio.Vec4, pseqdesc *studio.SeqDesc, panim *studio.Anim, f float32)

func (*MdlModel) Chrome

func (mm *MdlModel) Chrome(pchrome *[2]int, bone int, normal *studio.Vec3)

func (*MdlModel) DrawModel

func (mm *MdlModel) DrawModel()

func (*MdlModel) DrawPoints

func (mm *MdlModel) DrawPoints()

func (*MdlModel) GetSequence

func (mm *MdlModel) GetSequence() int32

func (*MdlModel) Init

func (mm *MdlModel) Init()

func (*MdlModel) InitView

func (mm *MdlModel) InitView()

func (*MdlModel) Lighting

func (mm *MdlModel) Lighting(bone int, flags int32, normal *studio.Vec3) float32

func (*MdlModel) LoadModel

func (mm *MdlModel) LoadModel()

func (*MdlModel) SetBlending

func (mm *MdlModel) SetBlending(iblender int32, flval float32) float32

func (*MdlModel) SetController

func (mm *MdlModel) SetController(icntl int32, flval float32) float32

func (*MdlModel) SetMouth

func (mm *MdlModel) SetMouth(flval float32) float32

func (*MdlModel) SetSequence

func (mm *MdlModel) SetSequence(iseq int32) int32

func (*MdlModel) SetUpBones

func (mm *MdlModel) SetUpBones()

func (*MdlModel) SetupLighting

func (mm *MdlModel) SetupLighting()

func (*MdlModel) SetupModel

func (mm *MdlModel) SetupModel(bodypart int32)

func (*MdlModel) SlerpBones

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL