vmd

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2024 License: MIT Imports: 26 Imported by: 1

Documentation

Index

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) GetIndex

func (bf *BaseFrame) GetIndex() int

func (*BaseFrame) IsRead

func (bf *BaseFrame) IsRead() bool

func (*BaseFrame) IsRegistered

func (bf *BaseFrame) IsRegistered() bool

func (*BaseFrame) Less

func (b *BaseFrame) Less(than llrb.Item) bool

func (*BaseFrame) New

func (b *BaseFrame) New(index int) IBaseFrame

func (*BaseFrame) SetIndex

func (bf *BaseFrame) SetIndex(index int)

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]) Append

func (fs *BaseFrames[T]) Append(f T)

Append 補間曲線は分割しない

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 NewBoneDelta

func NewBoneDelta(bone *pmx.Bone, frame int) *BoneDelta

func NewBoneDeltaByGlobalMatrix

func NewBoneDeltaByGlobalMatrix(
	bone *pmx.Bone, frame int, globalMatrix *mmath.MMat4, parentDelta *BoneDelta,
) *BoneDelta

func (*BoneDelta) Copy

func (bd *BoneDelta) Copy() *BoneDelta

func (*BoneDelta) FrameMorphPosition

func (bd *BoneDelta) FrameMorphPosition() *mmath.MVec3

func (*BoneDelta) FrameMorphRotation

func (bd *BoneDelta) FrameMorphRotation() *mmath.MQuaternion

func (*BoneDelta) FrameMorphScale

func (bd *BoneDelta) FrameMorphScale() *mmath.MVec3

func (*BoneDelta) FramePosition

func (bd *BoneDelta) FramePosition() *mmath.MVec3

func (*BoneDelta) FrameRotation

func (bd *BoneDelta) FrameRotation() *mmath.MQuaternion

func (*BoneDelta) FrameScale

func (bd *BoneDelta) FrameScale() *mmath.MVec3

func (*BoneDelta) GlobalMatrix

func (bd *BoneDelta) GlobalMatrix() *mmath.MMat4

func (*BoneDelta) GlobalPosition

func (bd *BoneDelta) GlobalPosition() *mmath.MVec3

func (*BoneDelta) GlobalRotation

func (bd *BoneDelta) GlobalRotation() *mmath.MQuaternion

func (*BoneDelta) LocalEffectorPosition

func (bd *BoneDelta) LocalEffectorPosition(effectorFactor float64) *mmath.MVec3

func (*BoneDelta) LocalEffectorRotation

func (bd *BoneDelta) LocalEffectorRotation(effectorFactor float64) *mmath.MQuaternion

func (*BoneDelta) LocalMatrix

func (bd *BoneDelta) LocalMatrix() *mmath.MMat4

func (*BoneDelta) LocalPosition

func (bd *BoneDelta) LocalPosition() *mmath.MVec3

func (*BoneDelta) LocalRotation

func (bd *BoneDelta) LocalRotation() *mmath.MQuaternion

func (*BoneDelta) LocalScale

func (bd *BoneDelta) LocalScale() *mmath.MVec3

type BoneDeltas

type BoneDeltas struct {
	Data  []*BoneDelta
	Bones *pmx.Bones
}

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 NewBoneFrame(index int) *BoneFrame

func NullBoneFrame

func NullBoneFrame() *BoneFrame

func (*BoneFrame) Add

func (bf *BoneFrame) Add(v *BoneFrame) *BoneFrame

func (*BoneFrame) Added

func (bf *BoneFrame) Added(v *BoneFrame) *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 NewIkFrame(index int) *IkFrame

func NullNewIkFrame

func NullNewIkFrame() *IkFrame

func (*IkFrame) Copy

func (ikf *IkFrame) Copy() IBaseFrame

func (*IkFrame) IsEnable

func (kf *IkFrame) IsEnable(boneName string) bool

type IkFrames

type IkFrames struct {
	*BaseFrames[*IkFrame]
}

func NewIkFrames

func NewIkFrames() *IkFrames

func (*IkFrames) NewFrame

func (i *IkFrames) NewFrame(index int) *IkFrame

type LightFrame

type LightFrame struct {
	*BaseFrame              // キーフレ
	Position   *mmath.MVec3 // 位置
	Color      *mmath.MVec3 // 色
}

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 (*MaterialMorphDelta) Mul

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

type MorphFrame struct {
	*BaseFrame         // キーフレ
	Ratio      float64 // モーフの割合
}

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

type ShadowFrame struct {
	*BaseFrame         // キーフレ
	ShadowMode int     // セルフ影モード
	Distance   float64 // 影範囲距離
}

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

type VertexDelta struct {
	Position *mmath.MVec3
}

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

func NewVmdDeltas(vertices *pmx.Vertices) *VmdDeltas

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 NewVmdMotion(path string) *VmdMotion

func (*VmdMotion) AppendBoneFrame

func (m *VmdMotion) AppendBoneFrame(boneName string, bf *BoneFrame)

func (*VmdMotion) AppendCameraFrame

func (m *VmdMotion) AppendCameraFrame(cf *CameraFrame)

func (*VmdMotion) AppendIkFrame

func (m *VmdMotion) AppendIkFrame(ikf *IkFrame)

func (*VmdMotion) AppendLightFrame

func (m *VmdMotion) AppendLightFrame(lf *LightFrame)

func (*VmdMotion) AppendMorphFrame

func (m *VmdMotion) AppendMorphFrame(morphName string, mf *MorphFrame)

func (*VmdMotion) AppendRegisteredBoneFrame

func (m *VmdMotion) AppendRegisteredBoneFrame(boneName string, bf *BoneFrame)

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 (m *VmdMotion) DeformMorph(
	frame int,
	model *pmx.PmxModel,
	morphNames []string,
) *MorphDeltas

func (*VmdMotion) GetMaxFrame

func (m *VmdMotion) GetMaxFrame() int

func (*VmdMotion) GetMinFrame

func (m *VmdMotion) GetMinFrame() int

func (*VmdMotion) GetName

func (m *VmdMotion) GetName() string

func (*VmdMotion) InsertBoneFrame

func (m *VmdMotion) InsertBoneFrame(boneName string, bf *BoneFrame)

func (*VmdMotion) InsertCameraFrame

func (m *VmdMotion) InsertCameraFrame(cf *CameraFrame)

func (*VmdMotion) InsertIkFrame

func (m *VmdMotion) InsertIkFrame(ikf *IkFrame)

func (*VmdMotion) InsertLightFrame

func (m *VmdMotion) InsertLightFrame(lf *LightFrame)

func (*VmdMotion) InsertMorphFrame

func (m *VmdMotion) InsertMorphFrame(morphName string, mf *MorphFrame)

func (*VmdMotion) InsertRegisteredBoneFrame

func (m *VmdMotion) InsertRegisteredBoneFrame(boneName string, bf *BoneFrame)

func (*VmdMotion) InsertShadowFrame

func (m *VmdMotion) InsertShadowFrame(sf *ShadowFrame)

func (*VmdMotion) Save

func (motion *VmdMotion) Save(overrideModelName, overridePath string) error

func (*VmdMotion) SetName

func (m *VmdMotion) SetName(name string)

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)

func (*VmdMotionReader) ReadText

func (r *VmdMotionReader) ReadText(size int) (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)

func (*VpdMotionReader) ReadText

func (r *VpdMotionReader) ReadText(line string, pattern *regexp.Regexp) ([]string, error)

type WireVertexMorphDeltas

type WireVertexMorphDeltas struct {
	*VertexMorphDeltas
}

func NewWireVertexMorphDeltas

func NewWireVertexMorphDeltas() *WireVertexMorphDeltas

Jump to

Keyboard shortcuts

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