Class representing a sub-mesh containing local vertices and triangles. More...
Functions | |
| Chunk () | |
| Default constructor. More... | |
| ~Chunk () | |
| Default destructor. More... | |
| void | clear () |
| Clears all data. More... | |
Attributes | |
| std::vector< float3 > | vertices |
| Vector of vertices. More... | |
| std::vector< uint3 > | triangles |
| Vector of triangles/faces. More... | |
| std::vector< float3 > | normals |
| Vector of normals. More... | |
| std::vector< uchar3 > | colors |
| Vector of colors. More... | |
| std::vector< float2 > | uv |
| UVs defines the 2D projection of each vertices onto the texture. More... | |
| unsigned long long | timestamp |
| Timestamp of the latest update. More... | |
| float3 | barycenter |
| 3D centroid of the chunk. More... | |
| bool | has_been_updated |
| Whether the point cloud chunk has been updated by an inner process. More... | |
Class representing a sub-mesh containing local vertices and triangles.
Vertices and normals have the same size and are linked by id stored in triangles.
| ~Chunk | ( | ) |
Default destructor.
| void clear | ( | ) |
Clears all data.
| std::vector<float3> vertices |
Vector of vertices.
Vertices are defined by a 3D point {x, y, z}.
| std::vector<uint3> triangles |
Vector of triangles/faces.
Triangles are defined as a set of three vertices indexes {v1, v2, v3}.
| std::vector<float3> normals |
Vector of normals.
Normals are defined by three components {nx, ny, nz}.
| std::vector<uchar3> colors |
Vector of colors.
Colors are defined by three components {b, g, r}.
| std::vector<float2> uv |
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.
| unsigned long long timestamp |
Timestamp of the latest update.
| float3 barycenter |
3D centroid of the chunk.
| bool has_been_updated |
Whether the point cloud chunk has been updated by an inner process.