Class RenderSurface
- Namespace
- Elegy.Common.Assets.ElegyMapData
- Assembly
- Elegy.Common.dll
An ELF render surface is concrete render data that describes a little part of world geometry. It is not necessarily a single face or a few coplanar faces, but rather a mesh consisting of all faces belonging to one octree leaf, where the faces share the same material.
public class RenderSurface
- Inheritance
-
RenderSurface
- Inherited Members
Properties
BoundingBox
AABB of this render surface.
public Box3 BoundingBox { get; set; }
Property Value
Colours
Colour buffer.
public List<Vector4> Colours { get; set; }
Property Value
Indices
Index buffer.
public List<int> Indices { get; set; }
Property Value
LightmapTexture
Lightmap texture name. It's up to the engine to autogenerate materials for these lightmaps.
public string LightmapTexture { get; set; }
Property Value
LightmapUvs
Secondary UV buffer for lightmaps.
public List<Vector2> LightmapUvs { get; set; }
Property Value
Material
The name of the material associated with this surface. Multimaterials could perhaps be autogenerated from a collection of surfaces with fundamentally similar materials.
public string Material { get; set; }
Property Value
Normals
Normals buffer. Tangents and bitangents are built from normals and UVs.
public List<Vector3> Normals { get; set; }
Property Value
Positions
Position buffer.
public List<Vector3> Positions { get; set; }
Property Value
Uvs
UV buffer.
public List<Vector2> Uvs { get; set; }
Property Value
VertexCount
Actual number of vertices.
public int VertexCount { get; set; }
Property Value
Methods
AddTriangle(int, int, int)
Adds vertex indices to form a new triangle.
public void AddTriangle(int a, int b, int c)
Parameters
AddVertex(Vector3, Vector3, Vector2, Vector2, Vector4)
Adds a new vertex to the surface.
public void AddVertex(Vector3 position, Vector3 normal, Vector2 uv, Vector2 lightmapUv, Vector4 colour)
Parameters
ToMesh()
Converts this into an Elegy render mesh.
public Mesh ToMesh()