Entraides et échanges autour de la technologie Scol - Informations and exchanges on the Scol technology
Vous pouvez changer la langue de l'interface une fois inscrit - You can change the language once registered
You are not logged in.
Pages: 1
Hello colleagues:
I have a question about objects/functions in the Doxygen documentation in redmine, take
V3DaddShell ( sessionstr ,
name ,
idx ,
father ,
pos ,
ang
)
So if I have the code:
let V3DaddShell c3dXsession "HENRY" 3675 nil [0.0 (-.1.7) 0.0] [0.0 0.0 0.0 1.0] -> new_avatar_node in
(
Can I access the properites of new_avatar_node by using dot syntax, such as:
_fooS new_avatar_node.name;
_fooS (itoa new_avatar_node.idx);
//and so on?
in other words, can I use the function definition in doxygen to get the names of the fields (or properties) of a specific instance of a node returned by V3DaddShell?
thanks!
-h
Last edited by hebdemnobad (15-Dec-2013 16:04:39)
Offline
no you can't this way. the object returned is not a structure.
Prototype: fun [V3Dsession S I SO3_OBJECT [F F F] [F F F F]] SO3_OBJECT
you will have to use the SO3 API to get the node name
Offline
I see.
Offline
Arkeon is right. V3DaddShell add a shell in the scene. The return value is an Scol object SO3_OBJECT.
To understand, to adding this shell, you must give some parameters (the arguments of the function) such as a name.
As all functions, these arguments are named ("sessionstr", "name", "idx", ...).
Basically, when you write :
fun myFunction (name, age, address)=
_fooS name;
_fooId age;
_fooS address;
0;;
"name", "age", "address" can be replaced by what you want, there is no link between the name of the argument and its value :
fun myFunction (pif, paf, pof)=
_fooS pif;
_fooId paf;
_fooS pof;
0;;
This is the same thing.
Thus, the V3DaddShell arguments are simply names, that's all.
You can not get any structure fields by this way, never. The Scol object (here SO3_OBJECT) is written in C++, not a Scol. You MUST use the SO3Engine API.
The complete SO3Engine API documentation can be found here from the Scol documentation :
http://www.scolring.org/files/doc_html/so3dengine.html
In this case, you can click on "Modules" and search in Object/Node. Or directly : http://redmine.scolring.org/projects/so … o3obj.html
You'll find SO3ObjectGetName :
"Return a node's name. "
Its prototype : fun [SO3_OBJECT] S
Offline
thanks for the reply Iri
Offline
Pages: 1