fluidvis
Public Member Functions | List of all members
sx::ShadeX Class Reference

Public Member Functions

EX ShadeX ()
 
EX ~ShadeX ()
 
EX void clear (const string &id)
 
EX void clear ()
 
EX void addResourcesFromString (const string &resources)
 
EX void addResources (const string &path)
 
EX void load ()
 
EX ShadergetShader (const string &id)
 
EX void addResource (const string &id, Shader &shader)
 
EX BufferedMeshgetBufferedMesh (const string &id)
 
EX void addResource (const string &id, BufferedMesh &mesh)
 
EX SkeletongetSkeleton (const string &id)
 
EX void addResource (const string &id, Skeleton &skeleton)
 
EX UniformFloatgetUniformFloat (const string &id)
 
EX void addResource (const string &id, UniformFloat &uFloat)
 
EX UniformDoublegetUniformDouble (const string &id)
 
EX void addResource (const string &id, UniformDouble &uDouble)
 
EX UniformVectorgetUniformVector (const string &id)
 
EX void addResource (const string &id, UniformVector &uVector)
 
EX UniformDVectorgetUniformDVector (const string &id)
 
EX void addResource (const string &id, UniformDVector &uDVector)
 
EX UniformMatrixgetUniformMatrix (const string &id)
 
EX void addResource (const string &id, UniformMatrix &uMatrix)
 
EX UniformDMatrixgetUniformDMatrix (const string &id)
 
EX void addResource (const string &id, UniformDMatrix &uDMatrix)
 
EX TexturegetTexture (const string &id)
 
EX void addResource (const string &id, Texture &texture)
 
EX VolumegetVolume (const string &id)
 
EX void addResource (const string &id, Volume &volume)
 
EX RenderTargetgetRenderTarget (const string &id)
 
EX void addResource (const string &id, RenderTarget &target)
 
EX RenderObjectgetRenderObject (const string &id)
 
EX void addResource (const string &id, RenderObject &object)
 
EX PassgetPass (const string &id)
 
EX void addResource (const string &id, Pass &pass)
 
EX EffectgetEffect (const string &id)
 
EX void addResource (const string &id, Effect &effect)
 
EX AudioBuffergetAudioBuffer (const string &id)
 
EX void addResource (const string &id, AudioBuffer &buffer)
 
EX AudioObjectgetAudioObject (const string &id)
 
EX void addResource (const string &id, AudioObject &object)
 
EX AudioListenergetAudioListener (const string &id)
 
EX void addResource (const string &id, AudioListener &object)
 
EX AudioPassgetAudioPass (const string &id)
 
EX void addResource (const string &id, AudioPass &object)
 

Constructor & Destructor Documentation

EX sx::ShadeX::ShadeX ( )

default constructor

EX sx::ShadeX::~ShadeX ( )

deconstructor

Member Function Documentation

EX void sx::ShadeX::addResource ( const string &  id,
Shader shader 
)

adds a new shader with identifyer id

EX void sx::ShadeX::addResource ( const string &  id,
BufferedMesh mesh 
)

adds a new mesh with identifyer id

EX void sx::ShadeX::addResource ( const string &  id,
Skeleton skeleton 
)

adds a new skeleton with identifyer id

EX void sx::ShadeX::addResource ( const string &  id,
UniformFloat uFloat 
)

adds a new uniform float with identifyer id

EX void sx::ShadeX::addResource ( const string &  id,
UniformDouble uDouble 
)

adds a new uniform double with identifyer id

EX void sx::ShadeX::addResource ( const string &  id,
UniformVector uVector 
)

adds a new uniform vector with identifyer id

EX void sx::ShadeX::addResource ( const string &  id,
UniformDVector uDVector 
)

adds a new uniform double vector with identifyer id

EX void sx::ShadeX::addResource ( const string &  id,
UniformMatrix uMatrix 
)

adds a new uniform matrix with identifyer id

EX void sx::ShadeX::addResource ( const string &  id,
UniformDMatrix uDMatrix 
)

adds a new uniform double matrix with identifyer id

EX void sx::ShadeX::addResource ( const string &  id,
Texture texture 
)

adds a new texture with identifyer id

EX void sx::ShadeX::addResource ( const string &  id,
Volume volume 
)

adds a new volume with identifyer id

EX void sx::ShadeX::addResource ( const string &  id,
RenderTarget target 
)

adds a new rendertarget with identifyer id

EX void sx::ShadeX::addResource ( const string &  id,
RenderObject object 
)

adds a new renderobject with identifyer id

EX void sx::ShadeX::addResource ( const string &  id,
Pass pass 
)

adds a new Pass with identifyer id

EX void sx::ShadeX::addResource ( const string &  id,
Effect effect 
)

adds a new Effect with identifyer id

EX void sx::ShadeX::addResource ( const string &  id,
AudioBuffer buffer 
)

adds a new AudioBuffer with identifyer id

EX void sx::ShadeX::addResource ( const string &  id,
AudioObject object 
)

adds a new AudioObject with identifyer id

EX void sx::ShadeX::addResource ( const string &  id,
AudioListener object 
)

adds a new AudioListener with identifyer id

EX void sx::ShadeX::addResource ( const string &  id,
AudioPass object 
)

adds a new AudioPass with identifyer id

EX void sx::ShadeX::addResources ( const string &  path)

Parses a configuration file in SX language from path to load several resources. If the resources can't be loaded, an exception is thrown. To optain a specification of the format of the fileformat look at

See also
ShadeX::addResources(const string &resources)
EX void sx::ShadeX::addResourcesFromString ( const string &  resources)

Parses a configuration string in SX language to load several resources. If the resources can't be loaded, an exception is thrown. – TODO: SPECIFY FORMAT OF CONFIGURATION STRING! – look at "doc\SX reference cards\SX language"

EX void sx::ShadeX::clear ( const string &  id)

If a resource with identifyer id exists, the resource with the identifyer is deconstructed and removed. If no such resource exists, an exception is thrown.

Parameters
ididentifyer of the resource
Exceptions
anException object of type EX_NODATA is thrown, if no resource with identifyer id exists
EX void sx::ShadeX::clear ( )

Deconstructs and removes all resources.

EX AudioBuffer& sx::ShadeX::getAudioBuffer ( const string &  id)

Searches for an AudioBuffer with identifyer id, and returns it. If no such AudioBuffer exists, a new AudioBuffer with this id is created before it is returned. If another resource than an AudioBuffer has the id, an exception is thrown.

Parameters
ididentifyer of the AudioBuffer
Returns
a reference to the AudioBuffer
Exceptions
anException object of type EX_AMBIGUOUS is thrown, if a non-effect resource with identifyer id exists
EX AudioListener& sx::ShadeX::getAudioListener ( const string &  id)

Searches for an AudioListener with identifyer id, and returns it. If no such AudioListener exists, a new AudioListener with this id is created before it is returned. If another resource than an AudioListener has the id, an exception is thrown.

Parameters
ididentifyer of the AudioListener
Returns
a reference to the AudioListener
Exceptions
anException object of type EX_AMBIGUOUS is thrown, if a non-effect resource with identifyer id exists
EX AudioObject& sx::ShadeX::getAudioObject ( const string &  id)

Searches for an AudioObject with identifyer id, and returns it. If no such AudioObject exists, a new AudioObject with this id is created before it is returned. If another resource than an AudioObject has the id, an exception is thrown.

Parameters
ididentifyer of the AudioObject
Returns
a reference to the AudioObject
Exceptions
anException object of type EX_AMBIGUOUS is thrown, if a non-effect resource with identifyer id exists
EX AudioPass& sx::ShadeX::getAudioPass ( const string &  id)

Searches for an AudioPass with identifyer id, and returns it. If no such AudioPass exists, a new AudioPass with this id is created before it is returned. If another resource than an AudioPass has the id, an exception is thrown.

Parameters
ididentifyer of the AudioPass
Returns
a reference to the AudioPass
Exceptions
anException object of type EX_AMBIGUOUS is thrown, if a non-effect resource with identifyer id exists
EX BufferedMesh& sx::ShadeX::getBufferedMesh ( const string &  id)

Searches for a BufferedMesh with identifyer id, and returns it. If no such BufferedMesh exists, a new BufferedMesh with this id is created before it is returned. If another resource than a BufferedMesh has the id, an exception is thrown.

Parameters
ididentifyer of the BufferedMesh
Returns
a reference to the BufferedMesh
Exceptions
anException object of type EX_AMBIGUOUS is thrown, if a non-BufferedMesh resource with identifyer id exists
EX Effect& sx::ShadeX::getEffect ( const string &  id)

Searches for an Effect with identifyer id, and returns it. If no such Effect exists, a new Effect with this id is created before it is returned. If another resource than a Effect has the id, an exception is thrown.

Parameters
ididentifyer of the Effect
Returns
a reference to the Effect
Exceptions
anException object of type EX_AMBIGUOUS is thrown, if a non-effect resource with identifyer id exists
EX Pass& sx::ShadeX::getPass ( const string &  id)

Searches for a Pass with identifyer id, and returns it. If no such Pass exists, a new Pass with this id is created before it is returned. If another resource than a Pass has the id, an exception is thrown.

Parameters
ididentifyer of the Pass
Returns
a reference to the Pass
Exceptions
anException object of type EX_AMBIGUOUS is thrown, if a non-pass resource with identifyer id exists
EX RenderObject& sx::ShadeX::getRenderObject ( const string &  id)

Searches for a RenderObject with identifyer id, and returns it. If no such RenderObject exists, a new RenderObject with this id is created before it is returned. If another resource than a RenderObject has the id, an exception is thrown.

Parameters
ididentifyer of the RenderObject
Returns
a reference to the RenderObject
Exceptions
anException object of type EX_AMBIGUOUS is thrown, if a non-renderobject resource with identifyer id exists
EX RenderTarget& sx::ShadeX::getRenderTarget ( const string &  id)

Searches for a RenderTarget with identifyer id, and returns it. If no such RenderTarget exists, a new RenderTarget with this id is created before it is returned. If another resource than a RenderTarget has the id, an exception is thrown.

Parameters
ididentifyer of the RenderTarget
Returns
a reference to the RenderTarget
Exceptions
anException object of type EX_AMBIGUOUS is thrown, if a non-rendertarget resource with identifyer id exists
EX Shader& sx::ShadeX::getShader ( const string &  id)

Searches for the shader with identifyer id, and returns it. If no such shader exists, a new shader with this id is created before it is returned. If another resource than a shader has the id, an exception is thrown.

Parameters
ididentifyer of the shader
Returns
a reference to the shader
Exceptions
anException object of type EX_AMBIGUOUS is thrown, if a non-shader resource with identifyer id exists
EX Skeleton& sx::ShadeX::getSkeleton ( const string &  id)

Searches for a Skeleton with identifyer id, and returns it. If no such Skeleton exists, a new Skeleton with this id is created before it is returned. If another resource than a Skeleton has the id, an exception is thrown.

Parameters
ididentifyer of the Skeleton
Returns
a reference to the Skeleton
Exceptions
anException object of type EX_AMBIGUOUS is thrown, if a non-Skeleton resource with identifyer id exists
EX Texture& sx::ShadeX::getTexture ( const string &  id)

Searches for a Texture with identifyer id, and returns it. If no such Texture exists, a new Texture with this id is created before it is returned. If another resource than a Texture has the id, an exception is thrown.

Parameters
ididentifyer of the Texture
Returns
a reference to the Texture
Exceptions
anException object of type EX_AMBIGUOUS is thrown, if a non-texture resource with identifyer id exists
EX UniformDMatrix& sx::ShadeX::getUniformDMatrix ( const string &  id)

Searches for a uniform double matrix with identifyer id, and returns it. If no such uniform double matrix exists, a new uniform double matrix with this id is created before it is returned. If another resource than a uniform double matrix has the id, an exception is thrown.

Parameters
ididentifyer of the uniform double matrix
Returns
a reference to the uniform double matrix
Exceptions
anException object of type EX_AMBIGUOUS is thrown, if a non-uniform double matrix resource with identifyer id exists
EX UniformDouble& sx::ShadeX::getUniformDouble ( const string &  id)

Searches for a uniform double with identifyer id, and returns it. If no such uniform double exists, a new uniform double with this id is created before it is returned. If another resource than a uniform double has the id, an exception is thrown.

Parameters
ididentifyer of the uniform double
Returns
a reference to the uniform double
Exceptions
anException object of type EX_AMBIGUOUS is thrown, if a non-uniform double resource with identifyer id exists
EX UniformDVector& sx::ShadeX::getUniformDVector ( const string &  id)

Searches for a uniform double vector with identifyer id, and returns it. If no such uniform double vector exists, a new uniform double vector with this id is created before it is returned. If another resource than a uniform double vector has the id, an exception is thrown.

Parameters
ididentifyer of the uniform double vector
Returns
a reference to the uniform double vector
Exceptions
anException object of type EX_AMBIGUOUS is thrown, if a non-uniform double vector resource with identifyer id exists
EX UniformFloat& sx::ShadeX::getUniformFloat ( const string &  id)

Searches for a uniform float with identifyer id, and returns it. If no such uniform float exists, a new uniform float with this id is created before it is returned. If another resource than a uniform float has the id, an exception is thrown.

Parameters
ididentifyer of the uniform float
Returns
a reference to the uniform float
Exceptions
anException object of type EX_AMBIGUOUS is thrown, if a non-uniform float resource with identifyer id exists
EX UniformMatrix& sx::ShadeX::getUniformMatrix ( const string &  id)

Searches for a uniform matrix with identifyer id, and returns it. If no such uniform matrix exists, a new uniform matrix with this id is created before it is returned. If another resource than a uniform matrix has the id, an exception is thrown.

Parameters
ididentifyer of the uniform matrix
Returns
a reference to the uniform matrix
Exceptions
anException object of type EX_AMBIGUOUS is thrown, if a non-uniform matrix resource with identifyer id exists
EX UniformVector& sx::ShadeX::getUniformVector ( const string &  id)

Searches for a uniform vector with identifyer id, and returns it. If no such uniform vector exists, a new uniform vector with this id is created before it is returned. If another resource than a uniform vector has the id, an exception is thrown.

Parameters
ididentifyer of the uniform vector
Returns
a reference to the uniform vector
Exceptions
anException object of type EX_AMBIGUOUS is thrown, if a non-uniform vector resource with identifyer id exists
EX Volume& sx::ShadeX::getVolume ( const string &  id)

Searches for a Volume with identifyer id, and returns it. If no such Volume exists, a new Volume with this id is created before it is returned. If another resource than a Volume has the id, an exception is thrown.

Parameters
ididentifyer of the Volume
Returns
a reference to the Volume
Exceptions
anException object of type EX_AMBIGUOUS is thrown, if a non-texture resource with identifyer id exists
EX void sx::ShadeX::load ( )

Tries to initialize as much resources as possible. If some resources are still not loaded after trying to load every single one, an exception is thrown.

an exception Exception of type EX_INIT


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