Class TextureOutput
See Also: Class MtlBase, Class AColor, Class Point3.
class TextureOutput : public MtlBase
Description:
This class is used by texture maps to put up the 'Output' rollup in the materials editor, and perform the output filtering. Currently this provides control over the Output Amount, RGB Level, and RGB Offset. In the future this may be enhanced to include other things that are often desirable on the output stage. These are things like tinting, color shifting, etc. All methods of this class are implemented by the system.
A plug-in will typically call these methods from the implementations of EvalColor(), EvalMono(), etc. This is just done as a final adjustment to scale or offset the value. The code below is from the Gradient texture map.
AColor Gradient::EvalColor(ShadeContext& sc) {
return texout->Filter(uvGen->EvalUVMap(sc,&mysamp));
}
float Gradient::EvalMono(ShadeContext& sc) {
return texout->Filter(uvGen->EvalUVMapMono(sc,&mysamp));
}
Methods:
Prototype:
virtual AColor Filter(AColor c) = 0;
Remarks:
Filters the specified AColor and returns it.
Parameters:
AColor c
The color to filter.
Return Value:
The filtered color as an AColor.
Prototype:
virtual float Filter(float f) = 0;
Remarks:
Filters the specified float value and returns it.
Parameters:
float f
The value to filter.
Return Value:
The filtered value.
Prototype:
virtual Point3 Filter(Point3 p) = 0;
Remarks:
Filters the specified Point3 value and returns it.
Parameters:
Point3 p
The Point3 to filter.
Return Value:
The filtered Point3.
Prototype:
virtual float GetOutputLevel(TimeValue t) = 0;
Remarks:
Returns the output level (amount) at the specified time.
Parameters:
TimeValue t
The time at which to retrieve the output level.
Prototype:
virtual void SetOutputLevel(TimeValue t, float v) = 0;
Remarks:
Sets the output level at the specified time.
Parameters:
TimeValue t
The time to set the output level.
float v
The value of the output level.
Prototype:
virtual void SetInvert(BOOL onoff)=0;
Remarks:
Sets the state of the 'Invert' toggle in the Output rollup.
Parameters:
BOOL onoff
TRUE to turn on; FALSE to turn off.
Prototype:
virtual BOOL GetInvert()=0;
Remarks:
Returns the state of the 'Invert' toggle in the Output rollup.
Return Value:
TRUE is on; FALSE is off.
Prototype:
virtual void SetRollupOpen(BOOL open)=0;
Remarks:
This method is available in release 2.0 and later only.
Sets the 'Output' rollup page to open or closed.
Parameters:
BOOL open
TRUE to open the rollup; FALSE to close it.
Prototype:
virtual BOOL GetRollupOpen()=0;
Remarks:
This method is available in release 2.0 and later only.
Returns the open or closed state of the 'Output' rollup.
Return Value:
TRUE for open; FALSE for closed.