C# Класс QuadVideo.XYAxesPointMesh

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.
Наследование: NewTOAPIA.GL.Mesh3D
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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.

XYAxesPointMesh ( 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.

XYAxesPointMesh ( Vector3D boundary, Resolution res ) : 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 and indices. The general routine is to create a mesh in the x-y plane, using the appropriate width and height.

CreateTextureCoords ( ) : 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

XYAxesPointMesh() публичный Метод

To construct a mesh, we need to know the size and resolution. We also set the texture as a convenience.
public XYAxesPointMesh ( 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

XYAxesPointMesh() публичный Метод

To construct a mesh, we need to know the size and resolution. We also set the texture as a convenience.
public XYAxesPointMesh ( Vector3D boundary, Resolution res ) : System
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.
Результат System