Taxonomy Categories:
Member Functions:
Interface Category:
API.
Inherits From:
TGrafAttribute
Inherited By:
None.
Purpose:
This concrete class, derived from TGrafAttribute, specifies an option for 3-D rendering. Essentially, the class is a wrapper for a Boolean that specifies whether hidden lines and surfaces should be removed during rendering. The renderer can examine the scene bundle to see the state of this attribute. What happens next depends upon the type of rendering. Z-buffer rendering turns on the visibility check if the THiddenSurfaceRemovalControl attribute is set to on, causing hidden surfaces not to be rendered. Similarly, vector rendering uses the attribute to decide whether to eliminate hidden lines in a wire frame. Priority-sorting rendering uses the attribute to determine its sorting scheme.
Note that this attribute is different in several ways from the backface-culling attribute of TGrafBundle3D. First, THiddenSurfaceRemovalControl is a scene attribute rather than an individual graphic's attribute. Also, its behavior is different. Backface culling looks at the surface normal of each facet of an object, to determine whether the facet faces towards or away from the viewer. However, a front-facing facet is not necessarily visible; it might be hidden. THiddenSurfaceRemovalControl catches such a case, where backface culling would not. Backface culling can also fail to determine visibility when the polygons it is checking are concave instead of convex.
Instantiation:
Allocate on the heap or the stack.
Deriving Classes:
None.
Concurrency:
Not multithread safe.
Resource Use:
No special requirements.
- THiddenSurfaceRemovalControl ()
- THiddenSurfaceRemovalControl (bool useHiddenSurface)
- THiddenSurfaceRemovalControl (const THiddenSurfaceRemovalControl &)
Interface Category:
API.
Purpose:
- Default constructor. Sets the state of hidden surface removal to true as the default value.
- Constructor used to set the state of hidden surface removal to either true or false.
- 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. You can call this function directly.
Parameters:
- Takes no parameters.
- bool useHiddenSurface -A Boolean used to set the state of the hidden surface removal control.
- const THiddenSurfaceRemovalControl & -The object to be copied.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
THiddenSurfaceRemovalControl ;
virtual ~ THiddenSurfaceRemovalControl ()
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 TToken GetName () const
Interface Category:
API.
Purpose:
Gets the name of this extended attribute, which is set as a static TToken.
Calling Context:
Call this function directly.
Parameters:
Return Value:
Returns the name of this extended attribute -(HiddenSurfaceRemovalControl).
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
virtual bool GetHiddenSurfaceControl () const
Interface Category:
API.
Purpose:
Gets the status of hidden surface removal as represented by this extended attribute.
Calling Context:
Call this function directly.
Parameters:
Return Value:
Returns true if hidden surface removal is turned on.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
THiddenSurfaceRemovalControl & operator =( const THiddenSurfaceRemovalControl & 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 out to.
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.