Documentation
¶
Index ¶
- Constants
- Variables
- func GetStandardBoneConfigs() map[StandardBoneName]*BoneConfig
- func NewCollisionGroup(collisionGroupMask uint16) []uint16
- type Bdef1
- func (deform *Bdef1) Add(boneIndex, separateIndex int, ratio float64)
- func (deform *Bdef1) Index(boneIndex int) int
- func (deform *Bdef1) IndexWeight(boneIndex int) float64
- func (deform *Bdef1) Indexes() []int
- func (deform *Bdef1) IndexesByWeight(weightThreshold float64) []int
- func (deform *Bdef1) Normalize(align bool)
- func (bdef1 *Bdef1) Packed() [8]float32
- func (deform *Bdef1) SetIndexes(indexes []int)
- func (deform *Bdef1) SetWeights(weights []float64)
- func (deform *Bdef1) Weights() []float64
- func (deform *Bdef1) WeightsByWeight(weightThreshold float64) []float64
- type Bdef2
- func (deform *Bdef2) Add(boneIndex, separateIndex int, ratio float64)
- func (deform *Bdef2) Index(boneIndex int) int
- func (deform *Bdef2) IndexWeight(boneIndex int) float64
- func (deform *Bdef2) Indexes() []int
- func (deform *Bdef2) IndexesByWeight(weightThreshold float64) []int
- func (deform *Bdef2) Normalize(align bool)
- func (bdef2 *Bdef2) Packed() [8]float32
- func (deform *Bdef2) SetIndexes(indexes []int)
- func (deform *Bdef2) SetWeights(weights []float64)
- func (deform *Bdef2) Weights() []float64
- func (deform *Bdef2) WeightsByWeight(weightThreshold float64) []float64
- type Bdef4
- func (deform *Bdef4) Add(boneIndex, separateIndex int, ratio float64)
- func (deform *Bdef4) Index(boneIndex int) int
- func (deform *Bdef4) IndexWeight(boneIndex int) float64
- func (deform *Bdef4) Indexes() []int
- func (deform *Bdef4) IndexesByWeight(weightThreshold float64) []int
- func (deform *Bdef4) Normalize(align bool)
- func (bdef4 *Bdef4) Packed() [8]float32
- func (deform *Bdef4) SetIndexes(indexes []int)
- func (deform *Bdef4) SetWeights(weights []float64)
- func (deform *Bdef4) Weights() []float64
- func (deform *Bdef4) WeightsByWeight(weightThreshold float64) []float64
- type Bone
- func (bone *Bone) CanManipulate() bool
- func (bone *Bone) CanRotate() bool
- func (bone *Bone) CanTranslate() bool
- func (bone *Bone) Config() *BoneConfig
- func (bone *Bone) ConfigChildBoneNames() []string
- func (bone *Bone) ConfigParentBoneNames() []string
- func (bone *Bone) Copy() core.IIndexNameModel
- func (bone *Bone) Direction() BoneDirection
- func (bone *Bone) EnglishName() string
- func (bone *Bone) HasFixedAxis() bool
- func (bone *Bone) HasLocalAxis() bool
- func (bone *Bone) HasPhysics() bool
- func (bone *Bone) Index() int
- func (bone *Bone) IsAfterPhysicsDeform() bool
- func (bone *Bone) IsEffectorLocal() bool
- func (bone *Bone) IsEffectorParentDeform() bool
- func (bone *Bone) IsEffectorRotation() bool
- func (bone *Bone) IsEffectorTranslation() bool
- func (bone *Bone) IsIK() bool
- func (bone *Bone) IsTailBone() bool
- func (bone *Bone) IsValid() bool
- func (bone *Bone) IsVisible() bool
- func (bone *Bone) Name() string
- func (bone *Bone) NormalizeFixedAxis(fixedAxis *mmath.MVec3)
- func (bone *Bone) NormalizeLocalAxis(localAxisX *mmath.MVec3)
- func (bone *Bone) SetEnglishName(englishName string)
- func (bone *Bone) SetIndex(index int)
- func (bone *Bone) SetName(name string)
- type BoneCategory
- type BoneConfig
- type BoneDirection
- type BoneFlag
- type BoneMorphOffset
- type Bones
- func (bones *Bones) CreateAnkleD(direction BoneDirection) (*Bone, error)
- func (bones *Bones) CreateAnkleDGround(direction BoneDirection) (*Bone, error)
- func (bones *Bones) CreateArmTwist(direction BoneDirection) (*Bone, error)
- func (bones *Bones) CreateArmTwistChild(direction BoneDirection, idx int) (*Bone, error)
- func (bones *Bones) CreateBodyAxis() (*Bone, error)
- func (bones *Bones) CreateGroove() (*Bone, error)
- func (bones *Bones) CreateHead() (*Bone, error)
- func (bones *Bones) CreateHeadTail() (*Bone, error)
- func (bones *Bones) CreateHeel(direction BoneDirection) (*Bone, error)
- func (bones *Bones) CreateHeelD(direction BoneDirection) (*Bone, error)
- func (bones *Bones) CreateHip(direction BoneDirection) (*Bone, error)
- func (bones *Bones) CreateIndexTail(direction BoneDirection) (*Bone, error)
- func (bones *Bones) CreateKneeD(direction BoneDirection) (*Bone, error)
- func (bones *Bones) CreateLegCenter() (*Bone, error)
- func (bones *Bones) CreateLegD(direction BoneDirection) (*Bone, error)
- func (bones *Bones) CreateLegIkParent(direction BoneDirection) (*Bone, error)
- func (bones *Bones) CreateLegRoot(direction BoneDirection) (*Bone, error)
- func (bones *Bones) CreateLowerRoot() (*Bone, error)
- func (bones *Bones) CreateMiddleTail(direction BoneDirection) (*Bone, error)
- func (bones *Bones) CreateNeck() (*Bone, error)
- func (bones *Bones) CreateNeckRoot() (*Bone, error)
- func (bones *Bones) CreatePinkyTail(direction BoneDirection) (*Bone, error)
- func (bones *Bones) CreateRingTail(direction BoneDirection) (*Bone, error)
- func (bones *Bones) CreateRoot() (*Bone, error)
- func (bones *Bones) CreateShoulderC(direction BoneDirection) (*Bone, error)
- func (bones *Bones) CreateShoulderP(direction BoneDirection) (*Bone, error)
- func (bones *Bones) CreateShoulderRoot(direction BoneDirection) (*Bone, error)
- func (bones *Bones) CreateThumb0(direction BoneDirection) (*Bone, error)
- func (bones *Bones) CreateThumbTail(direction BoneDirection) (*Bone, error)
- func (bones *Bones) CreateToeC(direction BoneDirection) (*Bone, error)
- func (bones *Bones) CreateToeCD(direction BoneDirection) (*Bone, error)
- func (bones *Bones) CreateToeEx(direction BoneDirection) (*Bone, error)
- func (bones *Bones) CreateToeP(direction BoneDirection) (*Bone, error)
- func (bones *Bones) CreateToePD(direction BoneDirection) (*Bone, error)
- func (bones *Bones) CreateToeT(direction BoneDirection) (*Bone, error)
- func (bones *Bones) CreateToeTD(direction BoneDirection) (*Bone, error)
- func (bones *Bones) CreateTrunkRoot() (*Bone, error)
- func (bones *Bones) CreateUpper2() (*Bone, error)
- func (bones *Bones) CreateUpperRoot() (*Bone, error)
- func (bones *Bones) CreateWaist() (*Bone, error)
- func (bones *Bones) CreateWaistCancel(direction BoneDirection) (*Bone, error)
- func (bones *Bones) CreateWristTail(direction BoneDirection) (*Bone, error)
- func (bones *Bones) CreateWristTwist(direction BoneDirection) (*Bone, error)
- func (bones *Bones) CreateWristTwistChild(direction BoneDirection, idx int) (*Bone, error)
- func (bones *Bones) GetAnkle(direction BoneDirection) (*Bone, error)
- func (bones *Bones) GetAnkleD(direction BoneDirection) (*Bone, error)
- func (bones *Bones) GetAnkleDGround(direction BoneDirection) (*Bone, error)
- func (bones *Bones) GetArm(direction BoneDirection) (*Bone, error)
- func (bones *Bones) GetArmTwist(direction BoneDirection) (*Bone, error)
- func (bones *Bones) GetArmTwistChild(direction BoneDirection, idx int) (*Bone, error)
- func (bones *Bones) GetBodyAxis() (*Bone, error)
- func (bones *Bones) GetCenter() (*Bone, error)
- func (bones *Bones) GetElbow(direction BoneDirection) (*Bone, error)
- func (bones *Bones) GetEye(direction BoneDirection) (*Bone, error)
- func (bones *Bones) GetEyes() (*Bone, error)
- func (bones *Bones) GetGroove() (*Bone, error)
- func (bones *Bones) GetHead() (*Bone, error)
- func (bones *Bones) GetHeadTail() (*Bone, error)
- func (bones *Bones) GetHeel(direction BoneDirection) (*Bone, error)
- func (bones *Bones) GetHeelD(direction BoneDirection) (*Bone, error)
- func (bones *Bones) GetHip(direction BoneDirection) (*Bone, error)
- func (bones *Bones) GetIkTarget(ikBoneIndex int) (*Bone, error)
- func (bones *Bones) GetIkTargetByName(ikBoneName string) (*Bone, error)
- func (bones *Bones) GetIndex(direction BoneDirection, idx int) (*Bone, error)
- func (bones *Bones) GetIndexTail(direction BoneDirection) (*Bone, error)
- func (bones *Bones) GetKnee(direction BoneDirection) (*Bone, error)
- func (bones *Bones) GetKneeD(direction BoneDirection) (*Bone, error)
- func (bones *Bones) GetLeg(direction BoneDirection) (*Bone, error)
- func (bones *Bones) GetLegCenter() (*Bone, error)
- func (bones *Bones) GetLegD(direction BoneDirection) (*Bone, error)
- func (bones *Bones) GetLegIk(direction BoneDirection) (*Bone, error)
- func (bones *Bones) GetLegIkParent(direction BoneDirection) (*Bone, error)
- func (bones *Bones) GetLegRoot(direction BoneDirection) (*Bone, error)
- func (bones *Bones) GetLower() (*Bone, error)
- func (bones *Bones) GetLowerRoot() (*Bone, error)
- func (bones *Bones) GetMiddle(direction BoneDirection, idx int) (*Bone, error)
- func (bones *Bones) GetMiddleTail(direction BoneDirection) (*Bone, error)
- func (bones *Bones) GetNeck() (*Bone, error)
- func (bones *Bones) GetNeckRoot() (*Bone, error)
- func (bones *Bones) GetPinky(direction BoneDirection, idx int) (*Bone, error)
- func (bones *Bones) GetPinkyTail(direction BoneDirection) (*Bone, error)
- func (bones *Bones) GetRing(direction BoneDirection, idx int) (*Bone, error)
- func (bones *Bones) GetRingTail(direction BoneDirection) (*Bone, error)
- func (bones *Bones) GetRoot() (*Bone, error)
- func (bones *Bones) GetShoulder(direction BoneDirection) (*Bone, error)
- func (bones *Bones) GetShoulderC(direction BoneDirection) (*Bone, error)
- func (bones *Bones) GetShoulderP(direction BoneDirection) (*Bone, error)
- func (bones *Bones) GetShoulderRoot(direction BoneDirection) (*Bone, error)
- func (b *Bones) GetStandardBoneNames() []string
- func (bones *Bones) GetThumb(direction BoneDirection, idx int) (*Bone, error)
- func (bones *Bones) GetThumbTail(direction BoneDirection) (*Bone, error)
- func (bones *Bones) GetToeC(direction BoneDirection) (*Bone, error)
- func (bones *Bones) GetToeCD(direction BoneDirection) (*Bone, error)
- func (bones *Bones) GetToeEx(direction BoneDirection) (*Bone, error)
- func (bones *Bones) GetToeIK(direction BoneDirection) (*Bone, error)
- func (bones *Bones) GetToeIk(direction BoneDirection) (*Bone, error)
- func (bones *Bones) GetToeP(direction BoneDirection) (*Bone, error)
- func (bones *Bones) GetToePD(direction BoneDirection) (*Bone, error)
- func (bones *Bones) GetToeT(direction BoneDirection) (*Bone, error)
- func (bones *Bones) GetToeTD(direction BoneDirection) (*Bone, error)
- func (bones *Bones) GetTrunkRoot() (*Bone, error)
- func (bones *Bones) GetUpper() (*Bone, error)
- func (bones *Bones) GetUpper2() (*Bone, error)
- func (bones *Bones) GetUpperRoot() (*Bone, error)
- func (bones *Bones) GetWaist() (*Bone, error)
- func (bones *Bones) GetWaistCancel(direction BoneDirection) (*Bone, error)
- func (bones *Bones) GetWrist(direction BoneDirection) (*Bone, error)
- func (bones *Bones) GetWristTail(direction BoneDirection) (*Bone, error)
- func (bones *Bones) GetWristTwist(direction BoneDirection) (*Bone, error)
- func (bones *Bones) GetWristTwistChild(direction BoneDirection, idx int) (*Bone, error)
- func (bones *Bones) Insert(bone *Bone) error
- func (bones *Bones) InsertShortageOverrideBones() error
- func (bones *Bones) MaxBoneIndex(boneIndexes []int) int
- func (bones *Bones) MinBoneIndex(boneIndexes []int) int
- func (bones *Bones) Range(fromBoneIndex, toBoneIndex int) []int
- func (bones *Bones) SetParentFromConfig(bone *Bone)
- func (bones *Bones) Setup()
- type CollisionGroup
- type DeformType
- type DisplaySlot
- func (displaySlot *DisplaySlot) Copy() core.IIndexNameModel
- func (displaySlot *DisplaySlot) EnglishName() string
- func (displaySlot *DisplaySlot) Index() int
- func (displaySlot *DisplaySlot) IsValid() bool
- func (displaySlot *DisplaySlot) Name() string
- func (displaySlot *DisplaySlot) SetEnglishName(englishName string)
- func (displaySlot *DisplaySlot) SetIndex(index int)
- func (displaySlot *DisplaySlot) SetName(name string)
- type DisplaySlots
- type DisplayType
- type DrawFlag
- func (drawFlg DrawFlag) IsDoubleSidedDrawing() bool
- func (drawFlg DrawFlag) IsDrawingEdge() bool
- func (drawFlg DrawFlag) IsDrawingOnSelfShadowMaps() bool
- func (drawFlg DrawFlag) IsDrawingSelfShadows() bool
- func (drawFlg DrawFlag) IsGroundShadow() bool
- func (drawFlg DrawFlag) SetDoubleSidedDrawing(flag bool) DrawFlag
- func (drawFlg DrawFlag) SetDrawingEdge(flag bool) DrawFlag
- func (drawFlg DrawFlag) SetDrawingOnSelfShadowMaps(flag bool) DrawFlag
- func (drawFlg DrawFlag) SetDrawingSelfShadows(flag bool) DrawFlag
- func (drawFlg DrawFlag) SetGroundShadow(flag bool) DrawFlag
- type Face
- type FaceGL
- type Faces
- type GroupMorphOffset
- type IDeform
- type IMorphOffset
- type Ik
- type IkLink
- type Joint
- func (joint *Joint) Copy() core.IIndexNameModel
- func (joint *Joint) EnglishName() string
- func (joint *Joint) Index() int
- func (joint *Joint) IsValid() bool
- func (joint *Joint) Name() string
- func (joint *Joint) SetEnglishName(englishName string)
- func (joint *Joint) SetIndex(index int)
- func (joint *Joint) SetName(name string)
- type JointParam
- type Joints
- type Material
- func (material *Material) Copy() core.IIndexNameModel
- func (material *Material) EnglishName() string
- func (material *Material) Index() int
- func (material *Material) IsValid() bool
- func (material *Material) Name() string
- func (material *Material) SetEnglishName(englishName string)
- func (material *Material) SetIndex(index int)
- func (material *Material) SetName(name string)
- type MaterialMorphCalcMode
- type MaterialMorphOffset
- type Materials
- type Morph
- func (morph *Morph) Copy() core.IIndexNameModel
- func (morph *Morph) EnglishName() string
- func (morph *Morph) Index() int
- func (morph *Morph) IsValid() bool
- func (morph *Morph) Name() string
- func (morph *Morph) SetEnglishName(englishName string)
- func (morph *Morph) SetIndex(index int)
- func (morph *Morph) SetName(name string)
- type MorphPanel
- type MorphType
- type Morphs
- type PhysicsType
- type PmxModel
- func (model *PmxModel) Copy() (*PmxModel, error)
- func (model *PmxModel) EnglishName() string
- func (model *PmxModel) Hash() string
- func (model *PmxModel) Index() int
- func (model *PmxModel) InitializeDisplaySlots()
- func (model *PmxModel) Name() string
- func (model *PmxModel) Path() string
- func (model *PmxModel) SetEnglishName(name string)
- func (model *PmxModel) SetHash(hash string)
- func (model *PmxModel) SetIndex(index int)
- func (model *PmxModel) SetName(name string)
- func (model *PmxModel) SetPath(path string)
- func (model *PmxModel) SetRandHash()
- func (model *PmxModel) Setup()
- func (model *PmxModel) UpdateHash()
- type Reference
- type RigidBodies
- type RigidBody
- func (rigidBody *RigidBody) Copy() core.IIndexNameModel
- func (rigidBody *RigidBody) EnglishName() string
- func (rigidBody *RigidBody) Index() int
- func (rigidBody *RigidBody) IsValid() bool
- func (rigidBody *RigidBody) Name() string
- func (rigidBody *RigidBody) SetEnglishName(englishName string)
- func (rigidBody *RigidBody) SetIndex(index int)
- func (rigidBody *RigidBody) SetName(name string)
- type RigidBodyParam
- type Sdef
- func (deform *Sdef) Add(boneIndex, separateIndex int, ratio float64)
- func (deform *Sdef) Index(boneIndex int) int
- func (deform *Sdef) IndexWeight(boneIndex int) float64
- func (deform *Sdef) Indexes() []int
- func (deform *Sdef) IndexesByWeight(weightThreshold float64) []int
- func (deform *Sdef) Normalize(align bool)
- func (sdef *Sdef) Packed() [8]float32
- func (deform *Sdef) SetIndexes(indexes []int)
- func (deform *Sdef) SetWeights(weights []float64)
- func (deform *Sdef) Weights() []float64
- func (deform *Sdef) WeightsByWeight(weightThreshold float64) []float64
- type Shape
- type SpecialFlag
- type SphereMode
- type StandardBoneName
- type Texture
- func (tex *Texture) Copy() core.IIndexModel
- func (tex *Texture) EnglishName() string
- func (tex *Texture) Index() int
- func (tex *Texture) IsValid() bool
- func (tex *Texture) Name() string
- func (tex *Texture) SetEnglishName(englishName string)
- func (tex *Texture) SetIndex(index int)
- func (tex *Texture) SetName(name string)
- func (tex *Texture) SetValid(valid bool)
- type TextureType
- type Textures
- type ToonSharing
- type ToonTextures
- type UvMorphOffset
- type Vertex
- type VertexMorphOffset
- type Vertices
Constants ¶
const BONE_DIRECTION_PREFIX string = "{d}"
const MLIB_PREFIX string = "[mlib]"
MLIB_PREFIX システム用接頭辞
Variables ¶
var CollisionGroupFlags = []uint16{
0x0001,
0x0002,
0x0004,
0x0008,
0x0010,
0x0020,
0x0040,
0x0080,
0x0100,
0x0200,
0x0400,
0x0800,
0x1000,
0x2000,
0x4000,
0x8000,
}
Functions ¶
func GetStandardBoneConfigs ¶ added in v0.0.4
func GetStandardBoneConfigs() map[StandardBoneName]*BoneConfig
func NewCollisionGroup ¶
Types ¶
type Bdef1 ¶
type Bdef1 struct {
// contains filtered or unexported fields
}
Bdef1 represents the BDEF1 deformation.
func (*Bdef1) IndexWeight ¶
func (*Bdef1) IndexesByWeight ¶
Indexes ウェイト閾値以上のウェイトを持っているINDEXのみを取得する
func (*Bdef1) SetIndexes ¶
func (deform *Bdef1) SetIndexes(indexes []int)
func (*Bdef1) SetWeights ¶
func (deform *Bdef1) SetWeights(weights []float64)
func (*Bdef1) WeightsByWeight ¶
Weights ウェイト閾値以上のウェイトを持っているウェイトのみを取得する
type Bdef2 ¶
type Bdef2 struct {
// contains filtered or unexported fields
}
Bdef2 represents the BDEF2 deformation.
func (*Bdef2) IndexWeight ¶
func (*Bdef2) IndexesByWeight ¶
Indexes ウェイト閾値以上のウェイトを持っているINDEXのみを取得する
func (*Bdef2) SetIndexes ¶
func (deform *Bdef2) SetIndexes(indexes []int)
func (*Bdef2) SetWeights ¶
func (deform *Bdef2) SetWeights(weights []float64)
func (*Bdef2) WeightsByWeight ¶
Weights ウェイト閾値以上のウェイトを持っているウェイトのみを取得する
type Bdef4 ¶
type Bdef4 struct {
// contains filtered or unexported fields
}
Bdef4 represents the BDEF4 deformation.
func NewBdef4 ¶
func NewBdef4(index0, index1, index2, index3 int, weight0, weight1, weight2, weight3 float64) *Bdef4
NewBdef4 creates a new Bdef4 instance.
func (*Bdef4) IndexWeight ¶
func (*Bdef4) IndexesByWeight ¶
Indexes ウェイト閾値以上のウェイトを持っているINDEXのみを取得する
func (*Bdef4) SetIndexes ¶
func (deform *Bdef4) SetIndexes(indexes []int)
func (*Bdef4) SetWeights ¶
func (deform *Bdef4) SetWeights(weights []float64)
func (*Bdef4) WeightsByWeight ¶
Weights ウェイト閾値以上のウェイトを持っているウェイトのみを取得する
type Bone ¶
type Bone struct { Position *mmath.MVec3 // ボーン位置 ParentIndex int // 親ボーンのボーンIndex Layer int // 変形階層 BoneFlag BoneFlag // ボーンフラグ(16bit) 各bit 0:OFF 1:ON TailPosition *mmath.MVec3 // 接続先:0 の場合 座標オフセット, ボーン位置からの相対分 TailIndex int // 接続先:1 の場合 接続先ボーンのボーンIndex EffectIndex int // 回転付与:1 または 移動付与:1 の場合 付与親ボーンのボーンIndex EffectFactor float64 // 付与率 FixedAxis *mmath.MVec3 // 軸固定:1 の場合 軸の方向ベクトル LocalAxisX *mmath.MVec3 // ローカル軸:1 の場合 X軸の方向ベクトル LocalAxisZ *mmath.MVec3 // ローカル軸:1 の場合 Z軸の方向ベクトル EffectorKey int // 外部親変形:1 の場合 Key値 Ik *Ik // IK:1 の場合 IKデータを格納 DisplaySlot int // 該当表示枠 IsSystem bool // システム計算用追加ボーン の場合 true NormalizedLocalAxisX *mmath.MVec3 // 計算済みのX軸の方向ベクトル NormalizedLocalAxisY *mmath.MVec3 // 計算済みのY軸の方向ベクトル NormalizedLocalAxisZ *mmath.MVec3 // 計算済みのZ軸の方向ベクトル NormalizedFixedAxis *mmath.MVec3 // 計算済みの軸制限ベクトル LocalAxis *mmath.MVec3 // ローカル軸の方向ベクトル(CorrectedLocalXVectorの正規化ベクトル) ParentRelativePosition *mmath.MVec3 // 親ボーンからの相対位置 ChildRelativePosition *mmath.MVec3 // Tailボーンへの相対位置 RevertOffsetMatrix *mmath.MMat4 // 逆オフセット行列(親ボーンからの相対位置分を戻す) OffsetMatrix *mmath.MMat4 // オフセット行列 (自身の位置を原点に戻す行列) TreeBoneIndexes []int // 自分のボーンまでのボーンIndexのリスト ParentBoneIndexes []int // 自分の親ボーンからルートまでのボーンIndexのリスト ParentBoneNames []string // 自分の親ボーンからルートまでのボーン名のリスト RelativeBoneIndexes []int // 関連ボーンINDEX一覧(付与親とかIKとか) ChildBoneIndexes []int // 自分を親として登録しているボーンINDEX一覧 EffectiveBoneIndexes []int // 自分を付与親として登録しているボーンINDEX一覧 IkLinkBoneIndexes []int // 自分をIKリンクとして登録されているIKボーンのボーンIndex IkTargetBoneIndexes []int // 自分をIKターゲットとして登録されているIKボーンのボーンIndex AngleLimit bool // 自分がIKリンクボーンの角度制限がある場合、true MinAngleLimit *mmath.MVec3 // 自分がIKリンクボーンの角度制限の下限 MaxAngleLimit *mmath.MVec3 // 自分がIKリンクボーンの角度制限の上限 LocalAngleLimit bool // 自分がIKリンクボーンのローカル軸角度制限がある場合、true LocalMinAngleLimit *mmath.MVec3 // 自分がIKリンクボーンのローカル軸角度制限の下限 LocalMaxAngleLimit *mmath.MVec3 // 自分がIKリンクボーンのローカル軸角度制限の上限 AxisSign int // ボーンの軸ベクトル(左は-1, 右は1) RigidBody *RigidBody // 物理演算用剛体 OriginalLayer int // 元の変形階層 ParentBone *Bone // 親ボーン // contains filtered or unexported fields }
func NewBoneByName ¶
func (*Bone) Config ¶
func (bone *Bone) Config() *BoneConfig
func (*Bone) Copy ¶
func (bone *Bone) Copy() core.IIndexNameModel
func (*Bone) Direction ¶
func (bone *Bone) Direction() BoneDirection
func (*Bone) EnglishName ¶
func (*Bone) HasPhysics ¶ added in v0.0.4
func (*Bone) NormalizeFixedAxis ¶
func (*Bone) NormalizeLocalAxis ¶
func (*Bone) SetEnglishName ¶
type BoneCategory ¶
type BoneCategory int
const ( // ルート CATEGORY_ROOT BoneCategory = iota // 体幹 CATEGORY_TRUNK BoneCategory = iota // 上半身 CATEGORY_UPPER BoneCategory = iota // 下半身 CATEGORY_LOWER BoneCategory = iota // 肩 CATEGORY_SHOULDER BoneCategory = iota // 腕 CATEGORY_ARM BoneCategory = iota // ひじ CATEGORY_ELBOW BoneCategory = iota // 足 CATEGORY_LEG BoneCategory = iota // 指 CATEGORY_FINGER BoneCategory = iota // 先 CATEGORY_TAIL BoneCategory = iota // 足D CATEGORY_LEG_D BoneCategory = iota // 肩P CATEGORY_SHOULDER_P BoneCategory = iota // 足FK CATEGORY_LEG_FK BoneCategory = iota // 足IK CATEGORY_LEG_IK BoneCategory = iota // 足首 CATEGORY_ANKLE BoneCategory = iota // 靴底 CATEGORY_SOLE BoneCategory = iota // 捩 CATEGORY_TWIST BoneCategory = iota // 頭 CATEGORY_HEAD BoneCategory = iota // フィッティングの時に移動だけさせるか CATEGORY_FITTING_ONLY_MOVE BoneCategory = iota )
type BoneConfig ¶
type BoneConfig struct { // 親ボーン名候補リスト ParentBoneNames []StandardBoneName // 末端ボーン名候補リスト ChildBoneNames [][]StandardBoneName // ボーンカテゴリ Categories []BoneCategory // 表示枠 DisplaySlot StandardBoneName // バウンディングボックスの形 BoundingBoxShape Shape // 準標準までのボーンか IsStandard bool // 重心先ボーン名 GravityTargetBoneName StandardBoneName // 略称 Abbreviation StandardBoneName }
func BoneConfigFromName ¶ added in v0.0.4
func BoneConfigFromName(name string) *BoneConfig
func (*BoneConfig) IsArm ¶ added in v0.0.4
func (c *BoneConfig) IsArm() bool
func (*BoneConfig) IsFinger ¶ added in v0.0.4
func (c *BoneConfig) IsFinger() bool
type BoneDirection ¶
type BoneDirection string
const ( // 右 BONE_DIRECTION_RIGHT BoneDirection = "右" // 左 BONE_DIRECTION_LEFT BoneDirection = "左" // 体幹 BONE_DIRECTION_TRUNK BoneDirection = "" )
func (BoneDirection) Sign ¶ added in v0.0.4
func (d BoneDirection) Sign() float64
func (BoneDirection) String ¶
func (d BoneDirection) String() string
type BoneFlag ¶
type BoneFlag uint16
const ( // 初期値 BONE_FLAG_NONE BoneFlag = 0x0000 // 接続先(PMD子ボーン指定)表示方法 -> 0:座標オフセットで指定 1:ボーンで指定 BONE_FLAG_TAIL_IS_BONE BoneFlag = 0x0001 // 回転可能 BONE_FLAG_CAN_ROTATE BoneFlag = 0x0002 // 移動可能 BONE_FLAG_CAN_TRANSLATE BoneFlag = 0x0004 // 表示 BONE_FLAG_IS_VISIBLE BoneFlag = 0x0008 // 操作可 BONE_FLAG_CAN_MANIPULATE BoneFlag = 0x0010 // IK BONE_FLAG_IS_IK BoneFlag = 0x0020 // ローカル付与 | 付与対象 0:ユーザー変形値/IKリンク/多重付与 1:親のローカル変形量 BONE_FLAG_IS_EXTERNAL_LOCAL BoneFlag = 0x0080 // 回転付与 BONE_FLAG_IS_EXTERNAL_ROTATION BoneFlag = 0x0100 // 移動付与 BONE_FLAG_IS_EXTERNAL_TRANSLATION BoneFlag = 0x0200 // 軸固定 BONE_FLAG_HAS_FIXED_AXIS BoneFlag = 0x0400 // ローカル軸 BONE_FLAG_HAS_LOCAL_AXIS BoneFlag = 0x0800 // 物理後変形 BONE_FLAG_IS_AFTER_PHYSICS_DEFORM BoneFlag = 0x1000 // 外部親変形 BONE_FLAG_IS_EXTERNAL_PARENT_DEFORM BoneFlag = 0x2000 )
type BoneMorphOffset ¶
type BoneMorphOffset struct { BoneIndex int // ボーンIndex Position *mmath.MVec3 // グローバル移動量 CancelablePosition *mmath.MVec3 // 親キャンセル位置 Rotation *mmath.MQuaternion // グローバル回転量 CancelableRotation *mmath.MQuaternion // 親キャンセル回転 Scale *mmath.MVec3 // グローバル縮尺量 CancelableScale *mmath.MVec3 // 親キャンセルスケール LocalMat *mmath.MMat4 // ローカル変換行列 }
BoneMorphOffset represents a bone morph.
func NewBoneMorphOffset ¶
func NewBoneMorphOffset(boneIndex int) *BoneMorphOffset
func (*BoneMorphOffset) Type ¶
func (offset *BoneMorphOffset) Type() int
type Bones ¶
type Bones struct { *core.IndexNameModels[*Bone] LayerSortedBones map[bool][]*Bone LayerSortedNames map[bool]map[string]int LayerSortedBoneIndexes map[bool][]int DeformBoneIndexes map[int][]int LayerSortedIndexes []int }
ボーンリスト
func (*Bones) CreateAnkleD ¶
func (bones *Bones) CreateAnkleD(direction BoneDirection) (*Bone, error)
CreateAnkleD 足首D作成
func (*Bones) CreateAnkleDGround ¶ added in v0.0.4
func (bones *Bones) CreateAnkleDGround(direction BoneDirection) (*Bone, error)
CreateAnkleDGround 足首地面作成
func (*Bones) CreateArmTwist ¶
func (bones *Bones) CreateArmTwist(direction BoneDirection) (*Bone, error)
CreateArmTwist 腕捩作成
func (*Bones) CreateArmTwistChild ¶
func (bones *Bones) CreateArmTwistChild(direction BoneDirection, idx int) (*Bone, error)
CreateArmTwistChild 腕捩分割作成
func (*Bones) CreateBodyAxis ¶ added in v0.0.4
func (*Bones) CreateHeadTail ¶
CreateHeadTail 頭先作成
func (*Bones) CreateHeel ¶
func (bones *Bones) CreateHeel(direction BoneDirection) (*Bone, error)
CreateHeel かかと作成
func (*Bones) CreateHeelD ¶
func (bones *Bones) CreateHeelD(direction BoneDirection) (*Bone, error)
CreateHeelD かかとD作成
func (*Bones) CreateHip ¶ added in v0.0.4
func (bones *Bones) CreateHip(direction BoneDirection) (*Bone, error)
CreateHip 腰骨作成
func (*Bones) CreateIndexTail ¶
func (bones *Bones) CreateIndexTail(direction BoneDirection) (*Bone, error)
CreateIndexTail 親指先先作成
func (*Bones) CreateKneeD ¶
func (bones *Bones) CreateKneeD(direction BoneDirection) (*Bone, error)
CreateKneeD ひざD作成
func (*Bones) CreateLegCenter ¶
CreateLegCenter 足中心作成
func (*Bones) CreateLegD ¶
func (bones *Bones) CreateLegD(direction BoneDirection) (*Bone, error)
CreateLegD 足D作成
func (*Bones) CreateLegIkParent ¶
func (bones *Bones) CreateLegIkParent(direction BoneDirection) (*Bone, error)
CreateLegIkParent 足IK親作成
func (*Bones) CreateLegRoot ¶
func (bones *Bones) CreateLegRoot(direction BoneDirection) (*Bone, error)
CreateLegRoot 足根元作成
func (*Bones) CreateLowerRoot ¶
CreateLowerRoot 下半身根元作成
func (*Bones) CreateMiddleTail ¶
func (bones *Bones) CreateMiddleTail(direction BoneDirection) (*Bone, error)
CreateMiddleTail 親指先先作成
func (*Bones) CreateNeckRoot ¶
CreateNeckRoot 首根元作成
func (*Bones) CreatePinkyTail ¶
func (bones *Bones) CreatePinkyTail(direction BoneDirection) (*Bone, error)
CreateLittleTail 親指先先作成
func (*Bones) CreateRingTail ¶
func (bones *Bones) CreateRingTail(direction BoneDirection) (*Bone, error)
CreateRingTail 親指先先作成
func (*Bones) CreateShoulderC ¶
func (bones *Bones) CreateShoulderC(direction BoneDirection) (*Bone, error)
CreateShoulderC 肩C作成
func (*Bones) CreateShoulderP ¶
func (bones *Bones) CreateShoulderP(direction BoneDirection) (*Bone, error)
CreateShoulderP 肩P作成
func (*Bones) CreateShoulderRoot ¶
func (bones *Bones) CreateShoulderRoot(direction BoneDirection) (*Bone, error)
CreateShoulderRoot 肩根元作成
func (*Bones) CreateThumb0 ¶
func (bones *Bones) CreateThumb0(direction BoneDirection) (*Bone, error)
CreateThumb0 親指0作成
func (*Bones) CreateThumbTail ¶
func (bones *Bones) CreateThumbTail(direction BoneDirection) (*Bone, error)
CreateThumbTail 親指先先作成
func (*Bones) CreateToeC ¶
func (bones *Bones) CreateToeC(direction BoneDirection) (*Bone, error)
CreateToeC つま先子作成
func (*Bones) CreateToeCD ¶
func (bones *Bones) CreateToeCD(direction BoneDirection) (*Bone, error)
CreateToeCD つま先子D作成
func (*Bones) CreateToeEx ¶
func (bones *Bones) CreateToeEx(direction BoneDirection) (*Bone, error)
CreateToeEx 足先EX作成
func (*Bones) CreateToeP ¶
func (bones *Bones) CreateToeP(direction BoneDirection) (*Bone, error)
CreateToeP つま先親作成
func (*Bones) CreateToePD ¶
func (bones *Bones) CreateToePD(direction BoneDirection) (*Bone, error)
CreateToePD つま先親D作成
func (*Bones) CreateToeT ¶
func (bones *Bones) CreateToeT(direction BoneDirection) (*Bone, error)
CreateToeT つま先先作成
func (*Bones) CreateToeTD ¶
func (bones *Bones) CreateToeTD(direction BoneDirection) (*Bone, error)
CreateToeTD つま先先D作成
func (*Bones) CreateTrunkRoot ¶
CreateTrunkRoot 体幹中心作成
func (*Bones) CreateUpperRoot ¶
CreateUpperRoot 上半身根元作成
func (*Bones) CreateWaistCancel ¶
func (bones *Bones) CreateWaistCancel(direction BoneDirection) (*Bone, error)
CreateWaistCancel 腰キャンセル作成
func (*Bones) CreateWristTail ¶
func (bones *Bones) CreateWristTail(direction BoneDirection) (*Bone, error)
CreateWristTail 手首先先作成
func (*Bones) CreateWristTwist ¶
func (bones *Bones) CreateWristTwist(direction BoneDirection) (*Bone, error)
CreateWristTwist 腕捩作成
func (*Bones) CreateWristTwistChild ¶
func (bones *Bones) CreateWristTwistChild(direction BoneDirection, idx int) (*Bone, error)
CreateWristTwistChild 腕捩分割作成
func (*Bones) GetAnkle ¶
func (bones *Bones) GetAnkle(direction BoneDirection) (*Bone, error)
GetAnkle 足首取得
func (*Bones) GetAnkleD ¶
func (bones *Bones) GetAnkleD(direction BoneDirection) (*Bone, error)
GetAnkleD 足首D取得
func (*Bones) GetAnkleDGround ¶ added in v0.0.4
func (bones *Bones) GetAnkleDGround(direction BoneDirection) (*Bone, error)
GetAnkleDGround 足首地面取得
func (*Bones) GetArm ¶
func (bones *Bones) GetArm(direction BoneDirection) (*Bone, error)
GetArm 腕取得
func (*Bones) GetArmTwist ¶
func (bones *Bones) GetArmTwist(direction BoneDirection) (*Bone, error)
GetArmTwist 腕捩取得
func (*Bones) GetArmTwistChild ¶
func (bones *Bones) GetArmTwistChild(direction BoneDirection, idx int) (*Bone, error)
GetArmTwistChild 腕捩分割取得
func (*Bones) GetBodyAxis ¶ added in v0.0.4
func (*Bones) GetElbow ¶
func (bones *Bones) GetElbow(direction BoneDirection) (*Bone, error)
GetElbowRoot ひじ取得
func (*Bones) GetEye ¶
func (bones *Bones) GetEye(direction BoneDirection) (*Bone, error)
GetEye 目取得
func (*Bones) GetHeel ¶
func (bones *Bones) GetHeel(direction BoneDirection) (*Bone, error)
GetHeel かかと取得
func (*Bones) GetHeelD ¶
func (bones *Bones) GetHeelD(direction BoneDirection) (*Bone, error)
GetHeelD かかとD取得
func (*Bones) GetHip ¶ added in v0.0.4
func (bones *Bones) GetHip(direction BoneDirection) (*Bone, error)
GetHip 腰骨取得
func (*Bones) GetIkTargetByName ¶ added in v0.0.4
func (*Bones) GetIndex ¶
func (bones *Bones) GetIndex(direction BoneDirection, idx int) (*Bone, error)
GetIndex 人差し指取得
func (*Bones) GetIndexTail ¶
func (bones *Bones) GetIndexTail(direction BoneDirection) (*Bone, error)
GetIndexTail 人差し指先先取得
func (*Bones) GetKnee ¶
func (bones *Bones) GetKnee(direction BoneDirection) (*Bone, error)
GetKnee ひざ取得
func (*Bones) GetKneeD ¶
func (bones *Bones) GetKneeD(direction BoneDirection) (*Bone, error)
GetKneeD ひざD取得
func (*Bones) GetLeg ¶
func (bones *Bones) GetLeg(direction BoneDirection) (*Bone, error)
GetLeg 足取得
func (*Bones) GetLegD ¶
func (bones *Bones) GetLegD(direction BoneDirection) (*Bone, error)
GetLegD 足D取得
func (*Bones) GetLegIk ¶
func (bones *Bones) GetLegIk(direction BoneDirection) (*Bone, error)
GetLegIk 足IK取得
func (*Bones) GetLegIkParent ¶
func (bones *Bones) GetLegIkParent(direction BoneDirection) (*Bone, error)
GetLegIkParent 足IK親取得
func (*Bones) GetLegRoot ¶
func (bones *Bones) GetLegRoot(direction BoneDirection) (*Bone, error)
GetLegRoot 足根元取得
func (*Bones) GetMiddle ¶
func (bones *Bones) GetMiddle(direction BoneDirection, idx int) (*Bone, error)
GetMiddle 中指取得
func (*Bones) GetMiddleTail ¶
func (bones *Bones) GetMiddleTail(direction BoneDirection) (*Bone, error)
GetMiddleTail 中指先先取得
func (*Bones) GetPinky ¶
func (bones *Bones) GetPinky(direction BoneDirection, idx int) (*Bone, error)
GetPinky 小指取得
func (*Bones) GetPinkyTail ¶
func (bones *Bones) GetPinkyTail(direction BoneDirection) (*Bone, error)
GetPinkyTail 小指先先取得
func (*Bones) GetRing ¶
func (bones *Bones) GetRing(direction BoneDirection, idx int) (*Bone, error)
GetRing 薬指取得
func (*Bones) GetRingTail ¶
func (bones *Bones) GetRingTail(direction BoneDirection) (*Bone, error)
GetRingTail 薬指先先取得
func (*Bones) GetShoulder ¶
func (bones *Bones) GetShoulder(direction BoneDirection) (*Bone, error)
GetShoulder 肩取得
func (*Bones) GetShoulderC ¶
func (bones *Bones) GetShoulderC(direction BoneDirection) (*Bone, error)
GetShoulderC 肩C取得
func (*Bones) GetShoulderP ¶
func (bones *Bones) GetShoulderP(direction BoneDirection) (*Bone, error)
GetShoulderP 肩P取得
func (*Bones) GetShoulderRoot ¶
func (bones *Bones) GetShoulderRoot(direction BoneDirection) (*Bone, error)
GetShoulderRoot 肩根元取得
func (*Bones) GetStandardBoneNames ¶ added in v0.0.4
func (*Bones) GetThumb ¶
func (bones *Bones) GetThumb(direction BoneDirection, idx int) (*Bone, error)
GetThumb 親指取得
func (*Bones) GetThumbTail ¶
func (bones *Bones) GetThumbTail(direction BoneDirection) (*Bone, error)
GetThumbTail 親指先先取得
func (*Bones) GetToeC ¶
func (bones *Bones) GetToeC(direction BoneDirection) (*Bone, error)
GetToeC つま先子取得
func (*Bones) GetToeCD ¶
func (bones *Bones) GetToeCD(direction BoneDirection) (*Bone, error)
GetToeCD つま先子D取得
func (*Bones) GetToeEx ¶
func (bones *Bones) GetToeEx(direction BoneDirection) (*Bone, error)
GetToeEx 足先EX取得
func (*Bones) GetToeIK ¶
func (bones *Bones) GetToeIK(direction BoneDirection) (*Bone, error)
GetToeIK つま先IK取得
func (*Bones) GetToeIk ¶ added in v0.0.4
func (bones *Bones) GetToeIk(direction BoneDirection) (*Bone, error)
func (*Bones) GetToeP ¶
func (bones *Bones) GetToeP(direction BoneDirection) (*Bone, error)
GetToeP つま先親取得
func (*Bones) GetToePD ¶
func (bones *Bones) GetToePD(direction BoneDirection) (*Bone, error)
GetToePD つま先親D取得
func (*Bones) GetToeT ¶
func (bones *Bones) GetToeT(direction BoneDirection) (*Bone, error)
GetToeT つま先先取得
func (*Bones) GetToeTD ¶
func (bones *Bones) GetToeTD(direction BoneDirection) (*Bone, error)
GetToeTD つま先先D取得
func (*Bones) GetWaistCancel ¶
func (bones *Bones) GetWaistCancel(direction BoneDirection) (*Bone, error)
GetWaistCancel 腰キャンセル取得
func (*Bones) GetWrist ¶
func (bones *Bones) GetWrist(direction BoneDirection) (*Bone, error)
GetWrist 手首取得
func (*Bones) GetWristTail ¶
func (bones *Bones) GetWristTail(direction BoneDirection) (*Bone, error)
GetWristTail 手首先先取得
func (*Bones) GetWristTwist ¶
func (bones *Bones) GetWristTwist(direction BoneDirection) (*Bone, error)
GetWristTwist 腕捩取得
func (*Bones) GetWristTwistChild ¶
func (bones *Bones) GetWristTwistChild(direction BoneDirection, idx int) (*Bone, error)
GetWristTwistChild 腕捩分割取得
func (*Bones) InsertShortageOverrideBones ¶ added in v0.0.4
InsertShortageOverrideBones 不足ボーン作成
func (*Bones) MaxBoneIndex ¶
指定されたボーンのうち、もっとも変形階層が大きいINDEXを取得
func (*Bones) MinBoneIndex ¶
指定されたボーンのうち、もっとも変形階層が小さいINDEXを取得
func (*Bones) SetParentFromConfig ¶ added in v0.0.4
type CollisionGroup ¶
type CollisionGroup struct {
IsCollisions []uint16
}
func NewCollisionGroupFromSlice ¶
func NewCollisionGroupFromSlice(collisionGroup []uint16) CollisionGroup
type DeformType ¶
type DeformType byte
DeformType ウェイト変形方式
const ( BDEF1 DeformType = 0 BDEF2 DeformType = 1 BDEF4 DeformType = 2 SDEF DeformType = 3 )
type DisplaySlot ¶
type DisplaySlot struct { SpecialFlag SpecialFlag // 特殊枠フラグ - 0:通常枠 1:特殊枠 References []*Reference // 表示枠要素 // contains filtered or unexported fields }
func NewMorphDisplaySlot ¶
func NewMorphDisplaySlot() *DisplaySlot
func NewRootDisplaySlot ¶
func NewRootDisplaySlot() *DisplaySlot
func (*DisplaySlot) EnglishName ¶
func (displaySlot *DisplaySlot) EnglishName() string
func (*DisplaySlot) Index ¶
func (displaySlot *DisplaySlot) Index() int
func (*DisplaySlot) IsValid ¶
func (displaySlot *DisplaySlot) IsValid() bool
func (*DisplaySlot) Name ¶
func (displaySlot *DisplaySlot) Name() string
func (*DisplaySlot) SetEnglishName ¶
func (displaySlot *DisplaySlot) SetEnglishName(englishName string)
func (*DisplaySlot) SetIndex ¶
func (displaySlot *DisplaySlot) SetIndex(index int)
func (*DisplaySlot) SetName ¶
func (displaySlot *DisplaySlot) SetName(name string)
type DisplaySlots ¶
type DisplaySlots struct { *core.IndexNameModels[*DisplaySlot] }
表示枠リスト
func NewDisplaySlots ¶
func NewDisplaySlots(capacity int) *DisplaySlots
func NewInitialDisplaySlots ¶ added in v0.0.4
func NewInitialDisplaySlots() *DisplaySlots
func (*DisplaySlots) GetByBoneIndex ¶
func (displaySlots *DisplaySlots) GetByBoneIndex(boneIndex int) *DisplaySlot
func (*DisplaySlots) GetMorphDisplaySlot ¶
func (displaySlots *DisplaySlots) GetMorphDisplaySlot() (*DisplaySlot, error)
func (*DisplaySlots) GetRootDisplaySlot ¶
func (displaySlots *DisplaySlots) GetRootDisplaySlot() (*DisplaySlot, error)
type DisplayType ¶
type DisplayType int
表示枠要素タイプ
const ( DISPLAY_TYPE_BONE DisplayType = 0 // ボーン DISPLAY_TYPE_MORPH DisplayType = 1 // モーフ )
type DrawFlag ¶
type DrawFlag byte
const ( // 初期値 DRAW_FLAG_NONE DrawFlag = 0x0000 // 0x01:両面描画 DRAW_FLAG_DOUBLE_SIDED_DRAWING DrawFlag = 0x0001 // 0x02:地面影 DRAW_FLAG_GROUND_SHADOW DrawFlag = 0x0002 // 0x04:セルフシャドウマップへの描画 DRAW_FLAG_DRAWING_ON_SELF_SHADOW_MAPS DrawFlag = 0x0004 // 0x08:セルフシャドウの描画 DRAW_FLAG_DRAWING_SELF_SHADOWS DrawFlag = 0x0008 // 0x10:エッジ描画 DRAW_FLAG_DRAWING_EDGE DrawFlag = 0x0010 )
func (DrawFlag) IsDoubleSidedDrawing ¶
0x01:両面描画
func (DrawFlag) IsDrawingOnSelfShadowMaps ¶
0x04:セルフシャドウマップへの描画
func (DrawFlag) IsDrawingSelfShadows ¶
0x08:セルフシャドウの描画
func (DrawFlag) SetDoubleSidedDrawing ¶
func (DrawFlag) SetDrawingEdge ¶
func (DrawFlag) SetDrawingOnSelfShadowMaps ¶
func (DrawFlag) SetDrawingSelfShadows ¶
func (DrawFlag) SetGroundShadow ¶
type Face ¶
type Face struct { VertexIndexes [3]int // 頂点INDEXリスト // contains filtered or unexported fields }
面データ
func (*Face) Copy ¶
func (face *Face) Copy() core.IIndexModel
type GroupMorphOffset ¶
GroupMorphOffset represents a group morph.
func NewGroupMorphOffset ¶
func NewGroupMorphOffset(morphIndex int, morphFactor float64) *GroupMorphOffset
func (*GroupMorphOffset) Type ¶
func (offset *GroupMorphOffset) Type() int
type IDeform ¶
type IDeform interface { Indexes() []int Weights() []float64 IndexesByWeight(weightThreshold float64) []int WeightsByWeight(weightThreshold float64) []float64 Packed() [8]float32 Normalize(align bool) Index(boneIndex int) int IndexWeight(boneIndex int) float64 Add(boneIndex, separateIndex int, ratio float64) SetIndexes(indexes []int) }
type IMorphOffset ¶
type IMorphOffset interface {
Type() int
}
IMorphOffset represents a morph offset.
type Ik ¶
type IkLink ¶
type Joint ¶
type Joint struct { JointType byte // Joint種類 - 0:スプリング6DOF | PMX2.0では 0 のみ(拡張用) RigidbodyIndexA int // 関連剛体AのIndex RigidbodyIndexB int // 関連剛体BのIndex Position *mmath.MVec3 // 位置(x,y,z) Rotation *mmath.MVec3 // 回転 JointParam *JointParam // ジョイントパラメーター IsSystem bool // contains filtered or unexported fields }
func NewJointByName ¶
func (*Joint) Copy ¶
func (joint *Joint) Copy() core.IIndexNameModel
func (*Joint) EnglishName ¶
func (*Joint) SetEnglishName ¶
type JointParam ¶
type JointParam struct { TranslationLimitMin *mmath.MVec3 // 移動制限-下限(x,y,z) TranslationLimitMax *mmath.MVec3 // 移動制限-上限(x,y,z) RotationLimitMin *mmath.MVec3 // 回転制限-下限 RotationLimitMax *mmath.MVec3 // 回転制限-上限 SpringConstantTranslation *mmath.MVec3 // バネ定数-移動(x,y,z) SpringConstantRotation *mmath.MVec3 // バネ定数-回転(x,y,z) }
func NewJointParam ¶
func NewJointParam() *JointParam
func (*JointParam) String ¶ added in v0.0.4
func (param *JointParam) String() string
type Material ¶
type Material struct { Diffuse *mmath.MVec4 // Diffuse (R,G,B,A)(拡散色+非透過度) Specular *mmath.MVec4 // Specular (R,G,B,A)(反射色 + 反射強度) Ambient *mmath.MVec3 // Ambient (R,G,B)(環境色) DrawFlag DrawFlag // 描画フラグ(8bit) - 各bit 0:OFF 1:ON Edge *mmath.MVec4 // エッジ色 (R,G,B,A) EdgeSize float64 // エッジサイズ TextureIndex int // 通常テクスチャINDEX SphereTextureIndex int // スフィアテクスチャINDEX SphereMode SphereMode // スフィアモード ToonSharingFlag ToonSharing // 共有Toonフラグ ToonTextureIndex int // ToonテクスチャINDEX Memo string // メモ VerticesCount int // 材質に対応する面(頂点)数 (必ず3の倍数になる) // contains filtered or unexported fields }
func NewMaterial ¶
func NewMaterial() *Material
func NewMaterialByName ¶
func (*Material) Copy ¶
func (material *Material) Copy() core.IIndexNameModel
func (*Material) EnglishName ¶
func (*Material) SetEnglishName ¶
type MaterialMorphCalcMode ¶
type MaterialMorphCalcMode int
MaterialMorphCalcMode 材質モーフ:計算モード
const ( CALC_MODE_MULTIPLICATION MaterialMorphCalcMode = 0 // 乗算 CALC_MODE_ADDITION MaterialMorphCalcMode = 1 // 加算 )
type MaterialMorphOffset ¶
type MaterialMorphOffset struct { MaterialIndex int // 材質Index -> -1:全材質対象 CalcMode MaterialMorphCalcMode // 0:乗算, 1:加算 Diffuse *mmath.MVec4 // Diffuse (R,G,B,A) Specular *mmath.MVec4 // SpecularColor (R,G,B, 係数) Ambient *mmath.MVec3 // AmbientColor (R,G,B) Edge *mmath.MVec4 // エッジ色 (R,G,B,A) EdgeSize float64 // エッジサイズ TextureFactor *mmath.MVec4 // テクスチャ係数 (R,G,B,A) SphereTextureFactor *mmath.MVec4 // スフィアテクスチャ係数 (R,G,B,A) ToonTextureFactor *mmath.MVec4 // Toonテクスチャ係数 (R,G,B,A) }
MaterialMorphOffset represents a material morph.
func NewMaterialMorphOffset ¶
func NewMaterialMorphOffset( materialIndex int, calcMode MaterialMorphCalcMode, diffuse *mmath.MVec4, specular *mmath.MVec4, ambient *mmath.MVec3, edge *mmath.MVec4, edgeSize float64, textureFactor *mmath.MVec4, sphereTextureFactor *mmath.MVec4, toonTextureFactor *mmath.MVec4, ) *MaterialMorphOffset
func (*MaterialMorphOffset) Type ¶
func (offset *MaterialMorphOffset) Type() int
type Materials ¶
type Materials struct { *core.IndexNameModels[*Material] Vertices map[int][]int Faces map[int][]int }
材質リスト
func NewMaterials ¶
type Morph ¶
type Morph struct { Panel MorphPanel // モーフパネル MorphType MorphType // モーフ種類 Offsets []IMorphOffset // モーフオフセット DisplaySlot int // 表示枠 IsSystem bool // ツール側で追加したモーフ // contains filtered or unexported fields }
Morph represents a morph.
func (*Morph) Copy ¶
func (morph *Morph) Copy() core.IIndexNameModel
func (*Morph) EnglishName ¶
func (*Morph) SetEnglishName ¶
type MorphPanel ¶
type MorphPanel byte
MorphPanel 操作パネル
const ( MORPH_PANEL_SYSTEM MorphPanel = 0 // システム予約 MORPH_PANEL_EYEBROW_LOWER_LEFT MorphPanel = 1 // 眉(左下) MORPH_PANEL_EYE_UPPER_LEFT MorphPanel = 2 // 目(左上) MORPH_PANEL_LIP_UPPER_RIGHT MorphPanel = 3 // 口(右上) MORPH_PANEL_OTHER_LOWER_RIGHT MorphPanel = 4 // その他(右下) )
func (MorphPanel) PanelName ¶
func (morphPanel MorphPanel) PanelName() string
PanelName returns the name of the operation panel.
type MorphType ¶
type MorphType int
MorphType モーフ種類
const ( MORPH_TYPE_GROUP MorphType = 0 // グループ MORPH_TYPE_VERTEX MorphType = 1 // 頂点 MORPH_TYPE_BONE MorphType = 2 // ボーン MORPH_TYPE_UV MorphType = 3 // UV MORPH_TYPE_EXTENDED_UV1 MorphType = 4 // 追加UV1 MORPH_TYPE_EXTENDED_UV2 MorphType = 5 // 追加UV2 MORPH_TYPE_EXTENDED_UV3 MorphType = 6 // 追加UV3 MORPH_TYPE_EXTENDED_UV4 MorphType = 7 // 追加UV4 MORPH_TYPE_MATERIAL MorphType = 8 // 材質 MORPH_TYPE_AFTER_VERTEX MorphType = 9 // ボーン変形後頂点(システム独自) )
type PhysicsType ¶
type PhysicsType int
剛体物理の計算モード
const ( PHYSICS_TYPE_STATIC PhysicsType = 0 // ボーン追従(static) PHYSICS_TYPE_DYNAMIC PhysicsType = 1 // 物理演算(dynamic) PHYSICS_TYPE_DYNAMIC_BONE PhysicsType = 2 // 物理演算 + Bone位置合わせ )
type PmxModel ¶
type PmxModel struct { Signature string Version float64 ExtendedUVCount int VertexCountType int TextureCountType int MaterialCountType int BoneCountType int MorphCountType int RigidBodyCountType int Comment string EnglishComment string Vertices *Vertices Faces *Faces Textures *Textures Materials *Materials Bones *Bones Morphs *Morphs DisplaySlots *DisplaySlots RigidBodies *RigidBodies Joints *Joints // contains filtered or unexported fields }
func NewPmxModel ¶
func (*PmxModel) EnglishName ¶
func (*PmxModel) InitializeDisplaySlots ¶
func (model *PmxModel) InitializeDisplaySlots()
func (*PmxModel) SetEnglishName ¶
func (*PmxModel) SetRandHash ¶
func (model *PmxModel) SetRandHash()
func (*PmxModel) UpdateHash ¶
func (model *PmxModel) UpdateHash()
type Reference ¶
type Reference struct { DisplayType DisplayType // 要素対象 0:ボーン 1:モーフ DisplayIndex int // ボーンIndex or モーフIndex }
func NewDisplaySlotReference ¶
func NewDisplaySlotReference() *Reference
func NewDisplaySlotReferenceByValues ¶
func NewDisplaySlotReferenceByValues(displayType DisplayType, displayIndex int) *Reference
type RigidBodies ¶
type RigidBodies struct { *core.IndexNameModels[*RigidBody] }
剛体リスト
func NewRigidBodies ¶
func NewRigidBodies(capacity int) *RigidBodies
type RigidBody ¶
type RigidBody struct { BoneIndex int // 関連ボーンIndex CollisionGroup byte // グループ CollisionGroupMask CollisionGroup // 非衝突グループフラグ CollisionGroupMaskValue int // 非衝突グループフラグ値 ShapeType Shape // 形状 Size *mmath.MVec3 // サイズ(x,y,z) Position *mmath.MVec3 // 位置(x,y,z) Rotation *mmath.MVec3 // 回転(x,y,z) -> ラジアン角 RigidBodyParam *RigidBodyParam // 剛体パラ PhysicsType PhysicsType // 剛体の物理演算 XDirection *mmath.MVec3 // X軸方向 YDirection *mmath.MVec3 // Y軸方向 ZDirection *mmath.MVec3 // Z軸方向 IsSystem bool // システムで追加した剛体か Matrix *mmath.MMat4 // 剛体の行列 Bone *Bone // 繋がっているボーン // contains filtered or unexported fields }
func (*RigidBody) Copy ¶
func (rigidBody *RigidBody) Copy() core.IIndexNameModel
func (*RigidBody) EnglishName ¶
func (*RigidBody) SetEnglishName ¶
type RigidBodyParam ¶
type RigidBodyParam struct { Mass float64 // 質量 LinearDamping float64 // 移動減衰 AngularDamping float64 // 回転減衰 Restitution float64 // 反発力 Friction float64 // 摩擦力 }
func NewRigidBodyParam ¶
func NewRigidBodyParam() *RigidBodyParam
func (*RigidBodyParam) String ¶ added in v0.0.4
func (param *RigidBodyParam) String() string
type Sdef ¶
type Sdef struct { SdefC *mmath.MVec3 SdefR0 *mmath.MVec3 SdefR1 *mmath.MVec3 // contains filtered or unexported fields }
Sdef represents the SDEF deformation.
func (*Sdef) IndexWeight ¶
func (*Sdef) IndexesByWeight ¶
Indexes ウェイト閾値以上のウェイトを持っているINDEXのみを取得する
func (*Sdef) SetIndexes ¶
func (deform *Sdef) SetIndexes(indexes []int)
func (*Sdef) SetWeights ¶
func (deform *Sdef) SetWeights(weights []float64)
func (*Sdef) WeightsByWeight ¶
Weights ウェイト閾値以上のウェイトを持っているウェイトのみを取得する
type SpecialFlag ¶
type SpecialFlag int
特殊枠フラグ - 0:通常枠 1:特殊枠
const ( SPECIAL_FLAG_OFF SpecialFlag = 0 // 通常枠 SPECIAL_FLAG_ON SpecialFlag = 1 // 特殊枠(Rootと表情) )
type SphereMode ¶
type SphereMode byte
スフィアモード
const ( // 無効 SPHERE_MODE_INVALID SphereMode = 0 // 乗算(sph) SPHERE_MODE_MULTIPLICATION SphereMode = 1 // 加算(spa) SPHERE_MODE_ADDITION SphereMode = 2 // サブテクスチャ(追加UV1のx,yをUV参照して通常テクスチャ描画を行う) SPHERE_MODE_SUBTEXTURE SphereMode = 3 )
type StandardBoneName ¶
type StandardBoneName string
const ( ROOT StandardBoneName = "全ての親" CENTER StandardBoneName = "センター" GROOVE StandardBoneName = "グルーブ" BODY_AXIS StandardBoneName = "体軸" TRUNK_ROOT StandardBoneName = "体幹中心" WAIST StandardBoneName = "腰" LOWER_ROOT StandardBoneName = "下半身根元" LOWER StandardBoneName = "下半身" HIP StandardBoneName = "{d}腰骨" LEG_CENTER StandardBoneName = "足中心" UPPER_ROOT StandardBoneName = "上半身根元" UPPER StandardBoneName = "上半身" UPPER2 StandardBoneName = "上半身2" NECK_ROOT StandardBoneName = "首根元" NECK StandardBoneName = "首" HEAD StandardBoneName = "頭" HEAD_TAIL StandardBoneName = "頭先先" EYES StandardBoneName = "両目" EYE StandardBoneName = "{d}目" SHOULDER_ROOT StandardBoneName = "{d}肩根元" SHOULDER_P StandardBoneName = "{d}肩P" SHOULDER StandardBoneName = "{d}肩" SHOULDER_C StandardBoneName = "{d}肩C" ARM StandardBoneName = "{d}腕" ARM_TWIST StandardBoneName = "{d}腕捩" ARM_TWIST1 StandardBoneName = "{d}腕捩1" ARM_TWIST2 StandardBoneName = "{d}腕捩2" ARM_TWIST3 StandardBoneName = "{d}腕捩3" ELBOW StandardBoneName = "{d}ひじ" WRIST_TWIST StandardBoneName = "{d}手捩" WRIST_TWIST1 StandardBoneName = "{d}手捩1" WRIST_TWIST2 StandardBoneName = "{d}手捩2" WRIST_TWIST3 StandardBoneName = "{d}手捩3" WRIST StandardBoneName = "{d}手首" WRIST_TAIL StandardBoneName = "{d}手首先先" THUMB0 StandardBoneName = "{d}親指0" THUMB1 StandardBoneName = "{d}親指1" THUMB2 StandardBoneName = "{d}親指2" THUMB_TAIL StandardBoneName = "{d}親指先先" INDEX1 StandardBoneName = "{d}人指1" INDEX2 StandardBoneName = "{d}人指2" INDEX3 StandardBoneName = "{d}人指3" INDEX_TAIL StandardBoneName = "{d}人指先先" MIDDLE1 StandardBoneName = "{d}中指1" MIDDLE2 StandardBoneName = "{d}中指2" MIDDLE3 StandardBoneName = "{d}中指3" MIDDLE_TAIL StandardBoneName = "{d}中指先先" RING1 StandardBoneName = "{d}薬指1" RING2 StandardBoneName = "{d}薬指2" RING3 StandardBoneName = "{d}薬指3" RING_TAIL StandardBoneName = "{d}薬指先先" PINKY1 StandardBoneName = "{d}小指1" PINKY2 StandardBoneName = "{d}小指2" PINKY3 StandardBoneName = "{d}小指3" PINKY_TAIL StandardBoneName = "{d}小指先先" WAIST_CANCEL StandardBoneName = "腰キャンセル{d}" LEG_ROOT StandardBoneName = "{d}足根元" LEG StandardBoneName = "{d}足" KNEE StandardBoneName = "{d}ひざ" ANKLE StandardBoneName = "{d}足首" ANKLE_GROUND StandardBoneName = "{d}足首地面" HEEL StandardBoneName = "{d}かかと" TOE_T StandardBoneName = "{d}つま先先" TOE_P StandardBoneName = "{d}つま先親" TOE_C StandardBoneName = "{d}つま先子" LEG_D StandardBoneName = "{d}足D" KNEE_D StandardBoneName = "{d}ひざD" HEEL_D StandardBoneName = "{d}かかとD" ANKLE_D StandardBoneName = "{d}足首D" ANKLE_D_GROUND StandardBoneName = "{d}足首地面D" TOE_T_D StandardBoneName = "{d}つま先先D" TOE_P_D StandardBoneName = "{d}つま先親D" TOE_C_D StandardBoneName = "{d}つま先子D" TOE_EX StandardBoneName = "{d}足先EX" LEG_IK_PARENT StandardBoneName = "{d}足IK親" LEG_IK StandardBoneName = "{d}足IK" TOE_IK StandardBoneName = "{d}つま先IK" )
func (StandardBoneName) Left ¶
func (s StandardBoneName) Left() string
func (StandardBoneName) Right ¶
func (s StandardBoneName) Right() string
func (StandardBoneName) String ¶
func (s StandardBoneName) String() string
func (StandardBoneName) StringFromDirection ¶
func (s StandardBoneName) StringFromDirection(direction BoneDirection) string
func (StandardBoneName) StringFromDirectionAndIdx ¶
func (s StandardBoneName) StringFromDirectionAndIdx(direction BoneDirection, idx int) string
type Texture ¶
type Texture struct { TextureType TextureType // テクスチャ種別 // contains filtered or unexported fields }
func NewTexture ¶
func NewTexture() *Texture
func (*Texture) Copy ¶
func (tex *Texture) Copy() core.IIndexModel
func (*Texture) EnglishName ¶
func (*Texture) SetEnglishName ¶
type TextureType ¶
type TextureType int
テクスチャ種別
const ( TEXTURE_TYPE_TEXTURE TextureType = 0 // テクスチャ TEXTURE_TYPE_TOON TextureType = 1 // Toonテクスチャ TEXTURE_TYPE_SPHERE TextureType = 2 // スフィアテクスチャ )
type ToonSharing ¶
type ToonSharing byte
共有Toonフラグ
const ( // 0:継続値は個別Toon TOON_SHARING_INDIVIDUAL ToonSharing = 0 // 1:継続値は共有Toon TOON_SHARING_SHARING ToonSharing = 1 )
type ToonTextures ¶
type ToonTextures struct { *core.IndexModels[*Texture] }
共有テクスチャ辞書
func NewToonTextures ¶
func NewToonTextures() *ToonTextures
type UvMorphOffset ¶
UvMorphOffset represents a UV morph.
func NewUvMorphOffset ¶
func NewUvMorphOffset(vertexIndex int, uv *mmath.MVec4) *UvMorphOffset
func (*UvMorphOffset) Type ¶
func (offset *UvMorphOffset) Type() int
type Vertex ¶
type Vertex struct { Position *mmath.MVec3 // 頂点位置 Normal *mmath.MVec3 // 頂点法線 Uv *mmath.MVec2 // UV ExtendedUvs []*mmath.MVec4 // 追加UV DeformType DeformType // ウェイト変形方式 Deform IDeform // デフォーム EdgeFactor float64 // エッジ倍率 MaterialIndexes []int // 割り当て材質インデックス // contains filtered or unexported fields }
func (*Vertex) Copy ¶
func (vertex *Vertex) Copy() core.IIndexModel
type VertexMorphOffset ¶
type VertexMorphOffset struct { VertexIndex int // 頂点INDEX Position *mmath.MVec3 // 座標オフセット量(x,y,z) }
VertexMorphOffset represents a vertex morph.
func NewVertexMorphOffset ¶
func NewVertexMorphOffset(vertexIndex int, position *mmath.MVec3) *VertexMorphOffset
func (*VertexMorphOffset) Type ¶
func (offset *VertexMorphOffset) Type() int
type Vertices ¶
type Vertices struct { *core.IndexModels[*Vertex] // contains filtered or unexported fields }
頂点リスト