SO3Engine
Public Member Functions | Static Public Member Functions | Protected Attributes | List of all members
SO3::SMaterial Class Reference

#include <SO3Material.h>

Inheritance diagram for SO3::SMaterial:
SO3::SData

Public Member Functions

 SMaterial (SScene *scene, const std::string &groupname, const std::string &materialName, const bool &loadedFromScript=false)
 
 ~SMaterial ()
 
SWidgetGetAssociatedWidget ()
 
void SetAssociatedWidget (SWidget *newAssociatedWidget)
 
SSceneGetScene ()
 
std::string GetGroupName ()
 
Ogre::MaterialPtr getOgreMaterialPointer ()
 
int GetNumTechniques ()
 
STechniqueGetTechnique (const unsigned int &technique)
 
int GetTechniqueIndexByName (const std::string &techname)
 
bool GetReceiveShadows ()
 
void SetReceiveShadows (const bool &state)
 
void SetLightingEnabled (const bool &state)
 
void SetAmbientColor (const int &color)
 
void SetDiffuseColor (const int &color)
 
void SetSpecularColor (const int &color)
 
void SetSelfIlluminationColor (const int &color)
 
void SetAmbientColor (float r, float g, float b, float a)
 
void SetDiffuseColor (float r, float g, float b, float a)
 
void SetSpecularColor (float r, float g, float b, float a)
 
void SetSelfIlluminationColor (float r, float g, float b, float a)
 
void SetShininess (const float &value)
 
void AddTechnique ()
 
void RemoveTechnique (const unsigned int &technique)
 
void _BindTechniquesToOgre ()
 
void _UnbindTechniquesToOgre ()
 
void _UpdateOgreMaterialPointer ()
 
void SetPointSize (Ogre::Real size)
 
void CleanUpGeneratedTechniques ()
 
void WriteMaterialFile (std::string path="")
 
void SetIgnoreSlicePlane (bool state)
 
bool GetIgnoreSlicePlane ()
 
void UpdateGeneratedMaterial (bool full=false)
 
- Public Member Functions inherited from SO3::SData
 SData (const std::string &dataName)
 
virtual ~SData ()
 
std::string GetName () const
 
SUserObjectBindingsGetUserObjectBindings ()
 
const SUserObjectBindingsGetUserObjectBindings () const
 

Static Public Member Functions

static void CleanUpGeneratedTechniques (Ogre::Material *mat)
 
static void UpdateMaterialScript (std::string path)
 
static int CountMaterialsInScript (std::string path)
 

Protected Attributes

Ogre::MaterialPtr ogreMaterial
 
SScenemScene
 
SWidgetassociatedWidget
 
std::string mGroupName
 
bool mIgnoreSlicePlane
 
- Protected Attributes inherited from SO3::SData
std::string name
 

Detailed Description

Definition at line 42 of file SO3Material.h.

Constructor & Destructor Documentation

◆ SMaterial()

SO3::SMaterial::SMaterial ( SScene scene,
const std::string &  groupname,
const std::string &  materialName,
const bool &  loadedFromScript = false 
)

Definition at line 19 of file SO3Material.cpp.

◆ ~SMaterial()

SO3::SMaterial::~SMaterial ( )

Definition at line 61 of file SO3Material.cpp.

Member Function Documentation

◆ _BindTechniquesToOgre()

void SO3::SMaterial::_BindTechniquesToOgre ( )

Internal use only, associate SO3 STechnique to Ogre::Technique using Ogre's UserObjectBindings

Definition at line 93 of file SO3Material.cpp.

◆ _UnbindTechniquesToOgre()

void SO3::SMaterial::_UnbindTechniquesToOgre ( )

Internal use only, unassociate SO3 STechnique from Ogre::Technique using Ogre's UserObjectBindings

Definition at line 108 of file SO3Material.cpp.

◆ _UpdateOgreMaterialPointer()

void SO3::SMaterial::_UpdateOgreMaterialPointer ( )

Definition at line 124 of file SO3Material.cpp.

◆ AddTechnique()

void SO3::SMaterial::AddTechnique ( )

Definition at line 328 of file SO3Material.cpp.

◆ CleanUpGeneratedTechniques() [1/2]

void SO3::SMaterial::CleanUpGeneratedTechniques ( )

remove Generated techniques like SSAO

Definition at line 400 of file SO3Material.cpp.

◆ CleanUpGeneratedTechniques() [2/2]

void SO3::SMaterial::CleanUpGeneratedTechniques ( Ogre::Material *  mat)
static

Definition at line 368 of file SO3Material.cpp.

◆ CountMaterialsInScript()

int SO3::SMaterial::CountMaterialsInScript ( std::string  path)
static

Definition at line 758 of file SO3Material.cpp.

◆ GetAssociatedWidget()

SWidget * SO3::SMaterial::GetAssociatedWidget ( )

Definition at line 222 of file SO3Material.cpp.

◆ GetGroupName()

std::string SO3::SMaterial::GetGroupName ( )

Definition at line 167 of file SO3Material.cpp.

◆ GetIgnoreSlicePlane()

bool SO3::SMaterial::GetIgnoreSlicePlane ( )

Get ignore slice plane state

Definition at line 804 of file SO3Material.cpp.

◆ GetNumTechniques()

int SO3::SMaterial::GetNumTechniques ( )

Definition at line 172 of file SO3Material.cpp.

◆ getOgreMaterialPointer()

Ogre::MaterialPtr SO3::SMaterial::getOgreMaterialPointer ( )

Definition at line 157 of file SO3Material.cpp.

◆ GetReceiveShadows()

bool SO3::SMaterial::GetReceiveShadows ( )

Definition at line 236 of file SO3Material.cpp.

◆ GetScene()

SScene * SO3::SMaterial::GetScene ( )

Definition at line 162 of file SO3Material.cpp.

◆ GetTechnique()

STechnique * SO3::SMaterial::GetTechnique ( const unsigned int &  technique)

Definition at line 178 of file SO3Material.cpp.

◆ GetTechniqueIndexByName()

int SO3::SMaterial::GetTechniqueIndexByName ( const std::string &  techname)

Definition at line 196 of file SO3Material.cpp.

◆ RemoveTechnique()

void SO3::SMaterial::RemoveTechnique ( const unsigned int &  technique)

Definition at line 336 of file SO3Material.cpp.

◆ SetAmbientColor() [1/2]

void SO3::SMaterial::SetAmbientColor ( const int &  color)

Definition at line 256 of file SO3Material.cpp.

◆ SetAmbientColor() [2/2]

void SO3::SMaterial::SetAmbientColor ( float  r,
float  g,
float  b,
float  a 
)

Definition at line 288 of file SO3Material.cpp.

◆ SetAssociatedWidget()

void SO3::SMaterial::SetAssociatedWidget ( SWidget newAssociatedWidget)
Remarks
: internal use only!

Definition at line 227 of file SO3Material.cpp.

◆ SetDiffuseColor() [1/2]

void SO3::SMaterial::SetDiffuseColor ( const int &  color)

Definition at line 264 of file SO3Material.cpp.

◆ SetDiffuseColor() [2/2]

void SO3::SMaterial::SetDiffuseColor ( float  r,
float  g,
float  b,
float  a 
)

Definition at line 296 of file SO3Material.cpp.

◆ SetIgnoreSlicePlane()

void SO3::SMaterial::SetIgnoreSlicePlane ( bool  state)

Ignore slice plane

Definition at line 773 of file SO3Material.cpp.

◆ SetLightingEnabled()

void SO3::SMaterial::SetLightingEnabled ( const bool &  state)

Definition at line 248 of file SO3Material.cpp.

◆ SetPointSize()

void SO3::SMaterial::SetPointSize ( Ogre::Real  size)

Set point size on all techniques

Definition at line 351 of file SO3Material.cpp.

◆ SetReceiveShadows()

void SO3::SMaterial::SetReceiveShadows ( const bool &  state)

Definition at line 242 of file SO3Material.cpp.

◆ SetSelfIlluminationColor() [1/2]

void SO3::SMaterial::SetSelfIlluminationColor ( const int &  color)

Definition at line 280 of file SO3Material.cpp.

◆ SetSelfIlluminationColor() [2/2]

void SO3::SMaterial::SetSelfIlluminationColor ( float  r,
float  g,
float  b,
float  a 
)

Definition at line 312 of file SO3Material.cpp.

◆ SetShininess()

void SO3::SMaterial::SetShininess ( const float &  value)

Definition at line 320 of file SO3Material.cpp.

◆ SetSpecularColor() [1/2]

void SO3::SMaterial::SetSpecularColor ( const int &  color)

Definition at line 272 of file SO3Material.cpp.

◆ SetSpecularColor() [2/2]

void SO3::SMaterial::SetSpecularColor ( float  r,
float  g,
float  b,
float  a 
)

Definition at line 304 of file SO3Material.cpp.

◆ UpdateGeneratedMaterial()

void SO3::SMaterial::UpdateGeneratedMaterial ( bool  full = false)

Definition at line 809 of file SO3Material.cpp.

◆ UpdateMaterialScript()

void SO3::SMaterial::UpdateMaterialScript ( std::string  path)
static

Definition at line 625 of file SO3Material.cpp.

◆ WriteMaterialFile()

void SO3::SMaterial::WriteMaterialFile ( std::string  path = "")

Save the material script to a file

Definition at line 420 of file SO3Material.cpp.

Member Data Documentation

◆ associatedWidget

SWidget* SO3::SMaterial::associatedWidget
protected

Definition at line 49 of file SO3Material.h.

◆ mGroupName

std::string SO3::SMaterial::mGroupName
protected

Definition at line 50 of file SO3Material.h.

◆ mIgnoreSlicePlane

bool SO3::SMaterial::mIgnoreSlicePlane
protected

Definition at line 51 of file SO3Material.h.

◆ mScene

SScene* SO3::SMaterial::mScene
protected

Definition at line 48 of file SO3Material.h.

◆ ogreMaterial

Ogre::MaterialPtr SO3::SMaterial::ogreMaterial
protected

Definition at line 47 of file SO3Material.h.


The documentation for this class was generated from the following files: