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

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



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?


Daniel Rodriguez Millan


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