Documentation ¶
Index ¶
- Constants
- type Anim
- type AnimValue
- type AnimValue2
- type Attachment
- type BBox
- type BodyPart
- type Bone
- type BoneController
- type Event
- type Hdr
- func (h *Hdr) GetAttachmentsPtr(buf []byte) *byte
- func (h *Hdr) GetBodyPartsPtr(buf []byte) *byte
- func (h *Hdr) GetBoneControllersPtr(buf []byte) *byte
- func (h *Hdr) GetBonesPtr(buf []byte) *byte
- func (h *Hdr) GetHitBoxesPtr(buf []byte) *byte
- func (h *Hdr) GetSeqGroupsPtr(buf []byte) *byte
- func (h *Hdr) GetSeqsPtr(buf []byte) *byte
- func (h *Hdr) GetSkinRefPtr(buf []byte) *byte
- func (h *Hdr) GetTextureDataPtr(buf []byte) *byte
- func (h *Hdr) GetTexturesPtr(buf []byte) *byte
- type Mat34
- type Mesh
- type Model
- type Rgb
- type SeqDesc
- type SeqGroup
- type Texture
- type Vec3
- func (angles *Vec3) AngleQuaternion(qt *Vec4)
- func (v1 *Vec3) CrossProduct(v2 *Vec3, cross *Vec3)
- func (v1 *Vec3) DotProduct(v2 *Vec3) float32
- func (v1 *Vec3) DotProductV4(v2 [4]float32) float32
- func (v1 *Vec3) VectorCompare(v2 *Vec3) bool
- func (in1 *Vec3) VectorIRotate(in2 *Mat34, out *Vec3)
- func (v *Vec3) VectorLength() float32
- func (v *Vec3) VectorNormalize() float32
- func (in *Vec3) VectorScale(scale float32, out *Vec3)
- func (in1 *Vec3) VectorTransform(in2 *Mat34, out *Vec3)
- type Vec4
Constants ¶
View Source
const ( STUDIO_NF_FLATSHADE = 0x0001 STUDIO_NF_CHROME = 0x0002 STUDIO_NF_FULLBRIGHT = 0x0004 STUDIO_NF_NOMIPS = 0x0008 STUDIO_NF_ALPHA = 0x0010 STUDIO_NF_ADDITIVE = 0x0020 STUDIO_NF_MASKED = 0x0040 )
lighting options (set Texture.Flags)
View Source
const ( STUDIO_X = 0x0001 STUDIO_Y = 0x0002 STUDIO_Z = 0x0004 STUDIO_XR = 0x0008 STUDIO_YR = 0x0010 STUDIO_ZR = 0x0020 STUDIO_LX = 0x0040 STUDIO_LY = 0x0080 STUDIO_LZ = 0x0100 STUDIO_AX = 0x0200 STUDIO_AY = 0x0400 STUDIO_AZ = 0x0800 STUDIO_AXR = 0x1000 STUDIO_AYR = 0x2000 STUDIO_AZR = 0x4000 STUDIO_TYPES = 0x7FFF STUDIO_RLOOP = 0x8000 // controller that wraps shortest distance )
motion flags (set SeqDesc.MotionType)
View Source
const ( SIZEOF_ANIM = 12 SIZEOF_ANIMVALUE = 2 )
size of struct (Cannot use unsafe package on GAE)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Anim ¶
type Anim struct {
Offset [6]uint16
}
animations
func (*Anim) GetAnimValue ¶
func (*Anim) GetAnimValue2 ¶
func (anm *Anim) GetAnimValue2(idx int) *AnimValue2
func (*Anim) GetNextAnim ¶
type AnimValue ¶
animation frames
func (*AnimValue) GetAddedPointer ¶
func (*AnimValue) GetAnimValue2Pointer ¶
func (anv *AnimValue) GetAnimValue2Pointer() *AnimValue2
type AnimValue2 ¶
type AnimValue2 struct {
Value int16
}
type Attachment ¶
type Attachment struct { Name [32]byte Type int32 Bone int32 Org Vec3 // attachment point Vectors [3]Vec3 }
attachment
type BBox ¶
type BBox struct { Bone int32 Group int32 // intersection group BbMin Vec3 // bounding box BbMax Vec3 }
intersection boxes
type BodyPart ¶
type BodyPart struct { Name [64]byte NumModels int32 Base int32 ModelIndex int32 // index into models array }
body part index
type BoneController ¶
type Hdr ¶
type Hdr struct { Id int32 Version int32 Name [64]byte Length int32 EyePosition Vec3 // ideal eye position Min Vec3 // ideal movement hull size Max Vec3 BbMin Vec3 // clipping bounding box BbMax Vec3 Flags int32 NumBones int32 // bones BoneIndex int32 NumBoneControllers int32 // bone controllers BoneControllerIndex int32 NumHitBoxes int32 // complex bounding boxes HitBoxIndex int32 NumSeq int32 // animation sequences SeqIndex int32 NumSeqGroups int32 // demand loaded sequences SeqGroupIndex int32 NumTextures int32 // raw textures TextureIndex int32 TextureDataIndex int32 NumSkinRef int32 // replaceable textures NumSkinFamilies int32 SkinIndex int32 NumBodyParts int32 BodyPartIndex int32 NumAttachments int32 // queryable attachable points AttachmentIndex int32 SoundTable int32 SoundIndex int32 SoundGroups int32 SoundGroupIndex int32 NumTransitions int32 // animation node to animation node transition graph TransitionIndex int32 }
func (*Hdr) GetAttachmentsPtr ¶
func (*Hdr) GetBodyPartsPtr ¶
func (*Hdr) GetBoneControllersPtr ¶
func (*Hdr) GetBonesPtr ¶
func (*Hdr) GetHitBoxesPtr ¶
func (*Hdr) GetSeqGroupsPtr ¶
func (*Hdr) GetSeqsPtr ¶
func (*Hdr) GetSkinRefPtr ¶
func (*Hdr) GetTextureDataPtr ¶
func (*Hdr) GetTexturesPtr ¶
type Mesh ¶
type Mesh struct { NumTris int32 TriIndex int32 SkinRef int32 NumNorms int32 // per mesh normals (no use) NormIndex int32 // normal vec3_t (no use) }
meshes
func (*Mesh) GetTricmdArray ¶
type Model ¶
type Model struct { Name [64]byte Type int32 BoundingRadius float32 NumMesh int32 MeshIndex int32 NumVerts int32 // number of unique vertices VertInfoIndex int32 // vertex bone info VertIndex int32 // vertex vec3_t NumNorms int32 // number of unique surface normals NormInfoIndex int32 // normal bone info NormIndex int32 // normal vec3_t NumGroups int32 // deformation groups GroupIndex int32 }
studio models
type SeqDesc ¶
type SeqDesc struct { Label [32]byte // sequence label Fps float32 // frames per second Flags int32 // looping/non-looping flags Activity int32 ActWeight int32 NumEvents int32 EventIndex int32 NumFrames int32 // number of frames per sequence NumPivots int32 // number of foot pivots PivotIndex int32 MotionType int32 MotionBone int32 LinearMovement Vec3 AutoMovePosIndex int32 AutoMoveAngleIndex int32 BbMin Vec3 // per sequence bounding box BbMax Vec3 NumBlends int32 AnimIndex int32 // mstudioanim_t pointer relative to start of sequence group data [blend][bone][X, Y, Z, XR, YR, ZR] BlendType [2]int32 // X, Y, Z, XR, YR, ZR BlendStart [2]float32 // starting value BlendEnd [2]float32 // ending value BlendParent int32 SeqGroup int32 // sequence group for demand loading EntryNode int32 // transition node at entry ExitNode int32 // transition node at exit NodeFlags int32 // transition rules NextSeq int32 // auto advancing sequences }
sequence descriptions
type SeqGroup ¶
type SeqGroup struct { Label [32]byte // textual name Name [64]byte // file name Unused1 int32 // was "cache" - index pointer Unused2 int32 // was "data" - hack for group 0 }
demand loaded sequence groups
type Vec3 ¶
type Vec3 [3]float32
func (*Vec3) AngleQuaternion ¶
func (*Vec3) CrossProduct ¶
func (*Vec3) DotProduct ¶
func (*Vec3) DotProductV4 ¶
func (*Vec3) VectorCompare ¶
func (*Vec3) VectorIRotate ¶
rotate by the inverse of the matrix
func (*Vec3) VectorLength ¶
func (*Vec3) VectorNormalize ¶
func (*Vec3) VectorScale ¶
func (*Vec3) VectorTransform ¶
Click to show internal directories.
Click to hide internal directories.