C# Класс IrrlichtNETCP.MeshManipulator

Наследование: NativeElement
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
CreateMeshUniquePrimitives ( Mesh baseMesh ) : Mesh

Unweld vertices.

CreateMeshWith2TCoords ( Mesh baseMesh ) : Mesh

Creates a copy of the mesh, which will only consist of Vertex3DT2Coord vertices.

CreateMeshWithTangents ( Mesh baseMesh ) : Mesh

Creates a copy of the mesh, which will only consist of S3DVertexTangents vertices. This is useful if you want to draw tangent space normal mapped geometry because it calculates the tangent and binormal data which is needed there.

FlipSurfaces ( Mesh m ) : void

Flips the direction of surfaces. Changes backfacing triangles to frontfacing triangles and vice versa

GetPolyCount ( AnimatedMesh mesh ) : int

Returns amount of polygons in mesh.

GetPolyCount ( Mesh mesh ) : int

Returns amount of polygons in mesh.

MakePlanarTextureMapping ( Mesh baseMesh, float resolution ) : void

Creates a planar texture mapping on the mesh.

MeshManipulator ( IntPtr raw ) : System
RecalculateNormals ( Mesh mesh, bool smooth ) : void

Recalculates all normals of the mesh.

ScaleMesh ( Mesh mesh, IrrlichtNETCP.Vector3D scale ) : void

Scales the whole mesh.

SetVertexColorAlpha ( Mesh mesh, int alpha ) : void

Sets the alpha vertex color value of the whole mesh to a new value.

SetVertexColors ( Mesh mesh, Color color ) : void

Sets the colors of all vertices to one color.

TransformMesh ( Mesh mesh, Matrix4 mat ) : void

Applies a transformation.

Приватные методы

Метод Описание
MeshManipulator_CreateMeshUniquePrimitives ( IntPtr mm, IntPtr mesh ) : IntPtr
MeshManipulator_CreateMeshWith2TCoords ( IntPtr mm, IntPtr mesh ) : IntPtr
MeshManipulator_CreateMeshWithTangents ( IntPtr mm, IntPtr mesh ) : IntPtr
MeshManipulator_FlipSurfaces ( IntPtr mm, IntPtr mesh ) : void
MeshManipulator_GetPolyCount ( IntPtr mm, IntPtr mesh ) : int
MeshManipulator_GetPolyCountA ( IntPtr mm, IntPtr amesh ) : int
MeshManipulator_MakePlanarTextureMapping ( IntPtr mm, IntPtr mesh, float resolution ) : void
MeshManipulator_RecalculateNormals ( IntPtr mm, IntPtr mesh, bool smooth ) : void
MeshManipulator_ScaleMesh ( IntPtr mm, IntPtr mesh, float scale ) : void
MeshManipulator_SetVertexColorAlpha ( IntPtr mm, IntPtr mesh, int alpha ) : void
MeshManipulator_SetVertexColors ( IntPtr mm, IntPtr mesh, int alpha ) : void
MeshManipulator_TransformMesh ( IntPtr mm, IntPtr mesh, float mat ) : void

Описание методов

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

Unweld vertices.
public CreateMeshUniquePrimitives ( Mesh baseMesh ) : Mesh
baseMesh Mesh Input mesh
Результат Mesh

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

Creates a copy of the mesh, which will only consist of Vertex3DT2Coord vertices.
public CreateMeshWith2TCoords ( Mesh baseMesh ) : Mesh
baseMesh Mesh /// A mesh to be created from ///
Результат Mesh

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

Creates a copy of the mesh, which will only consist of S3DVertexTangents vertices. This is useful if you want to draw tangent space normal mapped geometry because it calculates the tangent and binormal data which is needed there.
public CreateMeshWithTangents ( Mesh baseMesh ) : Mesh
baseMesh Mesh Input mesh
Результат Mesh

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

Flips the direction of surfaces. Changes backfacing triangles to frontfacing triangles and vice versa
public FlipSurfaces ( Mesh m ) : void
m Mesh Mesh on which the operation is performed.
Результат void

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

Returns amount of polygons in mesh.
public GetPolyCount ( AnimatedMesh mesh ) : int
mesh AnimatedMesh Mesh
Результат int

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

Returns amount of polygons in mesh.
public GetPolyCount ( Mesh mesh ) : int
mesh Mesh Mesh
Результат int

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

Creates a planar texture mapping on the mesh.
public MakePlanarTextureMapping ( Mesh baseMesh, float resolution ) : void
baseMesh Mesh Mesh on which the operation is performed.
resolution float Resolution of the planar mapping. This is the value specifying which is the relation between world space and texture coordinate space.
Результат void

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

public MeshManipulator ( IntPtr raw ) : System
raw System.IntPtr
Результат System

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

Recalculates all normals of the mesh.
public RecalculateNormals ( Mesh mesh, bool smooth ) : void
mesh Mesh Mesh on which the operation is performed.
smooth bool
Результат void

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

Scales the whole mesh.
public ScaleMesh ( Mesh mesh, IrrlichtNETCP.Vector3D scale ) : void
mesh Mesh Mesh on which the operation is performed.
scale IrrlichtNETCP.Vector3D Scale factor.
Результат void

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

Sets the alpha vertex color value of the whole mesh to a new value.
public SetVertexColorAlpha ( Mesh mesh, int alpha ) : void
mesh Mesh Mesh on which the operation is performed.
alpha int New alpha value. Must be a value between 0 and 255.
Результат void

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

Sets the colors of all vertices to one color.
public SetVertexColors ( Mesh mesh, Color color ) : void
mesh Mesh Mesh on which the operation is performed.
color Color New color.
Результат void

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

Applies a transformation.
public TransformMesh ( Mesh mesh, Matrix4 mat ) : void
mesh Mesh /// A mesh to be transformed ///
mat Matrix4 /// A transform matrix ///
Результат void