Taxonomy Categories:
Member Functions:
Interface Category:
API.
Inherits From:
MCollectible
Inherited By:
TBumpTextureMap
Purpose:
TBumpMap is an abstract base class for bump maps. A bump map is an array of perturbation vectors that is used to fool a shading computation into thinking that a surface is bumpy or dimpled. This is done not by altering the actual geometry of the object, but by altering the shading normal for each point. For each point, the perturbation vector that is mapped to that point is added to the point's shading normal. This causes the reflection model to create shaded colors as though the bumps were really present in the geometry. However, because the geometry is not actually affected, the surface perturbations simulated by the bump map do not appear on the silhouette of the object.
TBumpMap::GetValue returns the perturbed shading normal for a given point on a 3-D surface. The TBumpMap itself does not alter the shading normal that is stored in the TShadingSample passed to GetValue. Instead, it is the job of the shader that uses the TBumpMap (typically, a TBumpMapShader object) to use the returned value in place of the preexisting shading normal when computing the color of a given point.
Instantiation:
Abstract class; do not allocate.
Deriving Classes:
None.
Concurrency:
Not multithread safe.
Resource Use:
No special requirements.
virtual ~ TBumpMap ()
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: TBumpMap::GetValue
virtual TGPoint3D GetValue (const TShadingSample & ShadingSample) const
Interface Category:
API.
Purpose:
Returns a vector in 3-D space (a TGPoint3D) representing the shading normal that is mapped to the specified TShadingSample. This is a pure virtual function that must be overridden.
Calling Context:
Do not call this function directly.
Parameters:
- const TShadingSample & ShadingSample -The information about the surface point needed by the shader.
Return Value:
Returns a TGPoint3D object that represents the modified shading normal vector of the surface point (shading sample).
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: TBumpMap::operator>>=
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.
Member Function: TBumpMap::operator<<=
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.
- TBumpMap ()
- TBumpMap (const TBumpMap &)
Interface Category:
API.
Purpose:
- Default constructor. This is a protected constructor that must be overridden by derived classes.
- Copy constructor. This is a protected constructor that must be overridden by derived classes.
Calling Context:
- Called by the stream-in operators. Do not call this function directly.
- Called to copy an object. Do not call this function directly, except from within the copy constructor of a derived class.
Parameters:
- Takes no parameters.
- const TBumpMap & -The object to be copied.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: TBumpMap::operator=
TBumpMap & operator =(const TBumpMap & source)
Interface Category:
API.
Purpose:
Assignment operator. This is a protected member function that must be overridden by the derived classes.
Calling Context:
Do not call this function directly, except from within the operator
- function of a derived class.
Parameters:
- const TBumpMap & source -The object to be copied.
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:
None.
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.