Changeset View
Changeset View
Standalone View
Standalone View
intern/cycles/render/camera.h
| Show All 15 Lines | |||||
| #ifndef __CAMERA_H__ | #ifndef __CAMERA_H__ | ||||
| #define __CAMERA_H__ | #define __CAMERA_H__ | ||||
| #include "kernel/kernel_types.h" | #include "kernel/kernel_types.h" | ||||
| #include "graph/node.h" | #include "graph/node.h" | ||||
| #include "util/util_api.h" | |||||
| #include "util/util_array.h" | #include "util/util_array.h" | ||||
| #include "util/util_boundbox.h" | #include "util/util_boundbox.h" | ||||
| #include "util/util_projection.h" | #include "util/util_projection.h" | ||||
| #include "util/util_transform.h" | #include "util/util_transform.h" | ||||
| #include "util/util_types.h" | #include "util/util_types.h" | ||||
| CCL_NAMESPACE_BEGIN | CCL_NAMESPACE_BEGIN | ||||
| Show All 39 Lines | enum StereoEye { | ||||
| STEREO_LEFT, | STEREO_LEFT, | ||||
| STEREO_RIGHT, | STEREO_RIGHT, | ||||
| }; | }; | ||||
| /* motion blur */ | /* motion blur */ | ||||
| NODE_SOCKET_API(float, shuttertime) | NODE_SOCKET_API(float, shuttertime) | ||||
| NODE_SOCKET_API(MotionPosition, motion_position) | NODE_SOCKET_API(MotionPosition, motion_position) | ||||
| NODE_SOCKET_API_ARRAY(array<float>, shutter_curve) | NODE_SOCKET_API_ARRAY(array<float>, shutter_curve) | ||||
| size_t shutter_table_offset; | |||||
| /* ** Rolling shutter effect. ** */ | /* ** Rolling shutter effect. ** */ | ||||
| /* Defines rolling shutter effect type. */ | /* Defines rolling shutter effect type. */ | ||||
| NODE_SOCKET_API(RollingShutterType, rolling_shutter_type) | NODE_SOCKET_API(RollingShutterType, rolling_shutter_type) | ||||
| /* Specifies exposure time of scanlines when using | /* Specifies exposure time of scanlines when using | ||||
| * rolling shutter effect. | * rolling shutter effect. | ||||
| */ | */ | ||||
| NODE_SOCKET_API(float, rolling_shutter_duration) | NODE_SOCKET_API(float, rolling_shutter_duration) | ||||
| Show All 33 Lines | public: | ||||
| NODE_SOCKET_API(float, sensorwidth) | NODE_SOCKET_API(float, sensorwidth) | ||||
| NODE_SOCKET_API(float, sensorheight) | NODE_SOCKET_API(float, sensorheight) | ||||
| /* clipping */ | /* clipping */ | ||||
| NODE_SOCKET_API(float, nearclip) | NODE_SOCKET_API(float, nearclip) | ||||
| NODE_SOCKET_API(float, farclip) | NODE_SOCKET_API(float, farclip) | ||||
| /* screen */ | /* screen */ | ||||
| BoundBox2D viewplane; | GET_READ_ONLY(BoundBox2D, viewplane) | ||||
| NODE_SOCKET_API_STRUCT_MEMBER(float, viewplane, left) | NODE_SOCKET_API_STRUCT_MEMBER(float, viewplane, left) | ||||
| NODE_SOCKET_API_STRUCT_MEMBER(float, viewplane, right) | NODE_SOCKET_API_STRUCT_MEMBER(float, viewplane, right) | ||||
| NODE_SOCKET_API_STRUCT_MEMBER(float, viewplane, bottom) | NODE_SOCKET_API_STRUCT_MEMBER(float, viewplane, bottom) | ||||
| NODE_SOCKET_API_STRUCT_MEMBER(float, viewplane, top) | NODE_SOCKET_API_STRUCT_MEMBER(float, viewplane, top) | ||||
| /* width and height change during preview, so we need these for calculating dice rates. */ | /* width and height change during preview, so we need these for calculating dice rates. */ | ||||
| NODE_SOCKET_API(int, full_width) | NODE_SOCKET_API(int, full_width) | ||||
| NODE_SOCKET_API(int, full_height) | NODE_SOCKET_API(int, full_height) | ||||
| /* controls how fast the dicing rate falls off for geometry out side of view */ | /* controls how fast the dicing rate falls off for geometry out side of view */ | ||||
| NODE_SOCKET_API(float, offscreen_dicing_scale) | NODE_SOCKET_API(float, offscreen_dicing_scale) | ||||
| /* border */ | /* border */ | ||||
| BoundBox2D border; | GET_READ_ONLY(BoundBox2D, border) | ||||
| NODE_SOCKET_API_STRUCT_MEMBER(float, border, left) | NODE_SOCKET_API_STRUCT_MEMBER(float, border, left) | ||||
| NODE_SOCKET_API_STRUCT_MEMBER(float, border, right) | NODE_SOCKET_API_STRUCT_MEMBER(float, border, right) | ||||
| NODE_SOCKET_API_STRUCT_MEMBER(float, border, bottom) | NODE_SOCKET_API_STRUCT_MEMBER(float, border, bottom) | ||||
| NODE_SOCKET_API_STRUCT_MEMBER(float, border, top) | NODE_SOCKET_API_STRUCT_MEMBER(float, border, top) | ||||
| BoundBox2D viewport_camera_border; | GET_READ_ONLY(BoundBox2D, viewport_camera_border) | ||||
| NODE_SOCKET_API_STRUCT_MEMBER(float, viewport_camera_border, left) | NODE_SOCKET_API_STRUCT_MEMBER(float, viewport_camera_border, left) | ||||
| NODE_SOCKET_API_STRUCT_MEMBER(float, viewport_camera_border, right) | NODE_SOCKET_API_STRUCT_MEMBER(float, viewport_camera_border, right) | ||||
| NODE_SOCKET_API_STRUCT_MEMBER(float, viewport_camera_border, bottom) | NODE_SOCKET_API_STRUCT_MEMBER(float, viewport_camera_border, bottom) | ||||
| NODE_SOCKET_API_STRUCT_MEMBER(float, viewport_camera_border, top) | NODE_SOCKET_API_STRUCT_MEMBER(float, viewport_camera_border, top) | ||||
| /* transformation */ | /* transformation */ | ||||
| NODE_SOCKET_API(Transform, matrix) | NODE_SOCKET_API(Transform, matrix) | ||||
| /* motion */ | /* motion */ | ||||
| NODE_SOCKET_API_ARRAY(array<Transform>, motion) | NODE_SOCKET_API_ARRAY(array<Transform>, motion) | ||||
| NODE_SOCKET_API(bool, use_perspective_motion) | NODE_SOCKET_API(bool, use_perspective_motion) | ||||
| NODE_SOCKET_API(float, fov_pre) | NODE_SOCKET_API(float, fov_pre) | ||||
| NODE_SOCKET_API(float, fov_post) | NODE_SOCKET_API(float, fov_post) | ||||
| private: | |||||
| size_t shutter_table_offset; | |||||
| /* computed camera parameters */ | /* computed camera parameters */ | ||||
| ProjectionTransform screentoworld; | ProjectionTransform screentoworld; | ||||
| ProjectionTransform rastertoworld; | ProjectionTransform rastertoworld; | ||||
| ProjectionTransform ndctoworld; | ProjectionTransform ndctoworld; | ||||
| Transform cameratoworld; | Transform cameratoworld; | ||||
| ProjectionTransform worldtoraster; | GET_READ_ONLY(ProjectionTransform, worldtoraster) | ||||
| ProjectionTransform worldtoscreen; | ProjectionTransform worldtoscreen; | ||||
| ProjectionTransform worldtondc; | GET_READ_ONLY(ProjectionTransform, worldtondc) | ||||
| Transform worldtocamera; | Transform worldtocamera; | ||||
| ProjectionTransform rastertocamera; | ProjectionTransform rastertocamera; | ||||
| ProjectionTransform cameratoraster; | ProjectionTransform cameratoraster; | ||||
| ProjectionTransform full_rastertocamera; | ProjectionTransform full_rastertocamera; | ||||
| float3 dx; | float3 dx; | ||||
| Show All 11 Lines | private: | ||||
| bool need_device_update; | bool need_device_update; | ||||
| bool need_flags_update; | bool need_flags_update; | ||||
| int previous_need_motion; | int previous_need_motion; | ||||
| /* Kernel camera data, copied here for dicing. */ | /* Kernel camera data, copied here for dicing. */ | ||||
| KernelCamera kernel_camera; | KernelCamera kernel_camera; | ||||
| array<DecomposedTransform> kernel_camera_motion; | array<DecomposedTransform> kernel_camera_motion; | ||||
| private: | |||||
| int width; | int width; | ||||
| int height; | int height; | ||||
| int resolution; | int resolution; | ||||
| public: | public: | ||||
| /* functions */ | /* functions */ | ||||
| Camera(); | Camera(); | ||||
| ~Camera(); | ~Camera(); | ||||
| Show All 30 Lines | |||||