PixelLightAPI  .
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions
PLRenderer::Parameters Class Reference

Abstract parameters interface. More...

#include <Parameters.h>

Inheritance diagram for PLRenderer::Parameters:
Inheritance graph
[legend]

List of all members.

Public Types

enum  EDataType {
  String = 0, Integer = 1, Integer2 = 2, Integer3 = 3,
  Integer4 = 4, Float = 5, Float2 = 6, Float3 = 7,
  Float4 = 8, Double = 9, Double2 = 10, Double3 = 11,
  Double4 = 12, Float3x3 = 13, Float3x4 = 14, Float4x4 = 15,
  Double4x4 = 16, TextureBuffer = 17, UnknownDataType = 18
}
 Parameter data types. More...

Public Member Functions

virtual bool IsParameter (const PLCore::String &sName) const =0
 Returns whether there's a valid parameter with the given name or not.
virtual PLCore::String GetParameterString (const PLCore::String &sName) const =0
 Returns a parameter value as string (e.g. "1.0 5.4 0.21")
virtual bool SetParameterString (const PLCore::String &sName, const PLCore::String &sValue)=0
 Sets a parameter value from a string (e.g. "1.0 5.4 0.21")
virtual bool GetParameter1i (const PLCore::String &sName, int &nX) const =0
virtual bool SetParameter1i (const PLCore::String &sName, int nX)=0
virtual bool GetParameter2i (const PLCore::String &sName, int &nX, int &nY) const =0
virtual bool GetParameter2iv (const PLCore::String &sName, int nValue[]) const =0
virtual bool SetParameter2i (const PLCore::String &sName, int nX, int nY)=0
virtual bool SetParameter2iv (const PLCore::String &sName, const int nValue[])=0
virtual bool GetParameter3i (const PLCore::String &sName, int &nX, int &nY, int &nZ) const =0
virtual bool GetParameter3iv (const PLCore::String &sName, int nValue[]) const =0
virtual bool SetParameter3i (const PLCore::String &sName, int nX, int nY, int nZ)=0
virtual bool SetParameter3iv (const PLCore::String &sName, const int nValue[])=0
virtual bool GetParameter4i (const PLCore::String &sName, int &nX, int &nY, int &nZ, int &nW) const =0
virtual bool GetParameter4iv (const PLCore::String &sName, int nValue[]) const =0
virtual bool SetParameter4i (const PLCore::String &sName, int nX, int nY, int nZ, int nW)=0
virtual bool SetParameter4iv (const PLCore::String &sName, const int nValue[])=0
virtual bool GetParameter1f (const PLCore::String &sName, float &fX) const =0
virtual bool SetParameter1f (const PLCore::String &sName, float fX)=0
virtual bool GetParameter2f (const PLCore::String &sName, float &fX, float &fY) const =0
virtual bool GetParameter2fv (const PLCore::String &sName, float fValue[]) const =0
virtual bool SetParameter2f (const PLCore::String &sName, float fX, float fY)=0
virtual bool SetParameter2fv (const PLCore::String &sName, const float fValue[])=0
virtual bool GetParameter3f (const PLCore::String &sName, float &fX, float &fY, float &fZ) const =0
virtual bool GetParameter3fv (const PLCore::String &sName, float fValue[]) const =0
virtual bool SetParameter3f (const PLCore::String &sName, float fX, float fY, float fZ)=0
virtual bool SetParameter3fv (const PLCore::String &sName, const float fValue[])=0
virtual bool GetParameter4f (const PLCore::String &sName, float &fX, float &fY, float &fZ, float &fW) const =0
virtual bool GetParameter4fv (const PLCore::String &sName, float fValue[]) const =0
virtual bool SetParameter4f (const PLCore::String &sName, float fX, float fY, float fZ, float fW)=0
virtual bool SetParameter4fv (const PLCore::String &sName, const float fValue[])=0
virtual bool GetParameter1d (const PLCore::String &sName, double &fX) const =0
virtual bool SetParameter1d (const PLCore::String &sName, double fX)=0
virtual bool GetParameter2d (const PLCore::String &sName, double &fX, double &fY) const =0
virtual bool GetParameter2dv (const PLCore::String &sName, double fValue[]) const =0
virtual bool SetParameter2d (const PLCore::String &sName, double fX, double fY)=0
virtual bool SetParameter2dv (const PLCore::String &sName, const double fValue[])=0
virtual bool GetParameter3d (const PLCore::String &sName, double &fX, double &fY, double &fZ) const =0
virtual bool GetParameter3dv (const PLCore::String &sName, double fValue[]) const =0
virtual bool SetParameter3d (const PLCore::String &sName, double fX, double fY, double fZ)=0
virtual bool SetParameter3dv (const PLCore::String &sName, const double fValue[])=0
virtual bool GetParameter4d (const PLCore::String &sName, double &fX, double &fY, double &fZ, double &fW) const =0
virtual bool GetParameter4dv (const PLCore::String &sName, double fValue[]) const =0
virtual bool SetParameter4d (const PLCore::String &sName, double fX, double fY, double fZ, double fW)=0
virtual bool SetParameter4dv (const PLCore::String &sName, const double fValue[])=0
virtual bool GetParameterFloat3x3 (const PLCore::String &sName, float fValue[]) const =0
virtual bool SetParameterFloat3x3 (const PLCore::String &sName, const float fValue[])=0
virtual bool GetParameterFloat3x4 (const PLCore::String &sName, float fValue[]) const =0
virtual bool SetParameterFloat3x4 (const PLCore::String &sName, const float fValue[])=0
virtual bool GetParameterMatrixfv (const PLCore::String &sName, float fValue[]) const =0
virtual bool SetParameterMatrixfv (const PLCore::String &sName, const float fValue[])=0
virtual bool GetParameterMatrixdv (const PLCore::String &sName, double fValue[]) const =0
virtual bool SetParameterMatrixdv (const PLCore::String &sName, const double fValue[])=0
virtual PLRenderer::TextureBufferGetParameterTextureBuffer (const PLCore::String &sName) const =0
 Returns the texture buffer of the parameter.
virtual int SetParameterTextureBuffer (const PLCore::String &sName, PLRenderer::TextureBuffer *pTextureBuffer)=0
 Sets the texture buffer of the parameter.
virtual PLRenderer::TextureGetParameterTexture (const PLCore::String &sName) const =0
 Returns the texture of the parameter.
virtual int SetParameterTexture (const PLCore::String &sName, const PLCore::String &sFilename)=0
 Sets the texture of the parameter.
virtual int SetParameterTexture (const PLCore::String &sName, PLRenderer::Texture *pTexture)=0
 Sets the texture of the parameter.

Static Public Member Functions

static PLRENDERER_API
PLCore::String 
DataTypeToString (EDataType nDataType)
 Returns a data type as string.
static PLRENDERER_API EDataType DataTypeFromString (const PLCore::String &sDataType)
 Returns a data type as number.

Protected Member Functions

PLRENDERER_API Parameters ()
 Constructor.
virtual PLRENDERER_API ~Parameters ()
 Destructor.

Detailed Description

Abstract parameters interface.

Note:
  • This interface offers no 'create parameter' functions because on some implementations it is not possible to create new parameters 'from outside'

Member Enumeration Documentation

Parameter data types.

Enumerator:
String 

String

Integer 

Integer 1

Integer2 

Integer 2

Integer3 

Integer 3

Integer4 

Integer 4

Float 

Float 1

Float2 

Float 2

Float3 

Float 3

Float4 

Float 4

Double 

Double 1

Double2 

Double 2

Double3 

Double 3

Double4 

Double 4

Float3x3 

Float3x3 matrix

Float3x4 

Float3x4 matrix

Float4x4 

Float4x4 matrix

Double4x4 

Double4x4 matrix

TextureBuffer 

Texture buffer

UnknownDataType 

Unknown data type


Constructor & Destructor Documentation

PLRENDERER_API PLRenderer::Parameters::Parameters ( ) [protected]

Constructor.

virtual PLRENDERER_API PLRenderer::Parameters::~Parameters ( ) [protected, virtual]

Destructor.


Member Function Documentation

static PLRENDERER_API PLCore::String PLRenderer::Parameters::DataTypeToString ( EDataType  nDataType) [static]

Returns a data type as string.

Parameters:
[in]nDataTypeData type to return as string
Returns:
The given data type as string
static PLRENDERER_API EDataType PLRenderer::Parameters::DataTypeFromString ( const PLCore::String sDataType) [static]

Returns a data type as number.

Parameters:
[in]sDataTypeData type to return as number
Returns:
The given data type as number
virtual bool PLRenderer::Parameters::IsParameter ( const PLCore::String sName) const [pure virtual]

Returns whether there's a valid parameter with the given name or not.

Parameters:
[in]sNameName of the parameter to check
Returns:
'true' if there's a valid parameter with the given name, else 'false'

Implemented in PLRenderer::ParameterManager.

virtual PLCore::String PLRenderer::Parameters::GetParameterString ( const PLCore::String sName) const [pure virtual]

Returns a parameter value as string (e.g. "1.0 5.4 0.21")

param[in] sName Name of the parameter to return the value from

Returns:
The value of the parameter as string, empty string on error

Implemented in PLRenderer::ParameterManager.

virtual bool PLRenderer::Parameters::SetParameterString ( const PLCore::String sName,
const PLCore::String sValue 
) [pure virtual]

Sets a parameter value from a string (e.g. "1.0 5.4 0.21")

param[in] sName Name of the parameter to set param[in] sValue New parameter value

Returns:
'true' if all went fine, else 'false' (maybe unknown parameter)

Implemented in PLRenderer::ParameterManager.

virtual bool PLRenderer::Parameters::GetParameter1i ( const PLCore::String sName,
int &  nX 
) const [pure virtual]
virtual bool PLRenderer::Parameters::SetParameter1i ( const PLCore::String sName,
int  nX 
) [pure virtual]
virtual bool PLRenderer::Parameters::GetParameter2i ( const PLCore::String sName,
int &  nX,
int &  nY 
) const [pure virtual]
virtual bool PLRenderer::Parameters::GetParameter2iv ( const PLCore::String sName,
int  nValue[] 
) const [pure virtual]
virtual bool PLRenderer::Parameters::SetParameter2i ( const PLCore::String sName,
int  nX,
int  nY 
) [pure virtual]
virtual bool PLRenderer::Parameters::SetParameter2iv ( const PLCore::String sName,
const int  nValue[] 
) [pure virtual]
virtual bool PLRenderer::Parameters::GetParameter3i ( const PLCore::String sName,
int &  nX,
int &  nY,
int &  nZ 
) const [pure virtual]
virtual bool PLRenderer::Parameters::GetParameter3iv ( const PLCore::String sName,
int  nValue[] 
) const [pure virtual]
virtual bool PLRenderer::Parameters::SetParameter3i ( const PLCore::String sName,
int  nX,
int  nY,
int  nZ 
) [pure virtual]
virtual bool PLRenderer::Parameters::SetParameter3iv ( const PLCore::String sName,
const int  nValue[] 
) [pure virtual]
virtual bool PLRenderer::Parameters::GetParameter4i ( const PLCore::String sName,
int &  nX,
int &  nY,
int &  nZ,
int &  nW 
) const [pure virtual]
virtual bool PLRenderer::Parameters::GetParameter4iv ( const PLCore::String sName,
int  nValue[] 
) const [pure virtual]
virtual bool PLRenderer::Parameters::SetParameter4i ( const PLCore::String sName,
int  nX,
int  nY,
int  nZ,
int  nW 
) [pure virtual]
virtual bool PLRenderer::Parameters::SetParameter4iv ( const PLCore::String sName,
const int  nValue[] 
) [pure virtual]
virtual bool PLRenderer::Parameters::GetParameter1f ( const PLCore::String sName,
float &  fX 
) const [pure virtual]
virtual bool PLRenderer::Parameters::SetParameter1f ( const PLCore::String sName,
float  fX 
) [pure virtual]
virtual bool PLRenderer::Parameters::GetParameter2f ( const PLCore::String sName,
float &  fX,
float &  fY 
) const [pure virtual]
virtual bool PLRenderer::Parameters::GetParameter2fv ( const PLCore::String sName,
float  fValue[] 
) const [pure virtual]
virtual bool PLRenderer::Parameters::SetParameter2f ( const PLCore::String sName,
float  fX,
float  fY 
) [pure virtual]
virtual bool PLRenderer::Parameters::SetParameter2fv ( const PLCore::String sName,
const float  fValue[] 
) [pure virtual]
virtual bool PLRenderer::Parameters::GetParameter3f ( const PLCore::String sName,
float &  fX,
float &  fY,
float &  fZ 
) const [pure virtual]
virtual bool PLRenderer::Parameters::GetParameter3fv ( const PLCore::String sName,
float  fValue[] 
) const [pure virtual]
virtual bool PLRenderer::Parameters::SetParameter3f ( const PLCore::String sName,
float  fX,
float  fY,
float  fZ 
) [pure virtual]
virtual bool PLRenderer::Parameters::SetParameter3fv ( const PLCore::String sName,
const float  fValue[] 
) [pure virtual]
virtual bool PLRenderer::Parameters::GetParameter4f ( const PLCore::String sName,
float &  fX,
float &  fY,
float &  fZ,
float &  fW 
) const [pure virtual]
virtual bool PLRenderer::Parameters::GetParameter4fv ( const PLCore::String sName,
float  fValue[] 
) const [pure virtual]
virtual bool PLRenderer::Parameters::SetParameter4f ( const PLCore::String sName,
float  fX,
float  fY,
float  fZ,
float  fW 
) [pure virtual]
virtual bool PLRenderer::Parameters::SetParameter4fv ( const PLCore::String sName,
const float  fValue[] 
) [pure virtual]
virtual bool PLRenderer::Parameters::GetParameter1d ( const PLCore::String sName,
double &  fX 
) const [pure virtual]
virtual bool PLRenderer::Parameters::SetParameter1d ( const PLCore::String sName,
double  fX 
) [pure virtual]
virtual bool PLRenderer::Parameters::GetParameter2d ( const PLCore::String sName,
double &  fX,
double &  fY 
) const [pure virtual]
virtual bool PLRenderer::Parameters::GetParameter2dv ( const PLCore::String sName,
double  fValue[] 
) const [pure virtual]
virtual bool PLRenderer::Parameters::SetParameter2d ( const PLCore::String sName,
double  fX,
double  fY 
) [pure virtual]
virtual bool PLRenderer::Parameters::SetParameter2dv ( const PLCore::String sName,
const double  fValue[] 
) [pure virtual]
virtual bool PLRenderer::Parameters::GetParameter3d ( const PLCore::String sName,
double &  fX,
double &  fY,
double &  fZ 
) const [pure virtual]
virtual bool PLRenderer::Parameters::GetParameter3dv ( const PLCore::String sName,
double  fValue[] 
) const [pure virtual]
virtual bool PLRenderer::Parameters::SetParameter3d ( const PLCore::String sName,
double  fX,
double  fY,
double  fZ 
) [pure virtual]
virtual bool PLRenderer::Parameters::SetParameter3dv ( const PLCore::String sName,
const double  fValue[] 
) [pure virtual]
virtual bool PLRenderer::Parameters::GetParameter4d ( const PLCore::String sName,
double &  fX,
double &  fY,
double &  fZ,
double &  fW 
) const [pure virtual]
virtual bool PLRenderer::Parameters::GetParameter4dv ( const PLCore::String sName,
double  fValue[] 
) const [pure virtual]
virtual bool PLRenderer::Parameters::SetParameter4d ( const PLCore::String sName,
double  fX,
double  fY,
double  fZ,
double  fW 
) [pure virtual]
virtual bool PLRenderer::Parameters::SetParameter4dv ( const PLCore::String sName,
const double  fValue[] 
) [pure virtual]
virtual bool PLRenderer::Parameters::GetParameterFloat3x3 ( const PLCore::String sName,
float  fValue[] 
) const [pure virtual]
virtual bool PLRenderer::Parameters::SetParameterFloat3x3 ( const PLCore::String sName,
const float  fValue[] 
) [pure virtual]
virtual bool PLRenderer::Parameters::GetParameterFloat3x4 ( const PLCore::String sName,
float  fValue[] 
) const [pure virtual]
virtual bool PLRenderer::Parameters::SetParameterFloat3x4 ( const PLCore::String sName,
const float  fValue[] 
) [pure virtual]
virtual bool PLRenderer::Parameters::GetParameterMatrixfv ( const PLCore::String sName,
float  fValue[] 
) const [pure virtual]
virtual bool PLRenderer::Parameters::SetParameterMatrixfv ( const PLCore::String sName,
const float  fValue[] 
) [pure virtual]
virtual bool PLRenderer::Parameters::GetParameterMatrixdv ( const PLCore::String sName,
double  fValue[] 
) const [pure virtual]
virtual bool PLRenderer::Parameters::SetParameterMatrixdv ( const PLCore::String sName,
const double  fValue[] 
) [pure virtual]

Returns the texture buffer of the parameter.

Returns:
The texture buffer of the parameter, can be a null pointer

Implemented in PLRenderer::ParameterManager.

virtual int PLRenderer::Parameters::SetParameterTextureBuffer ( const PLCore::String sName,
PLRenderer::TextureBuffer pTextureBuffer 
) [pure virtual]

Sets the texture buffer of the parameter.

Parameters:
[in]sNameName of the parameter where to set the texture buffer
[in]pTextureBufferTexture buffer to set, can be a null pointer
Returns:
Texture stage the texture buffer was set to, < 0 on error

Implemented in PLRenderer::ParameterManager.

virtual PLRenderer::Texture* PLRenderer::Parameters::GetParameterTexture ( const PLCore::String sName) const [pure virtual]

Returns the texture of the parameter.

Returns:
The texture of the parameter, can be a null pointer

Implemented in PLRenderer::ParameterManager.

virtual int PLRenderer::Parameters::SetParameterTexture ( const PLCore::String sName,
const PLCore::String sFilename 
) [pure virtual]

Sets the texture of the parameter.

Parameters:
[in]sNameName of the parameter where to set the texture
[in]sFilenameTexture filename
Returns:
Texture stage the texture was set to, < 0 on error

Implemented in PLRenderer::ParameterManager.

virtual int PLRenderer::Parameters::SetParameterTexture ( const PLCore::String sName,
PLRenderer::Texture pTexture 
) [pure virtual]

Sets the texture of the parameter.

Parameters:
[in]sNameName of the parameter where to set the texture
[in]pTextureTexture to set, can be a null pointer
Returns:
Texture stage the texture was set to, < 0 on error

Implemented in PLRenderer::ParameterManager.


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


PixelLight PixelLight 0.9.11-R1
Copyright (C) 2002-2012 by The PixelLight Team
Last modified Thu Feb 23 2012 14:09:39
The content of this PixelLight document is published under the
Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported