The example you see on that page uses the SoClipPlaneManip just cut
the jetplane off with a plane. It then uses a callback-action to get
all the triangles in the scene (setTriangleCallback()) and intersects
them against the same clipping plane to get the line pieces of the cut.
I used the SbClip class in Coin for this.
The random line pieces were then organized into loops. Where two lines
continue in the same direction, the two lines are joined into one instead
to get rid of uninteresting vertices. Then an SoIndexedLineSet is created
to render the loops, and an SoMarkerSet is used to mark the vertex
positions. This geometry is placed behind the separator that contains
the clipplanemanip and the jetplane so it is not affected by the
clipping.
Regards,
Lars J
Thanks a lot for this solution. As I am not very comfortable with
Coin3D, let me know whether this example come part of the Coin3D
samples? I would appreciate if you can point me to the source code.
Thanks
-Binoy
> Regards,
>
> Lars J
Strings, actually, not loops. Had to check if the string was a loop when
removing superfluous vertices though.
> > continue in the same direction, the two lines are joined into one instead
> > to get rid of uninteresting vertices. Then an SoIndexedLineSet is created
> > to render the loops, and an SoMarkerSet is used to mark the vertex
> > positions. This geometry is placed behind the separator that contains
> > the clipplanemanip and the jetplane so it is not affected by the
> > clipping.
>
> Thanks a lot for this solution. As I am not very comfortable with
> Coin3D, let me know whether this example come part of the Coin3D
> samples? I would appreciate if you can point me to the source code.
The code was developed for an external contractor, so it's not our own
intellectual property. I'll do a quick check on what can be done with
the code, but I doubt anything comes of it...
Lars J
Thanks Lars!, in the mean time let me try and write down the code the
way I understood it.
-Binoy
> Lars J
All the code are belong to us ;), it turns out, so I'll make an example out
of it. I just don't have the time to do it right now...
Lars J
Hello Lars,
Thanks a lot for the help!