3ds Max C++ API Reference
IJiggle Class Referenceabstract

#include <ispringctrl.h>

+ Inheritance diagram for IJiggle:

Public Types

enum  {
  get_mass , set_mass , get_drag , set_drag ,
  get_tension , set_tension , get_dampening , set_dampening ,
  add_spring , get_spring_count , remove_spring_by_index , remove_spring ,
  get_spring_system
}
 
- Public Types inherited from BaseInterface
enum  LifetimeType { noRelease , immediateRelease , wantsRelease , serverControlled }
 

Public Member Functions

 FN_0 (get_mass, TYPE_FLOAT, GetMass)
 
 VFN_1 (set_mass, SetMass, TYPE_FLOAT)
 
 FN_0 (get_drag, TYPE_FLOAT, GetDrag)
 
 VFN_1 (set_drag, SetDrag, TYPE_FLOAT)
 
 FN_1 (get_tension, TYPE_FLOAT, GetTension, TYPE_INDEX)
 
 VFN_2 (set_tension, SetTension, TYPE_INDEX, TYPE_FLOAT)
 
 FN_1 (get_dampening, TYPE_FLOAT, GetDampening, TYPE_INDEX)
 
 VFN_2 (set_dampening, SetDampening, TYPE_INDEX, TYPE_FLOAT)
 
 FN_1 (add_spring, TYPE_BOOL, AddSpring, TYPE_INODE)
 
 FN_0 (get_spring_count, TYPE_INT, GetSpringCount)
 
 VFN_1 (remove_spring_by_index, RemoveSpring, TYPE_INDEX)
 
 VFN_1 (remove_spring, RemoveSpring, TYPE_INODE)
 
FPInterfaceDescGetDesc ()
 
virtual SpringSysGetSpringSystem ()=0
 
virtual float GetMass ()=0
 
virtual void SetMass (float mass, bool update=true)=0
 
virtual float GetDrag ()=0
 
virtual void SetDrag (float drag, bool update=true)=0
 
virtual float GetTension (int index)=0
 
virtual void SetTension (int index, float tension, int absolute=1, bool update=true)=0
 
virtual float GetDampening (int index)=0
 
virtual void SetDampening (int index, float dampening, int absolute=1, bool update=true)=0
 
virtual BOOL AddSpring (INode *node)=0
 
virtual INT GetSpringCount ()=0
 
virtual void RemoveSpring (int which)=0
 
virtual void RemoveSpring (INode *node)=0
 
- Public Member Functions inherited from FPMixinInterface
 FPMixinInterface ()
 
virtual LifetimeType LifetimeControl ()
 
virtual CoreExport bool RegisterNotifyCallback (InterfaceNotifyCallback *incb)
 
virtual void UnRegisterNotifyCallback (InterfaceNotifyCallback *incb)
 
CoreExport ~FPMixinInterface ()
 
virtual BaseInterfaceGetInterface (Interface_ID id)
 
virtual FPInterfaceDescGetDescByID (Interface_ID id)
 
virtual Interface_ID GetID ()
 
- Public Member Functions inherited from FPInterface
virtual CoreExport FPStatus Invoke (FunctionID fid, TimeValue t=0, FPParams *params=NULL)
 
virtual FPStatus Invoke (FunctionID fid, FPParams *params)
 
virtual CoreExport FPStatus Invoke (FunctionID fid, TimeValue t, FPValue &result, FPParams *params=NULL)
 
virtual FPStatus Invoke (FunctionID fid, FPValue &result, FPParams *params=NULL)
 
virtual CoreExport FunctionID FindFn (const MCHAR *name)
 
virtual CoreExport BOOL IsEnabled (FunctionID actionID)
 
virtual CoreExport BOOL IsChecked (FunctionID actionID)
 
virtual CoreExport BOOL IsVisible (FunctionID actionID)
 
virtual CoreExport FunctionID GetIsEnabled (FunctionID actionID)
 
virtual CoreExport FunctionID GetIsChecked (FunctionID actionID)
 
virtual CoreExport FunctionID GetIsVisible (FunctionID actionID)
 
virtual ActionTableGetActionTable ()
 
virtual void EnableActions (BOOL onOff)
 
- Public Member Functions inherited from BaseInterface
virtual UtilExport ~BaseInterface ()
 Destructor. More...
 
virtual BaseInterfaceAcquireInterface ()
 
virtual void ReleaseInterface ()
 
virtual void DeleteInterface ()
 
virtual BaseInterfaceCloneInterface (void *remapDir=nullptr)
 
- Public Member Functions inherited from InterfaceServer
virtual UtilExport ~InterfaceServer ()
 Destructor. More...
 
template<class InterfaceType >
InterfaceType * GetTypedInterface ()
 

Public Attributes

SpringSyspartsys
 

Additional Inherited Members

- Static Public Member Functions inherited from MaxHeapOperators
static UtilExport voidoperator new (size_t size)
 Standard new operator used to allocate objects If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, const std::nothrow_t &e)
 Standard new operator used to allocate objects if there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new (size_t size, const char *filename, int line)
 New operator used to allocate objects that takes the filename and line number where the new was called If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, int block_type, const char *filename, int line)
 New operator used to allocate objects that takes the type of memory, filename and line number where the new was called If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, const std::nothrow_t &e, const char *filename, int line)
 New operator used to allocate objects that takes the filename and line number where the new was called If there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new (size_t size, unsigned long flags)
 New operator used to allocate objects that takes extra flags to specify special operations If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, const std::nothrow_t &e, unsigned long flags)
 New operator used to allocate objects that takes extra flags to specify special operations If there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new[] (size_t size)
 New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new[] (size_t size, const std::nothrow_t &e)
 New operator used to allocate arrays of objects If there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new[] (size_t size, const char *filename, int line)
 New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new[] (size_t size, int block_type, const char *filename, int line)
 New operator used to allocate arrays of objects. More...
 
static UtilExport voidoperator new[] (size_t size, const std::nothrow_t &e, const char *filename, int line)
 New operator used to allocate arrays of objects If there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new[] (size_t size, unsigned long flags)
 New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new[] (size_t size, const std::nothrow_t &e, unsigned long flags)
 New operator used to allocate arrays of objects If there is insufficient memory, NULL will be returned. More...
 
static UtilExport void operator delete (void *ptr)
 Standard delete operator used to deallocate an object If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete (void *ptr, const std::nothrow_t &e)
 Standard delete operator used to deallocate an object If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete (void *ptr, const char *filename, int line)
 Delete operator used to deallocate an object that takes the filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete (void *ptr, int block_type, const char *filename, int line)
 Delete operator used to deallocate an object that takes the type of memory, filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete (void *ptr, const std::nothrow_t &e, const char *filename, int line)
 Delete operator used to deallocate an object that takes the filename and line number where the delete was called If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete (void *ptr, unsigned long flags)
 Delete operator used to deallocate an object that takes extra flags to specify special operations If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete (void *ptr, const std::nothrow_t &e, unsigned long flags)
 Delete operator used to deallocate an object that takes extra flags to specify special operations If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete[] (void *ptr)
 Standard delete operator used to deallocate an array of objects If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete[] (void *ptr, const std::nothrow_t &e)
 Standard delete operator used to deallocate an array of objects If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete[] (void *ptr, const char *filename, int line)
 Delete operator used to deallocate an array of objects that takes the filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete[] (void *ptr, int block_type, const char *filename, int line)
 Delete operator used to deallocate an array of objects that takes the type of memory, filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete[] (void *ptr, const std::nothrow_t &e, const char *filename, int line)
 Delete operator used to deallocate an array of objects that takes the filename and line number where the delete was called If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete[] (void *ptr, unsigned long flags)
 Delete operator used to deallocate an array of objects that takes extra flags to specify special operations If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete[] (void *ptr, const std::nothrow_t &e, unsigned long flags)
 Delete operator used to deallocate an array of objects that takes extra flags to specify special operations If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, void *placement_ptr)
 Placement new operator. More...
 
static UtilExport void operator delete (void *ptr, void *placement_ptr)
 Placement delete operator. More...
 
static UtilExport voidaligned_malloc (size_t size, size_t alignment)
 Allocates memory on a specified alignment boundary. More...
 
static UtilExport voidaligned_realloc (void *ptr, size_t size, size_t alignment)
 Reallocates memory on a specified alignment boundary. More...
 
static UtilExport void aligned_free (void *ptr)
 Frees a block of memory that was allocated with aligned_malloc/aligned_realloc. More...
 
- Static Public Attributes inherited from FPInterface
static CoreExport FPInterfaceDesc nullInterface
 
- Protected Member Functions inherited from FPMixinInterface
 FPMixinInterface (const FPMixinInterface &rhs)
 
FPMixinInterfaceoperator= (const FPMixinInterface &rhs)
 
- Protected Member Functions inherited from FPInterface
virtual FPStatus _dispatch_fn (FunctionID fid, TimeValue t, FPValue &result, FPParams *p)
 
- Protected Attributes inherited from FPMixinInterface
Tab< InterfaceNotifyCallback * > * interfaceNotifyCBs
 

Detailed Description

See also
Class FPMixinInterface, Class SpringSys , Class INode

Description:
This class represents the interface to the Spring Controller and comes in two different flavors, the JIGGLE_POS_CLASS_ID for the position spring controller and JIGGLE_P3_CLASS_ID for the Point3 spring controller.

All methods of this class are Implemented by the System.

Data Members:
SpringSys* partsys;

A pointer to the spring system class.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
get_mass 
set_mass 
get_drag 
set_drag 
get_tension 
set_tension 
get_dampening 
set_dampening 
add_spring 
get_spring_count 
remove_spring_by_index 
remove_spring 
get_spring_system 
@ add_spring
Definition: ispringctrl.h:54
@ get_dampening
Definition: ispringctrl.h:53
@ remove_spring
Definition: ispringctrl.h:54
@ set_mass
Definition: ispringctrl.h:53
@ get_spring_system
Definition: ispringctrl.h:54
@ get_tension
Definition: ispringctrl.h:53
@ get_drag
Definition: ispringctrl.h:53
@ get_spring_count
Definition: ispringctrl.h:54
@ set_tension
Definition: ispringctrl.h:53
@ set_dampening
Definition: ispringctrl.h:53
@ remove_spring_by_index
Definition: ispringctrl.h:54
@ set_drag
Definition: ispringctrl.h:53
@ get_mass
Definition: ispringctrl.h:53

Member Function Documentation

◆ FN_0() [1/3]

FN_0 ( get_mass  ,
TYPE_FLOAT  ,
GetMass   
)

◆ VFN_1() [1/4]

VFN_1 ( set_mass  ,
SetMass  ,
TYPE_FLOAT   
)

◆ FN_0() [2/3]

FN_0 ( get_drag  ,
TYPE_FLOAT  ,
GetDrag   
)

◆ VFN_1() [2/4]

VFN_1 ( set_drag  ,
SetDrag  ,
TYPE_FLOAT   
)

◆ FN_1() [1/3]

FN_1 ( get_tension  ,
TYPE_FLOAT  ,
GetTension  ,
TYPE_INDEX   
)

◆ VFN_2() [1/2]

VFN_2 ( set_tension  ,
SetTension  ,
TYPE_INDEX  ,
TYPE_FLOAT   
)

◆ FN_1() [2/3]

FN_1 ( get_dampening  ,
TYPE_FLOAT  ,
GetDampening  ,
TYPE_INDEX   
)

◆ VFN_2() [2/2]

VFN_2 ( set_dampening  ,
SetDampening  ,
TYPE_INDEX  ,
TYPE_FLOAT   
)

◆ FN_1() [3/3]

FN_1 ( add_spring  ,
TYPE_BOOL  ,
AddSpring  ,
TYPE_INODE   
)

◆ FN_0() [3/3]

FN_0 ( get_spring_count  ,
TYPE_INT  ,
GetSpringCount   
)

◆ VFN_1() [3/4]

◆ VFN_1() [4/4]

VFN_1 ( remove_spring  ,
RemoveSpring  ,
TYPE_INODE   
)

◆ GetDesc()

FPInterfaceDesc* GetDesc ( )
virtual
Remarks
Returns a pointer to the class which contains the interface metadata.

Implements FPInterface.

◆ GetSpringSystem()

virtual SpringSys* GetSpringSystem ( )
pure virtual
Remarks
This method returns the pointer to the associated spring system object.

◆ GetMass()

virtual float GetMass ( )
pure virtual
Remarks
This method returns the mass value.

◆ SetMass()

virtual void SetMass ( float  mass,
bool  update = true 
)
pure virtual
Remarks
This method allows you to set the mass value.
Parameters:
float mass

The mass you wish to set.

bool update=true

This flag initiates an update if set to TRUE.

◆ GetDrag()

virtual float GetDrag ( )
pure virtual
Remarks
This method returns the drag value.

◆ SetDrag()

virtual void SetDrag ( float  drag,
bool  update = true 
)
pure virtual
Remarks
This method allows you to set the drag value.
Parameters:
float drag

The drag you wish to set.

bool update=true

This flag initiates an update if set to TRUE.

◆ GetTension()

virtual float GetTension ( int  index)
pure virtual
Remarks
This method returns the tension for the specified spring in the system.
Parameters:
int index

The index of the spring in the system.

◆ SetTension()

virtual void SetTension ( int  index,
float  tension,
int  absolute = 1,
bool  update = true 
)
pure virtual
Remarks
This method allows you to set the tension for the specified spring in the system.
Parameters:
int index

The index of the spring in the system.

float tension

The tension you wish to set.

int absolute=1

The flag defining whether the tension is absolute or relative.

bool update=true

This flag initiates an update if set to TRUE.

◆ GetDampening()

virtual float GetDampening ( int  index)
pure virtual
Remarks
This method returns the dampening value for the specified spring in the system.
Parameters:
int index

The index of the spring in the system.

◆ SetDampening()

virtual void SetDampening ( int  index,
float  dampening,
int  absolute = 1,
bool  update = true 
)
pure virtual
Remarks
This method allows you to set the dampening value for the specified spring in the system.
Parameters:
int index

The index of the spring in the system.

float dampening

The tension you wish to set.

int absolute=1

The flag defining whether the tension is absolute or relative.

bool update=true

This flag initiates an update if set to TRUE.

◆ AddSpring()

virtual BOOL AddSpring ( INode node)
pure virtual
Remarks
This method allows you to add a spring.
Parameters:
INode *node

A pointer to the node.
Returns
TRUE if the spring was added, otherwise FALSE.

◆ GetSpringCount()

virtual INT GetSpringCount ( )
pure virtual
Remarks
This method returns the current number of springs in the system.

◆ RemoveSpring() [1/2]

virtual void RemoveSpring ( int  which)
pure virtual
Remarks
This method allows you to remove a spring from the system.
Parameters:
int which

The index of the spring in the system to remove.

◆ RemoveSpring() [2/2]

virtual void RemoveSpring ( INode node)
pure virtual
Remarks
This method allows you to remove a spring from the system.
Parameters:
INode *node

A pointer to the node you wish to remove.

Member Data Documentation

◆ partsys

SpringSys* partsys