Esempio n. 1
0
 /// <summary>
 /// Creates a copy of the mesh, which will only consist of Vertex3DT2Coord vertices.
 /// </summary>
 /// <param name="baseMesh">
 /// A mesh to be created from<see cref="Mesh"/>
 /// </param>
 /// <returns>
 /// A new mesh with 2T coords <see cref="Mesh"/>
 /// </returns>
 public Mesh CreateMeshWith2TCoords(Mesh baseMesh)
 {
     return (Mesh)
         NativeElement.GetObject(MeshManipulator_CreateMeshWith2TCoords(_raw, baseMesh.Raw),
                                 typeof(Mesh));
 }
Esempio n. 2
0
 /// <summary>
 /// Applies a transformation.
 /// </summary>
 /// <param name="mesh">
 /// A mesh to be transformed <see cref="Mesh"/>
 /// </param>
 /// <param name="mat">
 /// A transform matrix <see cref="Matrix4"/>
 /// </param>
 public void TransformMesh(Mesh mesh, Matrix4 mat)
 {
     MeshManipulator_TransformMesh(_raw, mesh.Raw, mat.ToUnmanaged());
 }
Esempio n. 3
0
 public Mesh CreateMeshCopy(Mesh mesh)
 {
     return (Mesh)
         NativeElement.GetObject(MeshManipulator_CreateMeshCopy(_raw, mesh.Raw),
                                 typeof(Mesh));
 }
Esempio n. 4
0
 /// <summary>
 /// Adds an oct tree scene node
 /// </summary>
 /// <returns>The oct tree</returns>
 /// <param name="mesh">The mesh it is based on</param>
 /// <param name="parent">Its parent</param>
 /// <param name="id">ID (-1 for automatic assign.)</param>
 /// <param name="minimalPolysPerNode">The minimal polys per node (ideal : 128)</param>
 public SceneNode AddOctTreeSceneNode(Mesh mesh, SceneNode parent, int id, int minimalPolysPerNode)
 {
     return (SceneNode)
         NativeElement.GetObject(SceneManager_AddOctTreeSceneNode(_raw, mesh.Raw, GetPtr(parent), id, minimalPolysPerNode),
                                 typeof(SceneNode));
 }
Esempio n. 5
0
 /// <summary>
 /// Sets the colors of all vertices to one color.
 /// </summary>
 /// <param name="mesh">Mesh on which the operation is performed. </param>
 /// <param name="color">New color.</param>
 public void SetVertexColors(Mesh mesh, Color color)
 {
     MeshManipulator_SetVertexColors(_raw, mesh.Raw, color.ToUnmanaged());
 }
Esempio n. 6
0
 /// <summary>
 /// Creates a planar texture mapping on the mesh.
 /// </summary>
 /// <param name="baseMesh">Mesh on which the operation is performed. </param>
 /// <param name="resolution">Resolution of the planar mapping. This is the value specifying which is the relation between world space and texture coordinate space. </param>
 public void MakePlanarTextureMapping(Mesh baseMesh, float resolution)
 {
     MeshManipulator_MakePlanarTextureMapping(_raw, baseMesh.Raw, resolution);
 }
Esempio n. 7
0
 /// <summary>
 /// Recalculates all normals of the mesh.
 /// </summary>
 /// <param name="mesh">Mesh on which the operation is performed.</param>
 /// <param name="smooth"></param>
 public void RecalculateNormals(Mesh mesh, bool smooth)
 {
     MeshManipulator_RecalculateNormals(_raw, mesh.Raw, smooth);
 }
Esempio n. 8
0
 public int GetMeshIndex(Mesh mesh)
 {
     return MeshCache_GetMeshIndex(_raw, mesh.Raw);
 }
Esempio n. 9
0
 public void RemoveMesh(Mesh mesh)
 {
     MeshCache_RemoveMesh(_raw, mesh.Raw);
 }
Esempio n. 10
0
 /// <summary>
 /// Sets the mesh the shadow volume uses to be rendered
 /// </summary>
 /// <param name="mesh">The mesh</param>
 public void SetMeshToRenderFrom(Mesh mesh)
 {
     ShadowVolume_SetMeshToRenderFrom(_raw, mesh.Raw);
 }
Esempio n. 11
0
 public string GetMeshFilename(Mesh mesh)
 {
     return MeshCache_GetMeshFilename(_raw, mesh.Raw);
 }
Esempio n. 12
0
 /// <summary>
 /// Creates a basic triangle selector based on a mesh
 /// </summary>
 /// <returns>A TriangleSelector</returns>
 /// <param name="mesh">The MESH !</param>
 /// <param name="node">Scene node, you NEED TO ADD THIS SELECTOR WITH SceneNode.TriangleSelector !</param>
 public TriangleSelector CreateTriangleSelector(Mesh mesh, SceneNode node)
 {
     return (TriangleSelector)
         NativeElement.GetObject(SceneManager_CreateTriangleSelector(_raw, mesh.Raw, node.Raw),
                                 typeof(TriangleSelector));
 }
Esempio n. 13
0
 /// <summary>
 /// Creates an optimized collision detector based on OctTrees
 /// </summary>
 /// <returns>A TriangleSelector</returns>
 /// <param name="mesh">Mesh from your node</param>
 /// <param name="node">Node</param>
 /// <param name="minimalPolysPerNode">Specifies the minimal polygons contained a octree node. If a node gets less polys the this value, it will not be splitted into smaller nodes.</param>
 public TriangleSelector CreateOctTreeTriangleSelector(Mesh mesh, SceneNode node, int minimalPolysPerNode)
 {
     return (TriangleSelector)
         NativeElement.GetObject(SceneManager_CreateOctTreeTriangleSelector(_raw, mesh.Raw, node.Raw, minimalPolysPerNode),
                                 typeof(TriangleSelector));
 }
Esempio n. 14
0
 /// <summary>
 /// Adds a water surface based on a hill mesh (use AddHillPlaneMesh). Looks good when material is TransparentReflection
 /// </summary>
 /// <returns>The water to surf on</returns>
 /// <param name="hillMesh">Hill mesh the water is based on</param>
 /// <param name="waveH">Height of waves</param>
 /// <param name="waveS">Speed of waves</param>
 /// <param name="waveL">Length of waves</param>
 /// <param name="parent">Parent of the node</param>
 /// <param name="id">ID (-1 for automatic assign.)</param>
 public SceneNode AddWaterSurfaceSceneNode(Mesh hillMesh, float waveH, float waveS, float waveL, SceneNode parent, int id)
 {
     return (SceneNode)
         NativeElement.GetObject(SceneManager_AddWaterSurfaceSceneNode(_raw, hillMesh.Raw, waveH, waveS, waveL, GetPtr(parent), id),
                                 typeof(SceneNode));
 }
Esempio n. 15
0
 /// <summary>
 /// Unweld vertices.
 /// </summary>
 /// <param name="baseMesh">Input mesh</param>
 /// <returns>Result mesh</returns>
 public Mesh CreateMeshUniquePrimitives(Mesh baseMesh)
 {
     return (Mesh)
         NativeElement.GetObject(MeshManipulator_CreateMeshUniquePrimitives(_raw, baseMesh.Raw),
                                 typeof(Mesh));
 }
Esempio n. 16
0
 public bool SetMeshFilename(Mesh mesh, string filename)
 {
     return MeshCache_SetMeshFilename(_raw, mesh.Raw, filename);
 }
Esempio n. 17
0
 /// <summary>
 /// Returns amount of polygons in mesh.
 /// </summary>
 /// <param name="mesh">Mesh</param>
 /// <returns>Amount of polygons</returns>
 public int GetPolyCount(Mesh mesh)
 {
     return MeshManipulator_GetPolyCount(_raw, mesh.Raw);
 }
Esempio n. 18
0
 /// <summary>
 /// Scales the whole mesh.
 /// </summary>
 /// <param name="mesh">Mesh on which the operation is performed. </param>
 /// <param name="scale">Scale factor. </param>
 public void ScaleMesh(Mesh mesh, Vector3D scale)
 {
     MeshManipulator_ScaleMesh(_raw, mesh.Raw, scale.ToUnmanaged());
 }
Esempio n. 19
0
 /// <summary>
 /// Flips the direction of surfaces.
 /// Changes backfacing triangles to frontfacing triangles and vice versa
 /// </summary>
 /// <param name="m">Mesh on which the operation is performed. </param>
 public void FlipSurfaces(Mesh m)
 {
     MeshManipulator_FlipSurfaces(_raw, m.Raw);
 }
Esempio n. 20
0
 /// <summary>
 /// Sets the alpha vertex color value of the whole mesh to a new value.
 /// </summary>
 /// <param name="mesh">Mesh on which the operation is performed. </param>
 /// <param name="alpha">New alpha value. Must be a value between 0 and 255. </param>
 public void SetVertexColorAlpha(Mesh mesh, int alpha)
 {
     MeshManipulator_SetVertexColorAlpha(_raw, mesh.Raw, alpha);
 }
Esempio n. 21
0
 public void SetMesh(Mesh pMesh)
 {
     MeshSceneNode_SetMesh(_raw, pMesh.Raw);
 }
Esempio n. 22
0
 /// <summary>
 /// Adds a basic and not-moving scene node based on a simple mesh
 /// </summary>
 /// <returns>Your scene node</returns>
 /// <param name="mesh">A static mesh often obtained via GetMesh(0)</param>
 /// <param name="parent">Parent of the node</param>
 /// <param name="id">ID of the node (-1 for automatic assignation)</param>
 public MeshSceneNode AddMeshSceneNode(Mesh mesh, SceneNode parent, int id)
 {
     return (MeshSceneNode)
         NativeElement.GetObject(SceneManager_AddMeshSceneNode(_raw, mesh.Raw, GetPtr(parent), id),
                                 typeof(MeshSceneNode));
 }