[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [x3d-public] Xj3D: Help with default values on createNode



dani rodriguez wrote:

Im trying this piece of code:

SAINode shape=(SAINode)x3dScene.createNode("Shape");
SFNode nodeGeometry=(SFNode)shape.getField("geometry");
SAINode node=(SAINode)x3dScene.createNode("Box");
SFVec3f size=(SFVec3f)node.getField("size");
size.setValue(new float[]{3,3,3});


but Box size remains 2,2,2 (default value), i noticed that:
size.isWritable() returns false, so i should be able to set that size on Box creation, the question is How?


and ... Can i create a node from a String containing a piece of x3d code, and then add that to my current loaded scene?

this is fixed in CVS. It was an issue with when a node is realized. I'll have a better idea when next release of Xj3D will be next week.

-------------------------------------------------------------------------
for list subscription/unsubscription,
go to http://www.web3d.org/cgi-bin/public_list_signup/lwgate/listsavail.html