|
| SubMesh (Mesh *parent, const std::string &name, MaterialPtr material, std::shared_ptr< IndexData > &index_data, MeshArrangement arrangement=MESH_ARRANGEMENT_TRIANGLES) |
|
| SubMesh (Mesh *parent, const std::string &name, MaterialPtr material, MeshArrangement arrangement=MESH_ARRANGEMENT_TRIANGLES) |
|
SubmeshType | type () const |
|
bool | add_vertex_range (uint32_t start, uint32_t count) |
| Add a vertex range to this submesh. count vertices will be rendered from the start index in the mesh vertex data. More...
|
|
void | mark_changed () |
|
const VertexRange * | vertex_ranges () const |
|
std::size_t | vertex_range_count () const |
|
void | remove_all_vertex_ranges () |
|
void | set_material (const MaterialPtr &material) |
|
void | set_material_at_slot (MaterialSlot var, const MaterialPtr &material) |
|
const MaterialPtr & | material () const |
|
const MaterialPtr & | material_at_slot (MaterialSlot var, bool fallback=false) const |
|
MeshArrangement | arrangement () const |
|
bool | reverse_winding () |
|
void | generate_texture_coordinates_cube (uint32_t texture=0) |
| SubMesh::generate_texture_coordinates_cube. More...
|
|
void | set_diffuse (const Color &color) |
|
void | set_contributes_to_edge_list (bool v=true) |
|
bool | contributes_to_edge_list () const |
|
void | each_triangle (std::function< void(uint32_t, uint32_t, uint32_t)> cb) |
|
const AABB & | aabb () const |
|
MaterialChangedCallback & | signal_material_changed () |
|
| S_DEFINE_PROPERTY (mesh, &SubMesh::parent_) |
|
| S_DEFINE_PROPERTY (index_data, &SubMesh::index_data_) |
|
bool | init () |
|
void | clean_up () |
|
void | set_name (const std::string &name) |
|
const std::string & | name () const |
|
bool | has_name () const |
|
◆ aabb()
const AABB & smlt::SubMesh::aabb |
( |
| ) |
const |
Return the axis-aligned bounding box for the faces making up this submesh
◆ add_vertex_range()
bool smlt::SubMesh::add_vertex_range |
( |
uint32_t |
start, |
|
|
uint32_t |
count |
|
) |
| |
Add a vertex range to this submesh. count
vertices will be rendered from the start
index in the mesh vertex data.
- Parameters
-
◆ generate_texture_coordinates_cube()
void smlt::SubMesh::generate_texture_coordinates_cube |
( |
uint32_t |
texture = 0 | ) |
|
SubMesh::generate_texture_coordinates_cube.
- Parameters
-
texture | - which texture unit to generate coordinates for |
Generates cube coordinates.
WARNING: Will not duplicate vertices. If you share vertices across polygons this will currently not give correct results. In future a "duplicate_vertices" argument might be added.
The documentation for this class was generated from the following files:
- simulant/meshes/submesh.h
- simulant/meshes/submesh.cpp