Class: TAtmosphereShader

Declaration: AtmosphereShader.h

Taxonomy Categories:

Member Functions:


Interface Category:

API.

Inherits From:

MCollectible

Inherited By:

TDepthCueingShader

Purpose:

TAtmosphereShader simulates atmospheric attenuation (such as that caused by fog, cloud, and haze) between the object and the viewer. TAtmosphereShader is an abstract base class that defines a protocol for a scene attribute. The TSceneBundle class has a pointer to a TAtmosphereShader object. During rendering, TReflectanceShader obtains this pointer from the TSceneBundle; if the pointer is not NIL, TReflectanceShader invokes the TAtmosphereShader's computeShade member function to add to TReflectanceShader's own shading computation.

Instantiation:

Abstract class; do not allocate.

Deriving Classes:

TDepthCueingShader is provided. Other deriving classes must follow the example of TDepthCueingShader and override ComputeShade().

Concurrency:

Not multithread safe.

Resource Use:

No special requirements.

Member Function: TAtmosphereShader::~TAtmosphereShader

virtual ~ TAtmosphereShader ()

Interface Category:

API.

Purpose:

Destructor.

Calling Context:

Called to destroy an object.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TAtmosphereShader::ComputeShade

virtual void ComputeShade (TShadingSample & shadingSample, const TSceneState & sceneState)

Interface Category:

API.

Purpose:

Provides a pure virtual function that computes the specific atmospheric shading effects defined in derived classes (for example: fog, haze, or mist). The TShadingSample will be modified based upon the effects of the specific atmospheric shader.

Calling Context:

Do not call this function directly. Call the overridden version of this function from a derived class.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

This is a pure virtual function and must be overridden by classes deriving from TAtmosphereShader.

Member Function: TAtmosphereShader::operator>>=

virtual TStream & operator >>=(TStream &) const

Interface Category:

API.

Purpose:

Stream-out operator.

Calling Context:

Called to stream out data.

Parameters:

Return Value:

Returns a reference to the stream the object streams itself out to.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TAtmosphereShader::operator<<=

virtual TStream & operator <<= (TStream &)

Interface Category:

API.

Purpose:

Stream-in operator.

Calling Context:

Called to stream in data.

Parameters:

Return Value:

Returns a reference to the stream the object streams itself in from.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TAtmosphereShader::TAtmosphereShader

  1. TAtmosphereShader ()
  2. TAtmosphereShader (const TAtmosphereShader & source)

Interface Category:

API.

Purpose:

  1. Default constructor.
  2. Copy constructor.

Calling Context:

  1. Called by the stream-in operators and derived classes. Do not call this constructor directly.
  2. Called to copy an object. Do not call this constructor directly.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

These constructors are protected functions and must be overridden by classes deriving from TAtmosphereShader.

Member Function: TAtmosphereShader::operator=

TAtmosphereShader & operator =( const TAtmosphereShader & source)

Interface Category:

API.

Purpose:

Assignment operator.

Calling Context:

Do not call this function directly. Call this function from the overridden function in a derived class.

Parameters:

Return Value:

A non-const reference to the left-hand side object.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

This function is a protected function and must be overridden by classes deriving from TAtmosphereShader.
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.