Blender V4.3
Camera Class Reference

#include <DNA_camera_types.h>

Inherits Node.

Public Types

enum  RollingShutterType { ROLLING_SHUTTER_NONE = 0 , ROLLING_SHUTTER_TOP = 1 , ROLLING_SHUTTER_NUM_TYPES }
enum  StereoEye { STEREO_NONE , STEREO_LEFT , STEREO_RIGHT }

Public Member Functions

 Camera ()
 ~Camera ()
void compute_auto_viewplane ()
void update (Scene *scene)
void device_update (Device *device, DeviceScene *dscene, Scene *scene)
void device_update_volume (Device *device, DeviceScene *dscene, Scene *scene)
void device_free (Device *device, DeviceScene *dscene, Scene *scene)
BoundBox viewplane_bounds_get ()
float world_to_raster_size (float3 P)
float motion_time (int step) const
int motion_step (float time) const
bool use_motion () const
void set_screen_size (int width_, int height_)
Public Member Functions inherited from Node
 Node (const NodeType *type, ustring name=ustring())
virtual ~Node ()=0
void set (const SocketType &input, bool value)
void set (const SocketType &input, int value)
void set (const SocketType &input, uint value)
void set (const SocketType &input, uint64_t value)
void set (const SocketType &input, float value)
void set (const SocketType &input, float2 value)
void set (const SocketType &input, float3 value)
void set (const SocketType &input, const char *value)
void set (const SocketType &input, ustring value)
void set (const SocketType &input, const Transform &value)
void set (const SocketType &input, Node *value)
template<class ValueType, std::enable_if_t< std::is_enum_v< ValueType >, bool > = true>
void set (const SocketType &input, const ValueType &value)
void set (const SocketType &input, array< bool > &value)
void set (const SocketType &input, array< int > &value)
void set (const SocketType &input, array< float > &value)
void set (const SocketType &input, array< float2 > &value)
void set (const SocketType &input, array< float3 > &value)
void set (const SocketType &input, array< ustring > &value)
void set (const SocketType &input, array< Transform > &value)
void set (const SocketType &input, array< Node * > &value)
bool get_bool (const SocketType &input) const
int get_int (const SocketType &input) const
uint get_uint (const SocketType &input) const
uint64_t get_uint64 (const SocketType &input) const
float get_float (const SocketType &input) const
float2 get_float2 (const SocketType &input) const
float3 get_float3 (const SocketType &input) const
ustring get_string (const SocketType &input) const
Transform get_transform (const SocketType &input) const
Nodeget_node (const SocketType &input) const
const array< bool > & get_bool_array (const SocketType &input) const
const array< int > & get_int_array (const SocketType &input) const
const array< float > & get_float_array (const SocketType &input) const
const array< float2 > & get_float2_array (const SocketType &input) const
const array< float3 > & get_float3_array (const SocketType &input) const
const array< ustring > & get_string_array (const SocketType &input) const
const array< Transform > & get_transform_array (const SocketType &input) const
const array< Node * > & get_node_array (const SocketType &input) const
bool has_default_value (const SocketType &input) const
void set_default_value (const SocketType &input)
bool equals_value (const Node &other, const SocketType &input) const
void copy_value (const SocketType &input, const Node &other, const SocketType &other_input)
void set_value (const SocketType &input, const Node &other, const SocketType &other_input)
bool equals (const Node &other) const
void hash (MD5Hash &md5)
size_t get_total_size_in_bytes () const
bool is_a (const NodeType *type)
bool socket_is_modified (const SocketType &input) const
bool is_modified () const
void tag_modified ()
void clear_modified ()
void print_modified_sockets () const
const NodeOwnerget_owner () const
void set_owner (const NodeOwner *owner_)
int reference_count () const
void reference ()
void dereference ()
void clear_reference_count ()

Public Attributes

ID id
struct AnimDataadt
char type
char dtx
short flag
float passepartalpha
float clip_start
float clip_end
float lens
float ortho_scale
float drawsize
float sensor_x
float sensor_y
float shiftx
float shifty
float dof_distance DNA_DEPRECATED
char sensor_fit
char panorama_type
char _pad [2]
float fisheye_fov
float fisheye_lens
float latitude_min
float latitude_max
float longitude_min
float longitude_max
float fisheye_polynomial_k0
float fisheye_polynomial_k1
float fisheye_polynomial_k2
float fisheye_polynomial_k3
float fisheye_polynomial_k4
float central_cylindrical_range_u_min
float central_cylindrical_range_u_max
float central_cylindrical_range_v_min
float central_cylindrical_range_v_max
float central_cylindrical_radius
float _pad2
struct Ipo *ipo DNA_DEPRECATED
struct Object *dof_ob DNA_DEPRECATED
struct GPUDOFSettings gpu_dof DNA_DEPRECATED
struct CameraDOFSettings dof
struct ListBase bg_images
struct CameraStereoSettings stereo
Camera_Runtime runtime
size_t shutter_table_offset
BoundBox2D viewplane
BoundBox2D border
BoundBox2D viewport_camera_border
ProjectionTransform screentoworld
ProjectionTransform rastertoworld
ProjectionTransform ndctoworld
Transform cameratoworld
ProjectionTransform worldtoraster
ProjectionTransform worldtoscreen
ProjectionTransform worldtondc
Transform worldtocamera
ProjectionTransform rastertocamera
ProjectionTransform full_rastertocamera
float3 dx
float3 dy
float3 full_dx
float3 full_dy
float3 frustum_right_normal
float3 frustum_top_normal
float3 frustum_left_normal
float3 frustum_bottom_normal
bool need_device_update
bool need_flags_update
int previous_need_motion
KernelCamera kernel_camera
array< DecomposedTransformkernel_camera_motion
Public Attributes inherited from Node
ustring name
const NodeTypetype
InternalNode internal
LeafNode leaf

Additional Inherited Members

Protected Member Functions inherited from Node
template<typename T>
void set_if_different (const SocketType &input, T value)
void set_if_different (const SocketType &input, Node *value)
template<typename T>
void set_if_different (const SocketType &input, array< T > &value)
void set_if_different (const SocketType &input, array< Node * > &value)
void dereference_all_used_nodes ()
Static Protected Member Functions inherited from Node
template<typename T>
static Tget_socket_value (const Node *node, const SocketType &socket)
Protected Attributes inherited from Node
const NodeOwnerowner
int ref_count {0}
SocketModifiedFlags socket_modified

Detailed Description

Definition at line 73 of file DNA_camera_types.h.

Member Enumeration Documentation

◆ RollingShutterType

Enumerator
ROLLING_SHUTTER_NONE 
ROLLING_SHUTTER_TOP 
ROLLING_SHUTTER_NUM_TYPES 

Definition at line 35 of file scene/camera.h.

◆ StereoEye

Enumerator
STEREO_NONE 
STEREO_LEFT 
STEREO_RIGHT 

Definition at line 45 of file scene/camera.h.

Constructor & Destructor Documentation

◆ Camera()

◆ ~Camera()

Camera::~Camera ( )

Definition at line 198 of file scene/camera.cpp.

Member Function Documentation

◆ compute_auto_viewplane()

void Camera::compute_auto_viewplane ( )

Definition at line 200 of file scene/camera.cpp.

References CAMERA_PANORAMA, float, and viewplane.

Referenced by Camera().

◆ device_free()

void Camera::device_free ( Device * device,
DeviceScene * dscene,
Scene * scene )

◆ device_update()

◆ device_update_volume()

void Camera::device_update_volume ( Device * device,
DeviceScene * dscene,
Scene * scene )

◆ motion_step()

int Camera::motion_step ( float time) const

Definition at line 844 of file scene/camera.cpp.

References motion_time(), and use_motion().

◆ motion_time()

float Camera::motion_time ( int step) const

Definition at line 839 of file scene/camera.cpp.

References use_motion().

Referenced by motion_step().

◆ set_screen_size()

void Camera::set_screen_size ( int width_,
int height_ )

Definition at line 830 of file scene/camera.cpp.

References Node::tag_modified().

Referenced by GeometryManager::device_update(), and Session::update_scene().

◆ update()

void Camera::update ( Scene * scene)

Definition at line 225 of file scene/camera.cpp.

References NamedTimeStats::add_entry(), KernelCamera::aperturesize, KernelCamera::blades, KernelCamera::bladesrotation, SceneUpdateStats::camera, CAMERA_ORTHOGRAPHIC, CAMERA_PANORAMA, CAMERA_PERSPECTIVE, cameratoworld, KernelCamera::cameratoworld, KernelCamera::central_cylindrical_range, central_cylindrical_range_u_max, central_cylindrical_range_u_min, central_cylindrical_range_v_max, central_cylindrical_range_v_min, Node::clear_modified(), KernelCamera::cliplength, KernelCamera::convergence_distance, dx, KernelCamera::dx, dy, KernelCamera::dy, KernelCamera::equirectangular_range, fisheye_fov, KernelCamera::fisheye_fov, fisheye_lens, KernelCamera::fisheye_lens, KernelCamera::fisheye_lens_polynomial_bias, KernelCamera::fisheye_lens_polynomial_coefficients, fisheye_polynomial_k0, fisheye_polynomial_k1, fisheye_polynomial_k2, fisheye_polynomial_k3, fisheye_polynomial_k4, float3_to_float4(), FLT_MAX, KernelCamera::focaldistance, frustum_bottom_normal, frustum_left_normal, frustum_right_normal, frustum_top_normal, full_dx, full_dy, full_rastertocamera, KernelCamera::have_perspective_motion, KernelCamera::height, KernelCamera::interocular_offset, KernelCamera::inv_aperture_ratio, KernelCamera::is_inside_volume, Node::is_modified(), kernel_camera, kernel_camera_motion, latitude_max, latitude_min, longitude_max, longitude_min, M_PI_2_F, make_float3(), make_float4(), max, Scene::MOTION_BLUR, Scene::MOTION_PASS, KernelCamera::motion_pass_post, KernelCamera::motion_pass_pre, KernelCamera::motion_position, ndctoworld, KernelCamera::ndctoworld, KernelCamera::nearclip, need_device_update, need_flags_update, Scene::need_motion(), normalize(), KernelCamera::num_motion_steps, panorama_type, KernelCamera::panorama_type, KernelCamera::perspective_post, KernelCamera::perspective_pre, KernelCamera::pole_merge_angle_from, KernelCamera::pole_merge_angle_to, previous_need_motion, projection_identity(), projection_inverse(), projection_orthographic(), projection_perspective(), rastertocamera, KernelCamera::rastertocamera, rastertoworld, KernelCamera::rastertoworld, KernelCamera::rolling_shutter_duration, KernelCamera::rolling_shutter_type, screentoworld, KernelCamera::screentoworld, KernelCamera::sensorheight, KernelCamera::sensorwidth, KernelCamera::shuttertime, STEREO_LEFT, STEREO_NONE, STEREO_RIGHT, timer, UpdateTimeStats::times, transform_direction(), transform_from_viewplane(), transform_inverse(), transform_motion_decompose(), transform_perspective(), transform_perspective_direction(), transform_scale(), KernelCamera::type, Scene::update_stats, v, viewplane, viewport_camera_border, KernelCamera::width, worldtocamera, KernelCamera::worldtocamera, worldtondc, KernelCamera::worldtondc, worldtoraster, KernelCamera::worldtoraster, worldtoscreen, KernelCamera::worldtoscreen, and zero_float3().

Referenced by device_update(), and xml_read_camera().

◆ use_motion()

bool Camera::use_motion ( ) const

Definition at line 825 of file scene/camera.cpp.

Referenced by motion_step(), and motion_time().

◆ viewplane_bounds_get()

BoundBox Camera::viewplane_bounds_get ( )

◆ world_to_raster_size()

Member Data Documentation

◆ _pad

char Camera::_pad[2]

Definition at line 92 of file DNA_camera_types.h.

◆ _pad2

float Camera::_pad2

Definition at line 111 of file DNA_camera_types.h.

◆ adt

struct AnimData* Camera::adt

Animation data (must be immediately after id for utilities to use it).

Definition at line 76 of file DNA_camera_types.h.

Referenced by acf_dscam_setting_ptr(), make_new_animlistelem(), and AnimationImporter::translate_Animations().

◆ bg_images

◆ border

BoundBox2D Camera::border

Definition at line 129 of file scene/camera.h.

Referenced by BlenderSync::get_buffer_params().

◆ cameratoworld

Transform Camera::cameratoworld

Definition at line 154 of file scene/camera.h.

Referenced by Camera(), update(), viewplane_bounds_get(), and world_to_raster_size().

◆ central_cylindrical_radius

float Camera::central_cylindrical_radius

Definition at line 110 of file DNA_camera_types.h.

Referenced by blo_do_versions_400().

◆ central_cylindrical_range_u_max

float Camera::central_cylindrical_range_u_max

Definition at line 107 of file DNA_camera_types.h.

Referenced by blo_do_versions_400(), and update().

◆ central_cylindrical_range_u_min

float Camera::central_cylindrical_range_u_min

Definition at line 106 of file DNA_camera_types.h.

Referenced by blo_do_versions_400(), and update().

◆ central_cylindrical_range_v_max

float Camera::central_cylindrical_range_v_max

Definition at line 109 of file DNA_camera_types.h.

Referenced by blo_do_versions_400(), and update().

◆ central_cylindrical_range_v_min

float Camera::central_cylindrical_range_v_min

Definition at line 108 of file DNA_camera_types.h.

Referenced by blo_do_versions_400(), and update().

◆ clip_end

◆ clip_start

◆ DNA_DEPRECATED [1/4]

float dof_distance Camera::DNA_DEPRECATED

Definition at line 88 of file DNA_camera_types.h.

◆ DNA_DEPRECATED [2/4]

struct Ipo* ipo Camera::DNA_DEPRECATED

Old animation system, deprecated for 2.5.

Definition at line 114 of file DNA_camera_types.h.

◆ DNA_DEPRECATED [3/4]

struct Object* dof_ob Camera::DNA_DEPRECATED

Definition at line 116 of file DNA_camera_types.h.

◆ DNA_DEPRECATED [4/4]

struct GPUDOFSettings gpu_dof Camera::DNA_DEPRECATED

Definition at line 117 of file DNA_camera_types.h.

◆ dof

◆ drawsize

◆ dtx

char Camera::dtx

Draw type extra.

Definition at line 81 of file DNA_camera_types.h.

Referenced by drawviewborder().

◆ dx

float3 Camera::dx

Definition at line 165 of file scene/camera.h.

Referenced by Camera(), update(), and world_to_raster_size().

◆ dy

float3 Camera::dy

Definition at line 166 of file scene/camera.h.

Referenced by Camera(), and update().

◆ fisheye_fov

float Camera::fisheye_fov

◆ fisheye_lens

float Camera::fisheye_lens

◆ fisheye_polynomial_k0

float Camera::fisheye_polynomial_k0

◆ fisheye_polynomial_k1

float Camera::fisheye_polynomial_k1

◆ fisheye_polynomial_k2

float Camera::fisheye_polynomial_k2

◆ fisheye_polynomial_k3

float Camera::fisheye_polynomial_k3

◆ fisheye_polynomial_k4

float Camera::fisheye_polynomial_k4

◆ flag

◆ frustum_bottom_normal

float3 Camera::frustum_bottom_normal

Definition at line 174 of file scene/camera.h.

Referenced by update(), and world_to_raster_size().

◆ frustum_left_normal

float3 Camera::frustum_left_normal

Definition at line 173 of file scene/camera.h.

Referenced by update(), and world_to_raster_size().

◆ frustum_right_normal

float3 Camera::frustum_right_normal

Definition at line 171 of file scene/camera.h.

Referenced by update(), and world_to_raster_size().

◆ frustum_top_normal

float3 Camera::frustum_top_normal

Definition at line 172 of file scene/camera.h.

Referenced by update(), and world_to_raster_size().

◆ full_dx

float3 Camera::full_dx

Definition at line 168 of file scene/camera.h.

Referenced by update(), and world_to_raster_size().

◆ full_dy

float3 Camera::full_dy

Definition at line 169 of file scene/camera.h.

Referenced by update(), and world_to_raster_size().

◆ full_rastertocamera

ProjectionTransform Camera::full_rastertocamera

Definition at line 163 of file scene/camera.h.

Referenced by Camera(), update(), and world_to_raster_size().

◆ id

◆ kernel_camera

KernelCamera Camera::kernel_camera

Definition at line 182 of file scene/camera.h.

Referenced by Camera(), device_update(), update(), and world_to_raster_size().

◆ kernel_camera_motion

array<DecomposedTransform> Camera::kernel_camera_motion

Definition at line 183 of file scene/camera.h.

Referenced by device_update(), update(), and world_to_raster_size().

◆ latitude_max

float Camera::latitude_max

◆ latitude_min

float Camera::latitude_min

◆ lens

◆ longitude_max

float Camera::longitude_max

◆ longitude_min

float Camera::longitude_min

◆ ndctoworld

ProjectionTransform Camera::ndctoworld

Definition at line 153 of file scene/camera.h.

Referenced by Camera(), and update().

◆ need_device_update

bool Camera::need_device_update

Definition at line 177 of file scene/camera.h.

Referenced by Camera(), device_update(), device_update_volume(), and update().

◆ need_flags_update

bool Camera::need_flags_update

Definition at line 178 of file scene/camera.h.

Referenced by Camera(), device_update_volume(), update(), and xml_read_camera().

◆ ortho_scale

◆ panorama_type

char Camera::panorama_type

◆ passepartalpha

float Camera::passepartalpha

Definition at line 83 of file DNA_camera_types.h.

Referenced by blo_do_versions_pre250(), and drawviewborder().

◆ previous_need_motion

int Camera::previous_need_motion

Definition at line 179 of file scene/camera.h.

Referenced by Camera(), and update().

◆ rastertocamera

ProjectionTransform Camera::rastertocamera

Definition at line 161 of file scene/camera.h.

Referenced by Camera(), and update().

◆ rastertoworld

ProjectionTransform Camera::rastertoworld

Definition at line 152 of file scene/camera.h.

Referenced by Camera(), and update().

◆ runtime

Camera_Runtime Camera::runtime

Runtime data (keep last).

Definition at line 127 of file DNA_camera_types.h.

◆ screentoworld

ProjectionTransform Camera::screentoworld

Definition at line 151 of file scene/camera.h.

Referenced by Camera(), and update().

◆ sensor_fit

◆ sensor_x

◆ sensor_y

◆ shiftx

◆ shifty

◆ shutter_table_offset

size_t Camera::shutter_table_offset

Definition at line 55 of file scene/camera.h.

Referenced by Camera(), device_free(), and device_update().

◆ stereo

◆ type

◆ viewplane

BoundBox2D Camera::viewplane

Definition at line 116 of file scene/camera.h.

Referenced by compute_auto_viewplane(), and update().

◆ viewport_camera_border

BoundBox2D Camera::viewport_camera_border

Definition at line 135 of file scene/camera.h.

Referenced by update().

◆ worldtocamera

Transform Camera::worldtocamera

Definition at line 159 of file scene/camera.h.

Referenced by update(), and world_to_raster_size().

◆ worldtondc

ProjectionTransform Camera::worldtondc

Definition at line 158 of file scene/camera.h.

Referenced by update().

◆ worldtoraster

ProjectionTransform Camera::worldtoraster

Definition at line 156 of file scene/camera.h.

Referenced by Camera(), and update().

◆ worldtoscreen

ProjectionTransform Camera::worldtoscreen

Definition at line 157 of file scene/camera.h.

Referenced by update().


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