My Project
|
A pool of currently selected objects. More...
#include <ParaScriptingWorld.h>
Static Public Member Functions | |
static void | RemoveObject (const ParaObject &obj) |
remove a given object in all selections. More... | |
static bool | RemoveUIObject (const char *sName) |
remove an UI object from all selection groups. More... | |
static void | AddObject (const ParaObject &obj, int nGroupID) |
Add a new object to a given group. More... | |
static bool | AddUIObject (const char *sName, int nGroupID) |
Please note that UI object in selection is automatically highlighted using the default highlighting effect. More... | |
static ParaObject | GetObject (int nGroupID, int nItemIndex) |
get the nItemIndex object in the nGroupID group. More... | |
static void | GetObject_ (ParaObject *pOut, int nGroupID, int nItemIndex) |
this function shall never be called from the scripting interface. More... | |
static int | GetItemNumInGroup (int nGroupID) |
get the total number item in the given group. More... | |
static void | SelectGroup (int nGroupID, bool bSelect) |
select the entire group. More... | |
static void | ClearGroup (int nGroupID) |
Clear a given group so that there are no objects in it. More... | |
static void | SetMaxItemNumberInGroup (int nGroupID, int nMaxItemsNumber) |
set the maximum number of objects in the group. More... | |
static int | GetMaxItemNumberInGroup (int nGroupID) |
set the maximum number of objects in the group. More... | |
A pool of currently selected objects.
This is a singleton class. Object may be selected into different groups. Although, there are no limit to group number, better keep it smaller than 16 groups. Selected objected may be displayed or highlighted differently. When objects are deleted from the scene. It will be deleted from the selection automatically.
|
static |
Add a new object to a given group.
An object may belong to multiple groups.
obj | pointer to the object to add |
nGroupID | which group the should be added to. by default it is added to group 0. group ID must be smaller than 32. |
|
static |
Please note that UI object in selection is automatically highlighted using the default highlighting effect.
sName | UI object name |
nGroupID | which group the should be added to. by default it is added to group 0. |
|
static |
Clear a given group so that there are no objects in it.
nGroupID | ID of the group. If ID is -1, all groups will be deleted. |
|
static |
get the total number item in the given group.
This function can be used with GetObject() to iterate through all objects in any group.
nGroupID | group ID. |
|
static |
set the maximum number of objects in the group.
nGroupID | group ID,which ID must be smaller than 32. |
|
static |
get the nItemIndex object in the nGroupID group.
nGroupID | from which group the object is get |
nItemIndex | the index of the item to be retrieved. |
|
static |
this function shall never be called from the scripting interface.
this is solely for exporting API. and should not be used from the scripting interface.
|
static |
remove a given object in all selections.
obj | pointer to the object to delete |
|
static |
remove an UI object from all selection groups.
sName | UI object name |
|
static |
select the entire group.
nGroupID | |
bSelect | true to select, false to de-select. |
|
static |
set the maximum number of objects in the group.
nGroupID | group ID group ID must be smaller than 32. |
nMaxItemsNumber | the number to set. default value is 1 |