Represents a sub-mesh, it contains local vertices and triangles. More...
Functions | |
| def | vertices (self) |
| Vertices are defined by a 3D point (numpy array). | |
| def | triangles (self) |
| List of triangles, defined as a set of three vertices. More... | |
| def | normals (self) |
| Normals are defined by three components (numpy array). More... | |
| def | uv (self) |
| UVs define the 2D projection of each vertex onto the texture. More... | |
| def | timestamp (self) |
| Timestamp of the latest update. | |
| def | barycenter (self) |
| 3D centroid of the chunk. | |
| def | has_been_updated (self) |
| True if the chunk has been updated by an inner process. | |
| def | clear (self) |
| Clears all chunk data. | |
Represents a sub-mesh, it contains local vertices and triangles.
Vertices and normals have the same size and are linked by id stored in triangles.
| def triangles | ( | self | ) |
List of triangles, defined as a set of three vertices.
The information is stored in a numpy array
| def normals | ( | self | ) |
Normals are defined by three components (numpy array).
Normals are defined for each vertex.
| def uv | ( | self | ) |
UVs define the 2D projection of each vertex onto the texture.
Values are normalized [0;1], starting 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.