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

Re: Fw: [x3d-public] Size of live Box



I just want to point out, and please correct me if I've got this wrong, that this is ok if you just want to display X3D content in a browser and manipulate it the way the X3D spec allows you to, but it is not very helpful if you want to implement application-level functionality that would otherwise require altering the content as it has been defined in some file or other source, something that might not always be possible. For instance, and this is how I came across this issue, suppose it is required to manipulate parts of an X3D scenegraph based on the bounding boxes of some of its nodes, or even just display those bounding boxes... I cannot see how this can be done for nodes that contain primitive geometry nodes (boxes, spheres, etc) since their live extents cannot be in any way calculated without altering the scenegraph in a way such as you have described using wrapping protos. I understand that size, height, radius and such fields are currently specified just for initialization of underlying "real" nodes, but I simply cannot understand what's the purpose of hiding node information that *is* available to the rendering infrastructure and *might* be useful, while harmless to provide, in some application-level context. Just a thought and by no means an attempt to criticize the X3D spec.

George

----- Original Message ----- From: "Alan Hudson" <giles@yumetech.com>
To: "George Anastassakis" <anastas@unipi.gr>
Cc: <x3d-public@web3d.org>
Sent: Monday, March 27, 2006 7:33 PM
Subject: Re: Fw: [x3d-public] Size of live Box



George Anastassakis wrote:
More generally, how is it possible to get the dimensions of geometric primitive nodes such as Boxes, Spheres, Cones, etc., since all the respective fields (size, radius, height, etc) are initializeOnly?

in general you can't. InitializeOnly fields are not readable. A browser can throw those values away after the file is loaded.

You can wrap them in a proto to make them readable.

PROTO MySphere [
   inputOutput SFVec3f radius 2
] {
   Sphere {
      radius IS radius
   }
}

MySphere {
   radius 4
}


-- Alan Hudson

President Yumetech, Inc.                               www.yumetech.com
President Web3D Consortium                             www.web3d.org
206 340 8900



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