Taxonomy Categories:
Member Functions:
Interface Category:
API.
Inherits From:
TBumpMap
Inherited By:
None.
Purpose:
TBumpTextureMap is a concrete class, derived from TBumpMap, that accepts a TImage object to put into the map. The TImage to be used is specified with a constructor argument, and is converted to a filtered texture map. The values in the map are perturbation vectors that get added to the shading normals of a surface.
The perturbation vector is signed. A positive sign creates an effect where surface details are raised upward (bumps), and a negative sign makes surface details appear to be carved into the surface (dimples). You can supply a scaling factor to change the height and depth of all the bumps and dimples; a negative scaling factor turns bumps into dimples and vice versa. The scaling factor should be between -1 and 1, inclusive. (The default is 1.)
Instantiation:
Allocate on the heap or the stack.
Deriving Classes:
None.
Concurrency:
Not multithread safe.
Resource Use:
No special requirements.
- TBumpTextureMap ()
- TBumpTextureMap (const TImage & image)
- TBumpTextureMap (const TBumpTextureMap & imageMap)
Interface Category:
API.
Purpose:
- Default constructor. Sets the bump map to NIL and the scale factor to 1.
- Construct used to set the bump map to the given TImage.
- Copy constructor.
Calling Context:
- Called by the stream-in operators. You can also call this function directly.
- Call this function directly.
- Called to copy an object.
Parameters:
- Takes no parameters.
- const TImage & image -The image to use as the bump map.
- const TBumpTextureMap & imageMap -The object to be copied.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
virtual ~ TBumpTextureMap ()
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 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 from the internal bump map.
Calling Context:
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 new normal vector for the given surface point (shading sample).
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
virtual void SetMapScale (double scale)
Interface Category:
API.
Purpose:
Sets the factor by which the perturbations on the bump map are multiplied.
Calling Context:
Call this function directly.
Parameters:
- double scale -The scale factor by which the perturbations on the bump are multiplied.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
virtual double GetMapScale () const
Interface Category:
API.
Purpose:
Returns the scale factor by which the perturbations on the bump are multiplied.
Calling Context:
Call this function directly.
Parameters:
Return Value:
Returns the scale factor by which the perturbations on the bump are multiplied.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
TBumpTextureMap & operator =(const TBumpTextureMap & source)
Interface Category:
API.
Purpose:
Assignment operator.
Calling Context:
Call this function by using the operator in an assignment statement.
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:
None.
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.
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.