Simulant  21.06-50
A portable game engine for Windows, OSX, Linux, Dreamcast, and PSP
Public Types | Public Member Functions | Friends | List of all members
smlt::SubMesh Class Reference
Inheritance diagram for smlt::SubMesh:
smlt::RefCounted< SubMesh > smlt::Nameable smlt::TwoPhaseConstructed

Public Types

typedef sig::signal< void(SubMeshPtr, MaterialSlot, MaterialID, MaterialID)> MaterialChangedCallback
- Public Types inherited from smlt::RefCounted< SubMesh >
typedef std::shared_ptr< SubMeshptr
typedef std::weak_ptr< SubMeshwptr

Public Member Functions

 SubMesh (Mesh *parent, const std::string &name, MaterialPtr material, std::shared_ptr< IndexData > &index_data, MeshArrangement arrangement=MESH_ARRANGEMENT_TRIANGLES)
void set_material (MaterialPtr material)
void set_material_at_slot (MaterialSlot var, MaterialPtr material)
MaterialPtr material () const
MaterialPtr material_at_slot (MaterialSlot var, bool fallback=false) const
MeshArrangement arrangement () const
void reverse_winding ()
void generate_texture_coordinates_cube (uint32_t texture=0)
 SubMesh::generate_texture_coordinates_cube. More...
void set_diffuse (const Colour &colour)
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)
MaterialChangedCallbacksignal_material_changed ()
 S_DEFINE_PROPERTY (mesh, &SubMesh::parent_)
 S_DEFINE_PROPERTY (index_data, &SubMesh::index_data_)
- Public Member Functions inherited from smlt::TwoPhaseConstructed
virtual bool init ()
virtual void clean_up ()
- Public Member Functions inherited from smlt::Nameable
void set_name (const std::string &name)
const std::string & name () const
bool has_name () const


class Mesh

Additional Inherited Members

- Static Public Member Functions inherited from smlt::RefCounted< SubMesh >
static RefCounted< SubMesh >::ptr create (Args &&... args)
static RefCounted< SubMesh >::ptr create ()
- Protected Member Functions inherited from smlt::RefCounted< SubMesh >
 RefCounted (Args &&...)

Member Function Documentation

◆ generate_texture_coordinates_cube()

void smlt::SubMesh::generate_texture_coordinates_cube ( uint32_t  texture = 0)


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: