Documentation ¶
Index ¶
- Variables
- type BaseFrame
- type BaseFrames
- func (fs *BaseFrames[T]) Append(f T)
- func (fs *BaseFrames[T]) Contains(index int) bool
- func (fs *BaseFrames[T]) ContainsRegistered(index int) bool
- func (fs *BaseFrames[T]) Delete(index int)
- func (fs *BaseFrames[T]) Get(index int) T
- func (fs *BaseFrames[T]) GetMaxFrame() int
- func (fs *BaseFrames[T]) GetMinFrame() int
- func (fs *BaseFrames[T]) Insert(f T)
- func (fs *BaseFrames[T]) Len() int
- func (fs *BaseFrames[T]) List() []T
- func (fs *BaseFrames[T]) NewFrame(index int) T
- type BoneCurves
- type BoneDelta
- func (bd *BoneDelta) Copy() *BoneDelta
- func (bd *BoneDelta) FrameMorphPosition() *mmath.MVec3
- func (bd *BoneDelta) FrameMorphRotation() *mmath.MQuaternion
- func (bd *BoneDelta) FrameMorphScale() *mmath.MVec3
- func (bd *BoneDelta) FramePosition() *mmath.MVec3
- func (bd *BoneDelta) FrameRotation() *mmath.MQuaternion
- func (bd *BoneDelta) FrameScale() *mmath.MVec3
- func (bd *BoneDelta) GlobalMatrix() *mmath.MMat4
- func (bd *BoneDelta) GlobalPosition() *mmath.MVec3
- func (bd *BoneDelta) GlobalRotation() *mmath.MQuaternion
- func (bd *BoneDelta) LocalEffectorPosition(effectorFactor float64) *mmath.MVec3
- func (bd *BoneDelta) LocalEffectorRotation(effectorFactor float64) *mmath.MQuaternion
- func (bd *BoneDelta) LocalMatrix() *mmath.MMat4
- func (bd *BoneDelta) LocalPosition() *mmath.MVec3
- func (bd *BoneDelta) LocalRotation() *mmath.MQuaternion
- func (bd *BoneDelta) LocalScale() *mmath.MVec3
- type BoneDeltas
- func (bds *BoneDeltas) Contains(boneIndex int) bool
- func (bds *BoneDeltas) Get(boneIndex int) *BoneDelta
- func (bds *BoneDeltas) GetBoneIndexes() []int
- func (bds *BoneDeltas) GetByName(boneName string) *BoneDelta
- func (bds *BoneDeltas) GetNearestBoneIndexes(worldPos *mmath.MVec3) []int
- func (bds *BoneDeltas) LocalPosition(boneIndex int, loop int) *mmath.MVec3
- func (bds *BoneDeltas) LocalRotation(boneIndex int, loop int) *mmath.MQuaternion
- func (bds *BoneDeltas) Update(boneDelta *BoneDelta)
- type BoneFrame
- type BoneFrames
- func (fs *BoneFrames) Append(nfs *BoneNameFrames)
- func (fs *BoneFrames) Contains(boneName string) bool
- func (fs *BoneFrames) Deform(frame int, model *pmx.PmxModel, boneNames []string, isCalcIk bool, ...) *BoneDeltas
- func (fs *BoneFrames) DeformByPhysicsFlag(frame int, model *pmx.PmxModel, boneNames []string, isCalcIk bool, ...) *BoneDeltas
- func (fs *BoneFrames) Delete(boneName string)
- func (fs *BoneFrames) Get(boneName string) *BoneNameFrames
- func (fs *BoneFrames) GetIndexes() []int
- func (fs *BoneFrames) GetMaxFrame() int
- func (fs *BoneFrames) GetMinFrame() int
- func (fs *BoneFrames) GetNames() []string
- func (fs *BoneFrames) GetRegisteredIndexes() []int
- func (fs *BoneFrames) Len() int
- type BoneMorphDelta
- type BoneMorphDeltas
- type BoneNameFrames
- type CameraCurves
- type CameraFrame
- type CameraFrames
- type IBaseFrame
- type IkEnabledFrame
- type IkFrame
- type IkFrames
- type LightFrame
- type LightFrames
- type MaterialMorphDelta
- type MaterialMorphDeltas
- type MorphDeltas
- type MorphFrame
- func (mf *MorphFrame) Add(v *MorphFrame)
- func (mf *MorphFrame) Added(v *MorphFrame) *MorphFrame
- func (mf *MorphFrame) Copy() IBaseFrame
- func (mf *MorphFrame) DeformAfterVertex(morphName string, model *pmx.PmxModel, deltas *VertexMorphDeltas, ...) *VertexMorphDeltas
- func (mf *MorphFrame) DeformBone(morphName string, model *pmx.PmxModel, deltas *BoneMorphDeltas, ratio float64) *BoneMorphDeltas
- func (mf *MorphFrame) DeformMaterial(morphName string, model *pmx.PmxModel, deltas *MaterialMorphDeltas, ...) *MaterialMorphDeltas
- func (mf *MorphFrame) DeformUv(morphName string, model *pmx.PmxModel, deltas *VertexMorphDeltas, ...) *VertexMorphDeltas
- func (mf *MorphFrame) DeformUv1(morphName string, model *pmx.PmxModel, deltas *VertexMorphDeltas, ...) *VertexMorphDeltas
- func (mf *MorphFrame) DeformVertex(morphName string, model *pmx.PmxModel, deltas *VertexMorphDeltas, ...) *VertexMorphDeltas
- type MorphFrameDelta
- type MorphFrames
- func (mfs *MorphFrames) Contains(morphName string) bool
- func (mfs *MorphFrames) Deform(frame int, model *pmx.PmxModel, morphNames []string) *MorphDeltas
- func (mfs *MorphFrames) Get(morphName string) *MorphNameFrames
- func (mfs *MorphFrames) GetMaxFrame() int
- func (mfs *MorphFrames) GetMinFrame() int
- func (mfs *MorphFrames) GetNames() []string
- func (fs *MorphFrames) Len() int
- func (mfs *MorphFrames) Update(fs *MorphNameFrames)
- type MorphNameFrames
- type SelectedVertexMorphDeltas
- type ShadowFrame
- type ShadowFrames
- type VertexDelta
- type VertexDeltas
- type VertexMorphDelta
- type VertexMorphDeltas
- type VmdDeltas
- type VmdMotion
- func (m *VmdMotion) AppendBoneFrame(boneName string, bf *BoneFrame)
- func (m *VmdMotion) AppendCameraFrame(cf *CameraFrame)
- func (m *VmdMotion) AppendIkFrame(ikf *IkFrame)
- func (m *VmdMotion) AppendLightFrame(lf *LightFrame)
- func (m *VmdMotion) AppendMorphFrame(morphName string, mf *MorphFrame)
- func (m *VmdMotion) AppendRegisteredBoneFrame(boneName string, bf *BoneFrame)
- func (m *VmdMotion) AppendRegisteredMorphFrame(morphName string, mf *MorphFrame)
- func (m *VmdMotion) AppendShadowFrame(sf *ShadowFrame)
- func (m *VmdMotion) Copy() mcore.IHashModel
- func (m *VmdMotion) DeformMorph(frame int, model *pmx.PmxModel, morphNames []string) *MorphDeltas
- func (m *VmdMotion) GetMaxFrame() int
- func (m *VmdMotion) GetMinFrame() int
- func (m *VmdMotion) GetName() string
- func (m *VmdMotion) InsertBoneFrame(boneName string, bf *BoneFrame)
- func (m *VmdMotion) InsertCameraFrame(cf *CameraFrame)
- func (m *VmdMotion) InsertIkFrame(ikf *IkFrame)
- func (m *VmdMotion) InsertLightFrame(lf *LightFrame)
- func (m *VmdMotion) InsertMorphFrame(morphName string, mf *MorphFrame)
- func (m *VmdMotion) InsertRegisteredBoneFrame(boneName string, bf *BoneFrame)
- func (m *VmdMotion) InsertShadowFrame(sf *ShadowFrame)
- func (motion *VmdMotion) Save(overrideModelName, overridePath string) error
- func (m *VmdMotion) SetName(name string)
- type VmdMotionReader
- type VmdVpdMotionReader
- type VpdMotionReader
- type WireVertexMorphDeltas
Constants ¶
This section is empty.
Variables ¶
View Source
var InitialBoneCurves = []byte{
20,
20,
0,
0,
20,
20,
20,
20,
107,
107,
107,
107,
107,
107,
107,
107,
20,
20,
20,
20,
20,
20,
20,
107,
107,
107,
107,
107,
107,
107,
107,
0,
20,
20,
20,
20,
20,
20,
107,
107,
107,
107,
107,
107,
107,
107,
0,
0,
20,
20,
20,
20,
20,
107,
107,
107,
107,
107,
107,
107,
107,
0,
0,
0,
}
View Source
var InitialCameraCurves = []byte{
20,
20,
20,
20,
20,
20,
20,
20,
20,
20,
20,
20,
107,
107,
107,
107,
107,
107,
107,
107,
107,
107,
107,
107,
}
Functions ¶
This section is empty.
Types ¶
type BaseFrame ¶
type BaseFrame struct { Index mcore.Int Registered bool // 登録対象のキーフレであるか Read bool // VMDファイルから読み込んだキーフレであるか }
func (*BaseFrame) Copy ¶
func (b *BaseFrame) Copy() IBaseFrame
func (*BaseFrame) IsRegistered ¶
func (*BaseFrame) New ¶
func (b *BaseFrame) New(index int) IBaseFrame
type BaseFrames ¶
type BaseFrames[T IBaseFrame] struct { Indexes *mcore.IntIndexes // 全キーフレリスト RegisteredIndexes *mcore.IntIndexes // 登録対象キーフレリスト // contains filtered or unexported fields }
func NewBaseFrames ¶
func NewBaseFrames[T IBaseFrame](newFunc func(index int) T, nullFunc func() T) *BaseFrames[T]
func (*BaseFrames[T]) Contains ¶
func (fs *BaseFrames[T]) Contains(index int) bool
func (*BaseFrames[T]) ContainsRegistered ¶
func (fs *BaseFrames[T]) ContainsRegistered(index int) bool
func (*BaseFrames[T]) Delete ¶
func (fs *BaseFrames[T]) Delete(index int)
func (*BaseFrames[T]) Get ¶
func (fs *BaseFrames[T]) Get(index int) T
func (*BaseFrames[T]) GetMaxFrame ¶
func (fs *BaseFrames[T]) GetMaxFrame() int
func (*BaseFrames[T]) GetMinFrame ¶
func (fs *BaseFrames[T]) GetMinFrame() int
func (*BaseFrames[T]) Insert ¶
func (fs *BaseFrames[T]) Insert(f T)
Insert Registered が true の場合、補間曲線を分割して登録する
func (*BaseFrames[T]) Len ¶
func (fs *BaseFrames[T]) Len() int
func (*BaseFrames[T]) List ¶
func (fs *BaseFrames[T]) List() []T
func (*BaseFrames[T]) NewFrame ¶
func (fs *BaseFrames[T]) NewFrame(index int) T
type BoneCurves ¶
type BoneCurves struct { TranslateX *mmath.Curve // 移動X TranslateY *mmath.Curve // 移動Y TranslateZ *mmath.Curve // 移動Z Rotate *mmath.Curve // 回転 Values []byte // 補間曲線の値 }
func NewBoneCurves ¶
func NewBoneCurves() *BoneCurves
func NewBoneCurvesByValues ¶
func NewBoneCurvesByValues(values []byte) *BoneCurves
func (*BoneCurves) Copy ¶
func (c *BoneCurves) Copy() *BoneCurves
func (*BoneCurves) Evaluate ¶
func (v *BoneCurves) Evaluate(prevIndex, nowIndex, nextIndex int) (float64, float64, float64, float64)
補間曲線の計算 (xy, yy, zy, ry)
func (*BoneCurves) Merge ¶
func (c *BoneCurves) Merge() []byte
type BoneDelta ¶
type BoneDelta struct { Bone *pmx.Bone // ボーン Frame int // キーフレーム *MorphFrameDelta // contains filtered or unexported fields }
func (*BoneDelta) FrameMorphPosition ¶
func (*BoneDelta) FrameMorphRotation ¶
func (bd *BoneDelta) FrameMorphRotation() *mmath.MQuaternion
func (*BoneDelta) FrameMorphScale ¶
func (*BoneDelta) FramePosition ¶
func (*BoneDelta) FrameRotation ¶
func (bd *BoneDelta) FrameRotation() *mmath.MQuaternion
func (*BoneDelta) FrameScale ¶
func (*BoneDelta) GlobalMatrix ¶
func (*BoneDelta) GlobalPosition ¶
func (*BoneDelta) GlobalRotation ¶
func (bd *BoneDelta) GlobalRotation() *mmath.MQuaternion
func (*BoneDelta) LocalEffectorPosition ¶
func (*BoneDelta) LocalEffectorRotation ¶
func (bd *BoneDelta) LocalEffectorRotation(effectorFactor float64) *mmath.MQuaternion
func (*BoneDelta) LocalMatrix ¶
func (*BoneDelta) LocalPosition ¶
func (*BoneDelta) LocalRotation ¶
func (bd *BoneDelta) LocalRotation() *mmath.MQuaternion
func (*BoneDelta) LocalScale ¶
type BoneDeltas ¶
func NewBoneDeltas ¶
func NewBoneDeltas(bones *pmx.Bones) *BoneDeltas
func (*BoneDeltas) Contains ¶
func (bds *BoneDeltas) Contains(boneIndex int) bool
func (*BoneDeltas) Get ¶
func (bds *BoneDeltas) Get(boneIndex int) *BoneDelta
func (*BoneDeltas) GetBoneIndexes ¶
func (bds *BoneDeltas) GetBoneIndexes() []int
func (*BoneDeltas) GetByName ¶
func (bds *BoneDeltas) GetByName(boneName string) *BoneDelta
func (*BoneDeltas) GetNearestBoneIndexes ¶
func (bds *BoneDeltas) GetNearestBoneIndexes(worldPos *mmath.MVec3) []int
func (*BoneDeltas) LocalPosition ¶
func (bds *BoneDeltas) LocalPosition(boneIndex int, loop int) *mmath.MVec3
func (*BoneDeltas) LocalRotation ¶
func (bds *BoneDeltas) LocalRotation(boneIndex int, loop int) *mmath.MQuaternion
func (*BoneDeltas) Update ¶
func (bds *BoneDeltas) Update(boneDelta *BoneDelta)
type BoneFrame ¶
type BoneFrame struct { *BaseFrame // キーフレ Position *mmath.MVec3 // 位置 LocalPosition *mmath.MVec3 // ローカル位置 Rotation *mmath.MQuaternion // 回転 LocalRotation *mmath.MQuaternion // ローカル回転 Scale *mmath.MVec3 // スケール LocalScale *mmath.MVec3 // ローカルスケール Curves *BoneCurves // 補間曲線 }
func NewBoneFrame ¶
func NullBoneFrame ¶
func NullBoneFrame() *BoneFrame
func (*BoneFrame) Copy ¶
func (v *BoneFrame) Copy() IBaseFrame
type BoneFrames ¶
type BoneFrames struct { Data map[string]*BoneNameFrames // contains filtered or unexported fields }
func NewBoneFrames ¶
func NewBoneFrames() *BoneFrames
func (*BoneFrames) Append ¶
func (fs *BoneFrames) Append(nfs *BoneNameFrames)
func (*BoneFrames) Contains ¶
func (fs *BoneFrames) Contains(boneName string) bool
func (*BoneFrames) Deform ¶
func (fs *BoneFrames) Deform( frame int, model *pmx.PmxModel, boneNames []string, isCalcIk bool, beforeBoneDeltas *BoneDeltas, ikFrame *IkFrame, ) *BoneDeltas
func (*BoneFrames) DeformByPhysicsFlag ¶
func (fs *BoneFrames) DeformByPhysicsFlag( frame int, model *pmx.PmxModel, boneNames []string, isCalcIk bool, beforeBoneDeltas *BoneDeltas, morphDeltas *MorphDeltas, ikFrame *IkFrame, isAfterPhysics bool, ) *BoneDeltas
func (*BoneFrames) Delete ¶
func (fs *BoneFrames) Delete(boneName string)
func (*BoneFrames) Get ¶
func (fs *BoneFrames) Get(boneName string) *BoneNameFrames
func (*BoneFrames) GetIndexes ¶
func (fs *BoneFrames) GetIndexes() []int
func (*BoneFrames) GetMaxFrame ¶
func (fs *BoneFrames) GetMaxFrame() int
func (*BoneFrames) GetMinFrame ¶
func (fs *BoneFrames) GetMinFrame() int
func (*BoneFrames) GetNames ¶
func (fs *BoneFrames) GetNames() []string
func (*BoneFrames) GetRegisteredIndexes ¶
func (fs *BoneFrames) GetRegisteredIndexes() []int
func (*BoneFrames) Len ¶
func (fs *BoneFrames) Len() int
type BoneMorphDelta ¶
type BoneMorphDelta struct { BoneIndex int *BoneFrame *MorphFrameDelta }
func NewBoneMorphDelta ¶
func NewBoneMorphDelta(boneIndex int) *BoneMorphDelta
type BoneMorphDeltas ¶
type BoneMorphDeltas struct {
Data []*BoneMorphDelta
}
func NewBoneMorphDeltas ¶
func NewBoneMorphDeltas(bones *pmx.Bones) *BoneMorphDeltas
func (*BoneMorphDeltas) Get ¶
func (bts *BoneMorphDeltas) Get(boneIndex int) *BoneMorphDelta
func (*BoneMorphDeltas) Update ¶
func (bts *BoneMorphDeltas) Update(b *BoneMorphDelta)
type BoneNameFrames ¶
type BoneNameFrames struct { *BaseFrames[*BoneFrame] Name string // ボーン名 }
func NewBoneNameFrames ¶
func NewBoneNameFrames(name string) *BoneNameFrames
type CameraCurves ¶
type CameraCurves struct { TranslateX *mmath.Curve // 移動X TranslateY *mmath.Curve // 移動Y TranslateZ *mmath.Curve // 移動Z Rotate *mmath.Curve // 回転 Distance *mmath.Curve // 距離 ViewOfAngle *mmath.Curve // 視野角 Values []byte // 補間曲線の値 }
func NewCameraCurves ¶
func NewCameraCurves() *CameraCurves
func NewCameraCurvesByValues ¶
func NewCameraCurvesByValues(values []byte) *CameraCurves
func (*CameraCurves) Copy ¶
func (c *CameraCurves) Copy() *CameraCurves
func (*CameraCurves) Evaluate ¶
func (v *CameraCurves) Evaluate(prevIndex, nowIndex, nextIndex int) (float64, float64, float64, float64, float64, float64)
補間曲線の計算
func (*CameraCurves) Merge ¶
func (c *CameraCurves) Merge() []byte
type CameraFrame ¶
type CameraFrame struct { *BaseFrame // キーフレ Position *mmath.MVec3 // 位置 Rotation *mmath.MRotation // 回転 Distance float64 // 距離 ViewOfAngle int // 視野角 IsPerspectiveOff bool // パースOFF Curves *CameraCurves // 補間曲線 }
func NewCameraFrame ¶
func NewCameraFrame(index int) *CameraFrame
func NullCameraFrame ¶
func NullCameraFrame() *CameraFrame
func (*CameraFrame) Add ¶
func (cf *CameraFrame) Add(v *CameraFrame)
func (*CameraFrame) Added ¶
func (cf *CameraFrame) Added(v *CameraFrame) *CameraFrame
func (*CameraFrame) Copy ¶
func (cf *CameraFrame) Copy() IBaseFrame
type CameraFrames ¶
type CameraFrames struct { *BaseFrames[*CameraFrame] }
func NewCameraFrames ¶
func NewCameraFrames() *CameraFrames
func (*CameraFrames) NewFrame ¶
func (i *CameraFrames) NewFrame(index int) *CameraFrame
type IBaseFrame ¶
type IBaseFrame interface { GetIndex() int SetIndex(index int) IsRegistered() bool IsRead() bool Less(than llrb.Item) bool Copy() IBaseFrame New(index int) IBaseFrame // contains filtered or unexported methods }
func NewFrame ¶
func NewFrame(index int) IBaseFrame
type IkEnabledFrame ¶
type IkEnabledFrame struct { *BaseFrame // キーフレ BoneName string // IKボーン名 Enabled bool // IKON/OFF }
func NewIkEnableFrame ¶
func NewIkEnableFrame(index int) *IkEnabledFrame
func (*IkEnabledFrame) Copy ¶
func (kf *IkEnabledFrame) Copy() *IkEnabledFrame
func (*IkEnabledFrame) LerpFrame ¶
func (nextKf *IkEnabledFrame) LerpFrame(prevFrame IBaseFrame, index int) IBaseFrame
type IkFrame ¶
type IkFrame struct { *BaseFrame // キーフレ Visible bool // 表示ON/OFF IkList []*IkEnabledFrame // IKリスト }
func NewIkFrame ¶
func NullNewIkFrame ¶
func NullNewIkFrame() *IkFrame
func (*IkFrame) Copy ¶
func (ikf *IkFrame) Copy() IBaseFrame
type IkFrames ¶
type IkFrames struct { *BaseFrames[*IkFrame] }
func NewIkFrames ¶
func NewIkFrames() *IkFrames
type LightFrame ¶
func NewLightFrame ¶
func NewLightFrame(index int) *LightFrame
func NullLightFrame ¶
func NullLightFrame() *LightFrame
func (*LightFrame) Add ¶
func (lf *LightFrame) Add(v *LightFrame)
func (*LightFrame) Added ¶
func (lf *LightFrame) Added(v *LightFrame) *LightFrame
func (*LightFrame) Copy ¶
func (lf *LightFrame) Copy() IBaseFrame
type LightFrames ¶
type LightFrames struct { *BaseFrames[*LightFrame] }
func NewLightFrames ¶
func NewLightFrames() *LightFrames
func (*LightFrames) NewFrame ¶
func (i *LightFrames) NewFrame(index int) *LightFrame
type MaterialMorphDelta ¶
type MaterialMorphDelta struct { *pmx.Material AddMaterial *pmx.Material MulMaterial *pmx.Material AddRatios *pmx.Material MulRatios *pmx.Material }
func NewMaterialMorphDelta ¶
func NewMaterialMorphDelta(m *pmx.Material) *MaterialMorphDelta
func (*MaterialMorphDelta) Add ¶
func (md *MaterialMorphDelta) Add(m *pmx.MaterialMorphOffset, ratio float64)
func (*MaterialMorphDelta) Mul ¶
func (md *MaterialMorphDelta) Mul(m *pmx.MaterialMorphOffset, ratio float64)
type MaterialMorphDeltas ¶
type MaterialMorphDeltas struct {
Data []*MaterialMorphDelta
}
func NewMaterialMorphDeltas ¶
func NewMaterialMorphDeltas(materials *pmx.Materials) *MaterialMorphDeltas
type MorphDeltas ¶
type MorphDeltas struct { Vertices *VertexMorphDeltas Bones *BoneMorphDeltas Materials *MaterialMorphDeltas }
func NewMorphDeltas ¶
func NewMorphDeltas(materials *pmx.Materials, bones *pmx.Bones) *MorphDeltas
type MorphFrame ¶
func NewMorphFrame ¶
func NewMorphFrame(index int) *MorphFrame
func NullMorphFrame ¶
func NullMorphFrame() *MorphFrame
func (*MorphFrame) Add ¶
func (mf *MorphFrame) Add(v *MorphFrame)
func (*MorphFrame) Added ¶
func (mf *MorphFrame) Added(v *MorphFrame) *MorphFrame
func (*MorphFrame) Copy ¶
func (mf *MorphFrame) Copy() IBaseFrame
func (*MorphFrame) DeformAfterVertex ¶
func (mf *MorphFrame) DeformAfterVertex( morphName string, model *pmx.PmxModel, deltas *VertexMorphDeltas, ratio float64, ) *VertexMorphDeltas
func (*MorphFrame) DeformBone ¶
func (mf *MorphFrame) DeformBone( morphName string, model *pmx.PmxModel, deltas *BoneMorphDeltas, ratio float64, ) *BoneMorphDeltas
func (*MorphFrame) DeformMaterial ¶
func (mf *MorphFrame) DeformMaterial( morphName string, model *pmx.PmxModel, deltas *MaterialMorphDeltas, ratio float64, ) *MaterialMorphDeltas
DeformMaterial 材質モーフの適用
func (*MorphFrame) DeformUv ¶
func (mf *MorphFrame) DeformUv( morphName string, model *pmx.PmxModel, deltas *VertexMorphDeltas, ratio float64, ) *VertexMorphDeltas
func (*MorphFrame) DeformUv1 ¶
func (mf *MorphFrame) DeformUv1( morphName string, model *pmx.PmxModel, deltas *VertexMorphDeltas, ratio float64, ) *VertexMorphDeltas
func (*MorphFrame) DeformVertex ¶
func (mf *MorphFrame) DeformVertex( morphName string, model *pmx.PmxModel, deltas *VertexMorphDeltas, ratio float64, ) *VertexMorphDeltas
type MorphFrameDelta ¶
type MorphFrameDelta struct {
// contains filtered or unexported fields
}
func NewMorphFrameDelta ¶
func NewMorphFrameDelta() *MorphFrameDelta
func (*MorphFrameDelta) Copy ¶
func (md *MorphFrameDelta) Copy() *MorphFrameDelta
func (*MorphFrameDelta) FramePosition ¶
func (md *MorphFrameDelta) FramePosition() *mmath.MVec3
func (*MorphFrameDelta) FrameRotation ¶
func (md *MorphFrameDelta) FrameRotation() *mmath.MQuaternion
func (*MorphFrameDelta) FrameScale ¶
func (md *MorphFrameDelta) FrameScale() *mmath.MVec3
type MorphFrames ¶
type MorphFrames struct {
Data map[string]*MorphNameFrames
}
func NewMorphFrames ¶
func NewMorphFrames() *MorphFrames
func (*MorphFrames) Contains ¶
func (mfs *MorphFrames) Contains(morphName string) bool
func (*MorphFrames) Deform ¶
func (mfs *MorphFrames) Deform( frame int, model *pmx.PmxModel, morphNames []string, ) *MorphDeltas
func (*MorphFrames) Get ¶
func (mfs *MorphFrames) Get(morphName string) *MorphNameFrames
func (*MorphFrames) GetMaxFrame ¶
func (mfs *MorphFrames) GetMaxFrame() int
func (*MorphFrames) GetMinFrame ¶
func (mfs *MorphFrames) GetMinFrame() int
func (*MorphFrames) GetNames ¶
func (mfs *MorphFrames) GetNames() []string
func (*MorphFrames) Len ¶
func (fs *MorphFrames) Len() int
func (*MorphFrames) Update ¶
func (mfs *MorphFrames) Update(fs *MorphNameFrames)
type MorphNameFrames ¶
type MorphNameFrames struct { *BaseFrames[*MorphFrame] Name string // ボーン名 }
func NewMorphNameFrames ¶
func NewMorphNameFrames(name string) *MorphNameFrames
func (*MorphNameFrames) NewFrame ¶
func (i *MorphNameFrames) NewFrame(index int) *MorphFrame
type SelectedVertexMorphDeltas ¶
type SelectedVertexMorphDeltas struct {
*VertexMorphDeltas
}
func NewSelectedVertexMorphDeltas ¶
func NewSelectedVertexMorphDeltas() *SelectedVertexMorphDeltas
type ShadowFrame ¶
func NewShadowFrame ¶
func NewShadowFrame(index int) *ShadowFrame
func NullShadowFrame ¶
func NullShadowFrame() *ShadowFrame
func (*ShadowFrame) Copy ¶
func (sf *ShadowFrame) Copy() IBaseFrame
type ShadowFrames ¶
type ShadowFrames struct { *BaseFrames[*ShadowFrame] }
func NewShadowFrames ¶
func NewShadowFrames() *ShadowFrames
func (*ShadowFrames) NewFrame ¶
func (i *ShadowFrames) NewFrame(index int) *ShadowFrame
type VertexDelta ¶
func NewVertexDelta ¶
func NewVertexDelta(pos *mmath.MVec3) *VertexDelta
type VertexDeltas ¶
type VertexDeltas struct { Data []*VertexDelta Vertices *pmx.Vertices }
func NewVertexDeltas ¶
func NewVertexDeltas(vertices *pmx.Vertices) *VertexDeltas
func (*VertexDeltas) FindNearestVertexIndexes ¶
func (vds *VertexDeltas) FindNearestVertexIndexes(frontPos *mmath.MVec3, visibleMaterialIndexes []int) [][]int
func (*VertexDeltas) FindVerticesInBox ¶
func (vds *VertexDeltas) FindVerticesInBox(prevXprevYFrontPos, prevXprevYBackPos, prevXnowYFrontPos, prevXnowYBackPos, nowXprevYFrontPos, nowXprevYBackPos, nowXnowYFrontPos, nowXnowYBackPos *mmath.MVec3, visibleMaterialIndexes []int) [][]int
func (*VertexDeltas) Get ¶
func (vds *VertexDeltas) Get(vertexIndex int) *VertexDelta
type VertexMorphDelta ¶
type VertexMorphDelta struct { Index int Position *mmath.MVec3 Uv *mmath.MVec2 Uv1 *mmath.MVec2 AfterPosition *mmath.MVec3 }
func NewVertexMorphDelta ¶
func NewVertexMorphDelta(index int) *VertexMorphDelta
type VertexMorphDeltas ¶
type VertexMorphDeltas struct {
Data map[int]*VertexMorphDelta
}
func NewVertexMorphDeltas ¶
func NewVertexMorphDeltas() *VertexMorphDeltas
type VmdDeltas ¶
type VmdDeltas struct { Vertices *VertexDeltas Bones *BoneDeltas Morphs *MorphDeltas SelectedVertexDeltas *SelectedVertexMorphDeltas BoneGlDeltas []mgl32.Mat4 MeshGlDeltas []*pmx.MeshDelta VertexMorphIndexes []int VertexMorphGlDeltas [][]float32 SelectedVertexIndexes []int SelectedVertexGlDeltas [][]float32 }
func NewVmdDeltas ¶
type VmdMotion ¶
type VmdMotion struct { *mcore.HashModel Signature string // vmdバージョン ModelName string // モデル名 BoneFrames *BoneFrames MorphFrames *MorphFrames CameraFrames *CameraFrames LightFrames *LightFrames ShadowFrames *ShadowFrames IkFrames *IkFrames }
func NewVmdMotion ¶
func (*VmdMotion) AppendBoneFrame ¶
func (*VmdMotion) AppendCameraFrame ¶
func (m *VmdMotion) AppendCameraFrame(cf *CameraFrame)
func (*VmdMotion) AppendIkFrame ¶
func (*VmdMotion) AppendLightFrame ¶
func (m *VmdMotion) AppendLightFrame(lf *LightFrame)
func (*VmdMotion) AppendMorphFrame ¶
func (m *VmdMotion) AppendMorphFrame(morphName string, mf *MorphFrame)
func (*VmdMotion) AppendRegisteredBoneFrame ¶
func (*VmdMotion) AppendRegisteredMorphFrame ¶
func (m *VmdMotion) AppendRegisteredMorphFrame(morphName string, mf *MorphFrame)
func (*VmdMotion) AppendShadowFrame ¶
func (m *VmdMotion) AppendShadowFrame(sf *ShadowFrame)
func (*VmdMotion) Copy ¶
func (m *VmdMotion) Copy() mcore.IHashModel
func (*VmdMotion) DeformMorph ¶
func (*VmdMotion) GetMaxFrame ¶
func (*VmdMotion) GetMinFrame ¶
func (*VmdMotion) InsertBoneFrame ¶
func (*VmdMotion) InsertCameraFrame ¶
func (m *VmdMotion) InsertCameraFrame(cf *CameraFrame)
func (*VmdMotion) InsertIkFrame ¶
func (*VmdMotion) InsertLightFrame ¶
func (m *VmdMotion) InsertLightFrame(lf *LightFrame)
func (*VmdMotion) InsertMorphFrame ¶
func (m *VmdMotion) InsertMorphFrame(morphName string, mf *MorphFrame)
func (*VmdMotion) InsertRegisteredBoneFrame ¶
func (*VmdMotion) InsertShadowFrame ¶
func (m *VmdMotion) InsertShadowFrame(sf *ShadowFrame)
type VmdMotionReader ¶
type VmdMotionReader struct { mcore.BaseReader[*VmdMotion] }
VMDリーダー
func (*VmdMotionReader) DecodeShiftJIS ¶
func (r *VmdMotionReader) DecodeShiftJIS(fbytes []byte) (string, error)
func (*VmdMotionReader) ReadByFilepath ¶
func (r *VmdMotionReader) ReadByFilepath(path string) (mcore.IHashModel, error)
指定されたパスのファイルからデータを読み込む
func (*VmdMotionReader) ReadNameByFilepath ¶
func (r *VmdMotionReader) ReadNameByFilepath(path string) (string, error)
type VmdVpdMotionReader ¶
type VmdVpdMotionReader struct { mcore.BaseReader[*VmdMotion] // contains filtered or unexported fields }
VMDリーダー
func NewVmdVpdMotionReader ¶
func NewVmdVpdMotionReader() *VmdVpdMotionReader
func (*VmdVpdMotionReader) ReadByFilepath ¶
func (r *VmdVpdMotionReader) ReadByFilepath(path string) (mcore.IHashModel, error)
指定されたパスのファイルからデータを読み込む
func (*VmdVpdMotionReader) ReadNameByFilepath ¶
func (r *VmdVpdMotionReader) ReadNameByFilepath(path string) (string, error)
type VpdMotionReader ¶
type VpdMotionReader struct { mcore.BaseReader[*VmdMotion] // contains filtered or unexported fields }
VMDリーダー
func (*VpdMotionReader) ReadByFilepath ¶
func (r *VpdMotionReader) ReadByFilepath(path string) (mcore.IHashModel, error)
指定されたパスのファイルからデータを読み込む
func (*VpdMotionReader) ReadNameByFilepath ¶
func (r *VpdMotionReader) ReadNameByFilepath(path string) (string, error)
type WireVertexMorphDeltas ¶
type WireVertexMorphDeltas struct {
*VertexMorphDeltas
}
func NewWireVertexMorphDeltas ¶
func NewWireVertexMorphDeltas() *WireVertexMorphDeltas
Source Files ¶
- base_frame.go
- bone_curves.go
- bone_delta.go
- bone_frame.go
- bone_frames.go
- bone_name_frames.go
- camera_curves.go
- camera_frame.go
- camera_frames.go
- ik_frame.go
- ik_frames.go
- light_frame.go
- light_frames.go
- morph_delta.go
- morph_frame.go
- morph_frames.go
- morph_name_frames.go
- shadow_frame.go
- shadow_frames.go
- vertex_delta.go
- vmd_deltas.go
- vmd_motion.go
- vmd_reader.go
- vmd_vpd_reader.go
- vmd_writer.go
- vpd_reader.go
Click to show internal directories.
Click to hide internal directories.