C# Class IrrlichtNETCP.MeshManipulator

Inheritance: NativeElement
Afficher le fichier Open project: Paulus/irrlichtnetcp Class Usage Examples

Méthodes publiques

Méthode 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

Méthode 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 méthode

Unweld vertices.
public CreateMeshUniquePrimitives ( Mesh baseMesh ) : Mesh
baseMesh Mesh Input mesh
Résultat Mesh

CreateMeshWith2TCoords() public méthode

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 ///
Résultat Mesh

CreateMeshWithTangents() public méthode

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
Résultat Mesh

FlipSurfaces() public méthode

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.
Résultat void

GetPolyCount() public méthode

Returns amount of polygons in mesh.
public GetPolyCount ( AnimatedMesh mesh ) : int
mesh AnimatedMesh Mesh
Résultat int

GetPolyCount() public méthode

Returns amount of polygons in mesh.
public GetPolyCount ( Mesh mesh ) : int
mesh Mesh Mesh
Résultat int

MakePlanarTextureMapping() public méthode

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.
Résultat void

MeshManipulator() public méthode

public MeshManipulator ( IntPtr raw ) : System
raw System.IntPtr
Résultat System

RecalculateNormals() public méthode

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

ScaleMesh() public méthode

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.
Résultat void

SetVertexColorAlpha() public méthode

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.
Résultat void

SetVertexColors() public méthode

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.
Résultat void

TransformMesh() public méthode

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