3ds Max C++ API Reference
IPopulate Class Referenceabstract

This is the interface class to Populate. More...

#include <IPopulate.h>

+ Inheritance diagram for IPopulate:

Public Types

enum  FigureDisplayType { eDisplayStickFigs = 1 , eDisplaySegmented , eDisplayCustomSkin , eDisplayTexturedSkin }
 Figure Display Types. More...
 
enum  TurnOptimizationType {
  eHybrid = 1 , eMaxspeed , eMaxdistribution , eMindistance ,
  eNone
}
 Turn Optimization Types. More...
 
- Public Types inherited from BaseInterface
enum  LifetimeType { noRelease , immediateRelease , wantsRelease , serverControlled }
 

Public Member Functions

Environment Objects: Flows, Idle Areas and Seats

Adds a flow to Populate

virtual bool AddFlow (INode *flow)=0
 A flow must be added to Populate in order for simulation to take place on it. More...
 
virtual bool AddIdleArea (INode *iArea)=0
 Adds an idle area to Populate. More...
 
virtual bool AddSeat (INode *seat)=0
 Adds a seat to Populate. More...
 
virtual bool UpdateIdleArea (INode *iArea)=0
 Updates the marks drawn on an idle area. More...
 
virtual void DisplayEnvironment (bool show)=0
 Shows or hides idle areas, flows, and seats. More...
 
virtual bool IsEnvironmentDisplayed () const =0
 Returns whether or not the idle areas, flows, and seats are displayed. More...
 
virtual void DisplayMarks (bool show)=0
 Shows or hides marks on idle areas, flows, and seats. More...
 
virtual bool AreMarksDisplayed () const =0
 Returns whether or not marks on idle areas, flows, and seats are displayed. More...
 
Seats

Returns the probability the next seat created will be for a female

Returns
a value between 0.0 and 1.0 indicating the probability the next seat created will be for a female
virtual float GetSeatFemalePercent () const =0
 Sets the probability the next seat created will be for a female. More...
 
virtual void SetSeatFemalePercent (float percent)=0
 Sets the probability the next seat created will be for a female. More...
 
virtual bool SetSelectedSeatsGender ()=0
 Sets the gender of the selected seats. More...
 
Seat Talking Specifications

In order for a person in seat A and B to talk to one another the following conditions must be met:

  • The angle between the vector from seat A to seat B and the orientation vector of seat A must be less than the specified maximum angle.
  • The angle between the vector from seat B to seat A and the orientation vector of seat B must be less than the specified maximum angle.
  • The distance between seat A and seat B must be less than the maximum talk distance.

Returns the maximum distance at which seated people will talk to each other

See also
GetSeatMaxTalkAngle()
virtual float GetSeatMaxTalkDist () const =0
 Sets the maximum distance at which seated people will talk to each other. More...
 
virtual void SetSeatMaxTalkDist (float distance)=0
 Sets the maximum distance at which seated people will talk to each other. More...
 
virtual float GetSeatMaxTalkAngle () const =0
 Returns the maximum angle at which seated people will talk to each other. More...
 
virtual void SetSeatMaxTalkAngle (float angle)=0
 Sets the maximum angle at which seated people will talk to each other. More...
 
Character Retrieval

These functions return the number of each type of character, and a node from each character.

These functions must be performed after a simulation, after characters have been created. If you delete characters or re-simulate, these functions may return different values than they did after a previous simulation. If you get the node of a character and then you delete the character or change its FigureDisplayType, the node will no longer exist. Characters of display type eDisplayStickFigs do not have nodes. They are lines drawn by Populate. However if you switched from any other display type to the stick figure type, the nodes will still exist and these functions will still return them.

Returns the number of standing idlers

virtual int NumStandingIdlers ()=0
 Returns the number of seated idlers. More...
 
virtual int NumSeatedIdlers ()=0
 Returns the number of seated idlers. More...
 
virtual int NumPedestrians ()=0
 Returns the number of pedestrians. More...
 
virtual INodeGetStandingIdler (int i)=0
 Returns a node from a standing idler, if there is one, NULL if not. More...
 
virtual INodeGetSeatedIdler (int i)=0
 Returns a node from a seated idler, if there is one, NULL if not. More...
 
virtual INodeGetPedestrian (int i)=0
 Returns a node from a pedestrian, if there is one, NULL if not. More...
 
Characters

Returns the display type of the characters

See also
FigureDisplayType
virtual FigureDisplayType GetDisplayType () const =0
 Sets the display type of the characters. More...
 
virtual bool SetDisplayType (FigureDisplayType type)=0
 Sets the display type of the characters. More...
 
virtual void DisplayCharacters (bool show)=0
 Shows or hides characters. More...
 
virtual bool AreCharactersDisplayed () const =0
 Returns whether or not the characters are displayed. More...
 
virtual bool RegenerateSelected (TimeValue t)=0
 Generates new meshes and texture maps for the selected characters. More...
 
virtual bool SwapSelectedCharacterAppearance ()=0
 Swaps the appearance of the selected characters. More...
 
virtual bool SwitchSelectedCharactersResolution ()=0
 Switches the mesh resolution for the selected characters. More...
 
virtual void DeleteSelectedCharacters (TimeValue t)=0
 Deletes all the selected characters. More...
 
virtual void DeleteAllCharacters ()=0
 Deletes all the characters. More...
 
Simulation

Returns the number of frames to simulate

virtual int GetNumFrames () const =0
 Sets the number of frames to simulate. More...
 
virtual void SetNumFrames (int nFrames)=0
 Sets the number of frames to simulate. More...
 
virtual TurnOptimizationType GetTurnOptimization () const =0
 Returns the turn optimization type. More...
 
virtual void SetTurnOptimization (TurnOptimizationType type)=0
 Sets the turn optimization type. More...
 
virtual void Simulate ()=0
 Computes a simulation. More...
 
virtual void ResimulateSelected ()=0
 Resimulates all the selected standing or seated idle characters. More...
 
Scale

Returns the real world scale

virtual float GetRealWorldScale () const =0
 Sets the real world scale. More...
 
virtual void SetRealWorldScale (float scale)=0
 Sets the real world scale. More...
 
Custom Material, Texture Maps, and Appearance

Returns the custom material for custom skinned characters

virtual MtlGetCustomMaterial () const =0
 Sets the custom material for custom skinned characters. More...
 
virtual void SetCustomMaterial (Mtl *mat)=0
 Sets the custom material for custom skinned characters. More...
 
virtual void SaveTextureMaps (bool save)=0
 Sets the Save Texture Maps flag. More...
 
virtual bool GetSaveTextureMapsState () const =0
 Returns the value of the Save Texture Maps flag. More...
 
virtual void ShowAppearanceDialog ()=0
 Shows the Appearance Dialog. More...
 
- Public Member Functions inherited from FPInterfaceDesc
CoreExport FPInterfaceDesc ()
 
CoreExport FPInterfaceDesc (Interface_ID id, const MCHAR *int_name, StringResID descr, ClassDesc *cd, ULONG flag,...)
 
CoreExport ~FPInterfaceDesc ()
 
virtual void Init ()
 
LifetimeType LifetimeControl ()
 
virtual BaseInterfaceGetInterface (Interface_ID id)
 
CoreExport void LoadDescriptor (Interface_ID id, const MCHAR *int_name, StringResID descr, ClassDesc *pCD, ULONG flag,...)
 
CoreExport void AppendFunction (int id,...)
 Add a new function to this interface descriptor. More...
 
CoreExport void AppendProperty (int id,...)
 Add a new property to this interface descriptor. More...
 
CoreExport void AppendEnum (int id,...)
 Add a new enum to this interface descriptor. More...
 
CoreExport void SetClassDesc (ClassDesc *i_cd)
 
CoreExport va_list check_fn (va_list ap, int id)
 
CoreExport va_list scan_fn (va_list ap, int id, int index)
 
CoreExport va_list check_prop (va_list ap, int id)
 
CoreExport va_list scan_prop (va_list ap, int id, int index)
 
CoreExport va_list check_enum (va_list ap, EnumID id)
 
CoreExport va_list scan_enum (va_list ap, EnumID id, int index)
 
FPInterfaceDescGetDesc ()
 
Interface_ID GetID ()
 
CoreExport FPFunctionDefGetFnDef (FunctionID fid)
 
ActionTableGetActionTable ()
 
CoreExport void EnableActions (BOOL onOff)
 
virtual CoreExport HINSTANCE HInstance ()
 
virtual CoreExport const MCHARGetRsrcString (StringResID id)
 
- 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)
 
- Public Member Functions inherited from BaseInterface
virtual UtilExport ~BaseInterface ()
 Destructor. More...
 
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 IPopulateGetInstance ()
 Returns the interface to Populate. 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...
 

Additional Inherited Members

- Public Attributes inherited from FPInterfaceDesc
Interface_ID ID
 
MSTR internal_name
 
StringResID description
 
ClassDesccd
 
USHORT flags
 
Tab< FPFunctionDef * > functions
 
Tab< FPPropDef * > props
 
Tab< FPEnum * > enumerations
 
MSPluginClasspc
 
Rolloutrollout
 
ActionTableaction_table
 
- Static Public Attributes inherited from FPInterface
static CoreExport FPInterfaceDesc nullInterface
 
- Protected Member Functions inherited from FPInterfaceDesc
CoreExport void load_descriptor (Interface_ID id, const MCHAR *int_name, StringResID descr, ClassDesc *cd, USHORT flag, va_list ap)
 
- Protected Member Functions inherited from FPInterface
virtual FPStatus _dispatch_fn (FunctionID fid, TimeValue t, FPValue &result, FPParams *p)
 

Detailed Description

This is the interface class to Populate.

It is a singleton class which is created upon 3dsMax start up. It manages all of the Populate operations.

The following code sets some Populate parameters and simulates. It then selects all the simulated characters and sets them to high resolution. This code will only do something if Populate objects exist in the scene. Code to create Populate objects can be found in the IPopulateFlow, IPopulateSeat and IPopulateIdleArea documentation.

Example
// Set the figure display type and number of frames
iPopulate->SetNumFrames(500);
iPopulate->SetDisplayType(IPopulate::eDisplayTexturedSkin);
// Simulate
iPopulate->Simulate();
// select all characters
INode *node = NULL;
INodeTab nodes;
for (int i=0; i<iPopulate->NumStandingIdlers(); i++)
{
node = iPopulate->GetStandingIdler(i);
if (node) nodes.Append(1,&node);
}
for (int i=0; i<iPopulate->NumSeatedIdlers(); i++)
{
node = iPopulate->GetSeatedIdler(i);
if (node) nodes.Append(1,&node);
}
for (int i=0; i<iPopulate->NumPedestrians(); i++)
{
node = iPopulate->GetPedestrian(i);
if (node) nodes.Append(1,&node);
}
ip->SelectNodeTab(nodes,1,1);
// change the resolution of the characters to high resolution
iPopulate->SwitchSelectedCharactersResolution();
#define NULL
Definition: autoptr.h:18
Definition: inode.h:55
Class representing a dynamic array of INodes.
Definition: INodeTab.h:8
@ eDisplayTexturedSkin
Textured Skin.
Definition: IPopulate.h:51
int Append(int num, T *el, int allocExtra=0)
Appends items at the end of the Tab.
Definition: tab.h:281
See also
IPopulateFlow, IPopulateIdleArea, IPopulateSeat

Member Enumeration Documentation

◆ FigureDisplayType

Figure Display Types.

Enumerator
eDisplayStickFigs 

Stick Figure Characters.

eDisplaySegmented 

Segmented Characters.

Deprecated:
Deprecated in 3ds Max 2015.


Segmented characters are not supported. Setting the display type to segmented will do nothing.

eDisplayCustomSkin 

Custom Skin.

eDisplayTexturedSkin 

Textured Skin.

40  {
44 
47  #pragma deprecated (eDisplaySegmented)
52  };
@ eDisplaySegmented
Segmented Characters.
Definition: IPopulate.h:46
@ eDisplayStickFigs
Stick Figure Characters.
Definition: IPopulate.h:42
@ eDisplayCustomSkin
Custom Skin.
Definition: IPopulate.h:49

◆ TurnOptimizationType

Turn Optimization Types.

Each of these options specifies an algorithm used to decide which way a character will turn when it reaches an intersection.

Enumerator
eHybrid 

Chooses turns based on a weighted combination of the eMaxspeed, eMaxdistribution, and eMindistance algorithms.

eMaxspeed 

Chooses turns that move pedestrians at faster speeds through intersections when avoiding collisions.

eMaxdistribution 

Chooses turns to equally distribute pedestrians into outgoing flows.

eMindistance 

Chooses turns to minimize distance traveled through intersections.

eNone 

Chooses turns randomly.

56  {
58  eHybrid = 1,
60  eMaxspeed,
66  eNone
67  };
@ eHybrid
Chooses turns based on a weighted combination of the eMaxspeed, eMaxdistribution, and eMindistance al...
Definition: IPopulate.h:58
@ eNone
Chooses turns randomly.
Definition: IPopulate.h:66
@ eMindistance
Chooses turns to minimize distance traveled through intersections.
Definition: IPopulate.h:64
@ eMaxspeed
Chooses turns that move pedestrians at faster speeds through intersections when avoiding collisions.
Definition: IPopulate.h:60
@ eMaxdistribution
Chooses turns to equally distribute pedestrians into outgoing flows.
Definition: IPopulate.h:62

Member Function Documentation

◆ AddFlow()

virtual bool AddFlow ( INode flow)
pure virtual

A flow must be added to Populate in order for simulation to take place on it.

The node won't be added if it is not a flow or it is already in Populate.

Parameters
[in]flow- The flow node to be added
Returns
true if the flow was added, false if not

◆ AddIdleArea()

virtual bool AddIdleArea ( INode iArea)
pure virtual

Adds an idle area to Populate.

An idle area must be added to Populate in order for simulation to take place on it. The node won't be added if it is not an idle area or it is already in Populate.

Parameters
[in]iArea- The idle area node to be added
Returns
true if the idle area was added, false if not

◆ AddSeat()

virtual bool AddSeat ( INode seat)
pure virtual

Adds a seat to Populate.

A seat must be added to Populate in order for simulation to take place on it. The node won't be added if it is not a seat or it is already in Populate.

Parameters
[in]seat- The seat node to be added
Returns
true if the seat was added, false if not

◆ UpdateIdleArea()

virtual bool UpdateIdleArea ( INode iArea)
pure virtual

Updates the marks drawn on an idle area.

This will force the marks on an idle area to be recomputed. The node won't be updated if it is not an idle area or it is not in Populate.

Parameters
[in]iArea- The idle area node to be updated
Returns
true if the idle area was updated, false if not

◆ DisplayEnvironment()

virtual void DisplayEnvironment ( bool  show)
pure virtual

Shows or hides idle areas, flows, and seats.

Parameters
[in]show- true to show idle areas, flows and seats, false to hide them

◆ IsEnvironmentDisplayed()

virtual bool IsEnvironmentDisplayed ( ) const
pure virtual

Returns whether or not the idle areas, flows, and seats are displayed.

◆ DisplayMarks()

virtual void DisplayMarks ( bool  show)
pure virtual

Shows or hides marks on idle areas, flows, and seats.

Parameters
[in]show- true to show marks, false to hide them

◆ AreMarksDisplayed()

virtual bool AreMarksDisplayed ( ) const
pure virtual

Returns whether or not marks on idle areas, flows, and seats are displayed.

◆ GetSeatFemalePercent()

virtual float GetSeatFemalePercent ( ) const
pure virtual

Sets the probability the next seat created will be for a female.

Parameters
[in]percent- a value between 0.0 and 1.0 specifying the probability the next seat created will be for a female

◆ SetSeatFemalePercent()

virtual void SetSeatFemalePercent ( float  percent)
pure virtual

Sets the probability the next seat created will be for a female.

Parameters
[in]percent- a value between 0.0 and 1.0 specifying the probability the next seat created will be for a female

◆ SetSelectedSeatsGender()

virtual bool SetSelectedSeatsGender ( )
pure virtual

Sets the gender of the selected seats.

Uses the value of Seat Female Percent to set the gender

See also
SetSeatFemalePercent()

◆ GetSeatMaxTalkDist()

virtual float GetSeatMaxTalkDist ( ) const
pure virtual

Sets the maximum distance at which seated people will talk to each other.

Parameters
[in]distance- the maximum distance at which seated people will talk to each other
See also
SetSeatMaxTalkAngle()

◆ SetSeatMaxTalkDist()

virtual void SetSeatMaxTalkDist ( float  distance)
pure virtual

Sets the maximum distance at which seated people will talk to each other.

Parameters
[in]distance- the maximum distance at which seated people will talk to each other
See also
SetSeatMaxTalkAngle()

◆ GetSeatMaxTalkAngle()

virtual float GetSeatMaxTalkAngle ( ) const
pure virtual

Returns the maximum angle at which seated people will talk to each other.

The angle is in degrees.

See also
GetSeatMaxTalkDist()

◆ SetSeatMaxTalkAngle()

virtual void SetSeatMaxTalkAngle ( float  angle)
pure virtual

Sets the maximum angle at which seated people will talk to each other.

Parameters
[in]angle- the maximum angle, in degrees, at which seated people will talk to each other
See also
SetSeatMaxTalkDist()

◆ NumStandingIdlers()

virtual int NumStandingIdlers ( )
pure virtual

Returns the number of seated idlers.

◆ NumSeatedIdlers()

virtual int NumSeatedIdlers ( )
pure virtual

Returns the number of seated idlers.

◆ NumPedestrians()

virtual int NumPedestrians ( )
pure virtual

Returns the number of pedestrians.

◆ GetStandingIdler()

virtual INode* GetStandingIdler ( int  i)
pure virtual

Returns a node from a standing idler, if there is one, NULL if not.

◆ GetSeatedIdler()

virtual INode* GetSeatedIdler ( int  i)
pure virtual

Returns a node from a seated idler, if there is one, NULL if not.

◆ GetPedestrian()

virtual INode* GetPedestrian ( int  i)
pure virtual

Returns a node from a pedestrian, if there is one, NULL if not.

◆ GetDisplayType()

virtual FigureDisplayType GetDisplayType ( ) const
pure virtual

Sets the display type of the characters.

Parameters
[in]type
See also
FigureDisplayType

◆ SetDisplayType()

virtual bool SetDisplayType ( FigureDisplayType  type)
pure virtual

Sets the display type of the characters.

Parameters
[in]type
See also
FigureDisplayType

◆ DisplayCharacters()

virtual void DisplayCharacters ( bool  show)
pure virtual

Shows or hides characters.

Parameters
[in]show- true to show characters, false to hide them

◆ AreCharactersDisplayed()

virtual bool AreCharactersDisplayed ( ) const
pure virtual

Returns whether or not the characters are displayed.

◆ RegenerateSelected()

virtual bool RegenerateSelected ( TimeValue  t)
pure virtual

Generates new meshes and texture maps for the selected characters.

If a pedestrian appears more than once, then only its appearance during time t will be changed.

Parameters
[in]t- time

◆ SwapSelectedCharacterAppearance()

virtual bool SwapSelectedCharacterAppearance ( )
pure virtual

Swaps the appearance of the selected characters.

Only two characters of the same gender can be swapped. If a pedestrian appears more than once, all of its appearances will be changed.

Returns
True if successful, false if not.

◆ SwitchSelectedCharactersResolution()

virtual bool SwitchSelectedCharactersResolution ( )
pure virtual

Switches the mesh resolution for the selected characters.

High resolution characters will switch to low, and low resolution characters will switch to high.

◆ DeleteSelectedCharacters()

virtual void DeleteSelectedCharacters ( TimeValue  t)
pure virtual

Deletes all the selected characters.

If a pedestrian appears more than once, then only its appearance during time t will be deleted.

Parameters
[in]t- time *‍/

◆ DeleteAllCharacters()

virtual void DeleteAllCharacters ( )
pure virtual

Deletes all the characters.

◆ GetNumFrames()

virtual int GetNumFrames ( ) const
pure virtual

Sets the number of frames to simulate.

Parameters
[in]nFrames- the number of frames to simulate

◆ SetNumFrames()

virtual void SetNumFrames ( int  nFrames)
pure virtual

Sets the number of frames to simulate.

Parameters
[in]nFrames- the number of frames to simulate

◆ GetTurnOptimization()

virtual TurnOptimizationType GetTurnOptimization ( ) const
pure virtual

Returns the turn optimization type.

See also
TurnOptimizationType

◆ SetTurnOptimization()

virtual void SetTurnOptimization ( TurnOptimizationType  type)
pure virtual

Sets the turn optimization type.

Parameters
[in]type- turn optimization type
See also
TurnOptimizationType

◆ Simulate()

virtual void Simulate ( )
pure virtual

Computes a simulation.

Characters of the specified display type will appear on all the marks of the idle areas and flows, and on all the chairs. They will be animated for the specified number of frames. New characters will be spawned at the ends of the flows over time. Pedestrian spawning, speeds and genders will conform to flow parameters.

See also
SetDisplayType(), SetNumFrames(), IPopulateFlow

◆ ResimulateSelected()

virtual void ResimulateSelected ( )
pure virtual

Resimulates all the selected standing or seated idle characters.

◆ GetRealWorldScale()

virtual float GetRealWorldScale ( ) const
pure virtual

Sets the real world scale.

The environment objects will scale appropriately when the real world scale is set. But you must simulate in order to scale the characters appropriately.

Parameters
[in]scale- the real world scale

◆ SetRealWorldScale()

virtual void SetRealWorldScale ( float  scale)
pure virtual

Sets the real world scale.

The environment objects will scale appropriately when the real world scale is set. But you must simulate in order to scale the characters appropriately.

Parameters
[in]scale- the real world scale

◆ GetCustomMaterial()

virtual Mtl* GetCustomMaterial ( ) const
pure virtual

Sets the custom material for custom skinned characters.

This material will only be used when new custom characters are created.

Parameters
[in]mat- the custom material

◆ SetCustomMaterial()

virtual void SetCustomMaterial ( Mtl mat)
pure virtual

Sets the custom material for custom skinned characters.

This material will only be used when new custom characters are created.

Parameters
[in]mat- the custom material

◆ SaveTextureMaps()

virtual void SaveTextureMaps ( bool  save)
pure virtual

Sets the Save Texture Maps flag.

Parameters
[in]save- true to save the texture maps, false to regenerate the texture maps on load

◆ GetSaveTextureMapsState()

virtual bool GetSaveTextureMapsState ( ) const
pure virtual

Returns the value of the Save Texture Maps flag.

◆ ShowAppearanceDialog()

virtual void ShowAppearanceDialog ( )
pure virtual

Shows the Appearance Dialog.

◆ GetInstance()

static IPopulate* GetInstance ( )
inlinestatic

Returns the interface to Populate.

285  {
286  return static_cast<IPopulate*>(GetCOREInterface(POPULATE_INTERFACE));
287  }
#define POPULATE_INTERFACE
The interface ID for the IPopulate class.
Definition: IPopulate.h:18
CoreExport Interface * GetCOREInterface()