Falco Engine 3.9.0.1 (beta)
Mesh.cs
Go to the documentation of this file.
1using System;
2using System.Runtime.CompilerServices;
3using System.Runtime.InteropServices;
4
5namespace FalcoEngine
6{
7 public class Mesh : Asset, IDisposable
8 {
9 [MethodImpl(MethodImplOptions.InternalCall)]
10 public extern Mesh();
11
15 public int subMeshCount { [MethodImpl(MethodImplOptions.InternalCall)] get; }
16
22 [MethodImpl(MethodImplOptions.InternalCall)]
23 public extern SubMesh GetSubMesh(int index);
24
29 [MethodImpl(MethodImplOptions.InternalCall)]
30 public extern void AddSubMesh(SubMesh subMesh);
31
36 [MethodImpl(MethodImplOptions.InternalCall)]
37 public extern void RemoveSubMesh(SubMesh subMesh);
38
43 [MethodImpl(MethodImplOptions.InternalCall)]
44 public extern void RemoveSubMesh(int index);
45
49 [MethodImpl(MethodImplOptions.InternalCall)]
50 public extern void RecalculateBounds();
51
55 [MethodImpl(MethodImplOptions.InternalCall)]
56 public extern void Commit();
57
61 public void Dispose()
62 {
63 Destroy();
64 }
65
66 [MethodImpl(MethodImplOptions.InternalCall)]
67 private extern void Destroy();
68 }
69}
SubMesh GetSubMesh(int index)
Get sub mesh by index
void RemoveSubMesh(int index)
Remove sub mesh by index
void Commit()
Apply changes made in runtime for all sub meshes
void AddSubMesh(SubMesh subMesh)
Add sub mesh
void Dispose()
Free internal unmanaged resources. Use it for procedurally generated meshes at runtime
Definition: Mesh.cs:61
void RemoveSubMesh(SubMesh subMesh)
Remove sub mesh by pointer
int subMeshCount
Get sub mesh count
Definition: Mesh.cs:15
void RecalculateBounds()
Recalculate mesh bounds