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.
- TMipMapA8R8G8B8 ()
- TMipMapA8R8G8B8 (const TImage & image)
- TMipMapA8R8G8B8 (const TMipMapA8R8G8B8 & source)
Interface Category:
API.
Purpose:
- Default constructor.
- Constructor used to set the image to be used as a texture map.
- 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 for the texture map.
- const TMipMapA8R8G8B8 & source -The object to be copied.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
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.
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:
- const TImage & image -The image to use as the texture map.
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.
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.
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.
Member Function: TMipMapA8R8G8B8::GetItemValue
- virtual void GetItemValue (const TGPoint & Index, double filterRange, TColor & returnColor) const
- virtual void GetItemValue (const TGPoint & index, const TGPoint & filterRange, TColor & returnColor)
- virtual void GetItemValue (const TGPoint & index, const TGPointArray & filterRange, TColor & returnColor)
Interface Category:
API.
Purpose:
- 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.
- 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.
- 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:
- Call this function directly.
- Call this function directly.
- Call this function directly.
Parameters:
- const TGPoint & Index -The point to be mapped onto the texture-map image.
- double filterRange -The range of the filter; normally set by renderers that display anti-aliased texture-mapped images.
- TColor & returnColor -The resulting color is returned here.
- const TGPoint & index -The point to be mapped onto the texture-map image.
- const TGPoint & filterRange -The range of the filter; normally set by renderers that display anti-aliased texture-mapped images.
- TColor & returnColor -The resulting color.
- const TGPoint & index -The point to be mapped onto the texture-map image.
- const TGPointArray & filterRange -The range of the filter; normally set by renderers that display anti-aliased texture-mapped images.
- TColor & returnColor -The resulting color.
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.