Hello,

My goal was also to represent the clipping plane. I did like that:

   ClipPlaneChunkPtr clipPlaneChunk = ClipPlaneChunk::create();
NodePtr surfaceClippingPlaneNode = Node::create();
   NodePtr swischenNode = Node::create();
   NodePtr swischenNodeRot = Node::create();

   TransformPtr ClipPlaneTr = Transform::create();

   beginEditCP(surfaceClippingPlaneNode);
   {
       surfaceClippingPlaneNode->setCore(ClipPlaneTr);
       surfaceClippingPlaneNode->addChild(swischenNode);
   }
   endEditCP(surfaceClippingPlaneNode);

   GeometryPtr clipPlaneGeo = makePlaneGeo( 100, 100, 1, 1);
   beginEditCP(swischenNode, Node::CoreFieldMask);
   {
       swischenNode->setCore(clipPlaneGeo);
   }
   endEditCP(swischenNode, Node::CoreFieldMask);

   beginEditCP(clipPlaneChunk);
       clipPlaneChunk->setEnable(true);
       clipPlaneChunk->setBeacon(surfaceClippingPlaneNode);
   endEditCP(clipPlaneChunk);

and I give the surfaceClippingPlaneNode to the root node. If I add this node to the root node it does not work any more. Is it normal ?

I think the solution of my problem is simple, but I would like to know if the problem I had is normal.

Thanks a lot.

Vincent


Vincent Honnet wrote:

Hello Dirk,

As I wrote the test program I saw that it's working well. So I did a mistake in my code. I'm looking for it.

Thanks.

Vincent

Dirk Reiners wrote:

    Hi Vincent,

On Mon, 2005-04-11 at 15:52 +0200, Vincent Honnet wrote:
Hello,

I have a problem with the ClippingPlaneChunk. Here is an exemple of my SG:

Root
   -> Node1
   -> Node2
   -> Node3

Quite simple...

I would like to clip each object with its own plane. I gave to the material of Node1 a ClipPlaneChunkPtr, another one to the Material of Node2, and so on. If I enable the ClipPlaneChunkPtr of Node1, Node1 Node2 and Node3 are clipped but not only Node1. If the ClipPlaneChunkPtr of Node2 is enabled and the other disabled, then Node2 and 3 are clipped. If the ClipPlaneChunkPtr of Node1 and 2 are enabled, the clipping plane of Node2 is not taken into account and Node1 and 2 are clipped with the ClipPlaneChunkPtr of Node1.

Is it possible to clip only one object with a ClipPlaneChunkPtr ?


Yup, that should just work the way you're doing it. I looked at the
ClipPlaneChunk code, but couldn't see anything that would give your
effect.

Could you make an example similar to a tutorial that I could try?

Thanks

    Dirk





--
Vincent Honnet
Photographie und Software Service
Mariahilfstr. 15
52062 Aachen
E-Mail: [EMAIL PROTECTED]
Tel.: 0241 400 8882



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to