![](../../Home/Icons/Home.gif)
![](../icons/UpCNM.gif)
![](../icons/CNMContext.gif)
![](../../Home/Icons/Search.gif)
Taxonomy Categories:
Member Functions:
Interface Category:
API.
Inherits From:
MCollectible
Inherited By:
None.
Purpose:
TLightSurrogate is a concrete class intended for use by TSceneBundle in managing its list of light sources. When TSceneBundle::AdoptLight is invoked, it adopts the specified TLight and returns a TLightSurrogate object. You provide this object as an argument in subsequent requests to the TSceneBundle to orphan a light or replace one light with another. For example:
TLight *light1, *light2, *light3;
TLightSurrogate surrogate1, surrogate2;
...
surrogate1 =bundle->adopt(light1);
surrogate2 =bundle->adopt(light2);
...
light3 =bundle->orphan(surrogate1);
The surrogate can be thought of as a key for retrieving a TLight value from the bundle's list of TLights. The key is a TLightSurrogate object, rather than a name.
Instantiation:
Allocate on the heap or the stack.
Deriving Classes:
None.
Concurrency:
Not multithread safe.
Resource Use:
No special requirements.
- TLightSurrogate ()
- TLightSurrogate (const TGlobalID &)
- TLightSurrogate (const TLightSurrogate &)
Interface Category:
API.
Purpose:
- Default constructor.
- Constructor that creates a surrogate from the given global ID number.
- 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:
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
virtual ~ TLightSurrogate ()
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.
TLightSurrogate & operator =(const TLightSurrogate &)
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 bool operator ==(const TLightSurrogate & source) const
Interface Category:
API.
Purpose:
Compares two TLightSurrogate objects and returns true if they are equal (if they both have the same global ID value).
Calling Context:
Call this function directly.
Parameters:
Return Value:
Returns true if both objects are equal.
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.
virtual TGlobalID GetID () const
Interface Category:
API.
Purpose:
Gets the global ID value of this light.
Calling Context:
Call this function directly.
Parameters:
Return Value:
The global ID value for this TLightSurrogate.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
virtual void SetID (TGlobalID)
Interface Category:
API.
Purpose:
Sets the global ID value of this TLightSurrogate object.
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.
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.