Changeset View
Changeset View
Standalone View
Standalone View
intern/cycles/render/camera.cpp
| Show First 20 Lines • Show All 47 Lines • ▼ Show 20 Lines | Camera::Camera() | ||||
| panorama_type = PANORAMA_EQUIRECTANGULAR; | panorama_type = PANORAMA_EQUIRECTANGULAR; | ||||
| fisheye_fov = M_PI_F; | fisheye_fov = M_PI_F; | ||||
| fisheye_lens = 10.5f; | fisheye_lens = 10.5f; | ||||
| latitude_min = -M_PI_2_F; | latitude_min = -M_PI_2_F; | ||||
| latitude_max = M_PI_2_F; | latitude_max = M_PI_2_F; | ||||
| longitude_min = -M_PI_F; | longitude_min = -M_PI_F; | ||||
| longitude_max = M_PI_F; | longitude_max = M_PI_F; | ||||
| fov = M_PI_4_F; | fov = M_PI_4_F; | ||||
| stereo_eye = STEREO_NONE; | |||||
| interocular_distance = 0.065f; | |||||
| convergence_distance = 30.0f * 0.065f; | |||||
sergey: Camera in volume check is to be adopted to this changes by the looks of it. | |||||
| sensorwidth = 0.036f; | sensorwidth = 0.036f; | ||||
| sensorheight = 0.024f; | sensorheight = 0.024f; | ||||
| nearclip = 1e-5f; | nearclip = 1e-5f; | ||||
| farclip = 1e5f; | farclip = 1e5f; | ||||
| width = 1024; | width = 1024; | ||||
| ▲ Show 20 Lines • Show All 218 Lines • ▼ Show 20 Lines | #endif | ||||
| /* panorama */ | /* panorama */ | ||||
| kcam->panorama_type = panorama_type; | kcam->panorama_type = panorama_type; | ||||
| kcam->fisheye_fov = fisheye_fov; | kcam->fisheye_fov = fisheye_fov; | ||||
| kcam->fisheye_lens = fisheye_lens; | kcam->fisheye_lens = fisheye_lens; | ||||
| kcam->equirectangular_range = make_float4(longitude_min - longitude_max, -longitude_min, | kcam->equirectangular_range = make_float4(longitude_min - longitude_max, -longitude_min, | ||||
| latitude_min - latitude_max, -latitude_min + M_PI_2_F); | latitude_min - latitude_max, -latitude_min + M_PI_2_F); | ||||
| kcam->stereo_eye = stereo_eye; | |||||
| kcam->interocular_distance = interocular_distance; | |||||
| kcam->convergence_distance = convergence_distance; | |||||
| /* sensor size */ | /* sensor size */ | ||||
| kcam->sensorwidth = sensorwidth; | kcam->sensorwidth = sensorwidth; | ||||
| kcam->sensorheight = sensorheight; | kcam->sensorheight = sensorheight; | ||||
| /* render size */ | /* render size */ | ||||
| kcam->width = width; | kcam->width = width; | ||||
| kcam->height = height; | kcam->height = height; | ||||
| kcam->resolution = resolution; | kcam->resolution = resolution; | ||||
| ▲ Show 20 Lines • Show All 61 Lines • ▼ Show 20 Lines | return !((shuttertime == cam.shuttertime) && | ||||
| (matrix == cam.matrix) && | (matrix == cam.matrix) && | ||||
| (aperture_ratio == cam.aperture_ratio) && | (aperture_ratio == cam.aperture_ratio) && | ||||
| (panorama_type == cam.panorama_type) && | (panorama_type == cam.panorama_type) && | ||||
| (fisheye_fov == cam.fisheye_fov) && | (fisheye_fov == cam.fisheye_fov) && | ||||
| (fisheye_lens == cam.fisheye_lens) && | (fisheye_lens == cam.fisheye_lens) && | ||||
| (latitude_min == cam.latitude_min) && | (latitude_min == cam.latitude_min) && | ||||
| (latitude_max == cam.latitude_max) && | (latitude_max == cam.latitude_max) && | ||||
| (longitude_min == cam.longitude_min) && | (longitude_min == cam.longitude_min) && | ||||
| (longitude_max == cam.longitude_max)); | (longitude_max == cam.longitude_max) && | ||||
| (stereo_eye == cam.stereo_eye)); | |||||
| } | } | ||||
| bool Camera::motion_modified(const Camera& cam) | bool Camera::motion_modified(const Camera& cam) | ||||
| { | { | ||||
| return !((motion == cam.motion) && | return !((motion == cam.motion) && | ||||
| (use_motion == cam.use_motion)); | (use_motion == cam.use_motion)); | ||||
| } | } | ||||
| Show All 38 Lines | BoundBox Camera::viewplane_bounds_get() | ||||
| /* TODO(sergey): This is all rather stupid, but is there a way to perform | /* TODO(sergey): This is all rather stupid, but is there a way to perform | ||||
| * checks we need in a more clear and smart fasion? | * checks we need in a more clear and smart fasion? | ||||
| */ | */ | ||||
| BoundBox bounds = BoundBox::empty; | BoundBox bounds = BoundBox::empty; | ||||
| if(type == CAMERA_PANORAMA) { | if(type == CAMERA_PANORAMA) { | ||||
| bounds.grow(make_float3(cameratoworld.w.x, | bounds.grow(make_float3(cameratoworld.w.x, | ||||
| cameratoworld.w.y, | cameratoworld.w.y, | ||||
| cameratoworld.w.z)); | cameratoworld.w.z)); | ||||
Done Inline ActionsSpace before { sergey: Space before `{` | |||||
| } | } | ||||
| else { | else { | ||||
| bounds.grow(transform_raster_to_world(0.0f, 0.0f)); | bounds.grow(transform_raster_to_world(0.0f, 0.0f)); | ||||
| bounds.grow(transform_raster_to_world(0.0f, (float)height)); | bounds.grow(transform_raster_to_world(0.0f, (float)height)); | ||||
| bounds.grow(transform_raster_to_world((float)width, (float)height)); | bounds.grow(transform_raster_to_world((float)width, (float)height)); | ||||
| bounds.grow(transform_raster_to_world((float)width, 0.0f)); | bounds.grow(transform_raster_to_world((float)width, 0.0f)); | ||||
| if(type == CAMERA_PERSPECTIVE) { | if(type == CAMERA_PERSPECTIVE) { | ||||
| /* Center point has the most distance in local Z axis, | /* Center point has the most distance in local Z axis, | ||||
| Show All 9 Lines | |||||
Camera in volume check is to be adopted to this changes by the looks of it.