C# Class IrrlichtNETCP.MeshManipulator

Inheritance: NativeElement
Mostrar archivo Open project: Paulus/irrlichtnetcp Class Usage Examples

Public Methods

Method Description
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.

Private Methods

Method Description
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

Method Details

CreateMeshUniquePrimitives() public method

Unweld vertices.
public CreateMeshUniquePrimitives ( Mesh baseMesh ) : Mesh
baseMesh Mesh Input mesh
return Mesh

CreateMeshWith2TCoords() public method

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 ///
return Mesh

CreateMeshWithTangents() public method

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
return Mesh

FlipSurfaces() public method

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.
return void

GetPolyCount() public method

Returns amount of polygons in mesh.
public GetPolyCount ( AnimatedMesh mesh ) : int
mesh AnimatedMesh Mesh
return int

GetPolyCount() public method

Returns amount of polygons in mesh.
public GetPolyCount ( Mesh mesh ) : int
mesh Mesh Mesh
return int

MakePlanarTextureMapping() public method

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.
return void

MeshManipulator() public method

public MeshManipulator ( IntPtr raw ) : System
raw System.IntPtr
return System

RecalculateNormals() public method

Recalculates all normals of the mesh.
public RecalculateNormals ( Mesh mesh, bool smooth ) : void
mesh Mesh Mesh on which the operation is performed.
smooth bool
return void

ScaleMesh() public method

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.
return void

SetVertexColorAlpha() public method

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.
return void

SetVertexColors() public method

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.
return void

TransformMesh() public method

Applies a transformation.
public TransformMesh ( Mesh mesh, Matrix4 mat ) : void
mesh Mesh /// A mesh to be transformed ///
mat Matrix4 /// A transform matrix ///
return void