Class: TMipMapA8R8G8B8

Declaration: TextureMaps.h

Taxonomy Categories:

Member Functions:


Interface Category:

API.

Inherits From:

TTextureMap

Inherited By:

None.

Purpose:

TMipMapA8R8G8B8, a concrete class derived from TTextureMap, implements a texture map based on a 32-bit RGB image. As the class name is supposed to indicate, each of the four channels of the image--alpha (transparency), red, green, and blue--is represented by eight bits of data. A MIP map reduces filtering computation by including filtered versions of the image along with the original image, while increasing storage by only a fraction of the image's size. The maximum size of the image (represented by the TImage class) is 512 * 512. If the size of the TImage exceeds this limit, the TImage filters itself down to an acceptable range. The TImageTextureMap and TBumpTextureMap classes use a TMipMapA8R8G8B8 internally for converting a TImage to a filtered texture map.

Instantiation:

Allocate on the heap or the stack.

Deriving Classes:

None.

Concurrency:

Not multithread safe.

Resource Use:

No special requirements.

Member Function: TMipMapA8R8G8B8::TMipMapA8R8G8B8

  1. TMipMapA8R8G8B8 ()
  2. TMipMapA8R8G8B8 (const TImage & image)
  3. TMipMapA8R8G8B8 (const TMipMapA8R8G8B8 & source)

Interface Category:

API.

Purpose:

  1. Default constructor.
  2. Constructor used to set the image to be used as a texture map.
  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: TMipMapA8R8G8B8::~TMipMapA8R8G8B8

virtual ~ TMipMapA8R8G8B8 ()

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: TMipMapA8R8G8B8::SetImage

virtual bool SetImage (const TImage & image)

Interface Category:

API.

Purpose:

Sets the image to be used as the texture map. Images must have a height and width greater than 0 and less than kMaxMapSize (512) pixels. The function attempts to filter the image down to the proper dimensions if it is too big. This function will store the pre-filtered versions of the image internally.

Calling Context:

Call this function directly.

Parameters:

Return Value:

Returns true if the MIP map image has been created successfully.

Exceptions:

Throws an Internal Assert exception if the image has an invalid height or width dimension.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TMipMapA8R8G8B8::GetImageSize

virtual TGPoint GetImageSize () const

Interface Category:

API.

Purpose:

Returns a TGPoint that represents the height and width of the image.

Calling Context:

Call this function directly.

Parameters:

Return Value:

Returns a TGPoint that represents the height and width of the image.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TMipMapA8R8G8B8::operator=

TMipMapA8R8G8B8 & operator =(const TMipMapA8R8G8B8 & 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: TMipMapA8R8G8B8::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: TMipMapA8R8G8B8::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: TMipMapA8R8G8B8::GetItemValue

  1. virtual void GetItemValue (const TGPoint & Index, double filterRange, TColor & returnColor) const
  2. virtual void GetItemValue (const TGPoint & index, const TGPoint & filterRange, TColor & returnColor)
  3. virtual void GetItemValue (const TGPoint & index, const TGPointArray & filterRange, TColor & returnColor)

Interface Category:

API.

Purpose:

  1. Returns the color from the texture-map image that corresponds to the index point. The filter range argument allows the image to be filtered to provide less detail than is available in the actual image array. Filter range values greater than 1.0 causes the mate to become more fuzzy.
  2. Returns the color from the texture-map image that corresponds to the index point. The filter range argument allows the image to be filtered to provide less detail than is available in the actual image array. This function is not implemented and returns the color kBlack as a default value.
  3. Returns the color from the texture-map image that corresponds to the index point. The filter range argument allows the image to be filtered to provide less detail than is available in the actual image array. This function is not implemented and returns a color of kBlack as the default value.

Calling Context:

  1. Call this function directly.
  2. Call this function directly.
  3. Call this function directly.

Parameters:

Return Value:

None.

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.