I would like to cut through an object in a scene (with a plane) and cap the object with some colored surface.
The red book says that this can be done using the stencil buffer. but the method seems to fail if the object intersects with other object in the scene. Does anybody know how to do it?
If you cut an object, you will see it’s inside. You can use the stencil buffer to fill the hole so that it appears solid. You know, if you cut an apple in half, you don’t see the inside of an empty shell, but the actual fruit
Thanks.! Now an extra problem. It seems by reading the read book that a clipping plane will cut everything bellow the infinite clip plane. However I want my clip plane to be finite and
clipping to occur only for the object cut by the plane. Is this
possible?
The problem is I have a scene with 10 objects and somewhere lies my plane. It might or not cut one (or more) of the objects. But I dont know which. Do I need to do some intersection test, or I dont need it?
Thanks
Thanks. Yet another question. Suppose the object I am clipping is drawn in wireframe but without hidden lines. After I clip the object I would like to draw the hidden lines that are exposed by the clipping plane. How to do that?
Yey another question: Suppose I want to clip all objects inside a cube (I know the vertex coordinates of the cube). How do I specify the viewing volume to be this cube?
[This message has been edited by mikemor (edited 10-21-2002).]
I draw a cube in the screen by 6 faces each rendered as a set of 4 vertices(the cube can move) and I would like to define the viewing volume to be the interior of this volume. (so that as the cube moves, the viewing volume also moves)
Any clue on how to set the viewing volume?
Thanks