Class representing a mesh and containing the geometric (and optionally texture) data of the scene captured by the spatial mapping module. More...
Attributes | |
int[] | nbVerticesInSubmesh = new int[(int)Constant.MAX_SUBMESH] |
Number of vertices per chunk/sub-mesh. More... | |
int[] | nbTrianglesInSubmesh = new int[(int)Constant.MAX_SUBMESH] |
Number of triangles per chunk/sub-mesh. More... | |
int[] | updatedIndices = new int[(int)Constant.MAX_SUBMESH] |
Number of indices per chunk/sub-mesh. More... | |
int | nbVertices = 0 |
Vertices count in current sub-mesh. More... | |
int | nbTriangles = 0 |
Triangle count in current sub-mesh. More... | |
int | nbUpdatedSubmesh = 0 |
Number of updated sub-meshes. More... | |
Vector3[] | vertices = new Vector3[(int)Constant.MAX_SUBMESH] |
Vector of vertices. More... | |
int[] | triangles = new int[(int)Constant.MAX_SUBMESH] |
Vector of of triangles/faces. More... | |
byte[] | colors = new byte[(int)Constant.MAX_SUBMESH] |
Vector of colors. More... | |
Vector2[] | uvs = null |
UVs defines the 2D projection of each vertices onto the texture. More... | |
IntPtr | textures = IntPtr.Zero |
Texture of the sl.Mesh. More... | |
int[] | texturesSize = new int[2] |
Width and height of the sl.Mesh texture, if any. More... | |
Dictionary< int, Chunk > | chunks = new Dictionary<int, Chunk>((int)Constant.MAX_SUBMESH) |
Dictionary of all existing chunks. More... | |
Class representing a mesh and containing the geometric (and optionally texture) data of the scene captured by the spatial mapping module.
By default the mesh is defined as a set of chunks.
This way we update only the data that has to be updated avoiding a time consuming remapping process every time a small part of the sl.Mesh is updated.
int [] nbVerticesInSubmesh = new int[(int)Constant.MAX_SUBMESH] |
Number of vertices per chunk/sub-mesh.
int [] nbTrianglesInSubmesh = new int[(int)Constant.MAX_SUBMESH] |
Number of triangles per chunk/sub-mesh.
int [] updatedIndices = new int[(int)Constant.MAX_SUBMESH] |
Number of indices per chunk/sub-mesh.
int nbVertices = 0 |
Vertices count in current sub-mesh.
int nbTriangles = 0 |
Triangle count in current sub-mesh.
Every three values of triangles are the indexes of the three vertices constituting a triangular face.
int nbUpdatedSubmesh = 0 |
Number of updated sub-meshes.
Vector3 [] vertices = new Vector3[(int)Constant.MAX_SUBMESH] |
Vector of vertices.
int [] triangles = new int[(int)Constant.MAX_SUBMESH] |
Vector of of triangles/faces.
Triangles are defined as a set of three vertices indexes {v1, v2, v3}
.
byte [] colors = new byte[(int)Constant.MAX_SUBMESH] |
Vector of colors.
Vector2 [] uvs = null |
UVs defines the 2D projection of each vertices onto the texture.
Values are normalized [0, 1] and start from the bottom left corner of the texture (as requested by OpenGL). In order to display a textured mesh you need to bind the texture and then draw each triangle by picking its uv values.
IntPtr textures = IntPtr.Zero |
Texture of the sl.Mesh.
int [] texturesSize = new int[2] |
Width and height of the sl.Mesh texture, if any.
Dictionary<int, Chunk> chunks = new Dictionary<int, Chunk>((int)Constant.MAX_SUBMESH) |
Dictionary of all existing chunks.