usually used for DirectX effect parameter block. value can be integer, float, vector3, vector4, matrix, TextureEntity, etc.
Public Member Functions | |
ParaParamBlock (CParameterBlock *pBlock) | |
bool | IsValid () |
check if the object is valid | |
void | Clear () |
clear all parameters | |
void | SetInt (const char *sParamName, int value) |
void | SetBoolean (const char *sParamName, bool value) |
void | SetFloat (const char *sParamName, float value) |
void | SetVector2 (const char *sParamName, float x, float y) |
void | SetVector3 (const char *sParamName, float x, float y, float z) |
void | SetVector4 (const char *sParamName, float x, float y, float z, float w) |
void | SetMatrix43 (const char *sParamName, const char *matrix) |
set matrix by a string of 4*3 number of float values separated by comma (see below): "mat._11, mat._12, mat._13, mat._21, mat._22, mat._23,mat._31, mat._32, mat._33,mat._41, mat._42, mat._43" If a blank string("") is specified, identity matrix is set | |
void | SetTexture (int nTextureIndex, const char *sFilePath) |
set texture with the given texture index, | |
void | SetTexture_ (const char *sParamName, const char *sFilePath) |
void | SetTextureObj (int nTextureIndex, const ParaAssetObject &assetObject) |
same as SetTexture, except that ParaAssetObject is an object. | |
Public Attributes | |
CParameterBlock * | m_pParamBlock |
void ParaScripting::ParaParamBlock::SetTexture | ( | int | nTextureIndex, | |
const char * | sFilePath | |||
) |
set texture with the given texture index,
nTextureIndex,: | usually [0,9], which texture register to use in case of effect file parameter. | |
sFilePath,: | the file name of the texture. |
void ParaScripting::ParaParamBlock::SetTextureObj | ( | int | nTextureIndex, | |
const ParaAssetObject & | assetObject | |||
) |
same as SetTexture, except that ParaAssetObject is an object.