|
Couch
|
#include <Mesh.h>


Public Member Functions | |
| int | GetNumSubmeshes () |
| Material | GetMaterial (int submesh) |
| void | SetMaterial (int submesh, Material material) |
| virtual void | Draw (Shader *shader) |
| virtual Mesh * | Create () |
| virtual Mesh * | Duplicate () |
| virtual Mesh * | Instance () |
| virtual Name | GetType () const |
Public Member Functions inherited from Spatial | |
| Transform | GetTransform () |
| void | SetTransform (Transform transform) |
| Transform | GetGlobalTransform () |
| void | SetGlobalTransform (Transform globalTransform) |
| virtual void | Translate (Vector3 offset) |
| void | RotateX (float phi) |
| void | RotateY (float phi) |
| void | RotateZ (float phi) |
| void | UniformScale (float scale) |
Public Member Functions inherited from Node | |
| Node (bool isPrefab) | |
| bool | IsPrefab () |
| NodeList | GetChildren () |
| void | AddChild (Node *child) |
| Node * | GetParent () |
| void | QueueFree () |
| void | DoFree () |
Static Public Member Functions | |
| static Mesh * | FromFile (const char *filename) |
Static Public Member Functions inherited from Node | |
| static Node * | GetRoot () |
Protected Member Functions | |
| virtual void | SetupMesh () |
Protected Attributes | |
| SubMeshList | submeshes |
Friends | |
| class | MeshCollisionShape |
Mesh and its subclasses are anything that can be rendered on screen. A mesh is made up of submeshes, each of which can have one material property.
|
virtual |
Allocates a new "default" version of this node.
Reimplemented from Spatial.
|
virtual |
Draw this mesh, by calling Draw on all submeshes. The shader will be updated on each call to the material property of the submesh
| shader | The shader program to use to draw |
|
virtual |
|
static |
Create a new mesh from a Wavefront file. A submesh will be generated for each material on the mesh. Material properties will be generated based on the .mat file, if present
| filename | The name of the file containing the mesh. |
| Material Mesh::GetMaterial | ( | int | submesh | ) |
Get the material property of a submesh
| submesh | The index of the submesh who's material is desired |
| int Mesh::GetNumSubmeshes | ( | ) |
|
virtual |
Creates an instanced version of this node, by calling Duplicate. Subclasses should override this to perform neccesary tasks for instantiation, i.e. adding a physic object to the physics world. Any children of this node will also be instanced.
Reimplemented from Spatial.
| void Mesh::SetMaterial | ( | int | submesh, |
| Material | material | ||
| ) |
Set the material property of a submesh
| submesh | The index of the submesh to update |
| material | The desired material property |