Public Member Functions | Protected Member Functions | Friends

EaseCurveList Class Reference

This reference page is linked to from the following overview topics: Controller API Elements.


Search for all occurrences

Detailed Description

See also:
Class ReferenceTarget, Class Control.

Description:
This class represents a list of ease curves.

The macro used to access this class is defined as follows:

#define GetEaseListInterface(anim) ((EaseCurveList*)anim->GetInterface(I_EASELIST))

This may be used to access the methods of this class as follows:

        EaseCurveList *el = GetEaseListInterface(client);
        if (el) {
            int num = el->NumEaseCurves();
            // ...
        }
All methods of this class are implemented by the system.

#include <control.h>

Inheritance diagram for EaseCurveList:
Inheritance graph
[legend]

List of all members.

Public Member Functions

  EaseCurveList ()
CoreExport  ~EaseCurveList ()
CoreExport TimeValue  ApplyEase (TimeValue t, Interval &valid)
CoreExport void  AppendEaseCurve (Control *cont)
CoreExport void  DeleteEaseCurve (int i)
CoreExport void  DisableEaseCurve (int i)
CoreExport void  EnableEaseCurve (int i)
CoreExport BOOL  IsEaseEnabled (int i)
int  NumEaseCurves ()
void  GetClassName (MSTR &s)
  Retrieves the name of the plugin class.
Class_ID  ClassID ()
  Retrieves a constant that uniquely identifies the plugin class.
SClass_ID  SuperClassID ()
  Retrieves a constant representing the type of the plugin.
CoreExport int  NumSubs ()
CoreExport Animatable SubAnim (int i)
CoreExport MSTR  SubAnimName (int i)
int  SubNumToRefNum (int subNum)
BOOL  BypassTreeView ()
CoreExport void  DeleteThis ()
  Deletes an instance of this class.
ParamDimension GetParamDimension (int i)
CoreExport BOOL  AssignController (Animatable *control, int subAnim)
CoreExport void *  GetInterface (ULONG id)
  Inherited from Animatable.
CoreExport IOResult  Save (ISave *isave)
  Called for saving data.
CoreExport IOResult  Load (ILoad *iload)
  Called for loading data.
CoreExport int  NumRefs ()
  Returns the total number of references this ReferenceMaker can hold.
CoreExport RefTargetHandle  GetReference (int i)
  Returns the 'i-th' reference.
CoreExport RefTargetHandle  Clone (RemapDir &remap)
  This method is used by 3ds Max to clone an object.
CoreExport RefResult  NotifyRefChanged (Interval changeInt, RefTargetHandle hTarget, PartID &partID, RefMessage message)
  Receives and responds to messages.

Protected Member Functions

virtual CoreExport void  SetReference (int i, RefTargetHandle rtarg)
  Stores a ReferenceTarget as its 'i-th' reference`.

Friends

class  AddEaseRestore
class  DeleteEaseRestore

Constructor & Destructor Documentation

EaseCurveList ( ) [inline]
Remarks:
Constructor.
{OpenTreeEntry(TRACKVIEW_ANIM, ALL_TRACK_VIEWS);}
CoreExport ~EaseCurveList ( )
Remarks:
Destructor. All the references are deleted from this class.

Member Function Documentation

CoreExport TimeValue ApplyEase ( TimeValue  t,
Interval valid 
)
Remarks:
Returns a TimeValue that reflects the TimeValue passed modified by each of the enabled ease curves in the list.
Parameters:
TimeValue t

The base time which is eased by the curves.

Interval &valid

The validity interval which is updated by each of the ease curves in the list.
CoreExport void AppendEaseCurve ( Control cont )
Remarks:
Adds the specified ease curve to the end of the ease curve list.
Parameters:
Control *cont

Points to the ease curve to append.
CoreExport void DeleteEaseCurve ( int  i )
Remarks:
Deletes the 'i-th' ease curve in the list.
Parameters:
int i

The index of the ease curve to delete.
CoreExport void DisableEaseCurve ( int  i )
Remarks:
Disables the 'i-th' ease curve in the list.
Parameters:
int i

The index of the ease curve to disable.
CoreExport void EnableEaseCurve ( int  i )
Remarks:
Enables the 'i-th' ease curve in the list.
Parameters:
int i

The index of the ease curve to enable.
CoreExport BOOL IsEaseEnabled ( int  i )
Remarks:
Returns TRUE if the 'i-th' ease curve is enabled; otherwise FALSE.
Parameters:
int i

The index of the ease curve to check.
int NumEaseCurves ( ) [inline]
Remarks:
Returns the number of ease curves in the list.
{return eases.Count();}
void GetClassName ( MSTR s ) [inline, virtual]

Retrieves the name of the plugin class.

This name is usually used internally for debugging purposes. For Material plug-ins this method is used to put up the material "type" name in the Material Editor.

Parameters:
s Reference to a string filled in with the name of the plugin class

Reimplemented from ReferenceTarget.

{ s= MSTR(_M("EaseCurve")); }  
Class_ID ClassID ( ) [inline, virtual]

Retrieves a constant that uniquely identifies the plugin class.

This method must return the unique ID for the plugin class. If two ClassIDs conflict, the system will only load the first conflicting one it finds. A program (gencid.exe) is provided to generate unique class id values.

Returns:
A class id that uniquely identifies a plugin class
See also:
Class ClassID, List of Class IDs.

Reimplemented from Animatable.

{ return Class_ID(EASE_LIST_CLASS_ID,0); }
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 EASE_LIST_CLASS_ID; }     
CoreExport int NumSubs ( ) [virtual]
Remarks:
The system uses a virtual array mechanism to access the sub-anims of a plug-in. This method returns the total number of sub-anims maintained by the plug-in. If a plug-in is using a parameter block to manage its parameters it should just return 1 for all the parameters directed by the parameter block.
Returns:
The number of sub-anims used by the plug-in.
Default Implementation:
{ return 0; }

Reimplemented from Animatable.

CoreExport Animatable* SubAnim ( int  i ) [virtual]
Remarks:
This method returns a pointer to the 'i-th' sub-anim. If a plug-in is using a parameter block to manage all its parameters it should just return a pointer to the parameter block itself from this method. This method may return NULL so developers need to check the return value before calling other sub anim methods (such as SubAnimName()).
Parameters:
i This is the index of the sub-anim to return.
Default Implementation:
{ return NULL };

Reimplemented from Animatable.

CoreExport MSTR SubAnimName ( int  i ) [virtual]
Remarks:
This method returns the name of the 'i-th' sub-anim to appear in track view. The system has no idea what name to assign to the sub-anim (it only knows it by the virtual array index), so this method is called to retrieve the name to display. Developer need to make sure the 'i-th' SubAnim() is non-NULL or this method will fail.
Parameters:
i The index of the parameter name to return
Returns:
The name of the 'i-th' parameter.

Reimplemented from Animatable.

int SubNumToRefNum ( int  subNum ) [inline, virtual]
Remarks:
This method is used for copying and pasting in the track view. It converts an anim index to a reference index or returns -1 if there is no correspondence. If a client does not wish an anim to be copied or pasted then it can return -1 even if there is a corresponding reference num.
Parameters:
subNum The anim index to return the corresponding reference index of.
Default Implementation:
{ return -1}
Returns:
The reference index corresponding to the anim index passed. Return -1 if there is no correspondence.

Reimplemented from Animatable.

{return subNum;}
BOOL BypassTreeView ( ) [inline, virtual]
Remarks:
This method indicates to the system that this anim should not appear in the Track View. Note: Track View was formally referred to as Tree View. This is what parameter blocks do for example. They don't show up in track view, just their sub-anims do. This prevents the extra level of the parameter block from appearing.
Returns:
Return TRUE to not appear in the Track View. Note that if you return TRUE your children will appear in the track view regardless.
Default Implementation:
{ return FALSE; }

Reimplemented from Animatable.

{ return TRUE; }
CoreExport void DeleteThis ( ) [virtual]

Deletes an instance of this class.

3ds Max calls this method when it needs to delete a plugin object (an instance of a class derived from Animatable). Similarly, plugins that need to delete instances of an Animatable or a class directly derived from it via an Animatable pointer, should call this method instead of calling directly operator delete. Following these rules will ensure that the same memory manager is used to allocate and deallocate the object. The default implementation of this method deletes the object. Plugin instances that never need to be deleted from the heap can overwrite this method to do nothing.

Note:
See the method ClassDesc::Create() for details on how Max allocates plugin objects.
See ReferenceMaker::DeleteMe() and ReferenceTarget::MaybeAutoDelete() for information on how plugin instances are deleted by the system.
Remarks:
See Memory Allocation.

See also:
Plugin DLL Functions, Class ClassDesc.

Reimplemented from Animatable.

ParamDimension* GetParamDimension ( int  i ) [inline, virtual]
Remarks:
Returns the type of dimension of the 'i-th' sub-anim. A dimension describes the type and order of magnitude of a sub-anim.
Parameters:
i Specifies the sub-anim (parameter) to return the dimension of.
Returns:
The dimension of the 'i-th' sub-anim (parameter).
Default Implementation:
{return defaultDim;}

Reimplemented from Animatable.

{return stdTimeDim;}
CoreExport BOOL AssignController ( Animatable control,
int  subAnim 
) [virtual]
Remarks:
This method is called to assign the controller to the sub-anim whose index is passed.
Parameters:
control The controller to assign.
subAnim The index of the sub-anim to assign the controller to.
Default Implementation:
{ return FALSE; }
Returns:
Returns TRUE if the controller was assigned; otherwise FALSE.

Reimplemented from Animatable.

CoreExport void* GetInterface ( ULONG  id ) [virtual]

Inherited from Animatable.

Returns a pointer to the interface.

Parameters:
id - The id of the interface.
Returns:
A Pointer to the Interface

Reimplemented from ReferenceTarget.

CoreExport IOResult Save ( ISave isave ) [virtual]

Called for saving data.

Called by the system to allow the plugin to save its data.

Parameters:
isave - This pointer may be used to call methods to write data to disk. See the section on Loading and Saving for an overview of the load/save process.
Returns:
The default implementation is return IO_OK.
  • IO_OK means the result was acceptable, with no errors.
  • IO_ERROR This should be returned if an error occurred.

Reimplemented from ReferenceMaker.

CoreExport IOResult Load ( ILoad iload ) [virtual]

Called for loading data.

Called by the system to allow the plug-in to load its data. See the section on Loading and Saving for an overview of the load - save process.

Parameters:
iload - This interface pointer may be used to call methods to read data from disk.
Returns:
The default implementation is return IO_OK.
  • IO_OK means the result was acceptable, with no errors.
  • IO_ERROR This should be returned if an error occurred.

Reimplemented from ReferenceMaker.

CoreExport int NumRefs ( ) [virtual]

Returns the total number of references this ReferenceMaker can hold.

The plugin implements this method to indicate the total number of of references it can make. This includes all references whether they are NULL (inactive) or non-NULL (active) at the time when this method is called. A plugin can hold a variable number of references, thus the return value of this method is not to be cached and reused by client code.

Returns:
The total number of references this plugin can hold. The default implementation is return 0.

Reimplemented from ReferenceMaker.

CoreExport RefTargetHandle GetReference ( int  i ) [virtual]

Returns the 'i-th' reference.

The plugin implements this method to return its 'i-th' reference. The plug-in simply keeps track of its references using an integer index for each one. This method is normally called by the system.

Parameters:
i - The index of the reference to retrieve. Valid values are from 0 to NumRefs()-1.
Returns:
The reference handle of the 'i-th' reference. Note that different calls to this method with the same 'i' value can result in different reference handles being retrieved, as the plugin changes the scene objects it references as its 'i-th' reference.

Reimplemented from ReferenceMaker.

virtual CoreExport void SetReference ( int  i,
RefTargetHandle  rtarg 
) [protected, virtual]

Stores a ReferenceTarget as its 'i-th' reference`.

The plugin implements this method to store the reference handle passed to it as its 'i-th' reference. In its implementation of this method, the plugin should simply assign the reference handle passed in as a parameter to the member variable that holds the 'i-th' reference. Other reference handling methods such as ReferenceMaker::DeleteReference(), or ReferenceMaker::ReplaceReference() should not be called from within this method. The plugin itself or other plugins should not call this method directly. The system will call this method when a new reference is created or an existing one is replaced by calling ReferenceMaker::ReplaceReference().

Parameters:
i - The index of the reference to store. Valid values are from 0 to NumRefs()-1.
rtarg - The reference handle to store.

Reimplemented from ReferenceMaker.

CoreExport RefTargetHandle Clone ( RemapDir remap ) [virtual]

This method is used by 3ds Max to clone an object.

See also:
CloneRefHierarchy(), class RemapDir This method is called by 3ds Max to have the plugin clone itself. The plug-in's implementation of this method should copy both the data structure and all the data residing in the data structure of this reference target. The plugin should clone all its references as well. Also, the plug-in's implementation of this method must call BaseClone(). In order for classes derived from this class to clone cleanly, the Clone method should just create the new instance, and then call an implementation of BaseClone that clones the references and copies any other necessary data. For example:
            class MyDerivedPlugin
                : public MyBasePlugin
            {
                const int MY_REFERENCE = 1;

                ReferenceTarget* Clone(RemapDir& remap)
                {
                    ReferenceTarget* result = new MyDerivedPlugin();
                    BaseClone(this, result, remap);
                    return result;
                }

                void BaseClone(ReferenceTarget* from, ReferenceTarget* to, RemapDir& remap)
                {
                    if (!to || !from || from == to)
                        return;    
                    MyBasePlugin::BaseClone(from, to, remap);
                    to->ReplaceReference(MY_REFERENCE, remap->CloneRef(from->GetReference(MY_REFERENCE)));
                }
            };

This method should not be directly called by plug-ins. Instead, either RemapDir::CloneRef() or CloneRefHierachy() should be used to perform cloning. These methods ensure that the mapping from the original object to the clone is added to the RemapDir used for cloning, which may be used during backpatch operations

Note:
See the remarks in method BaseClone() below.
Parameters:
remap - A RemapDir instance used for remapping references during a Clone.
Returns:
A pointer to the cloned item.

Reimplemented from ReferenceTarget.

CoreExport RefResult NotifyRefChanged ( Interval  changeInt,
RefTargetHandle  hTarget,
PartID partID,
RefMessage  message 
) [virtual]

Receives and responds to messages.

A plugin which makes references must implement a method to receive and respond to messages broadcast by its dependents. This is done by implementing NotifyRefChanged(). The plugin developer usually implements this method as a switch statement where each case is one of the messages the plugin needs to respond to. The Method StdNotifyRefChanged calls this, which can change the partID to new value. If it doesn't depend on the particular message& partID, it should return REF_DONTCARE.

  • For developer that need to update a dialog box with data about an object you reference note the following related to this method: This method may be called many times. For instance, say you have a dialog box that displays data about an object you reference. This method will get called many time during the drag operations on that object. If you updated the display every time you'd wind up with a lot of 'flicker' in the dialog box. Rather than updating the dialog box each time, you should just invalidate the window in response to the NotifyRefChanged() call. Then, as the user drags the mouse your window will still receive paint messages. If the scene is complex the user may have to pause (but not let up on the mouse) to allow the paint message to go through since they have a low priority. This is the way many windows in 3ds Max work.
Parameters:
changeInt - This is the interval of time over which the message is active. Currently, all plug-ins will receive FOREVER for this interval.
hTarget - This is the handle of the reference target the message was sent by. The reference maker uses this handle to know specifically which reference target sent the message.
partID - This contains information specific to the message passed in. Some messages don't use the partID at all. See the section List of Reference Messages for more information about the meaning of the partID for some common messages.
message - The message parameters passed into this method is the specific message which needs to be handled.
Returns:
The return value from this method is of type RefResult. This is usually REF_SUCCEED indicating the message was processed. Sometimes, the return value may be REF_STOP. This return value is used to stop the message from being propagated to the dependents of the item.

Implements ReferenceMaker.


Friends And Related Function Documentation

friend class AddEaseRestore [friend]
friend class DeleteEaseRestore [friend]

EaseCurveList EaseCurveList EaseCurveList EaseCurveList EaseCurveList EaseCurveList EaseCurveList EaseCurveList EaseCurveList EaseCurveList
EaseCurveList EaseCurveList EaseCurveList EaseCurveList EaseCurveList EaseCurveList EaseCurveList EaseCurveList EaseCurveList EaseCurveList