NVIDIA IndeX API nvidia_logo_transpbg.gif Up
nv::index::IPerspective_camera Class Referenceabstract

Interface class for a camera implementing the perspective camera model. More...

#include <icamera.h>

Inherits mi::base::Interface_declare< 0x1c7386d2, ... >.

Public Member Functions

virtual void assign (const IPerspective_camera *other)=0
 Assign all camera parameters from the source object to this camera. More...
 
virtual mi::Float64 get_aperture () const =0
 Returns the aperture width. More...
 
virtual void set_aperture (mi::Float64 aperture_width)=0
 Sets the aperture width. More...
 
virtual mi::Float64 get_aspect () const =0
 Returns the aspect ratio, defined as width/height. More...
 
virtual void set_aspect (mi::Float64 aspect_ratio)=0
 Sets the aspect ratio. More...
 
virtual mi::Float64 get_clip_min () const =0
 Returns the distance to the near clipping plane (hither). More...
 
virtual void set_clip_min (mi::Float64 clip_min)=0
 Sets the distance to the near clipping plane (hither). More...
 
virtual mi::Float64 get_clip_max () const =0
 Returns the distance to the far clipping plane (yon). More...
 
virtual void set_clip_max (mi::Float64 clip_max)=0
 Sets the distance to the far clipping plane (yon). More...
 
virtual mi::Float64 get_focal () const =0
 Returns the focal length. More...
 
virtual void set_focal (mi::Float64 focal_length)=0
 Sets the focal length. More...
 
virtual mi::Float64 get_fov_y_rad () const =0
 Returns the vertical field of view. More...
 

Detailed Description

Interface class for a camera implementing the perspective camera model.

For perspective projection, the field of view of the camera can be controlled by setting the aperture and the focal length. In this simple camera model the aperture describes the width of the viewing plane, while the focal length controls the distance from the viewing plane to the eye point. The horizontal field of view is then defined as the ratio of the aperture to the focal length. The aspect ratio is defined as the ratio of the width to the height of the rendering canvas. Using this ratio, the vertical field of view can also be computed as the ratio of the aperture to the product of the aspect ratio and the focal length.

Other attributes stored in the IPerspective_camera class include the near and far clipping planes and the canvas resolution (width and height).

Member Function Documentation

 assign()

virtual void nv::index::IPerspective_camera::assign ( const IPerspective_camera other)
pure virtual

Assign all camera parameters from the source object to this camera.

Parameters
[in]otherSource camera

 get_aperture()

virtual mi::Float64 nv::index::IPerspective_camera::get_aperture ( ) const
pure virtual

Returns the aperture width.

Returns
aperture width

 get_aspect()

virtual mi::Float64 nv::index::IPerspective_camera::get_aspect ( ) const
pure virtual

Returns the aspect ratio, defined as width/height.

Note
This does not take the canvas size controlled by set_resolution_x() and set_resolution_y() into account.
Returns
aspect ratio

 get_clip_max()

virtual mi::Float64 nv::index::IPerspective_camera::get_clip_max ( ) const
pure virtual

Returns the distance to the far clipping plane (yon).

Returns
far clipping plane distance

 get_clip_min()

virtual mi::Float64 nv::index::IPerspective_camera::get_clip_min ( ) const
pure virtual

Returns the distance to the near clipping plane (hither).

Returns
near clipping plane distance

 get_focal()

virtual mi::Float64 nv::index::IPerspective_camera::get_focal ( ) const
pure virtual

Returns the focal length.

Returns
focal length

 get_fov_y_rad()

virtual mi::Float64 nv::index::IPerspective_camera::get_fov_y_rad ( ) const
pure virtual

Returns the vertical field of view.

It is calculated from the aperture, aspect ratio and focal length settings.

Returns
Field of view, in radians

 set_aperture()

virtual void nv::index::IPerspective_camera::set_aperture ( mi::Float64  aperture_width)
pure virtual

Sets the aperture width.

Parameters
[in]aperture_widthAperture width

 set_aspect()

virtual void nv::index::IPerspective_camera::set_aspect ( mi::Float64  aspect_ratio)
pure virtual

Sets the aspect ratio.

It is defined a width/height.

Parameters
[in]aspect_ratioAspect ratio, must be positive

 set_clip_max()

virtual void nv::index::IPerspective_camera::set_clip_max ( mi::Float64  clip_max)
pure virtual

Sets the distance to the far clipping plane (yon).

Parameters
[in]clip_maxDistance

 set_clip_min()

virtual void nv::index::IPerspective_camera::set_clip_min ( mi::Float64  clip_min)
pure virtual

Sets the distance to the near clipping plane (hither).

Parameters
[in]clip_minDistance

 set_focal()

virtual void nv::index::IPerspective_camera::set_focal ( mi::Float64  focal_length)
pure virtual

Sets the focal length.

Parameters
[in]focal_lengthFocal length

The documentation for this class was generated from the following file: