Public Member Functions

TextureOutput Class Reference

This reference page is linked to from the following overview topics: Function and Macros for Use with Materials.


Search for all occurrences

Detailed Description

See also:
Class MtlBase, Class AColor, Class Point3.

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));
}

#include <imtl.h>

Inheritance diagram for TextureOutput:
Inheritance graph
[legend]

List of all members.

Public Member Functions

virtual AColor  Filter (AColor c)=0
virtual float  Filter (float f)=0
virtual Point3  Filter (Point3 p)=0
virtual float  GetOutputLevel (TimeValue t)=0
virtual void  SetOutputLevel (TimeValue t, float v)=0
virtual void  SetInvert (BOOL onoff)=0
virtual BOOL  GetInvert ()=0
virtual void  SetRollupOpen (BOOL open)=0
virtual BOOL  GetRollupOpen ()=0
SClass_ID  SuperClassID ()
  Retrieves a constant representing the type of the plugin.
CoreExport SvGraphNodeReference  SvTraverseAnimGraph (IGraphObjectManager *gom, Animatable *owner, int id, DWORD flags)
CoreExport MSTR  SvGetName (IGraphObjectManager *gom, IGraphNode *gNode, bool isBeingEdited)

Member Function Documentation

virtual AColor Filter ( AColor  c ) [pure virtual]
Remarks:
Filters the specified AColor and returns it.
Parameters:
AColor c

The color to filter.
Returns:
The filtered color as an AColor.
virtual float Filter ( float  f ) [pure virtual]
Remarks:
Filters the specified float value and returns it.
Parameters:
float f

The value to filter.
Returns:
The filtered value.
virtual Point3 Filter ( Point3  p ) [pure virtual]
Remarks:
Filters the specified Point3 value and returns it.
Parameters:
Point3 p

The Point3 to filter.
Returns:
The filtered Point3.
virtual float GetOutputLevel ( TimeValue  t ) [pure virtual]
Remarks:
Returns the output level (amount) at the specified time.
Parameters:
TimeValue t

The time at which to retrieve the output level.

Implemented in StdTexoutGen.

virtual void SetOutputLevel ( TimeValue  t,
float  v 
) [pure virtual]
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.

Implemented in StdTexoutGen.

virtual void SetInvert ( BOOL  onoff ) [pure virtual]
Remarks:
Sets the state of the 'Invert' toggle in the Output rollup.
Parameters:
BOOL onoff

TRUE to turn on; FALSE to turn off.

Implemented in StdTexoutGen.

virtual BOOL GetInvert ( ) [pure virtual]
Remarks:
Returns the state of the 'Invert' toggle in the Output rollup.
Returns:
TRUE is on; FALSE is off.

Implemented in StdTexoutGen.

virtual void SetRollupOpen ( BOOL  open ) [pure virtual]
Remarks:
Sets the 'Output' rollup page to open or closed.
Parameters:
BOOL open

TRUE to open the rollup; FALSE to close it.
virtual BOOL GetRollupOpen ( ) [pure virtual]
Remarks:
Returns the open or closed state of the 'Output' rollup.
Returns:
TRUE for open; FALSE for closed.
SClass_ID SuperClassID ( ) [inline, virtual]

Retrieves a constant representing the type of the plugin.

Returns:
A super class id that uniquely identifies the type (category) of the plugin. Note that several plugin classes can be of the same type, thus return the same super class id. Plugins are uniquely identified by their class ids. List of Super Class IDs.
See also:
SClass_ID

Reimplemented from ReferenceTarget.

{ return TEXOUTPUT_CLASS_ID; }
CoreExport SvGraphNodeReference SvTraverseAnimGraph ( IGraphObjectManager gom,
Animatable owner,
int  id,
DWORD  flags 
) [virtual]
Remarks:
This method is available in release 3.0 and later only.

This method traverses the graph of objects in the 3ds Max scene, adding desired objects to the schematic view. Developers can specialize this behaviour by overriding this method and adding whatever objects are interesting to the schematic view. Objects are added to the schematic view by calling IGraphObjectManager::AddAnimatable(...). Reference lines are added to the schematic view by calling IGraphObjectManager::AddReference(...). Implementers of this method should call it recursively to process other objects in the scene.

See Class IGraphObjectManager.
Parameters:
gom Points to the schematic view window manager.
owner The owning animatable.
id This is usually the sub-anim number (but can actually be any value the developer chooses).
flags See List of Schematic %View AddAnimatable Flags.
Returns:
A SvGraphNodeReference object.

Reimplemented from MtlBase.

CoreExport MSTR SvGetName ( IGraphObjectManager gom,
IGraphNode gNode,
bool  isBeingEdited 
) [inline, virtual]
Remarks:
Returns the name of the object as it appears in the schematic view.
Parameters:
gom Points to the schematic view window manager.
gNode Points to this node in the schematic view.
isBeingEdited TRUE if the item is being edited; FALSE if not.
Default Implementation:
        {
            Animatable *owner;
            int subNum;
            MSTR name;
            owner = gNode->GetOwner();
            subNum = gNode->GetID();
            name = owner->SubAnimName(subNum);
            return name;
        }

Reimplemented from MtlBase.

            {
                return Animatable::SvGetName(gom, gNode, isBeingEdited);
            }

TextureOutput TextureOutput TextureOutput TextureOutput TextureOutput TextureOutput TextureOutput TextureOutput TextureOutput TextureOutput
TextureOutput TextureOutput TextureOutput TextureOutput TextureOutput TextureOutput TextureOutput TextureOutput TextureOutput TextureOutput