Exemplo n.º 1
0
 public void GetWorldTransform(out Matrix4d result)
 {
     result = Transform;
     for (ModelBone parent = Parent; parent != null; parent = parent.parent)
     {
         result.Multiply(ref parent.transform, out result);
     }
 }
Exemplo n.º 2
0
 public ModelMesh(Sphere3d bounds, ModelBone bone, IEnumerable <ModelPart> parts)
     : this()
 {
     if (bone != null && bone.model != null)
     {
         bone.model.Meshes.Add(this);
     }
     Bounds = bounds;
     Bone   = bone;
     foreach (var item in parts)
     {
         Parts.Add(item);
     }
 }
Exemplo n.º 3
0
 public ModelMesh(Sphere3d bounds, ModelBone bone, params ModelPart[] parts) : this(bounds, bone, (IEnumerable <ModelPart>)parts)
 {
 }
Exemplo n.º 4
0
 /// <summary>Finish the current mesh, if any, and start a new one.</summary>
 /// <param name="bone">The bone to use, or <c>null</c> to use identity.</param>
 /// <returns></returns>
 public ModelBuilder FinishMesh(ModelBone bone = null)
 {
     meshes.Add(new MeshInfo(bone));
     firstIndex = indexCount;
     return(this);
 }
Exemplo n.º 5
0
 public MeshInfo(ModelBone bone)
 {
     Bone  = bone;
     Parts = new List <ModelPart>();
 }