Taxonomy Categories:
Member Functions:
Interface Category:
API.
Inherits From:
TLocalAttribute3DState
Inherited By:
None.
Purpose:
TFillBundle3D is a bundle class that is used for 3-D graphic objects that are solid, closed, frameless polygons. This includes surfaces and other closed volumes, such as rectangles and circles.
A bundle is a collection of attributes that contain imaging information for the rendering device. For instance, a 3-D bundle contains a TColor that describes the base color of a surface, as well as a TShader that describes how this color is altered by conditions such as reflected light or a texture map. A TFillBundle3D collects together the attributes needed to render a particular 3-D graphic object, just as a TGrafBundle is used for 2-D. The MGraphic3D class associates a TFillBundle3D with a 3-D geometry, in order to define the attributes needed for rendering the geometry--color, texture map, and so on.
The attributes contained in this 3-D bundle include only those attributes that are needed for the polygon fill, as this geometry is frameless. This includes the inside and outside colors, inside and outside shaders, and texture map transformation matrix. Each of these standard attributes is described by a corresponding class--TShader, TColor, and TGrafMatrix. The inside and outside color attributes determine the object's base color--the color of the surface before any effects are applied by the shaders. A right-hand rule is applied to determine which surface is inside and which is outside. The inside and outside surfaces have separate shaders. These shaders calculate the final color at every location on the surface, taking into account the lighting, the camera position, and the type of shader. For example, a highly reflective surface whose base color is red can actually appear whitish at the location where a light source is directly reflected. Finally, the texture map transformation matrix attribute specifies a TGrafMatrix that is used to map a 2-D texture to the object's surface. (The texture itself, if any, is specified by the shader attribute.)
Instantiation:
Allocate on the heap or the stack.
Deriving Classes:
None.
Concurrency:
Not multithread safe.
Resource Use:
No special requirements.
Other Considerations:
None.
- TFillBundle3D ()
- TFillBundle3D (const TFillBundle3D &)
- TFillBundle3D (const TColor & outsideColor, TAttribute3DState :: EShadingInterpolationMode shading =kColorSmooth, TAttribute3DState :: EBackfaceCulling backfaceCulling =kCullingOff, TAttribute3DState :: EShadingQuality shadingQuality =kBest)
- TFillBundle3D (const TColor & outsideColor, const TShader & outsideShader, TAttribute3DState :: EShadingInterpolationMode shading =kColorSmooth, TAttribute3DState :: EBackfaceCulling backfaceCulling =kCullingOff, TAttribute3DState :: EShadingQuality shadingQuality =kBest)
- TFillBundle3D (const TColor & outsideColor, const TColor & insideColor, TAttribute3DState :: EShadingInterpolationMode shading =kColorSmooth, TAttribute3DState :: EBackfaceCulling backfaceCulling =kCullingOff, TAttribute3DState :: EShadingQuality shadingQuality =kBest)
- TFillBundle3D (const TColor & outsideColor, const TColor & insideColor, const TShader & outsideShader, const TShader & insideShader, TAttribute3DState :: EShadingInterpolationMode shading =kColorSmooth, TAttribute3DState :: EBackfaceCulling backfaceCulling =kCullingOff, TAttribute3DState :: EShadingQuality shadingQuality =kBest)
Interface Category:
API.
Purpose:
- Default constructor.
- Copy constructor.
- For drawing a closed volume, inheriting the shader.
- For drawing a closed volume, using the specified shader.
- For drawing a surface, inheriting the shader.
- For drawing a surface, using the specified shader.
Calling Context:
- Called by the stream-in operators and can be called directly. The members of the bundle default to their unset condition.
- Called to copy an object.
- Called for use with a closed volume, when it is desired that the shader be inherited from a parent object.
- Called for use with a closed volume, when it is desired that a specific shader be used.
- Called for use with a surface, when it is desired that the shader be inherited from a parent object.
- Called for use with a surface, when it is desired that a specific shader be used.
Parameters:
- Takes no parameters.
- const TFillBundle3D & -The object to be copied.
- const TColor & outsideColor -The color to be used in rendering the object.
- TAttribute3DState :: EShadingInterpolationMode shading =kColorSmooth -The type of shading method to use.
- TAttribute3DState :: EBackfaceCulling backfaceCulling =kCullingOff -Specifies whether or not to employ backface culling.
- TAttribute3DState :: EShadingQuality shadingQuality =kBest -Specifies the amount of resolution to use when shading.
- const TColor & outsideColor -The color to be used in rendering the object.
- const TShader & outsideShader -The shader to be used in rendering the object.
- TAttribute3DState :: EShadingInterpolationMode shading =kColorSmooth -The type of shading method to use.
- TAttribute3DState :: EBackfaceCulling backfaceCulling =kCullingOff -Specifies whether or not to employ backface culling.
- TAttribute3DState :: EShadingQuality shadingQuality =kBest -Specifies the amount of resolution to use when shading.
- const TColor & outsideColor -The color to be used in rendering the outside of the surface.
- const TColor & insideColor -The color to be used in rendering the inside of the surface.
- TAttribute3DState :: EShadingInterpolationMode shading =kColorSmooth -The type of shading method to use.
- TAttribute3DState :: EBackfaceCulling backfaceCulling =kCullingOff -Specifies whether or not to employ backface culling.
- TAttribute3DState :: EShadingQuality shadingQuality =kBest -Specifies the amount of resolution to use when shading.
- const TColor & outsideColor -The color to be used in rendering the outside of the surface.
- const TColor & insideColor -The color to be used in rendering the inside of the surface.
- const TShader & outsideShader -The shader to be used in rendering the outside surface.
- const TShader & insideShader -The shader to be used in rendering the inside surface.
- TAttribute3DState :: EShadingInterpolationMode shading =kColorSmooth -The type of shading method to use.
- TAttribute3DState :: EBackfaceCulling backfaceCulling =kCullingOff -Specifies whether or not to employ backface culling.
- TAttribute3DState :: EShadingQuality shadingQuality =kBest -Specifies the amount of resolution to use when shading.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
virtual ~ TFillBundle3D ()
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: TFillBundle3D::operator=
TFillBundle3D & operator =(const TFillBundle3D &)
Interface Category:
API.
Purpose:
Assignment operator.
Calling Context:
Called when an object is assigned to another compatible object.
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: TFillBundle3D::SetOutsideColor
void SetOutsideColor (const TColor & color)
Interface Category:
API.
Purpose:
Sets the outside color for the object.
Calling Context:
Call this function directly.
Parameters:
- const TColor & color -The outside color for the object.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: TFillBundle3D::SetInsideColor
void SetInsideColor (const TColor & color)
Interface Category:
API.
Purpose:
Sets the inside color for the object.
Calling Context:
Call this function directly.
Parameters:
- const TColor & color -The inside color for the object.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: TFillBundle3D::SetOutsideShader
void SetOutsideShader (const TShader & shader)
Interface Category:
API.
Purpose:
Sets the outside shader for the object.
Calling Context:
Call this function directly.
Parameters:
- const TShader & shader -The outside shader for the object.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: TFillBundle3D::SetInsideShader
void SetInsideShader (const TShader & shader)
Interface Category:
API.
Purpose:
Sets the inside shader for the object.
Calling Context:
Call this function directly.
Parameters:
- const TShader & shader -The inside shader for the object.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: TFillBundle3D::SetShadingInterpolation
void SetShadingInterpolation (TAttribute3DState :: EShadingInterpolationMode shading)
Interface Category:
API.
Purpose:
Sets the shading interpolation method for the object, either flat, smooth, or no shading.
Calling Context:
Call this function directly.
Parameters:
- TAttribute3DState :: EShadingInterpolationMode shading -The new shading interpolation method; either flat (kFlat), smooth (kSmooth), or no shading (kNoShading).
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: TFillBundle3D::SetShadingQuality
void SetShadingQuality (TAttribute3DState :: EShadingQuality shadingQuality)
Interface Category:
API.
Purpose:
Sets the quality level for shading of this object. A value of fast (kFast) results in shading computations happening only once per polygon. Specifying medium (kMedium) causes calculations only at each vertex. Best (kBest) method is used to specify pixel-by-pixel processing.
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: TFillBundle3D::SetBackfaceCulling
void SetBackfaceCulling (TAttribute3DState :: EBackfaceCulling backfaceCulling)
Interface Category:
API.
Purpose:
Specifies whether or not to enable backface culling. When culling is enabled (kCullingOn), the shading and rendering operations ignore any surface that faces away from the camera, making it invisible.
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: TFillBundle3D::GetOutsideColor
virtual const TColor * GetOutsideColor () const
Interface Category:
API.
Purpose:
Returns the outside color being used for this object.
Calling Context:
Call this function directly.
Parameters:
Return Value:
Pointer to the outside color object being used.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: TFillBundle3D::GetOutsideShader
virtual const TShader * GetOutsideShader () const
Interface Category:
API.
Purpose:
Returns the shader object being used for rendering the outside of this object.
Calling Context:
Call this function directly.
Parameters:
Return Value:
Pointer to the outside shader object being used.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: TFillBundle3D::GetInsideColor
virtual const TColor * GetInsideColor () const
Interface Category:
API.
Purpose:
Returns the inside color being used for this object.
Calling Context:
Call this function directly.
Parameters:
Return Value:
Pointer to the inside color object being used.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: TFillBundle3D::GetInsideShader
virtual const TShader * GetInsideShader () const
Interface Category:
API.
Purpose:
Returns the shader object being used for rendering the inside of this object.
Calling Context:
Call this function directly.
Parameters:
Return Value:
Pointer to the inside shader object being used.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: TFillBundle3D::GetShadingInterpolation
virtual TAttribute3DState :: EShadingInterpolationMode GetShadingInterpolation () const
Interface Category:
API.
Purpose:
Returns the shading interpolation method being used.
Calling Context:
Call this function directly.
Parameters:
Return Value:
The enumeration tag corresponding to the currently used method of shading interpolation.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: TFillBundle3D::GetShadingQuality
virtual TAttribute3DState :: EShadingQuality GetShadingQuality () const
Interface Category:
API.
Purpose:
Returns the shading quality being used.
Calling Context:
Call this function directly.
Parameters:
Return Value:
The enumeration tag corresponding to the currently used quality level for shading.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: TFillBundle3D::GetDrawingOperation
virtual TAttributeState :: EDrawOperation GetDrawingOperation () const
Interface Category:
API.
Purpose:
Returns the EDrawOperation that determines whether to paint the fill, the frame, or both.
Calling Context:
Call this function directly.
Parameters:
Return Value:
The EDrawingOperation value of the bundle.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: TFillBundle3D::GetBackfaceCulling
virtual TAttribute3DState :: EBackfaceCulling GetBackfaceCulling () const
Interface Category:
API.
Purpose:
Returns the backface culling state being used.
Calling Context:
Call this function directly.
Parameters:
Return Value:
The enumeration tag that specifies whether or not backface culling is enabled.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: TFillBundle3D::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: TFillBundle3D::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.
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.