Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Graphics > Inventor API > BoundingBox and...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 1 Topic 481 of 502
Post > Topic >>

BoundingBox and SoCamera

by Andy <andreas@[EMAIL PROTECTED] > Jun 8, 2007 at 04:19 PM

Hello,

I have a problem and I can not find a solution yet.
The goal is to fit a scene best to the viewing window, regardless of
the scene transformation or camera transformation.

My Idea:
I am calculating a bounding box around the scene and then try to get
the X and Y Length to set the SoOrthographicCamera height. The Values
I get from the calculated bounding box are always local to the
bounding box koordinate cross (sizeX,sizeY,sizeZ) ... so far so good.
If the bounding box edges are parallel to the global axis then all
works well. But if the bounding box is rotated in a special way then I
am unable to calculate the length for X and Y direction.
I have made some tests with the boundingbox->getTransform() but it
dosent worked.
I also tried to use boundingbox->getSpan() with the camera up and
right vector .... but this also dosent work if the bounding box is
rotated.

So, maybe you have another idea for my problem.
I just have to calculate the Camera Parameters so that the current
scene is shown best in the viewing window.

I hope you can help me ... I need a solution very soon!

Thanks a lot!!

Andy
 




 1 Posts in Topic:
BoundingBox and SoCamera
Andy <andreas@[EMAIL P  2007-06-08 16:19:04 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Mon Oct 6 14:56:44 CDT 2008.