Create a clipping plane

Apr 20, 2011 at 7:27 PM

Total Noob question, but...

Is there a way to create an arbitrary clipping plane.  My goal is to show a cut-away view of objects on the screen and then look at the cut-away view from any angle.  I can move the camera clipping plane but the view from any angle part is tricky.

Apr 24, 2011 at 12:44 PM
Edited Apr 24, 2011 at 12:47 PM

So they way I am going about it is to create a plane and then move/delete the nodes above the plane. 

//psuedocode

Plane plane = new Plane();

for (int i = 0; i < object.numVertices; ++i){
     Vertex vert = originalObject.getVertex(i);
     Vertex rest = cloneObject.getVert(i);

     if (vert.X > plane.X)
     {
          vert.X = plane.X;
     }  else
     {
          vert.X = rest.X
     }

     if (vert.Y > plane.Y)
     {
          vert.Y = plane.Y;
     }  else
     {
          vert.Y = rest.Y
     }

     if (vert.Z > plane.Z)
     {
          vert.Z = plane.Z;
     }  else
     {
          vert.Z = rest.Z
     }

}

What do you think, am I going about it the wrong way?

Coordinator
Apr 26, 2011 at 7:39 AM

Hi,

the software renderer is optimized only for clipping against the viewing frustum and is not using clipping planes. But for hardware acceleration with SL5, XNA and other platforms this should be possible and certainly a feature that should go into Balder. I'll put up a work item so its not forgotten in the future. 

Coordinator
Apr 26, 2011 at 7:40 AM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.