C# Class WaveEngine.Components.Graphics3D.Model

Inheritance: LoadableModel, IDisposable
显示文件 Open project: WaveEngine/Components Class Usage Examples

Private Properties

Property Type Description
RefreshPrimitive void

Public Methods

Method Description
Clone ( ) : Framework.Component

Clone this model instance

CreateCapsule ( float height = 1f, float radius = 0.5f, int tessellation = 16 ) : Model

Creates the capsule.

CreateCone ( float height = 1.0f, float diameter = 1.0f, int tessellation = 16 ) : Model

Creates the cone.

CreateCube ( float size = 1.0f ) : Model

Creates the cube.

CreateCylinder ( float height = 1.0f, float diameter = 1.0f, int tessellation = 16 ) : Model

Creates the cylinder.

CreateFromMesh ( Mesh mesh ) : Model

Creates the cube.

CreateFromMesh ( Mesh mesh, BoundingBox boundingBox ) : Model

Creates the cube.

CreatePlane ( System.Vector3 normal = null, float size = 1.0f ) : Model

Creates the plane.

CreatePyramid ( float size = 1.0f ) : Model

Creates the pyramid.

CreateSphere ( float diameter = 1.0f, int tessellation = 8 ) : Model

Creates the sphere.

CreateTeapot ( float size = 1.0f, int tessellation = 8 ) : Model

Creates the teapot.

CreateTorus ( float diameter = 1.0f, float thickness = 0.333f, int tessellation = 16 ) : Model

Creates the torus.

Dispose ( ) : void

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

GetIndices ( ) : int[]

The get indices

GetVertices ( ) : System.Vector3[]

Gets the collition info.

Model ( ) : System

Initializes a new instance of the Model class.

Model ( string modelPath ) : System

Initializes a new instance of the Model class.

Model ( string name, string modelPath ) : System

Initializes a new instance of the Model class.

Protected Methods

Method Description
Initialize ( ) : void

Performs further custom initialization for this instance.

LoadModel ( ) : void

Load the static model

UnloadModel ( ) : void

Unload the static model

Private Methods

Method Description
RefreshPrimitive ( ) : void

Refresh primitive model

Method Details

Clone() public method

Clone this model instance
public Clone ( ) : Framework.Component
return Framework.Component

CreateCapsule() public static method

Creates the capsule.
public static CreateCapsule ( float height = 1f, float radius = 0.5f, int tessellation = 16 ) : Model
height float The height (1 by default).
radius float The radius (0.5f by default).
tessellation int The tessellation (16 by default).
return Model

CreateCone() public static method

Creates the cone.
public static CreateCone ( float height = 1.0f, float diameter = 1.0f, int tessellation = 16 ) : Model
height float The height (1 by default).
diameter float The diameter (1 by default).
tessellation int The tessellation (16 by default).
return Model

CreateCube() public static method

Creates the cube.
public static CreateCube ( float size = 1.0f ) : Model
size float The size (1 by default).
return Model

CreateCylinder() public static method

Creates the cylinder.
public static CreateCylinder ( float height = 1.0f, float diameter = 1.0f, int tessellation = 16 ) : Model
height float The height (1 by default).
diameter float The diameter (1 by default).
tessellation int The tessellation (16 by default).
return Model

CreateFromMesh() public static method

Creates the cube.
public static CreateFromMesh ( Mesh mesh ) : Model
mesh Mesh The mesh
return Model

CreateFromMesh() public static method

Creates the cube.
public static CreateFromMesh ( Mesh mesh, BoundingBox boundingBox ) : Model
mesh Mesh The mesh
boundingBox BoundingBox The mesh bounding box
return Model

CreatePlane() public static method

Creates the plane.
public static CreatePlane ( System.Vector3 normal = null, float size = 1.0f ) : Model
normal System.Vector3 The normal ( [0, 1, 0] by default).
size float The size (1 by default).
return Model

CreatePyramid() public static method

Creates the pyramid.
public static CreatePyramid ( float size = 1.0f ) : Model
size float The size (1 by default).
return Model

CreateSphere() public static method

Creates the sphere.
public static CreateSphere ( float diameter = 1.0f, int tessellation = 8 ) : Model
diameter float The diameter (1 by default).
tessellation int The tessellation (8 by default).
return Model

CreateTeapot() public static method

Creates the teapot.
public static CreateTeapot ( float size = 1.0f, int tessellation = 8 ) : Model
size float The size.
tessellation int The tessellation.
return Model

CreateTorus() public static method

Creates the torus.
public static CreateTorus ( float diameter = 1.0f, float thickness = 0.333f, int tessellation = 16 ) : Model
diameter float The diameter (1 by default).
thickness float The thickness (0.333f by default).
tessellation int The tessellation (16 by default).
return Model

Dispose() public method

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public Dispose ( ) : void
return void

GetIndices() public method

The get indices
public GetIndices ( ) : int[]
return int[]

GetVertices() public method

Gets the collition info.
public GetVertices ( ) : System.Vector3[]
return System.Vector3[]

Initialize() protected method

Performs further custom initialization for this instance.
protected Initialize ( ) : void
return void

LoadModel() protected method

Load the static model
protected LoadModel ( ) : void
return void

Model() public method

Initializes a new instance of the Model class.
public Model ( ) : System
return System

Model() public method

Initializes a new instance of the Model class.
public Model ( string modelPath ) : System
modelPath string The model path.
return System

Model() public method

Initializes a new instance of the Model class.
public Model ( string name, string modelPath ) : System
name string The name.
modelPath string The model path.
return System

UnloadModel() protected method

Unload the static model
protected UnloadModel ( ) : void
return void