PDA

View Full Version : Camera Cone



02-05-2004, 06:12 PM
ok, i have a camera. i have the position, the look at, the field of view and the angle. i want to draw in an orthographic view the camera cone or the viewing frustum. is there an easy way to do this?

targe
02-06-2004, 08:58 AM
ok not sure if this is what you're looking for but i've done something similar to this before.

To show the 'world from above' (plus lines indicating view frustum) e.g. on pressing enter:

1. create new object to show frustum lines, based on vertex coords of current frustum.

2. Turn off any 'if-the-camera-moves-update-the-frustum' code.

3. Remember the previous camera pos/view

4. Move the camera + n hundred units on the
vertical axis (usually Y)

5. Look at the previous camera position.

Then, when you need to go back to the previous view, just reload the previous camera pos/view values and activate anything else you turned off.

02-06-2004, 12:03 PM
ok, i just want to show the camera with the viewing frustum as an object i the scene. i just want to be able to draw it and i am not sure how to draw the actual frustum cone of the camera. i am designing a modeler and i have three orthographic views and one perspective. in each othographic view, i want to show the camera as an object. if i am looking at the XY axis and the camera is on the z axis, i would see the camera and its viewing frustum. of course in the perspective view the camera IS the view. is that a clearer idea of what i am trying to do?