2011-04-27 11:58:34 +00:00
|
|
|
/*
|
2013-08-18 14:16:15 +00:00
|
|
|
* Copyright 2011-2013 Blender Foundation
|
2011-04-27 11:58:34 +00:00
|
|
|
*
|
2013-08-18 14:16:15 +00:00
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
* you may not use this file except in compliance with the License.
|
|
|
|
* You may obtain a copy of the License at
|
2011-04-27 11:58:34 +00:00
|
|
|
*
|
2013-08-18 14:16:15 +00:00
|
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
2011-04-27 11:58:34 +00:00
|
|
|
*
|
2013-08-18 14:16:15 +00:00
|
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
* See the License for the specific language governing permissions and
|
2014-12-25 01:50:24 +00:00
|
|
|
* limitations under the License.
|
2011-04-27 11:58:34 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __CAMERA_H__
|
|
|
|
#define __CAMERA_H__
|
|
|
|
|
Cycles: Make all #include statements relative to cycles source directory
The idea is to make include statements more explicit and obvious where the
file is coming from, additionally reducing chance of wrong header being
picked up.
For example, it was not obvious whether bvh.h was refferring to builder
or traversal, whenter node.h is a generic graph node or a shader node
and cases like that.
Surely this might look obvious for the active developers, but after some
time of not touching the code it becomes less obvious where file is coming
from.
This was briefly mentioned in T50824 and seems @brecht is fine with such
explicitness, but need to agree with all active developers before committing
this.
Please note that this patch is lacking changes related on GPU/OpenCL
support. This will be solved if/when we all agree this is a good idea to move
forward.
Reviewers: brecht, lukasstockner97, maiself, nirved, dingto, juicyfruit, swerner
Reviewed By: lukasstockner97, maiself, nirved, dingto
Subscribers: brecht
Differential Revision: https://developer.blender.org/D2586
2017-03-28 18:39:14 +00:00
|
|
|
#include "kernel/kernel_types.h"
|
2012-02-28 16:44:54 +00:00
|
|
|
|
Cycles: Make all #include statements relative to cycles source directory
The idea is to make include statements more explicit and obvious where the
file is coming from, additionally reducing chance of wrong header being
picked up.
For example, it was not obvious whether bvh.h was refferring to builder
or traversal, whenter node.h is a generic graph node or a shader node
and cases like that.
Surely this might look obvious for the active developers, but after some
time of not touching the code it becomes less obvious where file is coming
from.
This was briefly mentioned in T50824 and seems @brecht is fine with such
explicitness, but need to agree with all active developers before committing
this.
Please note that this patch is lacking changes related on GPU/OpenCL
support. This will be solved if/when we all agree this is a good idea to move
forward.
Reviewers: brecht, lukasstockner97, maiself, nirved, dingto, juicyfruit, swerner
Reviewed By: lukasstockner97, maiself, nirved, dingto
Subscribers: brecht
Differential Revision: https://developer.blender.org/D2586
2017-03-28 18:39:14 +00:00
|
|
|
#include "graph/node.h"
|
2016-05-07 22:28:21 +00:00
|
|
|
|
2018-11-09 10:54:24 +00:00
|
|
|
#include "util/util_array.h"
|
Cycles: Make all #include statements relative to cycles source directory
The idea is to make include statements more explicit and obvious where the
file is coming from, additionally reducing chance of wrong header being
picked up.
For example, it was not obvious whether bvh.h was refferring to builder
or traversal, whenter node.h is a generic graph node or a shader node
and cases like that.
Surely this might look obvious for the active developers, but after some
time of not touching the code it becomes less obvious where file is coming
from.
This was briefly mentioned in T50824 and seems @brecht is fine with such
explicitness, but need to agree with all active developers before committing
this.
Please note that this patch is lacking changes related on GPU/OpenCL
support. This will be solved if/when we all agree this is a good idea to move
forward.
Reviewers: brecht, lukasstockner97, maiself, nirved, dingto, juicyfruit, swerner
Reviewed By: lukasstockner97, maiself, nirved, dingto
Subscribers: brecht
Differential Revision: https://developer.blender.org/D2586
2017-03-28 18:39:14 +00:00
|
|
|
#include "util/util_boundbox.h"
|
2018-03-08 04:33:55 +00:00
|
|
|
#include "util/util_projection.h"
|
Cycles: Make all #include statements relative to cycles source directory
The idea is to make include statements more explicit and obvious where the
file is coming from, additionally reducing chance of wrong header being
picked up.
For example, it was not obvious whether bvh.h was refferring to builder
or traversal, whenter node.h is a generic graph node or a shader node
and cases like that.
Surely this might look obvious for the active developers, but after some
time of not touching the code it becomes less obvious where file is coming
from.
This was briefly mentioned in T50824 and seems @brecht is fine with such
explicitness, but need to agree with all active developers before committing
this.
Please note that this patch is lacking changes related on GPU/OpenCL
support. This will be solved if/when we all agree this is a good idea to move
forward.
Reviewers: brecht, lukasstockner97, maiself, nirved, dingto, juicyfruit, swerner
Reviewed By: lukasstockner97, maiself, nirved, dingto
Subscribers: brecht
Differential Revision: https://developer.blender.org/D2586
2017-03-28 18:39:14 +00:00
|
|
|
#include "util/util_transform.h"
|
|
|
|
#include "util/util_types.h"
|
2011-04-27 11:58:34 +00:00
|
|
|
|
|
|
|
CCL_NAMESPACE_BEGIN
|
|
|
|
|
|
|
|
class Device;
|
|
|
|
class DeviceScene;
|
2012-04-30 12:49:26 +00:00
|
|
|
class Scene;
|
2011-04-27 11:58:34 +00:00
|
|
|
|
|
|
|
/* Camera
|
|
|
|
*
|
|
|
|
* The camera parameters are quite standard, tested to be both compatible with
|
2015-06-29 15:40:13 +00:00
|
|
|
* Renderman, and Blender after remapping.
|
|
|
|
*/
|
2011-04-27 11:58:34 +00:00
|
|
|
|
2016-05-07 22:28:21 +00:00
|
|
|
class Camera : public Node {
|
2011-04-27 11:58:34 +00:00
|
|
|
public:
|
2017-03-06 13:16:45 +00:00
|
|
|
NODE_DECLARE
|
2019-04-17 04:17:24 +00:00
|
|
|
|
2015-06-29 15:40:13 +00:00
|
|
|
/* Specifies an offset for the shutter's time interval. */
|
|
|
|
enum MotionPosition {
|
|
|
|
/* Shutter opens at the current frame. */
|
2016-02-10 14:09:45 +00:00
|
|
|
MOTION_POSITION_START = 0,
|
2015-06-29 15:40:13 +00:00
|
|
|
/* Shutter is fully open at the current frame. */
|
2016-02-10 14:09:45 +00:00
|
|
|
MOTION_POSITION_CENTER = 1,
|
2015-06-29 15:40:13 +00:00
|
|
|
/* Shutter closes at the current frame. */
|
2016-02-10 14:09:45 +00:00
|
|
|
MOTION_POSITION_END = 2,
|
2019-04-17 04:17:24 +00:00
|
|
|
|
2016-02-10 14:09:45 +00:00
|
|
|
MOTION_NUM_POSITIONS,
|
2015-06-29 15:40:13 +00:00
|
|
|
};
|
2019-04-17 04:17:24 +00:00
|
|
|
|
2015-11-20 09:42:34 +00:00
|
|
|
/* Specifies rolling shutter effect. */
|
|
|
|
enum RollingShutterType {
|
|
|
|
/* No rolling shutter effect. */
|
|
|
|
ROLLING_SHUTTER_NONE = 0,
|
|
|
|
/* Sensor is being scanned vertically from top to bottom. */
|
2016-02-10 14:09:45 +00:00
|
|
|
ROLLING_SHUTTER_TOP = 1,
|
2019-04-17 04:17:24 +00:00
|
|
|
|
2016-02-10 14:09:45 +00:00
|
|
|
ROLLING_SHUTTER_NUM_TYPES,
|
2015-11-20 09:42:34 +00:00
|
|
|
};
|
2019-04-17 04:17:24 +00:00
|
|
|
|
Multi-View: Cycles - Spherical Stereo support (VR Panoramas)
This is a new option for panorama cameras to render
stereo that can be used in virtual reality devices
The option is available under the camera panel when Multi-View is enabled (Views option in the Render Layers panel)
Known limitations:
------------------
* Parallel convergence is not supported (you need to set a convergence distance really high to simulate this effect).
* Pivot was not supposed to affect the render but it does, this has to be looked at, but for now set it to CENTER
* Derivatives in perspective camera need to be pre-computed or we shuld get rid of kcam->dx/dy (Sergey words, I don't fully grasp the implication shere)
* This works in perspective mode and in panorama mode. However, for fully benefit from this effect in perspective mode you need to render a cube map. (there is an addon for this, developed separately, perhaps we could include it in master).
* We have no support for "neck distance" at the moment. This is supposed to help with objects at short distances.
* We have no support to rotate the "Up Axis" of the stereo plane. Meaning, we hardcode 0,0,1 as UP, and create the stereo pair related to that. (although we could take the camera local UP when rendering panoramas, this wouldn't work for perspective cameras.
* We have no support for interocular distance attenuation based on the proximity of the poles (which helps to reduce the pole rotation effect/artifact).
THIS NEEDS DOCS - both in 2.78 release log and the Blender manual.
Meanwhile you can read about it here: http://code.blender.org/2015/03/1451
This patch specifically dates from March 2015, as you can see in the code.blender.org post. Many thanks to all the reviewers, testers and minor sponsors who helped me maintain spherical-stereo for 1 year.
All that said, have fun with this. This feature was what got me started with Multi-View development (at the time what I was looking for was Fulldome stereo support, but the implementation is the same). In order to make this into Blender I had to make it aiming at a less-specic user-case Thus Multi-View started. (this was December 2012, during Siggraph Asia and a chat I had with Paul Bourke during the conference). I don't have the original patch anymore, but you can find a re-based version of it from March 2013, right before I start with the Multi-View project https://developer.blender.org/P332
Reviewers: sergey, dingto
Subscribers: #cycles
Differential Revision: https://developer.blender.org/D1223
2016-03-10 12:28:29 +00:00
|
|
|
/* Stereo Type */
|
|
|
|
enum StereoEye {
|
|
|
|
STEREO_NONE,
|
|
|
|
STEREO_LEFT,
|
|
|
|
STEREO_RIGHT,
|
|
|
|
};
|
2019-04-17 04:17:24 +00:00
|
|
|
|
2011-04-27 11:58:34 +00:00
|
|
|
/* motion blur */
|
2020-11-04 10:17:38 +00:00
|
|
|
NODE_SOCKET_API(float, shuttertime)
|
|
|
|
NODE_SOCKET_API(MotionPosition, motion_position)
|
|
|
|
NODE_SOCKET_API_ARRAY(array<float>, shutter_curve)
|
2015-10-27 08:16:04 +00:00
|
|
|
size_t shutter_table_offset;
|
2019-04-17 04:17:24 +00:00
|
|
|
|
2015-11-20 09:42:34 +00:00
|
|
|
/* ** Rolling shutter effect. ** */
|
|
|
|
/* Defines rolling shutter effect type. */
|
2020-11-04 10:17:38 +00:00
|
|
|
NODE_SOCKET_API(RollingShutterType, rolling_shutter_type)
|
2015-11-20 09:42:34 +00:00
|
|
|
/* Specifies exposure time of scanlines when using
|
|
|
|
* rolling shutter effect.
|
|
|
|
*/
|
2020-11-04 10:17:38 +00:00
|
|
|
NODE_SOCKET_API(float, rolling_shutter_duration)
|
2019-04-17 04:17:24 +00:00
|
|
|
|
2011-04-27 11:58:34 +00:00
|
|
|
/* depth of field */
|
2020-11-04 10:17:38 +00:00
|
|
|
NODE_SOCKET_API(float, focaldistance)
|
|
|
|
NODE_SOCKET_API(float, aperturesize)
|
|
|
|
NODE_SOCKET_API(uint, blades)
|
|
|
|
NODE_SOCKET_API(float, bladesrotation)
|
2019-04-17 04:17:24 +00:00
|
|
|
|
2012-02-28 16:44:54 +00:00
|
|
|
/* type */
|
2020-11-04 10:17:38 +00:00
|
|
|
NODE_SOCKET_API(CameraType, camera_type)
|
|
|
|
NODE_SOCKET_API(float, fov)
|
2019-04-17 04:17:24 +00:00
|
|
|
|
2012-05-04 16:20:51 +00:00
|
|
|
/* panorama */
|
2020-11-04 10:17:38 +00:00
|
|
|
NODE_SOCKET_API(PanoramaType, panorama_type)
|
|
|
|
NODE_SOCKET_API(float, fisheye_fov)
|
|
|
|
NODE_SOCKET_API(float, fisheye_lens)
|
|
|
|
NODE_SOCKET_API(float, latitude_min)
|
|
|
|
NODE_SOCKET_API(float, latitude_max)
|
|
|
|
NODE_SOCKET_API(float, longitude_min)
|
|
|
|
NODE_SOCKET_API(float, longitude_max)
|
2019-04-17 04:17:24 +00:00
|
|
|
|
Multi-View: Cycles - Spherical Stereo support (VR Panoramas)
This is a new option for panorama cameras to render
stereo that can be used in virtual reality devices
The option is available under the camera panel when Multi-View is enabled (Views option in the Render Layers panel)
Known limitations:
------------------
* Parallel convergence is not supported (you need to set a convergence distance really high to simulate this effect).
* Pivot was not supposed to affect the render but it does, this has to be looked at, but for now set it to CENTER
* Derivatives in perspective camera need to be pre-computed or we shuld get rid of kcam->dx/dy (Sergey words, I don't fully grasp the implication shere)
* This works in perspective mode and in panorama mode. However, for fully benefit from this effect in perspective mode you need to render a cube map. (there is an addon for this, developed separately, perhaps we could include it in master).
* We have no support for "neck distance" at the moment. This is supposed to help with objects at short distances.
* We have no support to rotate the "Up Axis" of the stereo plane. Meaning, we hardcode 0,0,1 as UP, and create the stereo pair related to that. (although we could take the camera local UP when rendering panoramas, this wouldn't work for perspective cameras.
* We have no support for interocular distance attenuation based on the proximity of the poles (which helps to reduce the pole rotation effect/artifact).
THIS NEEDS DOCS - both in 2.78 release log and the Blender manual.
Meanwhile you can read about it here: http://code.blender.org/2015/03/1451
This patch specifically dates from March 2015, as you can see in the code.blender.org post. Many thanks to all the reviewers, testers and minor sponsors who helped me maintain spherical-stereo for 1 year.
All that said, have fun with this. This feature was what got me started with Multi-View development (at the time what I was looking for was Fulldome stereo support, but the implementation is the same). In order to make this into Blender I had to make it aiming at a less-specic user-case Thus Multi-View started. (this was December 2012, during Siggraph Asia and a chat I had with Paul Bourke during the conference). I don't have the original patch anymore, but you can find a re-based version of it from March 2013, right before I start with the Multi-View project https://developer.blender.org/P332
Reviewers: sergey, dingto
Subscribers: #cycles
Differential Revision: https://developer.blender.org/D1223
2016-03-10 12:28:29 +00:00
|
|
|
/* panorama stereo */
|
2020-11-04 10:17:38 +00:00
|
|
|
NODE_SOCKET_API(StereoEye, stereo_eye)
|
|
|
|
NODE_SOCKET_API(bool, use_spherical_stereo)
|
|
|
|
NODE_SOCKET_API(float, interocular_distance)
|
|
|
|
NODE_SOCKET_API(float, convergence_distance)
|
|
|
|
NODE_SOCKET_API(bool, use_pole_merge)
|
|
|
|
NODE_SOCKET_API(float, pole_merge_angle_from)
|
|
|
|
NODE_SOCKET_API(float, pole_merge_angle_to)
|
2019-04-17 04:17:24 +00:00
|
|
|
|
2014-08-27 08:51:50 +00:00
|
|
|
/* anamorphic lens bokeh */
|
2020-11-04 10:17:38 +00:00
|
|
|
NODE_SOCKET_API(float, aperture_ratio)
|
2019-04-17 04:17:24 +00:00
|
|
|
|
2012-05-04 16:20:51 +00:00
|
|
|
/* sensor */
|
2020-11-04 10:17:38 +00:00
|
|
|
NODE_SOCKET_API(float, sensorwidth)
|
|
|
|
NODE_SOCKET_API(float, sensorheight)
|
2019-04-17 04:17:24 +00:00
|
|
|
|
2011-04-27 11:58:34 +00:00
|
|
|
/* clipping */
|
2020-11-04 10:17:38 +00:00
|
|
|
NODE_SOCKET_API(float, nearclip)
|
|
|
|
NODE_SOCKET_API(float, farclip)
|
2019-04-17 04:17:24 +00:00
|
|
|
|
2011-04-27 11:58:34 +00:00
|
|
|
/* screen */
|
2012-11-10 22:31:29 +00:00
|
|
|
BoundBox2D viewplane;
|
2020-11-04 10:17:38 +00:00
|
|
|
NODE_SOCKET_API_STRUCT_MEMBER(float, viewplane, left)
|
|
|
|
NODE_SOCKET_API_STRUCT_MEMBER(float, viewplane, right)
|
|
|
|
NODE_SOCKET_API_STRUCT_MEMBER(float, viewplane, bottom)
|
|
|
|
NODE_SOCKET_API_STRUCT_MEMBER(float, viewplane, top)
|
|
|
|
|
2016-04-11 20:49:09 +00:00
|
|
|
/* width and height change during preview, so we need these for calculating dice rates. */
|
2020-11-04 10:17:38 +00:00
|
|
|
NODE_SOCKET_API(int, full_width)
|
|
|
|
NODE_SOCKET_API(int, full_height)
|
2018-01-11 23:50:34 +00:00
|
|
|
/* controls how fast the dicing rate falls off for geometry out side of view */
|
2020-11-04 10:17:38 +00:00
|
|
|
NODE_SOCKET_API(float, offscreen_dicing_scale)
|
2019-04-17 04:17:24 +00:00
|
|
|
|
2012-06-06 23:27:43 +00:00
|
|
|
/* border */
|
2012-11-10 22:31:29 +00:00
|
|
|
BoundBox2D border;
|
2020-11-04 10:17:38 +00:00
|
|
|
NODE_SOCKET_API_STRUCT_MEMBER(float, border, left)
|
|
|
|
NODE_SOCKET_API_STRUCT_MEMBER(float, border, right)
|
|
|
|
NODE_SOCKET_API_STRUCT_MEMBER(float, border, bottom)
|
|
|
|
NODE_SOCKET_API_STRUCT_MEMBER(float, border, top)
|
|
|
|
|
2015-01-27 16:36:14 +00:00
|
|
|
BoundBox2D viewport_camera_border;
|
2020-11-04 10:17:38 +00:00
|
|
|
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, bottom)
|
|
|
|
NODE_SOCKET_API_STRUCT_MEMBER(float, viewport_camera_border, top)
|
2019-04-17 04:17:24 +00:00
|
|
|
|
2011-04-27 11:58:34 +00:00
|
|
|
/* transformation */
|
2020-11-04 10:17:38 +00:00
|
|
|
NODE_SOCKET_API(Transform, matrix)
|
2019-04-17 04:17:24 +00:00
|
|
|
|
2012-04-30 12:49:26 +00:00
|
|
|
/* motion */
|
2020-11-04 10:17:38 +00:00
|
|
|
NODE_SOCKET_API_ARRAY(array<Transform>, motion)
|
|
|
|
NODE_SOCKET_API(bool, use_perspective_motion)
|
|
|
|
NODE_SOCKET_API(float, fov_pre)
|
|
|
|
NODE_SOCKET_API(float, fov_post)
|
2019-04-17 04:17:24 +00:00
|
|
|
|
2011-04-27 11:58:34 +00:00
|
|
|
/* computed camera parameters */
|
2018-03-08 04:33:55 +00:00
|
|
|
ProjectionTransform screentoworld;
|
|
|
|
ProjectionTransform rastertoworld;
|
|
|
|
ProjectionTransform ndctoworld;
|
2011-04-27 11:58:34 +00:00
|
|
|
Transform cameratoworld;
|
2019-04-17 04:17:24 +00:00
|
|
|
|
2018-03-08 04:33:55 +00:00
|
|
|
ProjectionTransform worldtoraster;
|
|
|
|
ProjectionTransform worldtoscreen;
|
|
|
|
ProjectionTransform worldtondc;
|
2012-11-21 01:00:03 +00:00
|
|
|
Transform worldtocamera;
|
2019-04-17 04:17:24 +00:00
|
|
|
|
2018-03-08 04:33:55 +00:00
|
|
|
ProjectionTransform rastertocamera;
|
|
|
|
ProjectionTransform cameratoraster;
|
2019-04-17 04:17:24 +00:00
|
|
|
|
2019-04-04 18:06:22 +00:00
|
|
|
ProjectionTransform full_rastertocamera;
|
2019-04-17 04:17:24 +00:00
|
|
|
|
2011-04-27 11:58:34 +00:00
|
|
|
float3 dx;
|
|
|
|
float3 dy;
|
2019-04-17 04:17:24 +00:00
|
|
|
|
2016-04-11 20:49:09 +00:00
|
|
|
float3 full_dx;
|
|
|
|
float3 full_dy;
|
2019-04-17 04:17:24 +00:00
|
|
|
|
2018-01-11 23:50:34 +00:00
|
|
|
float3 frustum_right_normal;
|
|
|
|
float3 frustum_top_normal;
|
2020-10-26 11:49:37 +00:00
|
|
|
float3 frustum_left_normal;
|
|
|
|
float3 frustum_bottom_normal;
|
2019-04-17 04:17:24 +00:00
|
|
|
|
2011-04-27 11:58:34 +00:00
|
|
|
/* update */
|
|
|
|
bool need_device_update;
|
2015-05-14 14:08:13 +00:00
|
|
|
bool need_flags_update;
|
2012-09-04 13:29:07 +00:00
|
|
|
int previous_need_motion;
|
2019-04-17 04:17:24 +00:00
|
|
|
|
2018-01-12 19:22:55 +00:00
|
|
|
/* Kernel camera data, copied here for dicing. */
|
|
|
|
KernelCamera kernel_camera;
|
2018-03-10 00:36:09 +00:00
|
|
|
array<DecomposedTransform> kernel_camera_motion;
|
2019-04-17 04:17:24 +00:00
|
|
|
|
2020-11-04 10:17:38 +00:00
|
|
|
private:
|
|
|
|
int width;
|
|
|
|
int height;
|
|
|
|
int resolution;
|
|
|
|
|
|
|
|
public:
|
2011-04-27 11:58:34 +00:00
|
|
|
/* functions */
|
|
|
|
Camera();
|
|
|
|
~Camera();
|
2019-04-17 04:17:24 +00:00
|
|
|
|
2014-02-14 17:40:31 +00:00
|
|
|
void compute_auto_viewplane();
|
2019-04-17 04:17:24 +00:00
|
|
|
|
2018-01-12 19:22:55 +00:00
|
|
|
void update(Scene *scene);
|
2019-04-17 04:17:24 +00:00
|
|
|
|
2012-04-30 12:49:26 +00:00
|
|
|
void device_update(Device *device, DeviceScene *dscene, Scene *scene);
|
2015-02-02 17:06:31 +00:00
|
|
|
void device_update_volume(Device *device, DeviceScene *dscene, Scene *scene);
|
2015-10-27 08:16:04 +00:00
|
|
|
void device_free(Device *device, DeviceScene *dscene, Scene *scene);
|
2019-04-17 04:17:24 +00:00
|
|
|
|
2015-04-10 11:25:12 +00:00
|
|
|
/* Public utility functions. */
|
2014-09-16 17:49:59 +00:00
|
|
|
BoundBox viewplane_bounds_get();
|
2019-04-17 04:17:24 +00:00
|
|
|
|
2016-04-11 20:49:09 +00:00
|
|
|
/* Calculates the width of a pixel at point in world space. */
|
|
|
|
float world_to_raster_size(float3 P);
|
2019-04-17 04:17:24 +00:00
|
|
|
|
2018-03-10 00:36:09 +00:00
|
|
|
/* Motion blur. */
|
|
|
|
float motion_time(int step) const;
|
|
|
|
int motion_step(float time) const;
|
|
|
|
bool use_motion() const;
|
2019-04-17 04:17:24 +00:00
|
|
|
|
2020-11-04 10:17:38 +00:00
|
|
|
void set_screen_size_and_resolution(int width_, int height_, int resolution_);
|
|
|
|
|
2015-04-10 11:25:12 +00:00
|
|
|
private:
|
|
|
|
/* Private utility functions. */
|
2014-09-16 17:49:59 +00:00
|
|
|
float3 transform_raster_to_world(float raster_x, float raster_y);
|
2011-04-27 11:58:34 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
CCL_NAMESPACE_END
|
|
|
|
|
|
|
|
#endif /* __CAMERA_H__ */
|