PC Stable Documentation
 
All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
Loading...
Searching...
No Matches
PPEClassBase Class Reference

Created once, on manager init. Script-side representation of C++ material class, separate handling. More...

Private Member Functions

void PPEClassBase (string mat_path_override="")
 
protected void Init (string mat_path_override="")
 
protected void CreateMaterial ()
 
Material GetMaterial ()
 
protected void CreateDataStructure ()
 
protected void RegisterMaterialParameters ()
 inserted into associative array by parameter int value, parameter registration order does not matter (still ordered, though)
 
protected void RegisterParameterScalarBool (int idx, string parameter_name, bool default_value)
 
protected void RegisterParameterScalarInt (int idx, string parameter_name, int default_value, int min, int max)
 
protected void RegisterParameterScalarFloat (int idx, string parameter_name, float default_value, float min, float max)
 WARNING - min/max values are usually taken from Workbench defaults, may not be actual min/max values the renderer can handle! When in doubt, try some higher/lower values...
 
protected void RegisterParameterScalarFloatEx (int idx, string parameter_name, float default_value, float min, float max, typename type)
 WARNING - min/max values are usually taken from Workbench defaults, may not be actual min/max values the renderer can handle! When in doubt, try some higher/lower values...
 
protected void RegisterParameterColor (int idx, string parameter_name, float r, float g, float b, float a)
 WARNING - min/max values are usually taken from Workbench defaults, may not be actual min/max values the renderer can handle! When in doubt, try some higher/lower values...
 
protected void RegisterParameterColorEx (int idx, string parameter_name, float r, float g, float b, float a, typename type)
 WARNING - min/max values are usually taken from Workbench defaults, may not be actual min/max values the renderer can handle! When in doubt, try some higher/lower values...
 
protected void RegisterParameterVector (int idx, string parameter_name, array< float > default_values)
 
protected void RegisterParameterTexture (int idx, string parameter_name, string default_path)
 
protected void RegisterParameterResource (int idx, string parameter_name, string default_path)
 
void InsertParamValueData (PPERequestParamDataBase request_data)
 Distributes requester data to the material class structure and links them to appropriate parameter.
 
void RemoveRequest (int req_idx)
 unused, see 'RemoveActiveRequestFromMaterials' for more info
 
void OnUpdate (float timeslice, int order)
 generic update method, take care when overriding!
 
void SetFinalParameterValue (int parameter_idx)
 Clamps the values being set to defaults, if there is no request setting non-zero values on the parameter.
 
void ApplyValueChanges ()
 
protected void InsertUpdatedParameter (int mat_id)
 
void ParamUpdateRemove (int parameter_idx)
 Queue selected parameter for removal from the update queue.
 
void SetParameterUpdating (int order, int parameter_id)
 Queue specific parameter of this material to update.
 
protected void ParamUpdateQueueCleanup (int order)
 
string GetDefaultMaterialPath ()
 override this if you want to use different path by default; '.emat' is appended automatically
 
void ChangeMaterialPathUsed (string path)
 
string GetCurrentMaterialPath ()
 
int GetPostProcessEffectID ()
 Overriden in all material classes!
 
PPEMatClassParameterCommandData GetParameterCommandData (int parameter_idx)
 Some PP effects are handled as hard-coded exceptions, outside of material system. Default == PPEExceptions.NONE (systemic behaviour)
 
void DbgPrnt (string text)
 

Private Attributes

protected PPEManager m_Manager
 
protected string m_MaterialPath = ""
 
protected Material m_Material
 
protected ref map< int, ref array< int > > m_ParameterUpdateQueueMap
 
protected ref array< intm_ParameterRemovalQueue
 
protected ref array< intm_UpdatedParameters
 
protected ref map< int, ref PPEMatClassParameterCommandDatam_MaterialParamMapStructure
 

Detailed Description

Created once, on manager init. Script-side representation of C++ material class, separate handling.

Constructor & Destructor Documentation

◆ PPEClassBase()

void PPEClassBase ( string  mat_path_override = "")
inlineprivate

Member Function Documentation

◆ ApplyValueChanges()

void ApplyValueChanges ( )
inlineprivate

◆ ChangeMaterialPathUsed()

void ChangeMaterialPathUsed ( string  path)
inlineprivate

◆ CreateDataStructure()

protected void CreateDataStructure ( )
inlineprivate

◆ CreateMaterial()

protected void CreateMaterial ( )
inlineprivate

◆ DbgPrnt()

void DbgPrnt ( string  text)
inlineprivate

◆ GetCurrentMaterialPath()

string GetCurrentMaterialPath ( )
inlineprivate

References m_MaterialPath.

◆ GetDefaultMaterialPath()

string GetDefaultMaterialPath ( )
private

override this if you want to use different path by default; '.emat' is appended automatically

Referenced by Init().

◆ GetMaterial()

Material GetMaterial ( )
inlineprivate

References m_Material.

Referenced by ChangePPEMaterial().

◆ GetParameterCommandData()

PPEMatClassParameterCommandData GetParameterCommandData ( int  parameter_idx)
inlineprivate

◆ GetPostProcessEffectID()

◆ Init()

protected void Init ( string  mat_path_override = "")
inlineprivate

◆ InsertParamValueData()

◆ InsertUpdatedParameter()

protected void InsertUpdatedParameter ( int  mat_id)
inlineprivate

References m_UpdatedParameters.

Referenced by OnUpdate().

◆ OnUpdate()

void OnUpdate ( float  timeslice,
int  order 
)
inlineprivate

◆ ParamUpdateQueueCleanup()

protected void ParamUpdateQueueCleanup ( int  order)
inlineprivate

◆ ParamUpdateRemove()

void ParamUpdateRemove ( int  parameter_idx)
inlineprivate

Queue selected parameter for removal from the update queue.

References m_ParameterRemovalQueue.

◆ RegisterMaterialParameters()

protected void RegisterMaterialParameters ( )
private

inserted into associative array by parameter int value, parameter registration order does not matter (still ordered, though)

Referenced by PPEClassBase().

◆ RegisterParameterColor()

protected void RegisterParameterColor ( int  idx,
string  parameter_name,
float  r,
float  g,
float  b,
float  a 
)
inlineprivate

WARNING - min/max values are usually taken from Workbench defaults, may not be actual min/max values the renderer can handle! When in doubt, try some higher/lower values...

References GetPostProcessEffectID(), and m_MaterialParamMapStructure.

Referenced by PPEColors::RegisterMaterialParameters(), PPEDistort::RegisterMaterialParameters(), PPEGhost::RegisterMaterialParameters(), and PPEGlow::RegisterMaterialParameters().

◆ RegisterParameterColorEx()

protected void RegisterParameterColorEx ( int  idx,
string  parameter_name,
float  r,
float  g,
float  b,
float  a,
typename type   
)
inlineprivate

WARNING - min/max values are usually taken from Workbench defaults, may not be actual min/max values the renderer can handle! When in doubt, try some higher/lower values...

References Class::CastTo(), GetPostProcessEffectID(), and m_MaterialParamMapStructure.

Referenced by PPEColors::RegisterMaterialParameters(), and PPEGlow::RegisterMaterialParameters().

◆ RegisterParameterResource()

protected void RegisterParameterResource ( int  idx,
string  parameter_name,
string  default_path 
)
inlineprivate

◆ RegisterParameterScalarBool()

◆ RegisterParameterScalarFloat()

◆ RegisterParameterScalarFloatEx()

protected void RegisterParameterScalarFloatEx ( int  idx,
string  parameter_name,
float  default_value,
float  min,
float  max,
typename type   
)
inlineprivate

WARNING - min/max values are usually taken from Workbench defaults, may not be actual min/max values the renderer can handle! When in doubt, try some higher/lower values...

References Class::CastTo(), GetPostProcessEffectID(), m_MaterialParamMapStructure, and PPEMatClassParameterFloat().

Referenced by PPEColors::RegisterMaterialParameters(), and PPEGlow::RegisterMaterialParameters().

◆ RegisterParameterScalarInt()

◆ RegisterParameterTexture()

protected void RegisterParameterTexture ( int  idx,
string  parameter_name,
string  default_path 
)
inlineprivate

◆ RegisterParameterVector()

protected void RegisterParameterVector ( int  idx,
string  parameter_name,
array< float default_values 
)
inlineprivate

◆ RemoveRequest()

void RemoveRequest ( int  req_idx)
inlineprivate

unused, see 'RemoveActiveRequestFromMaterials' for more info

Referenced by RemoveActiveRequestFromMaterials().

◆ SetFinalParameterValue()

void SetFinalParameterValue ( int  parameter_idx)
inlineprivate

Clamps the values being set to defaults, if there is no request setting non-zero values on the parameter.

References PPEMatClassParameterCommandData::GetCurrentValues(), GetParameterCommandData(), PPEMatClassParameterCommandData::GetParameterVarType(), m_Material, Param::param1, and Material::SetParamByIndex().

Referenced by ApplyValueChanges().

◆ SetParameterUpdating()

void SetParameterUpdating ( int  order,
int  parameter_id 
)
inlineprivate

Queue specific parameter of this material to update.

References m_ParameterUpdateQueueMap.

Referenced by SetMaterialParamUpdating().

Field Documentation

◆ m_Manager

protected PPEManager m_Manager
private

Referenced by Init(), and OnUpdate().

◆ m_Material

protected Material m_Material
private

◆ m_MaterialParamMapStructure

◆ m_MaterialPath

protected string m_MaterialPath = ""
private

◆ m_ParameterRemovalQueue

protected ref array<int> m_ParameterRemovalQueue
private

◆ m_ParameterUpdateQueueMap

protected ref map<int, ref array<int> > m_ParameterUpdateQueueMap
private

◆ m_UpdatedParameters


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