NVIDIA IndeX API nvidia_logo_transpbg.gif Up
icamera.h
Go to the documentation of this file.
1/******************************************************************************
2 * Copyright 2023 NVIDIA Corporation. All rights reserved.
3 *****************************************************************************/
6
7#ifndef NVIDIA_INDEX_ICAMERA_H
8#define NVIDIA_INDEX_ICAMERA_H
9
10#include <mi/dice.h>
11#include <mi/base/interface_declare.h>
12
13namespace nv {
14
15namespace index {
16
39class ICamera :
40 public mi::base::Interface_declare<0x1247f2e7,0x1725,0x47e1,0x81,0x57,0x1b,0x63,0xa4,0x85,0x64,0x29,
41 mi::neuraylib::IElement>
42{
43public:
50 virtual void set(
51 const mi::math::Vector_struct<mi::Float32, 3>& eye_point,
52 const mi::math::Vector_struct<mi::Float32, 3>& view_direction,
53 const mi::math::Vector_struct<mi::Float32, 3>& up_direction) = 0;
54
56 //
58 virtual void set_eye_point(const mi::math::Vector_struct<mi::Float32, 3>& eye_point) = 0;
59
62 virtual mi::math::Vector_struct<mi::Float32, 3> get_eye_point() const = 0;
63
68 virtual bool set_view_direction(const mi::math::Vector_struct<mi::Float32, 3>& view_direction) = 0;
69
73 virtual mi::math::Vector_struct<mi::Float32, 3> get_view_direction() const = 0;
74
77 virtual void set_up_direction(const mi::math::Vector_struct<mi::Float32, 3>& up_direction) = 0;
78
81 virtual mi::math::Vector_struct<mi::Float32, 3> get_up_direction() const = 0;
82};
83
105 public mi::base::Interface_declare<0x1c7386d2,0xbd2d,0x4973,0xa8,0xa8,0xb5,0xfc,0xe9,0x0,0x22,0x5e,
106 nv::index::ICamera>
107{
108public:
111 virtual void assign(const IPerspective_camera* other) = 0;
112
115 virtual mi::Float64 get_aperture() const = 0;
118 virtual void set_aperture(mi::Float64 aperture_width) = 0;
119
126 virtual mi::Float64 get_aspect() const = 0;
130 virtual void set_aspect(mi::Float64 aspect_ratio) = 0;
131
134 virtual mi::Float64 get_clip_min() const = 0;
137 virtual void set_clip_min(mi::Float64 clip_min) = 0;
138
141 virtual mi::Float64 get_clip_max() const = 0;
144 virtual void set_clip_max(mi::Float64 clip_max) = 0;
145
148 virtual mi::Float64 get_focal() const = 0;
151 virtual void set_focal(mi::Float64 focal_length) = 0;
152
157 virtual mi::Float64 get_fov_y_rad() const = 0;
158};
159
174 public mi::base::Interface_declare<0xd7d339b2,0xa894,0x4db8,0xbe,0x67,0xe,0x42,0x50,0x19,0x9e,0xee,
175 nv::index::ICamera>
176{
177public:
180 virtual void assign(const IOrthographic_camera* other) = 0;
181
184 virtual mi::Float64 get_aperture() const = 0;
187 virtual void set_aperture(mi::Float64 aperture_width) = 0;
188
195 virtual mi::Float64 get_aspect() const = 0;
199 virtual void set_aspect(mi::Float64 aspect_ratio) = 0;
200
203 virtual mi::Float64 get_clip_min() const = 0;
206 virtual void set_clip_min(mi::Float64 clip_min) = 0;
207
210 virtual mi::Float64 get_clip_max() const = 0;
213 virtual void set_clip_max(mi::Float64 clip_max) = 0;
214};
215
216} // namespace index
217} // namespace nv
218
219#endif // NVIDIA_INDEX_ICAMERA_H
Abstract interface class representing a generic camera.
Definition: icamera.h:42
virtual mi::math::Vector_struct< mi::Float32, 3 > get_eye_point() const =0
Returns the eye point (the origin of the camera's coordinate system).
virtual void set(const mi::math::Vector_struct< mi::Float32, 3 > &eye_point, const mi::math::Vector_struct< mi::Float32, 3 > &view_direction, const mi::math::Vector_struct< mi::Float32, 3 > &up_direction)=0
Set the basic camera parameters.
virtual void set_eye_point(const mi::math::Vector_struct< mi::Float32, 3 > &eye_point)=0
Sets the eye point (the origin of the camera's coordinate system).
virtual void set_up_direction(const mi::math::Vector_struct< mi::Float32, 3 > &up_direction)=0
Sets the up vector.
virtual mi::math::Vector_struct< mi::Float32, 3 > get_view_direction() const =0
Returns the normalized view direction.
virtual bool set_view_direction(const mi::math::Vector_struct< mi::Float32, 3 > &view_direction)=0
Set the view direction.
virtual mi::math::Vector_struct< mi::Float32, 3 > get_up_direction() const =0
Returns the normalized up vector.
Interface class for a camera implementing the orthographic camera model.
Definition: icamera.h:176
virtual void set_aperture(mi::Float64 aperture_width)=0
Sets the aperture width.
virtual mi::Float64 get_aspect() const =0
Returns the aspect ratio, defined as width/height.
virtual mi::Float64 get_clip_max() const =0
Returns the distance to the far clipping plane (yon).
virtual mi::Float64 get_clip_min() const =0
Returns the distance to the near clipping plane (hither).
virtual void assign(const IOrthographic_camera *other)=0
Assign all camera parameters from the source object to this camera.
virtual void set_aspect(mi::Float64 aspect_ratio)=0
Sets the aspect ratio.
virtual void set_clip_min(mi::Float64 clip_min)=0
Sets the distance to the near clipping plane (hither).
virtual mi::Float64 get_aperture() const =0
Returns the aperture width.
virtual void set_clip_max(mi::Float64 clip_max)=0
Sets the distance to the far clipping plane (yon).
Interface class for a camera implementing the perspective camera model.
Definition: icamera.h:107
virtual mi::Float64 get_focal() const =0
Returns the focal length.
virtual void assign(const IPerspective_camera *other)=0
Assign all camera parameters from the source object to this camera.
virtual mi::Float64 get_clip_max() const =0
Returns the distance to the far clipping plane (yon).
virtual void set_aspect(mi::Float64 aspect_ratio)=0
Sets the aspect ratio.
virtual mi::Float64 get_clip_min() const =0
Returns the distance to the near clipping plane (hither).
virtual void set_clip_min(mi::Float64 clip_min)=0
Sets the distance to the near clipping plane (hither).
virtual void set_clip_max(mi::Float64 clip_max)=0
Sets the distance to the far clipping plane (yon).
virtual mi::Float64 get_fov_y_rad() const =0
Returns the vertical field of view.
virtual mi::Float64 get_aperture() const =0
Returns the aperture width.
virtual void set_aperture(mi::Float64 aperture_width)=0
Sets the aperture width.
virtual mi::Float64 get_aspect() const =0
Returns the aspect ratio, defined as width/height.
virtual void set_focal(mi::Float64 focal_length)=0
Sets the focal length.
Common namespace for all NVIDIA APIs.
Definition: iindex.h:349