r3prilay
real/layer/r3prilay.h
r3layer
Real 3D Prim Layer Class is a container for objects of type PRIMITIVE and supports operations on this type that the OBJECTLAYER class can not support.
r3Objectlayer
R3CLID_OBJECTLAYER
r3Primlayer
R3CLID_PRIMLAYER - 73
OPENLEVEL, CUTPASTE, CUTPASTE2, DELETEROOT, PERFORMONROOT, EDITOBJECTS, EDITING, WIRELOCK, WIRERELEASE, EXECIDLES_moved_to_o, ADDIDLEMSG_moved_to_, DELETECONDITIONAL, EXPORT, MAKEINSTANCES, MAKEKEYFRAMES, RAWINSERT, CONCATENATE, MAKESELECTEDCURRENTL, COPYPASTE, TOGGLEEDITOBJECTS, MAKESELECTEDVIRTUALR, CALLSELECTEDINPAIRS, SNAPTONEARESTSELECTE, INSERTWITHFIXEDSPACE, REPLACE, INSERTTOSELECTED, DROPTOLEVEL, GETEDITSTRING, ANIMRECORD, GETSELECTEDNAMESTRIN, INSERTTO, RAWINSERTAFTER, COLLECTTOLEVEL, BEGININTERACTION, ENDINTERACTION, TRANSFORM, GETOBJECTNAMESTRING, SETONSELECTEDWIRES, SETRELATIVESUBFLOATO, SELECTCHILDREN, INVERTSELECTION, CHANGECHANNELBINDING, GETPARENTOFSELECTED, GETSELECTED, FREESELECTED, CONSIDERSELECT, SETCURRENTFROMSELECT, BEGINMATEVALEXT,
Root, CurrentLevel, AnimRecord, CurrentRGB, Matrix, Volatile, SelectMethod, MaterialEvaluator, RootClid, VirtualRoot, Materials, UserChannels, World, CurrentTag, CurrentIndex,
int R3RegisterPrimLayerClass(R3APP *app);
R3PLAYM_OPENLEVEL
OPENLEVEL
R3PLAYM_OPENLEVEL
obj.OPENLEVEL();
Toggle the OPEN flag of seleced objects
R3PLAYM_CUTPASTE
CUTPASTE
R3PLAYM_CUTPASTE
obj.CUTPASTE();
Perform CUT and PASTE in one operation
R3PLAYM_CUTPASTE2
CUTPASTE2
R3PLAYM_CUTPASTE2
obj.CUTPASTE2();
Perform CUT and PASTE2 in one operation
R3PLAYM_DELETEROOT
DELETEROOT
R3PLAYM_DELETEROOT
obj.DELETEROOT();
Delete all objects
R3PLAYM_PERFORMONROOT
PERFORMONROOT
R3PLAYM_PERFORMONROOT
R3BOOL, if set, method doesn't generate MM_CHANGED.
obj.PERFORMONROOT(p1, 0);
like doing R3OLAYM_PERFORMONSELECTED when root is selected.
R3PLAYM_EDITOBJECTS
EDITOBJECTS
R3PLAYM_EDITOBJECTS
obj.EDITOBJECTS();
Set selected objects to edit state
R3PLAYM_EDITING
EDITING
R3PLAYM_EDITING
obj.EDITING();
Return TRUE if layer is in edit state ie. any objects are beeing edited
R3PLAYM_WIRELOCK
WIRELOCK
R3PLAYM_WIRELOCK
obj.WIRELOCK();
Lock layer for changing wire objects so they can be safely changed while drawing.
R3PLAYM_WIRERELEASE
WIRERELEASE
R3PLAYM_WIRERELEASE
obj.WIRERELEASE();
Release layer for changing wire objects.
R3PLAYM_EXECIDLES_moved_to_o
EXECIDLES_moved_to_o
R3PLAYM_EXECIDLES_moved_to_o
obj.EXECIDLES_moved_to_o();
Execute all idle messages
R3PLAYM_ADDIDLEMSG_moved_to_
ADDIDLEMSG_moved_to_
R3PLAYM_ADDIDLEMSG_moved_to_
R3BOOL, true if succeeded
R3OBJ*, object to be called
R3INT, method
void*, p3 parameter for the object to be called.
rc = obj.ADDIDLEMSG_moved_to_(p1, p2, p3);
Add idle message to the layers idle list
R3PLAYM_DELETECONDITIONAL
DELETECONDITIONAL
R3PLAYM_DELETECONDITIONAL
obj.DELETECONDITIONAL();
If layer is in edit mode delete selected points in objects else behave like R3OLAYM_DELETESELECTION
R3PLAYM_EXPORT
EXPORT
R3PLAYM_EXPORT
obj.EXPORT();
Send R3PRIMM_EXPORT to root object
R3PLAYM_MAKEINSTANCES
MAKEINSTANCES
R3PLAYM_MAKEINSTANCES
R3OBJ*, insert after this object, if NULL insert at the end, if same as the parent level, then insert as the first child.
R3TAG*, tag list containing R3PLAYA_AutoSelect, R3PLAYA_DuplicateInstances
obj.MAKEINSTANCES(p1, p3);
Make INSTANCE objects of the selected objects
R3PLAYM_MAKEKEYFRAMES
MAKEKEYFRAMES
R3PLAYM_MAKEKEYFRAMES
obj.MAKEKEYFRAMES();
Make KEYFRAME objects of the selected objects
R3PLAYM_RAWINSERT
RAWINSERT
R3PLAYM_RAWINSERT
R3BOOL, true to update select list
R3BOOL, if true, no space mapping is applied (object is inserted with given space)
R3OBJ*, object to be inserted
obj.RAWINSERT(p1, p2, p3);
Insert new object to a layer. The contents of the selection list remains the same (R3PLAYA_SelectionMethod ignored)
R3PLAYM_CONCATENATE
CONCATENATE
R3PLAYM_CONCATENATE
R3INT, method to be sent to the first selected object
R3INT, if FALSE, selected objects are not deleted, otherwise only the first selected object is not deleted.
obj.CONCATENATE(p1, p2, 0);
Pass list of the selected objects to the first selected object
R3PLAYM_MAKESELECTEDCURRENTL
MAKESELECTEDCURRENTL
R3PLAYM_MAKESELECTEDCURRENTL
obj.MAKESELECTEDCURRENTL();
Make the first selected level the current level, if it is the current level move current level up to parent
R3PLAYM_COPYPASTE
COPYPASTE
R3PLAYM_COPYPASTE
obj.COPYPASTE();
Do a copy and a paste so that the copys parent is the same as the origiinal
R3PLAYM_TOGGLEEDITOBJECTS
TOGGLEEDITOBJECTS
R3PLAYM_TOGGLEEDITOBJECTS
obj.TOGGLEEDITOBJECTS();
Toggles selected objects edit state
R3PLAYM_MAKESELECTEDVIRTUALR
MAKESELECTEDVIRTUALR
R3PLAYM_MAKESELECTEDVIRTUALR
R3BOOL, true if succeeded
rc = obj.MAKESELECTEDVIRTUALR();
Make the first selected object the virtual root object.
R3PLAYM_CALLSELECTEDINPAIRS
CALLSELECTEDINPAIRS
R3PLAYM_CALLSELECTEDINPAIRS
void*, return value from the calllback method. If null, select list enumeration is cancelled.
R3INT, method to be called
void*, p3 parameter for the method
rc = obj.CALLSELECTEDINPAIRS(p1, p3);
Call each selected object for each other selected object. The selected object (o) is called as: R3SendMsgA2(o, p1, o[n], p3);
R3PLAYM_SNAPTONEARESTSELECTE
SNAPTONEARESTSELECTE
R3PLAYM_SNAPTONEARESTSELECTE
R3OBJ*, address of the nearest object
R3VECTOR, position to be snapped (in abs space)
R3VECTOR, snapped position in abs space
R3VECTOR, parameter value corresponding the snapped position
rc = obj.SNAPTONEARESTSELECTE(p1, p2, p3);
Snap the given 3D point to nearest object
R3PLAYM_INSERTWITHFIXEDSPACE
INSERTWITHFIXEDSPACE
R3PLAYM_INSERTWITHFIXEDSPACE
R3OBJ*, address of the 'dummy parent' level.
R3OBJ*, original object
R3OBJ*, copy of the original object.
rc = obj.INSERTWITHFIXEDSPACE(p1, p3);
Insert the given 'copy' object to layer without changing it object space. New 'dummy' parent level is added to accomplish this.
R3PLAYM_REPLACE
REPLACE
R3PLAYM_REPLACE
R3OBJ*, callback object
R3INT, callback method
void*, callback data
obj.REPLACE(p1, p2, p3);
Replace the selected objects. The method scans through the selected objects. It first removes the selected object in question, calls the callback method which should return the new object. Finally the selected object in question is unreferenced. Note: the caller can ref the object to be replaced and this way keep it alive. The callback method is called as: R3SendMsgA(cbobj, cbmth, selectedobj, cbdata); Note2: the selected object in question is already removed from the layer when the callback method is called.
R3PLAYM_INSERTTOSELECTED
INSERTTOSELECTED
R3PLAYM_INSERTTOSELECTED
R3BOOL, true if succeeded
R3OBJ*, object to be inserted.
rc = obj.INSERTTOSELECTED(p3);
Insert the given object to the selected object. If the selected object is not true level object, one will be created so that insertion becomes possible. If there are more than one selected object, the object to be inserted will be duplicated and inserted for all of them.
R3PLAYM_DROPTOLEVEL
DROPTOLEVEL
R3PLAYM_DROPTOLEVEL
R3OBJ*, address of the level in which the new object is inserted
R3OBJ*, target level
rc = obj.DROPTOLEVEL(p1, 0);
Inserts the given object to the given level object. If the 'level' is not true level, one will be created and the original level is inserted with the new object into the newly created level.
R3PLAYM_GETEDITSTRING
GETEDITSTRING
R3PLAYM_GETEDITSTRING
char*, buffer for holding the result (min length 256)
obj.GETEDITSTRING(p3);
Fetch symbolic string describing the status of the selected objects.
R3PLAYM_ANIMRECORD
ANIMRECORD
R3PLAYM_ANIMRECORD
R3BOOL, previous status
R3BOOL, true to set recording, FALSE to clear.
rc = obj.ANIMRECORD(p3);
Activate animation recording: all attributes modified when layer is in recording mode are automatically keyframed.
R3PLAYM_GETSELECTEDNAMESTRIN
GETSELECTEDNAMESTRIN
R3PLAYM_GETSELECTEDNAMESTRIN
R3INT, number of selected objects.
R3INT, max size of the supplied buffer
char*, buffer
rc = obj.GETSELECTEDNAMESTRIN(p1, p3);
Get hierarchical name of the selected object. If more than one object selected, common part of the name path is returned.
R3PLAYM_INSERTTO
INSERTTO
R3PLAYM_INSERTTO
R3BOOL, apply space mapping
R3OBJ*, object to be inserted
obj.INSERTTO(0, p2, p3);
Insert object to given level
R3PLAYM_RAWINSERTAFTER
RAWINSERTAFTER
R3PLAYM_RAWINSERTAFTER
R3BOOL, true to update select list
R3BOOL, if true, no space mapping is applied (object is inserted with given space)
R3TAG*, tag list containing R3PLAYA_InsertThis and R3PLAYA_AfterThis.
obj.RAWINSERTAFTER(p1, p2, p3);
Insert new object to a layer. Inserts after the given object. The contents of the selection list remains the same (R3PLAYA_SelectionMethod ignored)
R3PLAYM_COLLECTTOLEVEL
COLLECTTOLEVEL
R3PLAYM_COLLECTTOLEVEL
R3OBJ*, newly created level
rc = obj.COLLECTTOLEVEL();
Remove selected objects and insert them inside a new level. The parent for the newly created level is determined by the first selected object.
R3PLAYM_BEGININTERACTION
BEGININTERACTION
R3PLAYM_BEGININTERACTION
obj.BEGININTERACTION();
Enter interactive section.
R3PLAYM_ENDINTERACTION
ENDINTERACTION
R3PLAYM_ENDINTERACTION
obj.ENDINTERACTION();
Leave interaction mode
R3PLAYM_TRANSFORM
TRANSFORM
R3PLAYM_TRANSFORM
R3MATRIX, transformation matrix
obj.TRANSFORM(p3);
Translate selected objects by given transformation matrix
R3PLAYM_GETOBJECTNAMESTRING
GETOBJECTNAMESTRING
R3PLAYM_GETOBJECTNAMESTRING
R3OBJ*, name of this object will be created
R3INT, max size of the supplied buffer
char*, buffer
obj.GETOBJECTNAMESTRING(p1, p2, p3);
Get hierarchical name of an object.
R3PLAYM_SETONSELECTEDWIRES
SETONSELECTEDWIRES
R3PLAYM_SETONSELECTEDWIRES
R3TAG*, tags to pass to R3SetAttrsA().
obj.SETONSELECTEDWIRES(p3);
Perform R3SetAttrsA(wire, tags) on the wire frame objects of the selected objects
R3PLAYM_SETRELATIVESUBFLOATO
SETRELATIVESUBFLOATO
R3PLAYM_SETRELATIVESUBFLOATO
R3INT, attribute to be set
R3INT, ordnum of the sub field (0 = x, 1 = y etc.)
R3FLOAT, new value
obj.SETRELATIVESUBFLOATO(p1, p2, p3);
Set given sub component of a vector attribute in 'relative' way (the value is added to the current value, not assigned) to the wire frame objects of the selected objects.
R3PLAYM_SELECTCHILDREN
SELECTCHILDREN
R3PLAYM_SELECTCHILDREN
R3BOOL, if TRUE all sub objects are known to be unselected (gives quicker selection)
R3OBJ*, object whose sub object should be added to selection
obj.SELECTCHILDREN(p1, p3);
Select all sub objects of an object
R3PLAYM_INVERTSELECTION
INVERTSELECTION
R3PLAYM_INVERTSELECTION
obj.INVERTSELECTION();
Invert selection states
R3PLAYM_CHANGECHANNELBINDING
CHANGECHANNELBINDING
R3PLAYM_CHANGECHANNELBINDING
int, new attribute identifier
char*, name of the channel
obj.CHANGECHANNELBINDING(p1, p3);
map dynamig channel binding to a new value
R3PLAYM_GETPARENTOFSELECTED
GETPARENTOFSELECTED
R3PLAYM_GETPARENTOFSELECTED
R3BOOL, if TRUE returns current level if there are no selected objects.
obj.GETPARENTOFSELECTED(p3);
fetch the parent level of first selected object.
R3PLAYM_GETSELECTED
GETSELECTED
R3PLAYM_GETSELECTED
R3OBJ*, null terminated array of target objects
R3INT*, number of target objects
R3OBJ**, memory for the tool object
rc = obj.GETSELECTED(p1, p3);
An easy way to fetch selected objects. Supports the 'target / tool' object * philosophy: the first n-1 selected objects are returned as targets and * the last selected object is returned as the tool. Call R3PLAYM_FREESELECTED * to release the memory allocated by this method. This method locks * the select list in shared lock.
R3PLAYM_FREESELECTED
FREESELECTED
R3PLAYM_FREESELECTED
R3INT, number of target objects
R3OBJ**, target objects as returned by GETSELECTED method
obj.FREESELECTED(p1, p3);
Free memory allocated by the GETSELECTED method.
R3PLAYM_CONSIDERSELECT
CONSIDERSELECT
R3PLAYM_CONSIDERSELECT
R3INT, number of target objects
R3OBJ**, target objects as returned by GETSELECTED method
obj.CONSIDERSELECT(p1, p3);
Consider selecting the given object, depending * on the value of the R3PLAYA_SelectMethod attribute.
R3PLAYM_SETCURRENTFROMSELECT
SETCURRENTFROMSELECT
R3PLAYM_SETCURRENTFROMSELECT
obj.SETCURRENTFROMSELECT();
Changes current level by object selection * Current level will be the selected object if it is a single opened level, * otherwise the parent of the first selected object
R3PLAYM_BEGINMATEVALEXT
BEGINMATEVALEXT
R3PLAYM_BEGINMATEVALEXT
obj.BEGINMATEVALEXT();
Root
Root
R3PLAYA_Root
Object
R3OBJ*
R3RM_GET, Root object
value = jsobj.GetRoot();
R3OBJ* value;
R3GetAttrs(r3obj, R3PLAYA_Root, &value, R3TAG_END);
CurrentLevel
CurrentLevel
R3PLAYA_CurrentLevel
Object
R3OBJ*
R3RM_GET/SET, Current level
jsobj.SetCurrentLevel(value);
value = jsobj.GetCurrentLevel();
R3OBJ* value = ...;
R3SetAttrs(r3obj, R3PLAYA_CurrentLevel, value, R3TAG_END);
R3OBJ* value;
R3GetAttrs(r3obj, R3PLAYA_CurrentLevel, &value, R3TAG_END);
AnimRecord
AnimRecord
R3PLAYA_AnimRecord
Boolean
R3BOOL
true if recording active
jsobj.SetAnimRecord(value);
value = jsobj.GetAnimRecord();
R3BOOL value = ...;
R3SetAttrs(r3obj, R3PLAYA_AnimRecord, value, R3TAG_END);
R3BOOL value;
R3GetAttrs(r3obj, R3PLAYA_AnimRecord, &value, R3TAG_END);
CurrentRGB
CurrentRGB
R3PLAYA_CurrentRGB
useful for some tools
jsobj.SetCurrentRGB(value);
value = jsobj.GetCurrentRGB();
R3FLOATCOLOR3 value = ...;
R3SetAttrs(r3obj, R3PLAYA_CurrentRGB, value, R3TAG_END);
R3FLOATCOLOR3 value;
R3GetAttrs(r3obj, R3PLAYA_CurrentRGB, &value, R3TAG_END);
Matrix
Matrix
R3PLAYA_Matrix
R3RM_SET/GET, the world matrix
jsobj.SetMatrix(value);
value = jsobj.GetMatrix();
R3MATRIX* value = ...;
R3SetAttrs(r3obj, R3PLAYA_Matrix, value, R3TAG_END);
R3MATRIX* value;
R3GetAttrs(r3obj, R3PLAYA_Matrix, &value, R3TAG_END);
Volatile
Volatile
R3PLAYA_Volatile
Integer
R3INT
, R3RM_SET/GET, set by interactive transformation so drawing can forget optimaizations like display lists
jsobj.SetVolatile(value);
value = jsobj.GetVolatile();
R3INT value = ...;
R3SetAttrs(r3obj, R3PLAYA_Volatile, value, R3TAG_END);
R3INT value;
R3GetAttrs(r3obj, R3PLAYA_Volatile, &value, R3TAG_END);
SelectMethod
SelectMethod
R3PLAYA_SelectMethod
Integer
R3INT
R3RM_SET/GET see select methods below
jsobj.SetSelectMethod(value);
value = jsobj.GetSelectMethod();
R3INT value = ...;
R3SetAttrs(r3obj, R3PLAYA_SelectMethod, value, R3TAG_END);
R3INT value;
R3GetAttrs(r3obj, R3PLAYA_SelectMethod, &value, R3TAG_END);
MaterialEvaluator
MaterialEvaluator
R3PLAYA_MaterialEvaluator
Object
R3OBJ*
R3RM_SET/GET material evaluator object
jsobj.SetMaterialEvaluator(value);
value = jsobj.GetMaterialEvaluator();
R3OBJ* value = ...;
R3SetAttrs(r3obj, R3PLAYA_MaterialEvaluator, value, R3TAG_END);
R3OBJ* value;
R3GetAttrs(r3obj, R3PLAYA_MaterialEvaluator, &value, R3TAG_END);
RootClid
RootClid
R3PLAYA_RootClid
Integer
R3CLID
R3RM_CREATE, class id for the root object
jsobj.SetRootClid(value);
value = jsobj.GetRootClid();
R3CLID value = ...;
R3SetAttrs(r3obj, R3PLAYA_RootClid, value, R3TAG_END);
R3CLID value;
R3GetAttrs(r3obj, R3PLAYA_RootClid, &value, R3TAG_END);
VirtualRoot
VirtualRoot
R3PLAYA_VirtualRoot
Object
R3OBJ*
R3RM_GET/SET, Current 'virtual' root. Objects above this level are not shown
jsobj.SetVirtualRoot(value);
value = jsobj.GetVirtualRoot();
R3OBJ* value = ...;
R3SetAttrs(r3obj, R3PLAYA_VirtualRoot, value, R3TAG_END);
R3OBJ* value;
R3GetAttrs(r3obj, R3PLAYA_VirtualRoot, &value, R3TAG_END);
Materials
Materials
R3PLAYA_Materials
Object
R3OBJ*
address of the material layer
jsobj.SetMaterials(value);
value = jsobj.GetMaterials();
R3OBJ* value = ...;
R3SetAttrs(r3obj, R3PLAYA_Materials, value, R3TAG_END);
R3OBJ* value;
R3GetAttrs(r3obj, R3PLAYA_Materials, &value, R3TAG_END);
UserChannels
UserChannels
R3PLAYA_UserChannels
Object
R3OBJ*
address of the user channel layer
jsobj.SetUserChannels(value);
value = jsobj.GetUserChannels();
R3OBJ* value = ...;
R3SetAttrs(r3obj, R3PLAYA_UserChannels, value, R3TAG_END);
R3OBJ* value;
R3GetAttrs(r3obj, R3PLAYA_UserChannels, &value, R3TAG_END);
World
World
R3PLAYA_World
Object
R3OBJ*
level object that defines 'world space', root of of all other geometric objects in RS
value = jsobj.GetWorld();
R3OBJ* value;
R3GetAttrs(r3obj, R3PLAYA_World, &value, R3TAG_END);
CurrentTag
CurrentTag
R3PLAYA_CurrentTag
Integer
R3INT
current selected attribute
jsobj.SetCurrentTag(value);
value = jsobj.GetCurrentTag();
R3INT value = ...;
R3SetAttrs(r3obj, R3PLAYA_CurrentTag, value, R3TAG_END);
R3INT value;
R3GetAttrs(r3obj, R3PLAYA_CurrentTag, &value, R3TAG_END);
CurrentIndex
CurrentIndex
R3PLAYA_CurrentIndex
Integer
R3INT
current selected attribute index
jsobj.SetCurrentIndex(value);
value = jsobj.GetCurrentIndex();
R3INT value = ...;
R3SetAttrs(r3obj, R3PLAYA_CurrentIndex, value, R3TAG_END);
R3INT value;
R3GetAttrs(r3obj, R3PLAYA_CurrentIndex, &value, R3TAG_END);
r3appobj *