Class: TBumpTextureMap

Declaration: MapUtilities.h

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.

Member Function: TBumpTextureMap::TBumpTextureMap

  1. TBumpTextureMap ()
  2. TBumpTextureMap (const TImage & image)
  3. TBumpTextureMap (const TBumpTextureMap & imageMap)

Interface Category:

API.

Purpose:

  1. Default constructor. Sets the bump map to NIL and the scale factor to 1.
  2. Construct used to set the bump map to the given TImage.
  3. Copy constructor.

Calling Context:

  1. Called by the stream-in operators. You can also call this function directly.
  2. Call this function directly.
  3. Called to copy an object.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TBumpTextureMap::~TBumpTextureMap

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.

Member Function: TBumpTextureMap::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 from the internal bump map.

Calling Context:

Call this function directly.

Parameters:

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.

Member Function: TBumpTextureMap::SetMapScale

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:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TBumpTextureMap::GetMapScale

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.

Member Function: TBumpTextureMap::operator=

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.

Member Function: TBumpTextureMap::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: TBumpTextureMap::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.
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.