Documentation ¶
Index ¶
- Constants
- type MdlData
- func (md *MdlData) GetAttachment(idx int) *studio.Attachment
- func (md *MdlData) GetBBox(idx int) *studio.BBox
- func (md *MdlData) GetBodyPart(idx int) *studio.BodyPart
- func (md *MdlData) GetBone(idx int) *studio.Bone
- func (md *MdlData) GetBoneController(idx int) *studio.BoneController
- func (md *MdlData) GetNumBodyParts() int32
- func (md *MdlData) GetNumBoneControllers() int32
- func (md *MdlData) GetNumBones() int32
- func (md *MdlData) GetNumSeq() int32
- func (md *MdlData) GetNumTextures() int32
- func (md *MdlData) GetSeqDesc(idx int) *studio.SeqDesc
- func (md *MdlData) GetSeqGroup(idx int) *studio.SeqGroup
- func (md *MdlData) GetSkinRef(idx int) *int16
- func (md *MdlData) GetTexture(idx int) *studio.Texture
- func (md *MdlData) GetTextureIndex() int32
- type MdlModel
- func (mm *MdlModel) AdvanceFrame(dt float32)
- func (mm *MdlModel) CalcBoneAdj()
- func (mm *MdlModel) CalcBonePosition(frame int, s float32, pbone *studio.Bone, panim *studio.Anim, pos *studio.Vec3)
- func (mm *MdlModel) CalcBoneQuaternion(frame int, s float32, pbone *studio.Bone, panim *studio.Anim, q *studio.Vec4)
- func (mm *MdlModel) CalcRotations(pos *[MAXSTUDIOBONES]studio.Vec3, q *[MAXSTUDIOBONES]studio.Vec4, ...)
- func (mm *MdlModel) Chrome(pchrome *[2]int, bone int, normal *studio.Vec3)
- func (mm *MdlModel) DrawModel()
- func (mm *MdlModel) DrawPoints()
- func (mm *MdlModel) GetSequence() int32
- func (mm *MdlModel) Init()
- func (mm *MdlModel) InitView()
- func (mm *MdlModel) Lighting(bone int, flags int32, normal *studio.Vec3) float32
- func (mm *MdlModel) LoadModel()
- func (mm *MdlModel) SetBlending(iblender int32, flval float32) float32
- func (mm *MdlModel) SetController(icntl int32, flval float32) float32
- func (mm *MdlModel) SetMouth(flval float32) float32
- func (mm *MdlModel) SetSequence(iseq int32) int32
- func (mm *MdlModel) SetUpBones()
- func (mm *MdlModel) SetupLighting()
- func (mm *MdlModel) SetupModel(bodypart int32)
- func (mm *MdlModel) SlerpBones(q1 *[MAXSTUDIOBONES]studio.Vec4, pos1 *[MAXSTUDIOBONES]studio.Vec3, ...)
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 (*MdlData) GetAttachment ¶
func (md *MdlData) GetAttachment(idx int) *studio.Attachment
func (*MdlData) GetBoneController ¶
func (md *MdlData) GetBoneController(idx int) *studio.BoneController
func (*MdlData) GetNumBodyParts ¶
func (*MdlData) GetNumBoneControllers ¶
func (*MdlData) GetNumBones ¶
func (*MdlData) GetNumTextures ¶
func (*MdlData) GetSkinRef ¶
func (*MdlData) GetTextureIndex ¶
type MdlModel ¶
type MdlModel struct {
// contains filtered or unexported fields
}
calc utility
func NewMdlModel ¶
func (*MdlModel) AdvanceFrame ¶
func (*MdlModel) CalcBoneAdj ¶
func (mm *MdlModel) CalcBoneAdj()
func (*MdlModel) CalcBonePosition ¶
func (*MdlModel) CalcBoneQuaternion ¶
func (*MdlModel) CalcRotations ¶
func (*MdlModel) DrawPoints ¶
func (mm *MdlModel) DrawPoints()
func (*MdlModel) GetSequence ¶
func (*MdlModel) SetBlending ¶
func (*MdlModel) SetController ¶
func (*MdlModel) SetSequence ¶
func (*MdlModel) SetUpBones ¶
func (mm *MdlModel) SetUpBones()
func (*MdlModel) SetupLighting ¶
func (mm *MdlModel) SetupLighting()
func (*MdlModel) SetupModel ¶
func (*MdlModel) SlerpBones ¶
func (mm *MdlModel) SlerpBones(q1 *[MAXSTUDIOBONES]studio.Vec4, pos1 *[MAXSTUDIOBONES]studio.Vec3, q2 *[MAXSTUDIOBONES]studio.Vec4, pos2 *[MAXSTUDIOBONES]studio.Vec3, s float32)
Click to show internal directories.
Click to hide internal directories.