Documentation ¶
Index ¶
- Constants
- func Save(doc *Document, path string) error
- func WritePMX(doc *Document, w io.Writer) error
- type Animation
- type AnimationBoneSample
- type AnimationCameraSample
- type AnimationLightSample
- type AnimationMorphSample
- type Bone
- type BoneChannel
- type Document
- type Face
- type Header
- type Joint
- type Link
- type Material
- type Morph
- type MorphChannel
- type MorphGroup
- type MorphMaterial
- type MorphUV
- type MorphVertex
- type PMDParser
- type PMXParser
- type PMXWriter
- type Quaternion
- type RigidBody
- type VMDParser
- type Vector2
- type Vector3
- type Vector4
- type Vertex
Constants ¶
View Source
const ( MaterialFlagDoubleSided uint8 = 1 MaterialFlagCastShadow uint8 = 2 )
View Source
const ( BoneFlagTailIndex uint16 = 1 BoneFlagRotatable uint16 = 2 BoneFlagTranslatable uint16 = 4 BoneFlagVisible uint16 = 8 BoneFlagEnabled uint16 = 16 BoneFlagEnableIK uint16 = 32 BoneFlagInheritRotation uint16 = 256 BoneFlagInheritTranslation uint16 = 512 BoneFlagFixedAxis uint16 = 1024 BoneFlagLocalAxis uint16 = 2048 BoneFlagPhysicsMode uint16 = 4096 BoneFlagExternalParent uint16 = 8192 BoneFlagAll uint16 = (31 | 32 | 256 | 512 | 1024 | 2048 | 4096 | 8192) )
View Source
const ( AttrStringEncoding int = iota AttrExtUV AttrVertIndexSz AttrTexIndexSz AttrMatIndexSz AttrBoneIndexSz AttrMorphIndexSz AttrRBIndexSz )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Animation ¶ added in v0.2.4
type Animation struct { Name string Bone []*AnimationBoneSample Morph []*AnimationMorphSample Camera []*AnimationCameraSample Light []*AnimationLightSample }
func (*Animation) GetBoneChannels ¶ added in v0.3.0
func (a *Animation) GetBoneChannels() map[string]*BoneChannel
func (*Animation) GetMorphChannels ¶ added in v0.3.0
func (a *Animation) GetMorphChannels() map[string]*MorphChannel
type AnimationBoneSample ¶ added in v0.2.4
type AnimationBoneSample struct { Target string Frame int Position Vector3 Rotation Quaternion Params [64]byte }
type AnimationCameraSample ¶ added in v0.2.4
type AnimationLightSample ¶ added in v0.2.4
type AnimationMorphSample ¶ added in v0.2.4
type BoneChannel ¶ added in v0.3.0
type BoneChannel struct { Target string Keyframes []*AnimationBoneSample Frames []uint32 Rotations []*Quaternion Positions []*Vector3 }
type Document ¶ added in v0.2.0
type Document struct { Header *Header Name string NameEn string Comment string CommentEn string Vertexes []*Vertex Faces []*Face Textures []string Materials []*Material Bones []*Bone Morphs []*Morph Bodies []*RigidBody Joints []*Joint }
func NewDocument ¶ added in v0.2.0
func NewDocument() *Document
type Morph ¶
type Morph struct { Name string NameEn string PanelType byte MorphType byte // oneof Group []*MorphGroup Vertex []*MorphVertex UV []*MorphUV Material []*MorphMaterial }
type MorphChannel ¶ added in v0.3.0
type MorphChannel struct { Target string Keyframes []*AnimationMorphSample Frames []uint32 Weights []float32 }
type MorphMaterial ¶
type MorphMaterial struct { Target int Flags byte Diffuse Vector4 Specular Vector3 Specularity float32 Ambient Vector3 EdgeColor Vector4 EdgeSize float32 TextureTint Vector4 EnvironmentTint Vector4 ToonTint Vector4 }
type 8
type PMDParser ¶
type PMDParser struct {
// contains filtered or unexported fields
}
PMDParser is parser for .pmd model.
type PMXParser ¶
type PMXParser struct {
// contains filtered or unexported fields
}
PMXParser is parser for .pmx model.
type PMXWriter ¶
type PMXWriter struct {
// contains filtered or unexported fields
}
PMXWriter is writer for .pmx data
type Quaternion ¶ added in v0.3.0
type VMDParser ¶ added in v0.2.4
type VMDParser struct {
// contains filtered or unexported fields
}
VMDParser is parser for .vmd animation.
func NewVMDParser ¶ added in v0.2.4
NewVMDParser returns new parser.
Click to show internal directories.
Click to hide internal directories.