Taxonomy Categories:
Member Functions:
Interface Category:
API.
Inherits From:
TShaderColorSpline
Inherited By:
None.
Purpose:
TRGBShaderColorSpline is a concrete class, derived from TShaderColorSpline, that provides a color value in RGB space for any input parameter from 0.0 to 1.0. The TMarbleProcedureMap class uses TRGBShaderColorSpline to determine the colors of a marbled surface, but TRGBShaderColorSpline can be used in many other ways.
You specify three TGCurves as constructor arguments--one curve for determining the red component, one for green, and one for blue. Each curve represents a mathematical function. In other words, the x-coordinate of successive control points is increasing. The y-coordinates lie between 0.0 and 1.0, inclusive.
Instantiation:
Allocate on the heap or the stack.
Deriving Classes:
None.
Concurrency:
Not multithread safe.
Resource Use:
No special requirements.
virtual ~ TRGBShaderColorSpline ()
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.
- TRGBShaderColorSpline ()
- TRGBShaderColorSpline (const TGCurve & rCurve, const TGCurve & gCurve, const TGCurve & bCurve)
- TRGBShaderColorSpline (const TRGBShaderColorSpline &)
Interface Category:
API.
Purpose:
- Default constructor. Sets the red, green, and blue parameter curves to a linear curve between 0.0 and 1.0.
- Constructor used to set the individual curves (represented internally as three point splines) for computing the red, green, and blue color components.
- 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 TGCurve & rCurve -The curve to use to compute the red color component.
- const TGCurve & gCurve -The curve to use to compute the green color component.
- const TGCurve & bCurve -The curve to use to compute the blue color component.
- const TRGBShaderColorSpline & -The object to be copied.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
virtual void GetColor (GParametric val, TColor & retVal) const
Interface Category:
API.
Purpose:
Computes the new color based on the parametric input value (between 0 and 1) and the curve equations for the red, green, and blue color components. The resulting color is returned as a TColor object.
Calling Context:
Call this function directly.
Parameters:
- GParametric val -The parametric value (0 to 1) used to compute the new color components.
- TColor & retVal -The resulting color value.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
TRGBShaderColorSpline & operator =(const TRGBShaderColorSpline & 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.
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.