public void GetWorldTransform(out Matrix4d result) { result = Transform; for (ModelBone parent = Parent; parent != null; parent = parent.parent) { result.Multiply(ref parent.transform, out result); } }
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); } }
public ModelMesh(Sphere3d bounds, ModelBone bone, params ModelPart[] parts) : this(bounds, bone, (IEnumerable <ModelPart>)parts) { }
/// <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); }
public MeshInfo(ModelBone bone) { Bone = bone; Parts = new List <ModelPart>(); }