Class ImpInterface
See Also: Class ImpNode, Class Interval, Class_ID, Class GenLight, Class GenCamera.
class ImpInterface
Description:
Import Interface class. Methods of this class allow the plug-in to create nodes in the scene, create camera and light objects, and create objects by specifying a super class ID and Class ID. Methods are also available to bind target nodes to their Look At nodes. All methods of this class are implemented by the system.
Methods:
Prototype:
virtual ImpNode *CreateNode() = 0;
Remarks:
Creates a new node. Methods of ImpNode may be used to assign properties to the node. See AddNodeToScene() to add a node to the scene given its ImpNode pointer.
Return Value:
An ImpNode pointer that may be used to set properties of the node.
Prototype:
virtual void RedrawViews() = 0;
Remarks:
Redraws the 3ds max viewports.
Prototype:
virtual GenCamera *CreateCameraObject(int type) = 0;
Remarks:
Creates a camera object and returns a pointer to it. The GenCamera pointer may be used to set the properties of the camera object.
Parameters:
int type
One of the following values:
FREE_CAMERA
TARGETED_CAMERA
Prototype:
virtual Object *CreateTargetObject() = 0;
Remarks:
Creates a target object and returns a pointer to it.
Prototype:
virtual GenLight *CreateLightObject(int type) = 0;
Remarks:
Creates a light object and returns a pointer to it. The GenLight pointer may be used to set the properties of the light object.
Parameters:
int type
One of the following values:
OMNI_LIGHT - Omnidirectional
TSPOT_LIGHT - Targeted
DIR_LIGHT - Directional
FSPOT_LIGHT - Free
Prototype:
virtual void *Create(SClass_ID sclass, Class_ID classid)=0;
Remarks:
Creates an object given its Super Class ID and its Class ID.
Parameters:
SClass_ID sclass
The super class ID of the node to create.
Class_ID classid
The unique class ID of the node to create.
Return Value:
A pointer to the item.
Prototype:
virtual int BindToTarget(ImpNode *laNode, ImpNode *targNode)=0;
Remarks:
This method binds a node to a target using a Look At controller. This is typically used with target spotlights and cameras to bind them to their target node.
Parameters:
ImpNode *laNode
The node that will have the Look At controller assigned.
ImpNode *targNode
The target node.
Return Value:
Nonzero if successful; otherwise 0.
Prototype:
virtual void AddNodeToScene(ImpNode *node)=0;
Remarks:
Adds a node to the scene given its ImpNode pointer.
Parameters:
ImpNode *node
The node to add to the scene.
Prototype:
virtual void SetAnimRange(Interval& range)=0;
Remarks:
Sets the animation range for the node.
Parameters:
Interval& range
Specifies the animation range.
Prototype:
virtual Interval GetAnimRange()=0;
Remarks:
Retrieves the animation range for the node (as an Interval).
Prototype:
virtual void SetEnvironmentMap(Texmap *txm)=0;
Remarks:
Sets the current environment map to the specified map.
Parameters:
Texmap *txm
The map to set.
Prototype:
virtual void SetAmbient(TimeValue t, Point3 col)=0;
Remarks:
Sets the ambient light color at the specified time.
Parameters:
TimeValue t
The time to set the color.
Point3 col
The light color to set.
Prototype:
virtual void SetBackGround(TimeValue t,Point3 col)=0;
Remarks:
Sets the background color at the specified time.
Parameters:
TimeValue t
The time to set the color.
Point3 col
The light color to set.
Prototype:
virtual void SetUseMap(BOOL onoff)=0;
Remarks:
Sets the state of the environment 'Use Map' toggle.
Parameters:
BOOL onoff
TRUE to turn on; FALSE to turn off.
Prototype:
virtual void AddAtmosphere(Atmospheric *atmos)=0;
Remarks:
Adds the specified atmospheric effect to the environment.
Parameters:
Atmospheric *atmos
The atmospheric effect. See Class Atmospheric.
Prototype:
virtual int NewScene()=0;
Remarks:
This method deletes all existing geometry in the scene.