Hi Dirk,

On Fri, 14 Oct 2005, Dirk Reiners wrote:

[...]
The shader is the problem, not the solution. ;) The besy way to handle
this is knowing in which volume the particles can be. Then you can set
the bounding volume of the Node that contains them to that volume and
make it static:

   // set volume static to prevent constant update
   beginEditCP(pnode, Node::VolumeFieldMask);
   Volume &v=pnode->getVolume(false).getInstance();
   v.setEmpty();
   v.extendBy(Pnt3f(0,0,0));
   v.extendBy(Pnt3f(1,1,1));
   v.setStatic();
   ((DynamicVolume&)pnode->getVolume()).instanceChanged();
   endEditCP  (pnode, Node::VolumeFieldMask);

What is actually the difference between pnode->getVolume() and pnode->getVolume(false) ? From the docs it seems they're equal, since Node::getVolume(bool update) is almost the same as Node::getVolume(void), and certainly seems to be the same when update is set to false.

Also, why do you need to call DynamicVolume::instanceChanged() ? This doesn't seem to be very intuitive (and also Gerrit's similar example seems to omit this) plus e.g. DynamicVolume::extendBy() seems to call it anyway...

Just being curious,
        Akos


-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to