Class Mesh
Represents a Mesh. Can contain vary Polygons.
Inheritance
System.Object
Mesh
Namespace: Aximo
Assembly: AxCommon.dll
Syntax
Fields
|
Improve this Doc
View Source
PrimitiveType
Declaration
public MeshFaceType PrimitiveType
Field Value
Properties
|
Improve this Doc
View Source
Bounds
Declaration
public Box3 Bounds { get; }
Property Value
Type |
Description |
OpenToolkit.Mathematics.Box3 |
|
|
Improve this Doc
View Source
Components
Declaration
public IList<MeshComponent> Components { get; }
Property Value
|
Improve this Doc
View Source
FaceCount
Declaration
public int FaceCount { get; }
Property Value
Type |
Description |
System.Int32 |
|
|
Improve this Doc
View Source
MaterialCount
Declaration
public int MaterialCount { get; }
Property Value
Type |
Description |
System.Int32 |
|
|
Improve this Doc
View Source
MaterialIds
Declaration
public HashSet<int> MaterialIds { get; }
Property Value
Type |
Description |
System.Collections.Generic.HashSet<System.Int32> |
|
|
Improve this Doc
View Source
Name
Declaration
public string Name { get; set; }
Property Value
Type |
Description |
System.String |
|
|
Improve this Doc
View Source
VertexCount
Declaration
public int VertexCount { get; }
Property Value
Type |
Description |
System.Int32 |
|
Methods
|
Improve this Doc
View Source
AddComponent(MeshComponent)
Declaration
public void AddComponent(MeshComponent component)
Parameters
|
Improve this Doc
View Source
AddComponent(MeshComponentType)
Declaration
public MeshComponent AddComponent(MeshComponentType componentType)
Parameters
Returns
|
Improve this Doc
View Source
AddComponent<T>()
Declaration
public T AddComponent<T>()
where T : MeshComponent, new()
Returns
Type Parameters
|
Improve this Doc
View Source
AddComponents<T>()
Declaration
public void AddComponents<T>()
where T : IVertex
Type Parameters
|
Improve this Doc
View Source
AddFace(IList<Int32>)
Declaration
public void AddFace(IList<int> indicies)
Parameters
Type |
Name |
Description |
System.Collections.Generic.IList<System.Int32> |
indicies |
|
|
Improve this Doc
View Source
AddFace(Int32[])
Declaration
public void AddFace(params int[] indicies)
Parameters
Type |
Name |
Description |
System.Int32[] |
indicies |
|
|
Improve this Doc
View Source
AddFaceAndMaterial(Int32, Int32[])
Declaration
public void AddFaceAndMaterial(int materialId, params int[] indicies)
Parameters
Type |
Name |
Description |
System.Int32 |
materialId |
|
System.Int32[] |
indicies |
|
|
Improve this Doc
View Source
AddFaceFromVerticesPosition(Int32)
Declaration
public void AddFaceFromVerticesPosition(int vertexStartIndex)
Parameters
Type |
Name |
Description |
System.Int32 |
vertexStartIndex |
|
|
Improve this Doc
View Source
AddFaceFromVerticesPosition(Int32, MeshFaceType)
Declaration
public void AddFaceFromVerticesPosition(int vertexStartIndex, MeshFaceType faceType)
Parameters
Type |
Name |
Description |
System.Int32 |
vertexStartIndex |
|
MeshFaceType |
faceType |
|
|
Improve this Doc
View Source
AddFaceFromVerticesTail()
Declaration
public void AddFaceFromVerticesTail()
|
Improve this Doc
View Source
AddFaceFromVerticesTail(MeshFaceType)
Declaration
public void AddFaceFromVerticesTail(MeshFaceType faceType)
Parameters
|
Improve this Doc
View Source
AddMesh(Mesh)
Declaration
public void AddMesh(Mesh mesh)
Parameters
Type |
Name |
Description |
Mesh |
mesh |
|
|
Improve this Doc
View Source
AddMesh(Mesh, Int32)
Declaration
public void AddMesh(Mesh mesh, int filterMaterialId)
Parameters
Type |
Name |
Description |
Mesh |
mesh |
|
System.Int32 |
filterMaterialId |
|
|
Improve this Doc
View Source
AddMesh(Mesh, Int32, Int32)
Declaration
public void AddMesh(Mesh mesh, int filterMaterialId, int newMaterialId)
Parameters
Type |
Name |
Description |
Mesh |
mesh |
|
System.Int32 |
filterMaterialId |
|
System.Int32 |
newMaterialId |
|
|
Improve this Doc
View Source
AddVertex(Mesh, Int32)
Declaration
public int AddVertex(Mesh src, int index)
Parameters
Type |
Name |
Description |
Mesh |
src |
|
System.Int32 |
index |
|
Returns
Type |
Description |
System.Int32 |
|
|
Improve this Doc
View Source
AddVertices(Mesh, Int32, Int32)
Declaration
public void AddVertices(Mesh src, int start, int count)
Parameters
Type |
Name |
Description |
Mesh |
src |
|
System.Int32 |
start |
|
System.Int32 |
count |
|
|
Improve this Doc
View Source
AddVertices<T>(ICollection<T>)
Declaration
public void AddVertices<T>(ICollection<T> values)
where T : IVertex
Parameters
Type |
Name |
Description |
System.Collections.Generic.ICollection<T> |
values |
|
Type Parameters
|
Improve this Doc
View Source
CalculateBounds()
Declaration
public void CalculateBounds()
|
Improve this Doc
View Source
Clone()
Declaration
Returns
|
Improve this Doc
View Source
CloneEmpty()
Declaration
Returns
|
Improve this Doc
View Source
CreateCube()
Declaration
public static Mesh CreateCube()
Returns
|
Improve this Doc
View Source
CreateCylinder(Single, Nullable<Single>, Single, Int32)
Declaration
public static Mesh CreateCylinder(float diameterBottom = 1F, float? diameterTop = default(float? ), float height = 1F, int slices = 8)
Parameters
Type |
Name |
Description |
System.Single |
diameterBottom |
|
System.Nullable<System.Single> |
diameterTop |
|
System.Single |
height |
|
System.Int32 |
slices |
|
Returns
|
Improve this Doc
View Source
CreateFacesAndIndicies()
Declaration
public void CreateFacesAndIndicies()
|
Improve this Doc
View Source
CreateFacesAndIndicies(MeshFaceType)
Declaration
public void CreateFacesAndIndicies(MeshFaceType type)
Parameters
|
Improve this Doc
View Source
CreateFacesFromIndicies()
Declaration
public void CreateFacesFromIndicies()
|
Improve this Doc
View Source
CreateFacesFromIndicies(MeshFaceType)
Declaration
public void CreateFacesFromIndicies(MeshFaceType type)
Parameters
|
Improve this Doc
View Source
CreateFromVertices<T>(T[], Int32[], MeshFaceType)
Declaration
public static Mesh CreateFromVertices<T>(T[] vertices, int[] indicies = null, MeshFaceType primitiveType = MeshFaceType.Triangle)
where T : IVertex
Parameters
Type |
Name |
Description |
T[] |
vertices |
|
System.Int32[] |
indicies |
|
MeshFaceType |
primitiveType |
|
Returns
Type Parameters
|
Improve this Doc
View Source
CreateQuad2()
Declaration
public static Mesh CreateQuad2()
Returns
|
Improve this Doc
View Source
CreateQuad3()
Declaration
public static Mesh CreateQuad3()
Returns
|
Improve this Doc
View Source
Declaration
public static Mesh CreateQuadStride(IEnumerable<Vector2> path)
Parameters
Type |
Name |
Description |
System.Collections.Generic.IEnumerable<OpenToolkit.Mathematics.Vector2> |
path |
|
Returns
|
Improve this Doc
View Source
Declaration
public static Mesh CreateQuadStride(IEnumerable<Vector3> topPath, IEnumerable<Vector3> bottomPath)
Parameters
Type |
Name |
Description |
System.Collections.Generic.IEnumerable<OpenToolkit.Mathematics.Vector3> |
topPath |
|
System.Collections.Generic.IEnumerable<OpenToolkit.Mathematics.Vector3> |
bottomPath |
|
Returns
|
Improve this Doc
View Source
CreateSphere(Int32)
Declaration
public static Mesh CreateSphere(int divisions = 2)
Parameters
Type |
Name |
Description |
System.Int32 |
divisions |
|
Returns
|
Improve this Doc
View Source
Declaration
public static Mesh CreateSurface(IEnumerable<Vector2> path)
Parameters
Type |
Name |
Description |
System.Collections.Generic.IEnumerable<OpenToolkit.Mathematics.Vector2> |
path |
|
Returns
|
Improve this Doc
View Source
Declaration
public static Mesh CreateSurface(IEnumerable<Vector2> path, Vector2 center)
Parameters
Type |
Name |
Description |
System.Collections.Generic.IEnumerable<OpenToolkit.Mathematics.Vector2> |
path |
|
OpenToolkit.Mathematics.Vector2 |
center |
|
Returns
|
Improve this Doc
View Source
Declaration
public static Mesh CreateSurface(IEnumerable<Vector3> path)
Parameters
Type |
Name |
Description |
System.Collections.Generic.IEnumerable<OpenToolkit.Mathematics.Vector3> |
path |
|
Returns
|
Improve this Doc
View Source
Declaration
public static Mesh CreateSurface(IEnumerable<Vector3> path, Vector3 center)
Parameters
Type |
Name |
Description |
System.Collections.Generic.IEnumerable<OpenToolkit.Mathematics.Vector3> |
path |
|
OpenToolkit.Mathematics.Vector3 |
center |
|
Returns
|
Improve this Doc
View Source
CreateWallQuad()
Declaration
public static Mesh CreateWallQuad()
Returns
|
Improve this Doc
View Source
Expand()
Declaration
|
Improve this Doc
View Source
Expanded()
Declaration
Returns
|
Improve this Doc
View Source
FaceView<T>()
Declaration
public IList<MeshFace<T>> FaceView<T>()
where T : IVertex
Returns
Type |
Description |
System.Collections.Generic.IList<MeshFace<T>> |
|
Type Parameters
|
Improve this Doc
View Source
GetComponent(MeshComponentType)
Declaration
public MeshComponent GetComponent(MeshComponentType componentType)
Parameters
Returns
|
Improve this Doc
View Source
GetComponent<T>()
Declaration
public T GetComponent<T>()
where T : MeshComponent
Returns
Type Parameters
|
Improve this Doc
View Source
GetComponent<T>(MeshComponentType)
Declaration
public T GetComponent<T>(MeshComponentType componentType)
where T : MeshComponent
Parameters
Returns
Type Parameters
|
Improve this Doc
View Source
GetIndiciesArray()
Declaration
public int[] GetIndiciesArray()
Returns
Type |
Description |
System.Int32[] |
|
|
Improve this Doc
View Source
GetIndiciesArray(Int32)
Declaration
public int[] GetIndiciesArray(int materialId)
Parameters
Type |
Name |
Description |
System.Int32 |
materialId |
|
Returns
Type |
Description |
System.Int32[] |
|
|
Improve this Doc
View Source
GetIndiciesArray<T>()
Declaration
public T[] GetIndiciesArray<T>()
where T : struct
Returns
Type Parameters
|
Improve this Doc
View Source
GetIndiciesBuffer<T>()
Declaration
public BufferData1D<T> GetIndiciesBuffer<T>()
where T : struct
Returns
Type Parameters
|
Improve this Doc
View Source
GetPrimitiveType()
Declaration
public AxPrimitiveType GetPrimitiveType()
Returns
|
Improve this Doc
View Source
GetVertexArray<T>()
Declaration
public T[] GetVertexArray<T>()
Returns
Type Parameters
|
Improve this Doc
View Source
HasComponent(MeshComponentType)
Declaration
public bool HasComponent(MeshComponentType componentType)
Parameters
Returns
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
HasComponent<T>()
Declaration
public bool HasComponent<T>()
where T : MeshComponent
Returns
Type |
Description |
System.Boolean |
|
Type Parameters
|
Improve this Doc
View Source
HasComponents<T1, T2>()
Declaration
public bool HasComponents<T1, T2>()
where T1 : MeshComponent where T2 : MeshComponent
Returns
Type |
Description |
System.Boolean |
|
Type Parameters
|
Improve this Doc
View Source
HasComponents<T1, T2, T3>()
Declaration
public bool HasComponents<T1, T2, T3>()
where T1 : MeshComponent where T2 : MeshComponent where T3 : MeshComponent
Returns
Type |
Description |
System.Boolean |
|
Type Parameters
Name |
Description |
T1 |
|
T2 |
|
T3 |
|
|
Improve this Doc
View Source
IsCompatible<T>()
Declaration
public bool IsCompatible<T>()
where T : IVertex
Returns
Type |
Description |
System.Boolean |
|
Type Parameters
|
Improve this Doc
View Source
IsComponents<T1, T2>()
Declaration
public bool IsComponents<T1, T2>()
where T1 : MeshComponent where T2 : MeshComponent
Returns
Type |
Description |
System.Boolean |
|
Type Parameters
|
Improve this Doc
View Source
IsComponents<T1, T2, T3>()
Declaration
public bool IsComponents<T1, T2, T3>()
where T1 : MeshComponent where T2 : MeshComponent where T3 : MeshComponent
Returns
Type |
Description |
System.Boolean |
|
Type Parameters
Name |
Description |
T1 |
|
T2 |
|
T3 |
|
|
Improve this Doc
View Source
RecalculateNormals(Single)
Declaration
public void RecalculateNormals(float angle)
Parameters
Type |
Name |
Description |
System.Single |
angle |
|
|
Improve this Doc
View Source
ReplaceMaterial(Int32, Int32)
Declaration
public void ReplaceMaterial(int oldMaterialId, int newMaterialid)
Parameters
Type |
Name |
Description |
System.Int32 |
oldMaterialId |
|
System.Int32 |
newMaterialid |
|
|
Improve this Doc
View Source
ReverseWindingOrder()
Declaration
public void ReverseWindingOrder()
|
Improve this Doc
View Source
ReverseWindingOrder(Int32)
Declaration
public void ReverseWindingOrder(int faceIndex)
Parameters
Type |
Name |
Description |
System.Int32 |
faceIndex |
|
|
Improve this Doc
View Source
Declaration
public void Scale(Vector2 scale)
Parameters
Type |
Name |
Description |
OpenToolkit.Mathematics.Vector2 |
scale |
|
|
Improve this Doc
View Source
Declaration
public void Scale(Vector3 scale)
Parameters
Type |
Name |
Description |
OpenToolkit.Mathematics.Vector3 |
scale |
|
|
Improve this Doc
View Source
Scale(Single)
Declaration
public void Scale(float scale)
Parameters
Type |
Name |
Description |
System.Single |
scale |
|
|
Improve this Doc
View Source
Scale(Single, Single)
Declaration
public void Scale(float scaleX, float scaleY)
Parameters
Type |
Name |
Description |
System.Single |
scaleX |
|
System.Single |
scaleY |
|
|
Improve this Doc
View Source
Scale(Single, Single, Single)
Declaration
public void Scale(float scaleX, float scaleY, float scaleZ)
Parameters
Type |
Name |
Description |
System.Single |
scaleX |
|
System.Single |
scaleY |
|
System.Single |
scaleZ |
|
|
Improve this Doc
View Source
SetMaterial(Int32, Int32)
Declaration
public void SetMaterial(int faceIndex, int materialId)
Parameters
Type |
Name |
Description |
System.Int32 |
faceIndex |
|
System.Int32 |
materialId |
|
|
Improve this Doc
View Source
Declaration
public void SetNormals(IEnumerable<Vector3> normals)
Parameters
Type |
Name |
Description |
System.Collections.Generic.IEnumerable<OpenToolkit.Mathematics.Vector3> |
normals |
|
|
Improve this Doc
View Source
ToPrimitive()
Declaration
public Mesh ToPrimitive()
Returns
|
Improve this Doc
View Source
ToPrimitive(MeshFaceType, Int32)
Declaration
public Mesh ToPrimitive(MeshFaceType targetFaceType, int materialId = -1)
Parameters
Type |
Name |
Description |
MeshFaceType |
targetFaceType |
|
System.Int32 |
materialId |
|
Returns
|
Improve this Doc
View Source
ToString()
Declaration
public override string ToString()
Returns
Type |
Description |
System.String |
|
Overrides
System.Object.ToString()
|
Improve this Doc
View Source
Declaration
public void Translate(Vector2 direction)
Parameters
Type |
Name |
Description |
OpenToolkit.Mathematics.Vector2 |
direction |
|
|
Improve this Doc
View Source
Declaration
public void Translate(Vector3 direction)
Parameters
Type |
Name |
Description |
OpenToolkit.Mathematics.Vector3 |
direction |
|
|
Improve this Doc
View Source
View<T>()
Declaration
public MeshVertexList<T> View<T>()
where T : IVertex
Returns
Type Parameters
|
Improve this Doc
View Source
Visit<T>(Action<T, Int32>)
Declaration
public void Visit<T>(Action<T, int> callback)
where T : IVertex
Parameters
Type |
Name |
Description |
System.Action<T, System.Int32> |
callback |
|
Type Parameters
|
Improve this Doc
View Source
Visit<T>(Action<T>)
Declaration
public void Visit<T>(Action<T> callback)
where T : IVertex
Parameters
Type |
Name |
Description |
System.Action<T> |
callback |
|
Type Parameters
Extension Methods