Class StdFog

3DS Max Plug-In SDK

Class StdFog

See Also: Class Atmospheric, Class Texmap.

class StdFog : public Atmospheric

Description:

This class provides access to the settings of the Standard Fog Atmospheric plug-in of 3ds max. All methods of this class are implemented by the system.

Methods:

Prototype:

virtual void SetColor(Color c, TimeValue t)=0;

Remarks:

Sets the fog color.

Parameters:

Color c

The color to set.

TimeValue t

The time to set the color.

Prototype:

virtual void SetUseMap(BOOL onoff)=0;

Remarks:

Sets the state of the 'Use Map' toggle.

Parameters:

BOOL onoff

TRUE for on; FALSE for off.

Prototype:

virtual void SetUseOpac(BOOL onoff)=0;

Remarks:

Sets the state of the use opacity map toggle.

Parameters:

BOOL onoff

TRUE for on; FALSE for off.

Prototype:

virtual void SetColorMap(Texmap *tex)=0;

Remarks:

Set the color map used.

Parameters:

Texmap *tex

The map to set.

Prototype:

virtual void SetOpacMap(Texmap *tex)=0;

Remarks:

Set the opacity map used.

Parameters:

Texmap *tex

The map to set.

Prototype:

virtual void SetFogBackground(BOOL onoff)=0;

Remarks:

Sets the state of the fog background toggle.

Parameters:

BOOL onoff

TRUE for on; FALSE for off.

Prototype:

virtual void SetType(int type)=0;

Remarks:

Set the type of fog, layered or standard.

Parameters:

int type

The type of fog: 0 = Standard; 1 = Layered.

Prototype:

virtual void SetNear(float v, TimeValue t)=0;

Remarks:

Sets the standard fog near percentage.

Parameters:

float v

The value to set in the range 0 to 1.

TimeValue t

The time to set the value.

Prototype:

virtual void SetFar(float v, TimeValue t)=0;

Remarks:

Sets the standard fog far percentage.

Parameters:

float v

The value to set in the range 0 to 1.

TimeValue t

The time to set the value.

Prototype:

virtual void SetTop(float v, TimeValue t)=0;

Remarks:

Sets the layered fog top value.

Parameters:

float v

The value to set.

TimeValue t

The time to set the value.

Prototype:

virtual void SetBottom(float v, TimeValue t)=0;

Remarks:

Sets the layered fog bottom value.

Parameters:

float v

The value to set.

TimeValue t

The time to set the value.

Prototype:

virtual void SetDensity(float v, TimeValue t)=0;

Remarks:

Sets the layered fog density setting.

Parameters:

float v

The value to set (> 0).

TimeValue t

The time to set the value.

Prototype:

virtual void SetFalloffType(int tv)=0;

Remarks:

Sets the falloff type to top, bottom or none.

Parameters:

int tv

One of the following values:

FALLOFF_TOP

FALLOFF_BOTTOM

FALLOFF_NONE

Prototype:

virtual void SetUseNoise(BOOL onoff)=0;

Remarks:

Sets the state of the 'Horizon Noise' toggle.

Parameters:

BOOL onoff

TRUE for on; FALSE for off.

Prototype:

virtual void SetNoiseScale(float v, TimeValue t)=0;

Remarks:

Set the 'Horizon Noise Size' setting.

Parameters:

float v

The value to set.

TimeValue t

The time to set the value.

Prototype:

virtual void SetNoiseAngle(float v, TimeValue t)=0;

Remarks:

Set the 'Horizon Noise Angle' setting.

Parameters:

float v

The value to set in radians.

TimeValue t

The time to set the value.

Prototype:

virtual void SetNoisePhase(float v, TimeValue t)=0;

Remarks:

Set the 'Horizon Noise Phase' setting.

Parameters:

float v

The value to set.

TimeValue t

The time to set the value.

Prototype:

virtual Color GetColor(TimeValue t)=0;

Remarks:

Returns the fog color at the time passed.

Parameters:

TimeValue t

The time to get the color.

Prototype:

virtual BOOL GetUseMap()=0;

Remarks:

Returns the state of the 'Use Map' toggle.

Return Value:

TRUE is on; FALSE is off.

Prototype:

virtual BOOL GetUseOpac()=0;

Remarks:

Returns the state of the use opacity map toggle.

Return Value:

TRUE is on; FALSE is off.

Prototype:

virtual Texmap *GetColorMap()=0;

Remarks:

Returns the color map used.

Prototype:

virtual Texmap *GetOpacMap()=0;

Remarks:

Returns the opacity map used.

Prototype:

virtual BOOL GetFogBackground()=0;

Remarks:

Returns the state of the fog background toggle.

Return Value:

TRUE is on; FALSE is off.

Prototype:

virtual int GetType()=0;

Remarks:

Returns the type of fog, layered or standard.

Return Value:

The type of fog: 0 = Standard; 1 = Layered.

Prototype:

virtual float GetNear(TimeValue t)=0;

Remarks:

Returns the standard fog near percentage.

Parameters:

TimeValue t

The time to get the value.

Prototype:

virtual float GetFar(TimeValue t)=0;

Remarks:

Returns the standard fog far percentage.

Parameters:

TimeValue t

The time to get the value.

Prototype:

virtual float GetTop(TimeValue t)=0;

Remarks:

Returns the layered fog top value.

Parameters:

TimeValue t

The time to get the value.

Prototype:

virtual float GetBottom(TimeValue t)=0;

Remarks:

Returns the layered fog bottom value.

Parameters:

TimeValue t

The time to get the value.

Prototype:

virtual float GetDensity(TimeValue t)=0;

Remarks:

Returns the layered fog density setting.

Parameters:

TimeValue t

The time to get the value.

Prototype:

virtual int GetFalloffType()=0;

Remarks:

Returns the falloff type to top, bottom or none.

Return Value:

One of the following values:

FALLOFF_TOP

FALLOFF_BOTTOM

FALLOFF_NONE

Prototype:

virtual BOOL GetUseNoise()=0;

Remarks:

Returns the state of the 'Horizon Noise' toggle.

Return Value:

TRUE is on; FALSE is off.

Prototype:

virtual float GetNoiseScale(TimeValue t)=0;

Remarks:

Returns the 'Horizon Noise Size' setting.

Parameters:

TimeValue t

The time to get the value.

Prototype:

virtual float GetNoiseAngle(TimeValue t)=0;

Remarks:

Returns the 'Horizon Noise Angle' setting.

Parameters:

TimeValue t

The time to get the value.

Prototype:

virtual float GetNoisePhase(TimeValue t)=0;

Remarks:

Returns the 'Horizon Noise Phase' setting.

Parameters:

TimeValue t

The time to get the value.