Scolring - Forum

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.

#1 15-Dec-2013 15:51:37

hebdemnobad
Member
From: northamerica
Registered: 20-Apr-2011
Posts: 1,535
Website

Doxygen, struct properties question

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

#2 15-Dec-2013 16:50:40

arkeon
Admin. / Scol language & OpenSpace3D developer
From: Nantes
Registered: 30-Mar-2009
Posts: 5,157
Website

Re: Doxygen, struct properties question

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

#3 15-Dec-2013 17:00:45

hebdemnobad
Member
From: northamerica
Registered: 20-Apr-2011
Posts: 1,535
Website

Re: Doxygen, struct properties question

I see.

Offline

#4 15-Dec-2013 17:46:06

iri
Admin. / Scol language & Scol apps developer
From: France
Registered: 22-Feb-2009
Posts: 2,024
Website

Re: Doxygen, struct properties question

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

#5 18-Dec-2013 14:47:43

hebdemnobad
Member
From: northamerica
Registered: 20-Apr-2011
Posts: 1,535
Website

Re: Doxygen, struct properties question

thanks for the reply Iri

Offline

Board footer

Powered by FluxBB