public void AddMesh(MeshObject value, string name) { if (value.Mesh.Device == this._device) { this._meshes.Add(value, name); } else { throw new ArgumentException("Associated mesh device does not match current Direct3D render device."); } }
//*************************************************************************** // Static Methods // public static void DrawMesh(MeshObject mesh) { Graphics3D.DrawMesh(mesh.Mesh, mesh.Materials, mesh.Textures, Matrix.Translation(mesh.Position.X, mesh.Position.Y, mesh.Position.Z) * Matrix.RotationYawPitchRoll(mesh.Rotation.X, mesh.Rotation.Y, mesh.Rotation.Z)); }
public void AddMesh(MeshObject value, string name) { if (value.Mesh.Device == this._device) this._meshes.Add(value, name); else throw new ArgumentException("Associated mesh device does not match current Direct3D render device."); }
//*************************************************************************** // Public Methods // public void MoveForward(float speed) { MeshObject.MoveForward(ref this._v3Pos, ref this._v3Look, speed); }
//*************************************************************************** // Static Methods // public static void DrawMesh(MeshObject mesh) { Graphics3D.DrawMesh(mesh.Mesh, mesh.Materials, mesh.Textures, Matrix.Translation(mesh.Position.X, mesh.Position.Y, mesh.Position.Z) * Matrix.RotationYawPitchRoll(mesh.Rotation.X, mesh.Rotation.Y, mesh.Rotation.Z)); }
public static void GetBoundingBox(D3D.Mesh mesh, out DX.Vector3 min, out DX.Vector3 max) { MeshObject.GetBoundingBox(mesh, 1.0f, out min, out max); }
public static float GetBoundingRadius(D3D.Mesh mesh) { return(MeshObject.GetBoundingRadius(mesh, 1.0f)); }
//*************************************************************************** // Static Methods // public static void LoadMesh(string filename, D3D.Device dev, ref D3D.Mesh mesh, ref D3D.Material[] meshMaterials, ref D3D.Texture[] meshTextures) { using (FileStream stream = new FileStream(filename, FileMode.Open, FileAccess.Read)) MeshObject.LoadMesh(stream, dev, ref mesh, ref meshMaterials, ref meshTextures); }
public void MoveFoward(float speed) { MeshObject.MoveForward(ref this._position, ref this._angle, speed); }