Пример #1
0
 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.");
     }
 }
Пример #2
0
 //***************************************************************************
 // 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));
 }
Пример #3
0
 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.");
 }
Пример #4
0
 //***************************************************************************
 // Public Methods
 //
 public void MoveForward(float speed)
 {
     MeshObject.MoveForward(ref this._v3Pos, ref this._v3Look, speed);
 }
Пример #5
0
 //***************************************************************************
 // 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));
 }
Пример #6
0
 public static void GetBoundingBox(D3D.Mesh mesh, out DX.Vector3 min, out DX.Vector3 max)
 {
     MeshObject.GetBoundingBox(mesh, 1.0f, out min, out max);
 }
Пример #7
0
 public static float GetBoundingRadius(D3D.Mesh mesh)
 {
     return(MeshObject.GetBoundingRadius(mesh, 1.0f));
 }
Пример #8
0
 //***************************************************************************
 // 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);
 }
Пример #9
0
 public void MoveFoward(float speed)
 {
     MeshObject.MoveForward(ref this._position, ref this._angle, speed);
 }