r3level
real/objects/r3level.h
r3obj
Level primitive. This object defines a 'list' attribute which allows children to be linked to the objects of this class.
r3Primitive
R3CLID_PRIMITIVE
r3Level
R3CLID_LEVEL - 143
ADDTAIL, ADDHEAD, REMOVE, ENUMCHILDREN, GETSUBBYORDNUM, REGISTERSIMULATIONFU, INSERT, SETPARENT, ENUMTARGETS, SIBLINGCHANGED, HIDECHILDREN, CHILDRENHIDDEN,
Sub, Boolean, HasRenderGeometry, Simulation, SubCount, Children, NoAndWire,
int R3RegisterLevelClass(R3APP *app);
R3LEVM_ADDTAIL
ADDTAIL
R3LEVM_ADDTAIL
R3BOOL, don't send childchanged method
R3OBJ*, address of the object to be inserted
obj.ADDTAIL(p1, p3);
Inserts new sub object at the head of the children list
R3LEVM_ADDHEAD
ADDHEAD
R3LEVM_ADDHEAD
R3BOOL, don't send childchanged method
R3OBJ*, object to be inserted
obj.ADDHEAD(p1, p3);
Insert given object to the head of the children list
R3LEVM_REMOVE
REMOVE
R3LEVM_REMOVE
R3OBJ*, sub object to be removed
obj.REMOVE(p3);
Remove the given children from the children list
R3LEVM_ENUMCHILDREN
ENUMCHILDREN
R3LEVM_ENUMCHILDREN
R3TAG*, reserved for future use
obj.ENUMCHILDREN(p3);
Enumerates sub objects (not recursive). If the callback returns a positive value, enumeration continues to the next sub object. If 0 or negative value is returned, enumeration is cancelled and the return value from the callback is returned to the caller.
R3LEVM_GETSUBBYORDNUM
GETSUBBYORDNUM
R3LEVM_GETSUBBYORDNUM
R3OBJ*, address of the object or NULL if ordnum is higher than the number of sub objects
R3INT, ordnum of the sub object to be returned
rc = obj.GETSUBBYORDNUM(p3);
Fetch sub object by its ordnum. The first sub object corresponds to the ordnum 0.
R3LEVCM_REGISTERSIMULATIONFU
REGISTERSIMULATIONFU
R3LEVCM_REGISTERSIMULATIONFU
R3BOOL, TRUE if succeeded, FALSE otherwise
R3INT, NULL if OBJECTWISE effect, otherwise tag id for the attribute to be hold the cause/affect information.
R3INT, Type of the simulation to be plugged in, see R3SIMTYPE_ codes below
rc = obj.REGISTERSIMULATIONFU(p1, p2, 0);
Add new simulation function for the level class.
R3LEVM_INSERT
INSERT
R3LEVM_INSERT
R3BOOL, true of node was found
R3BOOL, don't send childchanged method
R3OBJ*, previous object
R3OBJ*, object to be inserted
rc = obj.INSERT(p1, p2, p3);
Insert new object after the given node
R3LEVCM_SETPARENT
SETPARENT
R3LEVCM_SETPARENT
R3OBJ*, old parent
R3OBJ*, new parent
R3OBJ*, child whose parent is to be changed.
obj.SETPARENT(p1, p2, p3);
callback method for R3PRIMCA_SetParentXxx.
R3LEVM_ENUMTARGETS
ENUMTARGETS
R3LEVM_ENUMTARGETS
R3OBJ*, constructor object
R3INT, constructor method
R3INT, callback data
obj.ENUMTARGETS(p1, p2, p3);
Enumerate target objects for the given constructor.
R3LEVM_SIBLINGCHANGED
SIBLINGCHANGED
R3LEVM_SIBLINGCHANGED
obj.SIBLINGCHANGED();
Internal methods for average map related use
R3LEVM_HIDECHILDREN
HIDECHILDREN
R3LEVM_HIDECHILDREN
R3BOOL, if true chilren are hidden, otherwise shown
obj.HIDECHILDREN(p3);
Hide/Show child objects
R3LEVM_CHILDRENHIDDEN
CHILDRENHIDDEN
R3LEVM_CHILDRENHIDDEN
obj.CHILDRENHIDDEN();
Return Hide/Show state
Simulation functions. The first one is for the R3SIMTYPE_OBJECTWISE. The second is for the PAIRWISE and PAIRWISEASYMM types.
Sub
Sub
R3LEVA_Sub
r3List
R3LIST*
address of the children list, READ ONLY
value = jsobj.GetSub();
R3LIST* value;
R3GetAttrs(r3obj, R3LEVA_Sub, &value, R3TAG_END);
Boolean
Boolean
R3LEVA_Boolean
Integer
R3INT
see boolean types below
jsobj.SetBoolean(value);
value = jsobj.GetBoolean();
R3INT value = ...;
R3SetAttrs(r3obj, R3LEVA_Boolean, value, R3TAG_END);
R3INT value;
R3GetAttrs(r3obj, R3LEVA_Boolean, &value, R3TAG_END);
HasRenderGeometry
HasRenderGeometry
R3LEVA_HasRenderGeometry
Integer
int
Used by R3PRIMM_BEGINRENDER. Return true if child class renders something visible
value = jsobj.GetHasRenderGeometry();
int value;
R3GetAttrs(r3obj, R3LEVA_HasRenderGeometry, &value, R3TAG_END);
Simulation
Simulation
R3LEVA_Simulation
Boolean
R3BOOL
set true to activate simulation
jsobj.SetSimulation(value);
value = jsobj.GetSimulation();
R3BOOL value = ...;
R3SetAttrs(r3obj, R3LEVA_Simulation, value, R3TAG_END);
R3BOOL value;
R3GetAttrs(r3obj, R3LEVA_Simulation, &value, R3TAG_END);
SubCount
SubCount
R3LEVA_SubCount
Integer
R3INT
number of children, read only
value = jsobj.GetSubCount();
R3INT value;
R3GetAttrs(r3obj, R3LEVA_SubCount, &value, R3TAG_END);
Children
Children
R3LEVA_Children
Object
R3OBJ*
indexed attribute for fetching child objects
value = jsobj.GetChildren(index);
R3OBJ* value;
R3GetAttrs(r3obj, R3LEVA_Children, &value, R3TAG_END);
NoAndWire
NoAndWire
R3LEVA_NoAndWire
Boolean
R3BOOL
do not compute boolean wire
jsobj.SetNoAndWire(value);
value = jsobj.GetNoAndWire();
R3BOOL value = ...;
R3SetAttrs(r3obj, R3LEVA_NoAndWire, value, R3TAG_END);
R3BOOL value;
R3GetAttrs(r3obj, R3LEVA_NoAndWire, &value, R3TAG_END);
Simulation values for the simulation specific tag
Simulation types for the REGISTERSIMULATIONFUNC method
Values for _Boolean tag
Registry function