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.
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.
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:
- TShadingSample & shadingSample -Information about the point to be shaded, including position vectors, texture coordinates, base color, and so on. After modification by this function, the new values are returned in this argument.
- const TSceneState & sceneState -The set of graphic scene attributes corresponding to the shading sample.
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.
virtual TStream & operator >>=(TStream &) const
Interface Category:
API.
Purpose:
Stream-out operator.
Calling Context:
Called to stream out data.
Parameters:
- TStream & -The stream that the object streams itself out to.
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.
virtual TStream & operator <<= (TStream &)
Interface Category:
API.
Purpose:
Stream-in operator.
Calling Context:
Called to stream in data.
Parameters:
- TStream & -The stream that the object streams itself in from.
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.
- TAtmosphereShader ()
- TAtmosphereShader (const TAtmosphereShader & source)
Interface Category:
API.
Purpose:
- Default constructor.
- Copy constructor.
Calling Context:
- Called by the stream-in operators and derived classes. Do not call this constructor directly.
- 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.
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.