C# 클래스 QuadVideo.XYAxesMesh

This object uses a set of quads to represent a mesh that is in the XY plane. A size parameter sets the model coordinate boundaries of the mesh The Resolution determines how many quads are constructed along each axis. This class clearly separates the creation of vertices, indices, and texture coodinates for the sake of clarity. It may not be the most efficient manner, but is probably the easiest to understand, modiy, extend, and maintain. This is not the most optimal representation of a mesh of quads. First, the individual vertices are duplicated rather than shared. This is to allow setting of individual normal vectors, and texture coordinates per vertex. Also, instead of using quad strips, each individual quad is drawn as a separate object. Again, this is for full control of drawing. One scenario might be that each individual quad is drawn and some shader parameters are set before the drawing occurs. This might allow a shader to convey information to the quad such as which position it is in relative to the resolution of the entire mesh.
상속: Mesh3D
파일 보기 프로젝트 열기: Wiladams/NewTOAPIA 1 사용 예제들

공개 메소드들

메소드 설명
CreateVertices ( ) : void
Render ( GraphicsInterface GI ) : void

This override is called by whomever is controlling the rendering process. We call the base Render method as it will automatically use the vertices, indices, and texture coordinates to draw the quads.

XYAxesMesh ( GraphicsInterface gi, Vector3D boundary, Resolution res, GLTexture texture ) : System

To construct a mesh, we need to know the size and resolution. We also set the texture as a convenience.

비공개 메소드들

메소드 설명
CreateIndices ( ) : void
CreateMesh ( ) : void

Do the work of creating the mesh vertices, indices, and texture coordinates.

CreateTextureCoords ( ) : void
SetupTextureOptions ( GraphicsInterface GI ) : void

메소드 상세

CreateVertices() 공개 메소드

public CreateVertices ( ) : void
리턴 void

Render() 공개 메소드

This override is called by whomever is controlling the rendering process. We call the base Render method as it will automatically use the vertices, indices, and texture coordinates to draw the quads.
public Render ( GraphicsInterface GI ) : void
GI NewTOAPIA.GL.GraphicsInterface
리턴 void

XYAxesMesh() 공개 메소드

To construct a mesh, we need to know the size and resolution. We also set the texture as a convenience.
public XYAxesMesh ( GraphicsInterface gi, Vector3D boundary, Resolution res, GLTexture texture ) : System
gi NewTOAPIA.GL.GraphicsInterface
boundary Vector3D The size on the XY plane. The value is not used.
res Resolution The resolution determines how many rows and columns of quads will be generated.
texture NewTOAPIA.GL.GLTexture An optional texture object to be bound to the mesh. /// Normalized texture coordinates will be generated whether a texture object is assigned or not.
리턴 System