MezzanineEngine March 18, 2012

Mezzanine::WorldObjectGraphicsSettings Class Reference

This is a helper class for configuring graphics settings of a World Object. More...

#include <worldobjectgraphicssettings.h>

List of all members.

Public Member Functions

 WorldObjectGraphicsSettings (WorldObject *WO, Ogre::Entity *GraphicsObject)
 Standard Constructor.
virtual ~WorldObjectGraphicsSettings ()
 Class destructor.
virtual void CloneMaterial (const String &NewName)
 Creates a copy of the material script of the graphics object and places it in the same resource group.
virtual ColourValue GetMaterialAmbient (const Whole &Submesh=0) const
 Gets the Ambient colour value of the material belonging to the specified submesh.
virtual ColourValue GetMaterialDiffuse (const Whole &Submesh=0) const
 Gets the Diffuse colour value of the material belonging to the specified submesh.
virtual ConstString GetMaterialName (const Whole &Submesh=0) const
 Gets the material name of the specified submesh.
virtual ColourValue GetMaterialSpecular (const Whole &Submesh=0) const
 Gets the Specular colour value of the material belonging to the specified submesh.
virtual MeshGetMesh () const
 Gets the mesh being used by this World Object.
virtual Whole GetNumSubmeshes () const
 Gets the number of submeshes in the mesh of the graphics ohject.
virtual bool HasMaterialSet (const Whole &Submesh=0)
 Gets whether or not the specified submesh has a material script assigned to it.
virtual void ProtoDeSerialize (const xml::Node &OneNode)
 Take the data stored in an XML and overwrite this instance of this object with it.
virtual void ProtoSerialize (xml::Node &CurrentRoot) const
 Convert this class to an xml::Node ready for serialization.
virtual void SetMaterial (const String &MatName, const Whole &Submesh=0)
 Sets the material of the specified submesh.
virtual void SetMaterialAmbient (const ColourValue &Ambient, const Whole &Submesh=0)
 Sets the Ambient colour value of the material belonging to the specified submesh.
virtual void SetMaterialDiffuse (const ColourValue &Diffuse, const Whole &Submesh=0)
 Sets the Diffuse colour value of the material belonging to the specified submesh.
virtual void SetMaterialSpecular (const ColourValue &Specular, const Whole &Submesh=0)
 Sets the Specular colour value of the material belonging to the specified submesh.
virtual void SetMesh (const String &MeshName, const String &Group)
 Sets the mesh to be used along with this World Object.
virtual void SetMesh (Mesh *ObjectMesh)
 Sets the mesh to be used along with this World Object.

Static Public Member Functions

static String SerializableName ()
 Get the name of the the XML tag this class will leave behind as its instances are serialized.

Protected Member Functions

virtual Ogre::MaterialPtr GetMaterial (const Whole &Submesh=0)
 Material/textures for the World Object.

Protected Attributes

internal::InternalWorldObjectGraphicsSettingsIWOGS
 Stores all the data to go with the.
WorldObjectParent
 The World Object this belongs to.
MeshWorldObjectMesh
 The mesh being used by the World Object.

Detailed Description

This is a helper class for configuring graphics settings of a World Object.

This class contains functions for the configuring of graphics specific settings of an actor. This class can only configure the actors graphics. For configuring World Object physics, see ActorBasePhysicsSettings.

Definition at line 71 of file worldobjectgraphicssettings.h.


Constructor & Destructor Documentation

Mezzanine::WorldObjectGraphicsSettings::WorldObjectGraphicsSettings ( WorldObject WO,
Ogre::Entity *  GraphicsObject 
)

Standard Constructor.

Parameters:
WOThe World Object this settings class configures.
GraphicsObjectThe graphics object belonging to the World Object this class configures.

Definition at line 96 of file worldobjectgraphicssettings.cpp.


Member Function Documentation

void Mezzanine::WorldObjectGraphicsSettings::CloneMaterial ( const String NewName) [virtual]

Creates a copy of the material script of the graphics object and places it in the same resource group.

Parameters:
NewNameof the cloned material script.

Definition at line 162 of file worldobjectgraphicssettings.cpp.

ColourValue Mezzanine::WorldObjectGraphicsSettings::GetMaterialAmbient ( const Whole Submesh = 0) const [virtual]

Gets the Ambient colour value of the material belonging to the specified submesh.

If no Ambient colour was specified for a given submesh a default ColourValue is returned.

Parameters:
SubmeshThe submesh you want to alter the material of.
Returns:
The colour that was as the material Ambient colour, OR a default colourvalue.

Definition at line 217 of file worldobjectgraphicssettings.cpp.

ColourValue Mezzanine::WorldObjectGraphicsSettings::GetMaterialDiffuse ( const Whole Submesh = 0) const [virtual]

Gets the Diffuse colour value of the material belonging to the specified submesh.

If no Diffuse colour was specified for a given submesh a default ColourValue is returned.

Parameters:
SubmeshThe submesh you want to alter the material of.
Returns:
The colour that was as the material Diffuse colour, OR a default colourvalue.

Definition at line 231 of file worldobjectgraphicssettings.cpp.

ConstString Mezzanine::WorldObjectGraphicsSettings::GetMaterialName ( const Whole Submesh = 0) const [virtual]

Gets the material name of the specified submesh.

Note the returned name isn't of the .material file, but the material script.

Parameters:
SubmeshThe submesh you want to get the material name from.
Returns:
Returns a String containing the name of the material script in use.

Definition at line 169 of file worldobjectgraphicssettings.cpp.

ColourValue Mezzanine::WorldObjectGraphicsSettings::GetMaterialSpecular ( const Whole Submesh = 0) const [virtual]

Gets the Specular colour value of the material belonging to the specified submesh.

If no Specular colour was specified for a given submesh a default ColourValue is returned.

Parameters:
SubmeshThe submesh you want to alter the material of.
Returns:
The colour that was as the material Specular colour, OR a default colourvalue.

Definition at line 224 of file worldobjectgraphicssettings.cpp.

Mesh * Mezzanine::WorldObjectGraphicsSettings::GetMesh ( ) const [virtual]

Gets the mesh being used by this World Object.

Returns:
Returns a pointer to the mesh being used by this World Object.

Definition at line 142 of file worldobjectgraphicssettings.cpp.

Whole Mezzanine::WorldObjectGraphicsSettings::GetNumSubmeshes ( ) const [virtual]

Gets the number of submeshes in the mesh of the graphics ohject.

Returns:
Returns a whole representing the number of submeshes in this objects mesh.

Definition at line 183 of file worldobjectgraphicssettings.cpp.

bool Mezzanine::WorldObjectGraphicsSettings::HasMaterialSet ( const Whole Submesh = 0) [virtual]

Gets whether or not the specified submesh has a material script assigned to it.

Parameters:
SubmeshThe submesh to check.
Returns:
Returns a bool indicating whether there is a material assigned to the specified submesh.

Definition at line 176 of file worldobjectgraphicssettings.cpp.

void Mezzanine::WorldObjectGraphicsSettings::ProtoDeSerialize ( const xml::Node OneNode) [virtual]

Take the data stored in an XML and overwrite this instance of this object with it.

Parameters:
OneNodeand xml::Node containing the data.

Definition at line 302 of file worldobjectgraphicssettings.cpp.

void Mezzanine::WorldObjectGraphicsSettings::ProtoSerialize ( xml::Node CurrentRoot) const [virtual]

Convert this class to an xml::Node ready for serialization.

Parameters:
CurrentRootThe point in the XML hierarchy that all this quaternion should be appended to.

Definition at line 240 of file worldobjectgraphicssettings.cpp.

String Mezzanine::WorldObjectGraphicsSettings::SerializableName ( ) [static]

Get the name of the the XML tag this class will leave behind as its instances are serialized.

Returns:
A string containing "ActorGraphicsSettings"

Definition at line 362 of file worldobjectgraphicssettings.cpp.

void Mezzanine::WorldObjectGraphicsSettings::SetMaterial ( const String MatName,
const Whole Submesh = 0 
) [virtual]

Sets the material of the specified submesh.

The name of the material isn't the same as the name of the .material file. As a single material file can contain several material scripts. The name this function expects is the name of the material script inside a .material file.

Parameters:
MatNameThe name of the material to be applied.
SubmeshThe submesh to apply the material to.

Definition at line 155 of file worldobjectgraphicssettings.cpp.

void Mezzanine::WorldObjectGraphicsSettings::SetMaterialAmbient ( const ColourValue Ambient,
const Whole Submesh = 0 
) [virtual]

Sets the Ambient colour value of the material belonging to the specified submesh.

The set value is applied to every technique of every pass in the material.

Parameters:
AmbientThe colour you wish to set as the material Ambient.
SubmeshThe submesh you want to alter the material of.

Definition at line 193 of file worldobjectgraphicssettings.cpp.

void Mezzanine::WorldObjectGraphicsSettings::SetMaterialDiffuse ( const ColourValue Diffuse,
const Whole Submesh = 0 
) [virtual]

Sets the Diffuse colour value of the material belonging to the specified submesh.

The set value is applied to every technique of every pass in the material.

Parameters:
DiffuseThe colour you wish to set as the material Diffuse.
SubmeshThe submesh you want to alter the material of.

Definition at line 209 of file worldobjectgraphicssettings.cpp.

void Mezzanine::WorldObjectGraphicsSettings::SetMaterialSpecular ( const ColourValue Specular,
const Whole Submesh = 0 
) [virtual]

Sets the Specular colour value of the material belonging to the specified submesh.

The set value is applied to every technique of every pass in the material.

Parameters:
SpecularThe colour you wish to set as the material Specular.
SubmeshThe submesh you want to alter the material of.

Definition at line 201 of file worldobjectgraphicssettings.cpp.

void Mezzanine::WorldObjectGraphicsSettings::SetMesh ( Mesh ObjectMesh) [virtual]

Sets the mesh to be used along with this World Object.

Parameters:
MeshThe mesh to apply to this World Object.

Definition at line 112 of file worldobjectgraphicssettings.cpp.

void Mezzanine::WorldObjectGraphicsSettings::SetMesh ( const String MeshName,
const String Group 
) [virtual]

Sets the mesh to be used along with this World Object.

Parameters:
MeshNameThe name of the mesh to apply to this World Object.
GroupThe resource group to which the mesh belongs.

Definition at line 136 of file worldobjectgraphicssettings.cpp.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines