![](../../Home/Icons/Home.gif)
![](../icons/UpCNM.gif)
![](../icons/CNMContext.gif)
![](../../Home/Icons/Search.gif)
Taxonomy Categories:
Member Functions:
Interface Category:
API.
Inherits From:
TNoiseProcedureMap
Inherited By:
None.
Purpose:
TMarbleProcedureMap is a concrete class, derived from TNoiseProcedureMap, that creates a texture with the appearance of marble. A TMarbleProcedureMap object alters the color but not the shading normal of a surface point. (It does not perturb the shading normal as a bump map would, because marble surfaces typically are smooth.) The procedure uses a TGrafNoise object (by default, an instance of TLatticeNoise) to generate a pseudo-random number for a given surface point. It then sends this number to a TShaderColorSpline object, which returns a new color based on the number and on the existing surface point's base color.
Instantiation:
Allocate on the heap or the stack.
Deriving Classes:
None.
Concurrency:
Not multithread safe.
Resource Use:
No special requirements.
- TMarbleProcedureMap ()
- TMarbleProcedureMap (const TMarbleProcedureMap & map)
- TMarbleProcedureMap (const TShaderColorSpline & spline)
Interface Category:
API.
Purpose:
- Default constructor. Sets the scale to 1.0. Sets the noise generator to a TLatticeNoise object. Sets the TShaderColorSpline object to a gray scale (RGB) color map.
- Copy constructor.
- Constructor to set the shader color spline object that returns the new marbled color based on the noise generator and the base color.
Calling Context:
- Called by the stream-in operators. You can also call this function directly.
- Called to copy an object.
- Call this function directly.
Parameters:
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
virtual ~ TMarbleProcedureMap ()
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 void SetGrafNoise (const TGrafNoise & noise)
Interface Category:
API.
Purpose:
Sets the noise object, which generate a certain type of pseudo- random number, to a copy of the specified TGrafNoise.
Calling Context:
Call this function directly.
Parameters:
- const TGrafNoise & noise -The noise generator to use.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
virtual void SetColorSpline (const TShaderColorSpline & spline)
Interface Category:
API.
Purpose:
Sets the color spline to a copy of the specified TShaderColorSpline.
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.
virtual void GetValue (TShadingSample & info, const TSceneState &) const
Interface Category:
API.
Purpose:
Returns, in the fBaseColor field of the TShadingSample argument, the new color that the procedure map computes for the given surface point.
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.
virtual void SetScale (double scale)
Interface Category:
API.
Purpose:
Sets the scalar used to multiply the x-, y-, and z-coordinates of a surface point before computing the new color. Larger scalars make the marbled pattern noisier.
Calling Context:
Call this function directly.
Parameters:
- double scale -The scale value to use.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: TMarbleProcedureMap::GetModifiedShadingVariables
virtual void GetModifiedShadingVariables (TShadingUsageVariables & variables) const
Interface Category:
API.
Purpose:
Returns, in its TShadingUsageVariables argument, an object indicating which TShadingSample fields the procedure map alters (namely, fBaseColor only). The shader needs this information to save and store variables in the TShadingSample that it operates on.
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.
TMarbleProcedureMap & operator =(const TMarbleProcedureMap & 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.