Login
Username:

Password:

Remember me



Lost Password?

Register now!
Main Menu
H3D.org Feeds
H3D.org Forum Index
   Programming Issues
     Node definition and description
Register To Post

Threaded | Newest First Previous Topic | Next Topic | Bottom
Poster Thread
sajjad
Posted on: 2011/2/11 16:25
Quite a regular
Joined: 2008/5/15
From:
Posts: 35
Node definition and description
Hello forum,

I have read some nodes attributes from the H3DNodeDatabase.

I believe that every node contains at least two fields that define the node . One is the DEF and the other is DESCRIPTION.

DEF is used so that later somewhere in the scene it can be referenced through USE.


TAKE FOR EXAMPLE THE FOLLOWING NODE:

TouchSensor . I read its field contents from the database and the fields are as follows:


Node name: "TouchSensor"
Size of the field contents: 9
"TouchSensor" is not Abstract
Field Name: "enabled" and Field type: "SFBool"
Field Name: "description" and Field type: "SFString"
Field Name: "isActive" and Field type: "SFBool"
Field Name: "hitPoint_changed" and Field type: "SFVec3f"
Field Name: "hitNormal_changed" and Field type: "SFVec3f"
Field Name: "touchTime" and Field type: "SFTime"
Field Name: "isOver" and Field type: "SFBool"
Field Name: "metadata" and Field type: "SFNode"
Field Name: "hitTexCoord_changed" and Field type: "SFVec2f"


Which of the above fields contanis what is defines after DEF=''?

Regards
Sajjad


Markus
Posted on: 2011/2/15 8:40
Webmaster
Joined: 2006/3/27
From: SenseGraphics
Posts: 2224
Online
Re: Node definition and description
To get the DEF of a node you need the a pointer to an instance of the node. If I am not wrong you can not get a list of DEF-names directly from the database. If you created the scene using C++ createX3D(Node)From* functions then you can supply a DEFNodes map which, when the function returns, will contain all DEF-names in the scene.
Threaded | Newest First Previous Topic | Next Topic | Top

Register To Post
 



(C) 2012 SenseGraphics AB    ---    Powered by XOOPS