Class: THiddenSurfaceRemovalControl

Declaration: SceneBundle.h

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.

Member Function: THiddenSurfaceRemovalControl::THiddenSurfaceRemovalControl

  1. THiddenSurfaceRemovalControl ()
  2. THiddenSurfaceRemovalControl (bool useHiddenSurface)
  3. THiddenSurfaceRemovalControl (const THiddenSurfaceRemovalControl &)

Interface Category:

API.

Purpose:

  1. Default constructor. Sets the state of hidden surface removal to true as the default value.
  2. Constructor used to set the state of hidden surface removal to either true or false.
  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. You can 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: THiddenSurfaceRemovalControl::~

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.

Member Function: THiddenSurfaceRemovalControl::GetName

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.

Member Function: THiddenSurfaceRemovalControl::GetHiddenSurfaceControl

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.

Member Function: THiddenSurfaceRemovalControl::operator=

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.

Member Function: THiddenSurfaceRemovalControl::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: THiddenSurfaceRemovalControl::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.