C# Class Visualizer.GeometricPrimitive

Base class for simple geometric primitive models. This provides a vertex buffer, an index buffer, plus methods for drawing the model. Classes for specific types of primitive (CubePrimitive, SpherePrimitive, etc.) are derived from this common base, and use the AddVertex and AddIndex methods to specify their geometry.
Inheritance: IDisposable
Afficher le fichier Open project: omanamos/kinect-nao

Méthodes publiques

Méthode Description
Dispose ( ) : void

Frees resources used by this object.

Draw ( Effect effect ) : void

Draws the primitive model, using the specified effect. Unlike the other Draw overload where you just specify the world/view/projection matrices and color, this method does not set any renderstates, so you must make sure all states are set to sensible values before you call it.

Draw ( Matrix world, Matrix view, Matrix projection, Color color ) : void

Draws the primitive model, using a BasicEffect shader with default lighting. Unlike the other Draw overload where you specify a custom effect, this method sets important renderstates to sensible values for 3D model rendering, so you do not need to set these states before you call it.

Méthodes protégées

Méthode Description
AddIndex ( int index ) : void

Adds a new index to the primitive model. This should only be called during the initialization process, before InitializePrimitive.

AddVertex ( Vector3 position, Vector3 normal ) : void

Adds a new vertex to the primitive model. This should only be called during the initialization process, before InitializePrimitive.

Dispose ( bool disposing ) : void

Frees resources used by this object.

InitializePrimitive ( GraphicsDevice graphicsDevice ) : void

Method Details

AddIndex() protected méthode

Adds a new index to the primitive model. This should only be called during the initialization process, before InitializePrimitive.
protected AddIndex ( int index ) : void
index int
Résultat void

AddVertex() protected méthode

Adds a new vertex to the primitive model. This should only be called during the initialization process, before InitializePrimitive.
protected AddVertex ( Vector3 position, Vector3 normal ) : void
position Vector3
normal Vector3
Résultat void

Dispose() public méthode

Frees resources used by this object.
public Dispose ( ) : void
Résultat void

Dispose() protected méthode

Frees resources used by this object.
protected Dispose ( bool disposing ) : void
disposing bool
Résultat void

Draw() public méthode

Draws the primitive model, using the specified effect. Unlike the other Draw overload where you just specify the world/view/projection matrices and color, this method does not set any renderstates, so you must make sure all states are set to sensible values before you call it.
public Draw ( Effect effect ) : void
effect Microsoft.Xna.Framework.Graphics.Effect
Résultat void

Draw() public méthode

Draws the primitive model, using a BasicEffect shader with default lighting. Unlike the other Draw overload where you specify a custom effect, this method sets important renderstates to sensible values for 3D model rendering, so you do not need to set these states before you call it.
public Draw ( Matrix world, Matrix view, Matrix projection, Color color ) : void
world Matrix
view Matrix
projection Matrix
color Color
Résultat void

InitializePrimitive() protected méthode

protected InitializePrimitive ( GraphicsDevice graphicsDevice ) : void
graphicsDevice GraphicsDevice
Résultat void