3ds Max C++ API Reference
IPopulateSeat Class Referenceabstract

IPopulateSeat is the interface class to Populate seat objects. More...

#include <IPopulateSeat.h>

+ Inheritance diagram for IPopulateSeat:

Public Types

enum  SeatGenderType { eMaleSeat = 0 , eFemaleSeat }
 Seat Gender Types. More...
 
- Public Types inherited from BaseInterface
enum  LifetimeType { noRelease , immediateRelease , wantsRelease , serverControlled }
 

Public Member Functions

virtual SeatGenderType GetGender ()=0
 Returns the seat gender. More...
 
virtual void SetGender (SeatGenderType gender)=0
 Sets the seat gender. More...
 
virtual bool GetSingle () const =0
 Returns whether or not the person on the seat will be single. More...
 
virtual void SetSingle (bool single)=0
 Sets whether or not the person on the seat will be single. More...
 
virtual float GetHeight () const =0
 Returns the seat height. More...
 
virtual void SetHeight (float height)=0
 Sets the seat height. More...
 
virtual Interface_ID GetID ()
 
- Public Member Functions inherited from BaseInterface
virtual UtilExport ~BaseInterface ()
 Destructor. More...
 
UtilExport BaseInterfaceGetInterface (Interface_ID id)
 
virtual LifetimeType LifetimeControl ()
 
virtual bool RegisterNotifyCallback (InterfaceNotifyCallback *incb)
 
virtual void UnRegisterNotifyCallback (InterfaceNotifyCallback *incb)
 
virtual BaseInterfaceAcquireInterface ()
 
virtual void ReleaseInterface ()
 
virtual void DeleteInterface ()
 
virtual BaseInterfaceCloneInterface (void *remapDir=NULL)
 
- Public Member Functions inherited from InterfaceServer
virtual UtilExport ~InterfaceServer ()
 Destructor. More...
 
template<class InterfaceType >
InterfaceType * GetTypedInterface ()
 

Static Public Member Functions

static IPopulateSeatGetPopulateSeatInterface (Object *obj)
 Gets the interface to a Populate Seat object. More...
 
- 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...
 

Detailed Description

IPopulateSeat is the interface class to Populate seat objects.

Example
The following code creates a Populate seat, sets a seat parameter, and adds it to Populate.
// Create Populate seat
INode *seatNode = ip->CreateObjectNode(seatObj);
IPopulateSeat *seatIface = IPopulateSeat::GetPopulateSeatInterface(seatObj);
// Set seat gender
seatIface->SetGender(IPopulateSeat::eFemaleSeat);
// Place and rotate the seat using standard Max controllers
Control *posControl = seatNode->GetTMController()->GetPositionController();
Point3 pos(0.0f,150.0f,0.0f);
posControl->SetValue(0,(void*)(&pos));
Point3 axis(0.0f,0.0f,1.0f);
AngAxis aa(axis,180.0f * .017453277f); // convert to radians
Quat quat(aa);
Control *rotControl = seatNode->GetTMController()->GetRotationController();
rotControl->SetValue(0,(void*)(&quat));
// Add seat to Populate
IPopulate *iPopulate = IPopulate::GetInstance();
iPopulate->AddSeat(seatNode);
#define POPULATE_SEAT_CLASS_ID
The class ID for the IPopulateSeat class.
Definition: IPopulateSeat.h:16
Definition: quat.h:41
Definition: control.h:1054
virtual Control * GetPositionController()
Definition: control.h:1153
virtual Control * GetRotationController()
Definition: control.h:1160
virtual void SetValue(TimeValue t, void *val, int commit=1, GetSetMethod method=CTRL_ABSOLUTE)=0
Definition: inode.h:55
virtual Control * GetTMController()=0
Definition: maxapi.h:2991
virtual INode * CreateObjectNode(Object *obj)=0
virtual void * CreateInstance(SClass_ID superID, Class_ID classID)=0
static IPopulate * GetInstance()
Returns the interface to Populate.
Definition: IPopulate.h:284
static IPopulateSeat * GetPopulateSeatInterface(Object *obj)
Gets the interface to a Populate Seat object.
Definition: IPopulateSeat.h:75
@ eFemaleSeat
Female Seat.
Definition: IPopulateSeat.h:40
The object class is the base class for all objects.
Definition: object.h:1428
Definition: point3.h:56
Definition: quat.h:173
controller mat max min numsubs x z controller keys x z pos
Definition: generics.inl:208
#define GEOMOBJECT_CLASS_ID
Geometric object super-class ID.
Definition: plugapi.h:398
CoreExport Interface * GetCOREInterface()
See also
IPopulate, IPopulateFlow, IPopulateIdleArea

Member Enumeration Documentation

◆ SeatGenderType

Seat Gender Types.

Enumerator
eMaleSeat 

Male Seat.

eFemaleSeat 

Female Seat.

36  {
38  eMaleSeat = 0,
40  eFemaleSeat,
41  };
@ eMaleSeat
Male Seat.
Definition: IPopulateSeat.h:38

Member Function Documentation

◆ GetGender()

virtual SeatGenderType GetGender ( )
pure virtual

Returns the seat gender.

See also
SeatGenderType

◆ SetGender()

virtual void SetGender ( SeatGenderType  gender)
pure virtual

Sets the seat gender.

Parameters
[in]gender
See also
SeatGenderType

◆ GetSingle()

virtual bool GetSingle ( ) const
pure virtual

Returns whether or not the person on the seat will be single.

If single, the person on the seat will be simulated not interacting with anyone else, not talking or listening to another seated character. Otherwise, the simulation will decide if the person should interact or not, and with whom.

◆ SetSingle()

virtual void SetSingle ( bool  single)
pure virtual

Sets whether or not the person on the seat will be single.

If single, the person on the seat will be simulated not interacting with anyone else, not talking or listening to another seated character. Otherwise, the simulation will decide if the person should interact or not, and with whom.

Parameters
[in]single

◆ GetHeight()

virtual float GetHeight ( ) const
pure virtual

Returns the seat height.

◆ SetHeight()

virtual void SetHeight ( float  height)
pure virtual

Sets the seat height.

The height will be clipped to be in between 16 and 18 inches.

Parameters
[in]height

◆ GetID()

virtual Interface_ID GetID ( )
inlinevirtual
Remarks
This method returns the unique interface ID.

Reimplemented from BaseInterface.

70 { return POPULATE_SEAT_INTERFACE; }
#define POPULATE_SEAT_INTERFACE
The interface ID for the IPopulateSeat class.
Definition: IPopulateSeat.h:18

◆ GetPopulateSeatInterface()

static IPopulateSeat* GetPopulateSeatInterface ( Object obj)
inlinestatic

Gets the interface to a Populate Seat object.

Parameters
[in]obj- Populate seat object
Returns
- a pointer to an IPopulateSeat interface, or NULL.
75  {
76  return obj? static_cast<IPopulateSeat*>(obj->GetInterface(POPULATE_SEAT_INTERFACE)): NULL;}
#define NULL
Definition: autoptr.h:18
CoreExport void * GetInterface(ULONG id)
Inherited from Animatable.