Hi Alexandra, On Tue, 2006-08-29 at 16:38 +0100, Alexandra Ribeiro wrote:
> I am developing a project that needs at the moment the collision > detection implementation, and I saw that maybe BoxVolume class would > be an answer to my problem. > > What I am trying to do is to create a BoxVolume to each of my scene > objects and then add that BoxVolume as an Attachment node to the > object itself. My question is: how can I make a cast to convert this > BV to a NodePtr or an AttachmentPtr to allow me to associate that node > to the object? Or there is not the need to associate the Box Volume to > the object?? The scenegraph keeps a bounding volume of every Node for its own purposes anyway. You can access it using DynamicVolume &vol = node->getVolume(true); Note that this volume is in the local coordinate frame of the Node. For collision detection you probably want the bounding volume in a global (world) coordinate frame (to compare them against each other). You can get this from the system using DynamicVolume world_vol; node->getWorldVolume(world_vol); Hope it helps Dirk ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ Opensg-users mailing list Opensg-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/opensg-users