## SoCamera and SoViewVolume confusion

### SoCamera and SoViewVolume confusion

Hi All,
This is regarding the camera and view volume of coin 2.0.2. I want to
create a custom view volume which is a subset of camera view volume,
and want to display objects with different colors which are inside the
new created volume.

For this I first fetch the current volume of the camera.

has //aspectRatio this viewVolume is the frustum of the camera.

To create the custom view volume from the camera view volume, I have
used the SbViewVolume::frustum(...) method.

SbViewVolume customViewVolume=viewVolume;
customViewVolume.frustum(...);// I have all aruments for passing to
this function

Now to check whether a object(rather point for simplcity) lies inside
the frustum, we can use SbPlane.isInHalfSpace(...) method w.r.t. all
the planes of the customViewVolume.
But before checking this, we have to calculate our point w.r.t. camera
position.
My question is :
Does the new frustum(customViewVolume) has same origin and orientation
as the camera?
I mean, Can i use the camera position and orientation to find out the
point w.r.t. new frustum?
if not How can I find the position and orientation of the new
frustom(customViewVolume)??

Best Regards

Hello,

I have an engine which generate a set of three vectors:
- the first one will be used a the camera position
- the second one is the direction of viewing
- the third (vector) is the orientation of the camera (the up direction).

Using this, a camera is completely defined (exluding realistics
considerations: perspective, clipping ...).

But an ordinary SoCamera has only two fields acceptable for these data:
- the position field (no problem with this one !)
- a SoSFRotation field, which hold the transformation that transforms the
(0,0,-1) vector into the real updir (probably assuming that the direction
of viewing is already in the current transformation matrix).

The SoSFRotation is a rotation which is defined by an axis and an angle.
This rotation can be deducted any given two vectors: the original one, and
its rotated counterpart (doing a cross product of these and measuring the
angle via a dot product will do the job). This rotation is not our client !
We need a rotation defined by two vectors and their transformed "images".

The trick can be done using a SoCameraKit, and its SoTransform field (connected
with a SoComposeRotationFromTo), which is quite complicated and sometimes