C# 클래스 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.
상속: IDisposable
파일 보기 프로젝트 열기: omanamos/kinect-nao

공개 메소드들

메소드 설명
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.

보호된 메소드들

메소드 설명
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

메소드 상세

AddIndex() 보호된 메소드

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
리턴 void

AddVertex() 보호된 메소드

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
리턴 void

Dispose() 공개 메소드

Frees resources used by this object.
public Dispose ( ) : void
리턴 void

Dispose() 보호된 메소드

Frees resources used by this object.
protected Dispose ( bool disposing ) : void
disposing bool
리턴 void

Draw() 공개 메소드

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
리턴 void

Draw() 공개 메소드

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
리턴 void

InitializePrimitive() 보호된 메소드

protected InitializePrimitive ( GraphicsDevice graphicsDevice ) : void
graphicsDevice GraphicsDevice
리턴 void