Class: TRGBShaderColorSpline

Declaration: ShaderColorSpline.h

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.

Member Function: TRGBShaderColorSpline::~TRGBShaderColorSpline

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.

Member Function: TRGBShaderColorSpline::TRGBShaderColorSpline

  1. TRGBShaderColorSpline ()
  2. TRGBShaderColorSpline (const TGCurve & rCurve, const TGCurve & gCurve, const TGCurve & bCurve)
  3. TRGBShaderColorSpline (const TRGBShaderColorSpline &)

Interface Category:

API.

Purpose:

  1. Default constructor. Sets the red, green, and blue parameter curves to a linear curve between 0.0 and 1.0.
  2. Constructor used to set the individual curves (represented internally as three point splines) for computing the red, green, and blue color components.
  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.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TRGBShaderColorSpline::GetColor

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:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TRGBShaderColorSpline::operator=

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.

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