Rev 1782 |
Rev 1800 |
Go to most recent revision |
Blame |
Compare with Previous |
Last modification |
View Log
| RSS feed
package com.gebauz.bauzoid2.graphics.model;
import com.gebauz.bauzoid2.math.Matrix4;
import com.gebauz.bauzoid2.math.Quaternion;
import com.gebauz.bauzoid2.math.Vector3;
/**
* Created by chris on 14.12.2014.
*/
public class ModelPart
{
// Constants========================================================================================
// Fields===========================================================================================
private String mName =
null;
private MeshGroup mMeshGroup =
null;
private Material mMaterial =
null;
private ModelNode
[] mBoneInfluences =
null;
private Matrix4
[] mMatrices =
null;
// Methods==========================================================================================
public ModelPart
(String name, MeshGroup group, Material material
)
{
mName = name
;
mMeshGroup = group
;
mMaterial = material
;
}
public Matrix4
[] calcBoneMatrices
()
{
mMatrices =
new Matrix4
[mBoneInfluences.
length];
for (int i =
0; i
< mMatrices.
length; i++
)
mMatrices
[i
] = Matrix4.
createIdentity();
return mMatrices
;
}
// Getters/Setters==================================================================================
public final Material getMaterial
() { return mMaterial
; }
public final MeshGroup getMeshGroup
() { return mMeshGroup
; }
public final void setBoneInfluences
(ModelNode
[] influences
)
{
mBoneInfluences = influences
;
mMatrices =
new Matrix4
[influences.
length];
for (int i =
0; i
< mMatrices.
length; i++
)
mMatrices
[i
] = Matrix4.
createIdentity();
}
public final ModelNode
[] getBoneInfluences
() { return mBoneInfluences
; }
public final Matrix4
[] getBoneMatrices
() { return mMatrices
; }
}