Empeld
Empeld plugin documentation.
|
A raw, un-optimize, fully mutable, representation of a static mesh More...
Public Member Functions | |
IEnumerable< Triangle > | TrianglesInGroup (TriangleGroup group) |
IEnumerable< Triangle > | TrianglesInGroup (string groupName) |
Mesh (bool autoNormals) | |
Mesh () | |
Triangle | AddTriangle () |
Triangle | AddTriangle (Vertex[] v, Material mat=null) |
Triangle | AddTriangle (Vertex a, Vertex b, Vertex c, Material mat=null, TriangleGroup group=null) |
Triangle | AddTriangle (Triangle tri) |
Triangle [] | AddQuad (Vertex a, Vertex b, Vertex c, Vertex d, Material material=null, TriangleGroup group=null) |
void | ReverseVertexOrder () |
Flips vertex order on all triangles eg. from (1,2,3) to (3,2,1) Useful when normals are generating backwards More... | |
void | ComputeFlatNormals () |
Computes the flat normals. Vert fast, but assumes each triangle has its own unique set of vertices More... | |
void | ComputeSmoothNormalsByRef () |
Computes the smooth normals by reference. Mid-range speed O(v * t). Only works if vertices are propertly created with references to each other in an indexed way More... | |
void | ComputeSmoothNormalsByProximity () |
Computes the smooth normals by proximity of the coordinate. Slowest, but most accurate, method More... | |
void | Merge (Mesh mesh) |
Merge multiple meshes More... | |
AxisAlignedBox | ComputeBoundingBox () |
Mesh | Clone () |
Public Attributes | |
IEnumerable< TriangleGroup > | Groups => _triangles.Select(x => x.Group).Where(x => x != null).Distinct() |
Protected Member Functions | |
Mesh (Mesh mesh) | |
Properties | |
IEnumerable< Triangle > | Triangles [get] |
IEnumerable< Vertex > | Vertices [get] |
IEnumerable< Material > | Materials [get] |
int | TriangleCount [get] |
int | VertexCount [get] |
bool | Empty [get] |
A raw, un-optimize, fully mutable, representation of a static mesh
|
protected |
Triangle [] pluginbase.Helpers.Mesh.Mesh.AddQuad | ( | Vertex | a, |
Vertex | b, | ||
Vertex | c, | ||
Vertex | d, | ||
Material | material = null , |
||
TriangleGroup | group = null |
||
) |
Triangle pluginbase.Helpers.Mesh.Mesh.AddTriangle | ( | ) |
Attribute: 0], v[1], v[2
, mat);
Triangle pluginbase.Helpers.Mesh.Mesh.AddTriangle | ( | Vertex | a, |
Vertex | b, | ||
Vertex | c, | ||
Material | mat = null , |
||
TriangleGroup | group = null |
||
) |
Mesh pluginbase.Helpers.Mesh.Mesh.Clone | ( | ) |
AxisAlignedBox pluginbase.Helpers.Mesh.Mesh.ComputeBoundingBox | ( | ) |
void pluginbase.Helpers.Mesh.Mesh.ComputeFlatNormals | ( | ) |
void pluginbase.Helpers.Mesh.Mesh.ComputeSmoothNormalsByProximity | ( | ) |
void pluginbase.Helpers.Mesh.Mesh.ComputeSmoothNormalsByRef | ( | ) |
Computes the smooth normals by reference. Mid-range speed O(v * t). Only works if vertices are propertly created with references to each other in an indexed way
void pluginbase.Helpers.Mesh.Mesh.Merge | ( | Mesh | mesh | ) |
Merge multiple meshes
mesh | Mesh. |
Attribute: mat
= mat.Clone();
Attribute: vert
= vert.Clone();
Attribute: tri.A
,
Attribute: tri.B
,
Attribute: tri.C
,
Attribute: tri.Material
: null
void pluginbase.Helpers.Mesh.Mesh.ReverseVertexOrder | ( | ) |
IEnumerable<Triangle> pluginbase.Helpers.Mesh.Mesh.TrianglesInGroup | ( | TriangleGroup | group | ) |
IEnumerable<Triangle> pluginbase.Helpers.Mesh.Mesh.TrianglesInGroup | ( | string | groupName | ) |
IEnumerable<TriangleGroup> pluginbase.Helpers.Mesh.Mesh.Groups => _triangles.Select(x => x.Group).Where(x => x != null).Distinct() |
|
get |
|
get |
|
get |
|
get |
|
get |
|
get |