Complex geometry. More...
Classes | |
class | Surface |
Mesh surface. More... | |
Public Member Functions | |
Mesh (Mesh template) | |
Mesh constructor. | |
Mesh () | |
Mesh constructor. | |
void | ComputeBounds () |
Compute mesh bounds. | |
void | ComputeNormals () |
Automatically compute mesh normals. | |
void | DisableNormals (bool on) |
Temporarly disable mesh normals. | |
void | DisableNormals () |
Disable mesh normals. | |
void | FlipNormals () |
Protected Types | |
enum | NormalMode { Disabled, VertexButDisabled, Vertex } |
Enumeration indicating use vertices normal. More... | |
Properties | |
override IEnumerable < ShaderObject > | Attachments [get] |
Mesh class shaders. | |
BoundVolume | Bounds [get, set] |
Bound volume of this Mesh. |
Complex geometry.
Simple geometry can be rendered simply deriving a RenderGraphNode class and setup an appropriate shader program, its inputs and its uniform state. But for complex geometries with multiple primitives types, with normals, multiple texture coordinates, colors and with many other attributes could be hard to handle.
The Mesh class aids the geometry rendering, allowing to subdivide the complex geometry into simpler surfaces.
Every surface, for being part of the same Mesh instance, shall have the same vertices attributes set. It is an error to supply a Surface not coherent with other already defined surfaces. This restriction is necessary to avoid a dedicated ShaderProgram for each surface (and consequent shader input updates). This limitation could be arounded using appropriate render hierarchy, or introducing conditional code in the ShaderPrograms and setup uniform state of specific surfaces.
enum Derm::Mesh::Mesh::NormalMode [protected] |
Derm.Mesh.Mesh.Mesh | ( | ) |
Mesh constructor.
Derm.Mesh.Mesh.Mesh | ( | Mesh | template | ) |
void Derm.Mesh.Mesh.ComputeBounds | ( | ) |
Compute mesh bounds.
void Derm.Mesh.Mesh.ComputeNormals | ( | ) |
Automatically compute mesh normals.
void Derm.Mesh.Mesh.DisableNormals | ( | bool | on | ) |
Temporarly disable mesh normals.
on | A System.Boolean indicating whether the mesh normals are send to the graphic system, without deallocating normal buffers. |
void Derm.Mesh.Mesh.DisableNormals | ( | ) |
Disable mesh normals.
It deallocates normal buffers if it's actually present.
void Derm.Mesh.Mesh.FlipNormals | ( | ) |
override IEnumerable<ShaderObject> Derm.Mesh.Mesh.Attachments [get] |
Mesh class shaders.
Reimplemented from Derm.Render.RenderGraphNode.
BoundVolume Derm.Mesh.Mesh.Bounds [get, set] |
Bound volume of this Mesh.