CmaterialEmitter

C++Python
Cmaxwell::CmaterialEmitterCmaterialEmitter

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

CmaterialPointer.

Sub-classes

Cpair.

Methods

NameDescription
setStateSwitch on/off the emitter.
getStateGet emitter state.
setPairSets the "pair" emission values.
getPairGets the "pair" emission values.
setTemperatureSets the emission temperature of this emitter material.
getTemperatureGets the emission temperature of this emitter material.
setMXISets the emission texture of this emitter material (if any).
getMXIGets the emission texture of this emitter material (if any).
setActiveMultiValueUsed to choose which emission type (MXI,PAIR,TEMPERATURE) is enabled
getActiveMultiValueUsed to get which emission type (MXI,PAIR,TEMPERATURE) is enabled.
setActivePairUsed to set the active types for Cmaxwell::CmultiValue::CemitterPair.
getActivePairUsed to get the active types for Cmaxwell::CmultiValue::CemitterPair.
setIESUsed to set the IES/EULUM emission file. It works only when the active emission type is "pair".
getIESUsed to get the IES/EULUM emission file. It works only when the active emission type is "pair".

Inherited methods

isNull.

setState

To switch on/off the emitter.

LanguageSyntax
C++byte setState( bool enabled )
Pythonint setState( bool enabled )

Return value

0 = Error setting emitter state.

1 = Success.

getState

Gets emitter state.

LanguageSyntax
C++byte getState( bool& enabled )
Pythonbool getState()

Return value

C++

0 = Error getting emitter state.

1 = Success.

Python

Emitter state.

setPair

Sets the "pair" emission values.

LanguageSyntax
C++byte setPair( Cmaxwell::CmultiValue::CemitterPair& pair )
Pythonint setState( CemitterPair pair )

Return value

0 = Error setting emitter pair.

1 = Success.

getPair

Gets the "pair" emission values.

LanguageSyntax
C++byte getPair( Cmaxwell::CmultiValue::CemitterPair& pair )
PythonCemitterPair 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.

LanguageSyntax
C++byte setTemperature( real temperature )
Pythonint setTemperature( float temperature )

Return value

0 = Error setting emitter temperature.

1 = Success.

getTemperature

Gets the emission temperature of this emitter material.

LanguageSyntax
C++byte getTemperature( real& remperature )
Pythonfloat 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.

LanguageSyntax
C++byte setMXI( Cmaxwell::CmultiValue::Cmap& map )
Pythonint 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.

LanguageSyntax
C++byte getMXI( Cmaxwell::CmultiValue::Cmap& map )
PythonCmap 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".

LanguageSyntax
C++byte setActiveMultiValue( Cmaxwell::CmultiValue& mv )
Pythonint 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".

LanguageSyntax
C++byte getActiveMultiValue( Cmaxwell::CmultiValue& pair )
PythonCmultiValue 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.

LanguageSyntax
C++byte setActivePair( Cmaxwell::CmaterialEmitter::Cpair& mv )
Pythonint setActiveMultiValue( Cpair map )

Return value

0 = Error setting the active pair.

1 = Success.

getActivePair

Used to get the active types for Cmaxwell::CmultiValue::CemitterPair.

LanguageSyntax
C++byte getActivePair( Cmaxwell::CmaterialEmitter::Cpair & pair )
PythonCpair 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".

LanguageSyntax
C++byte setIES( const char* file, const byte& enable, const real& weight )
Pythonint 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".

LanguageSyntax
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.