CmaterialEmitter
C++ | Python |
---|---|
Cmaxwell::CmaterialEmitter | CmaterialEmitter |
Emitter component. Each layer can contain an emitter in the top (just one per layer). The emitter component is created calling CmaterialLayer::createEmitter(). Any emitter can be set through one of the following ways:
- Through a color + luminance pair.
- The Color can be set through a RGB value or a Correlated Temperature Color.
- The luminance can be set through different emission units (Watts, lumens, candelas..) plus an IES FILE (if any).
- Through a temperature value in Kelvin.
- Through an emission texture.
The active emission type (1,2 or 3) is set through setActiveMultiValue.
Inherits from
Sub-classes
Methods
Name | Description |
---|---|
setState | Switch on/off the emitter. |
getState | Get emitter state. |
setPair | Sets the "pair" emission values. |
getPair | Gets the "pair" emission values. |
setTemperature | Sets the emission temperature of this emitter material. |
getTemperature | Gets the emission temperature of this emitter material. |
setMXI | Sets the emission texture of this emitter material (if any). |
getMXI | Gets the emission texture of this emitter material (if any). |
setActiveMultiValue | Used to choose which emission type (MXI,PAIR,TEMPERATURE) is enabled |
getActiveMultiValue | Used to get which emission type (MXI,PAIR,TEMPERATURE) is enabled. |
setActivePair | Used to set the active types for Cmaxwell::CmultiValue::CemitterPair. |
getActivePair | Used to get the active types for Cmaxwell::CmultiValue::CemitterPair. |
setIES | Used to set the IES/EULUM emission file. It works only when the active emission type is "pair". |
getIES | Used to get the IES/EULUM emission file. It works only when the active emission type is "pair". |
Inherited methods
setState
To switch on/off the emitter.
Language | Syntax |
---|---|
C++ | byte setState( bool enabled ) |
Python | int setState( bool enabled ) |
Return value
0 = Error setting emitter state.
1 = Success.
getState
Gets emitter state.
Language | Syntax |
---|---|
C++ | byte getState( bool& enabled ) |
Python | bool getState() |
Return value
C++
0 = Error getting emitter state.
1 = Success.
Python
Emitter state.
setPair
Sets the "pair" emission values.
Language | Syntax |
---|---|
C++ | byte setPair( Cmaxwell::CmultiValue::CemitterPair& pair ) |
Python | int setState( CemitterPair pair ) |
Return value
0 = Error setting emitter pair.
1 = Success.
getPair
Gets the "pair" emission values.
Language | Syntax |
---|---|
C++ | byte getPair( Cmaxwell::CmultiValue::CemitterPair& pair ) |
Python | CemitterPair getPair() |
Return value
C++
0 = Error getting emitter pair values.
1 = Success.
Python
Emitter pair values.
setTemperature
Sets the emission temperature of this emitter material.
Language | Syntax |
---|---|
C++ | byte setTemperature( real temperature ) |
Python | int setTemperature( float temperature ) |
Return value
0 = Error setting emitter temperature.
1 = Success.
getTemperature
Gets the emission temperature of this emitter material.
Language | Syntax |
---|---|
C++ | byte getTemperature( real& remperature ) |
Python | float getTemperature() |
Return value
C++
0 = Error getting emitter temperature.
1 = Success.
Python
Emitter temperature.
setMXI
Sets the emission texture of this emitter material (if any). Accepts any high dynamic range image format (MXI,EXR,HDR..). map.type will be assumed as TYPE_BITMAP.
Language | Syntax |
---|---|
C++ | byte setMXI( Cmaxwell::CmultiValue::Cmap& map ) |
Python | int setMXI( Cmap map ) |
Return value
0 = Error setting emission texture.
1 = Success.
getMXI
Gets the emission texture of this emitter material (if any).map.type will be assumed as TYPE_BITMAP.
Language | Syntax |
---|---|
C++ | byte getMXI( Cmaxwell::CmultiValue::Cmap& map ) |
Python | Cmap getMXI() |
Return value
C++
0 = Error getting emission texture values.
1 = Success.
Python
Cmap with the emission texture data.
setActiveMultiValue
Used to choose which emission type (MXI,PAIR,TEMPERATURE) is enabled. mv.type = "mxi", "temperature" or "pair".
Language | Syntax |
---|---|
C++ | byte setActiveMultiValue( Cmaxwell::CmultiValue& mv ) |
Python | int setActiveMultiValue( CmultiValue map ) |
Return value
0 = Error setting emission texture.
1 = Success.
getActiveMultiValue
Gets the emission type (MXI,PAIR,TEMPERATURE). mv.type = "mxi", "temperature" or "pair".
Language | Syntax |
---|---|
C++ | byte getActiveMultiValue( Cmaxwell::CmultiValue& pair ) |
Python | CmultiValue getActiveMultiValue() |
Return value
C++
0 = Error getting active multi-value.
1 = Success.
Python
CmultiValue with the active multi-value.
setActivePair
Used to set the active types for Cmaxwell::CmultiValue::CemitterPair. See Cmaxwell::CmultiValue::CemitterPair documentation to know how to fill a CemitterPair struct.
Language | Syntax |
---|---|
C++ | byte setActivePair( Cmaxwell::CmaterialEmitter::Cpair& mv ) |
Python | int setActiveMultiValue( Cpair map ) |
Return value
0 = Error setting the active pair.
1 = Success.
getActivePair
Used to get the active types for Cmaxwell::CmultiValue::CemitterPair.
Language | Syntax |
---|---|
C++ | byte getActivePair( Cmaxwell::CmaterialEmitter::Cpair & pair ) |
Python | Cpair getActivePair() |
Return value
C++
0 = Error getting active pair.
1 = Success.
Python
Cpair with the active pair.
setIES
Used to set the IES/EULUM emission file. It works only when the active emission type is "pair".
Language | Syntax |
---|---|
C++ | byte setIES( const char* file, const byte& enable, const real& weight ) |
Python | int setIES( str file, int enable, real weight ) |
Return value
0 = Error setting the IES/EULUM emission file for the emitter material.
1 = Success.
getIES
Used to get the IES/EULUM emission file. It works only when the active emission type is "pair".
Language | Syntax |
---|---|
C++ | const char* getIES( byte& isEnabled, real& weight ) |
Python | (str filename, int isEnabled, real Weight) getIES() |
Return value
C++
File name of the emission file.
Python
Tuple containing the IES values.