Changeset View
Changeset View
Standalone View
Standalone View
intern/cycles/render/camera.cpp
| Show First 20 Lines • Show All 792 Lines • ▼ Show 20 Lines | void Camera::set_screen_size_and_resolution(int width_, int height_, int resolution_) | ||||
| if (width_ != width || height_ != height || resolution_ != resolution) { | if (width_ != width || height_ != height || resolution_ != resolution) { | ||||
| width = width_; | width = width_; | ||||
| height = height_; | height = height_; | ||||
| resolution = resolution_; | resolution = resolution_; | ||||
| tag_modified(); | tag_modified(); | ||||
| } | } | ||||
| } | } | ||||
| int Camera::screen_width() const | |||||
| { | |||||
| return width; | |||||
| } | |||||
| int Camera::screen_height() const | |||||
| { | |||||
| return height; | |||||
| } | |||||
| int Camera::screen_resolution() const | |||||
| { | |||||
| return resolution; | |||||
| } | |||||
| float Camera::motion_time(int step) const | float Camera::motion_time(int step) const | ||||
| { | { | ||||
| return (use_motion()) ? 2.0f * step / (motion.size() - 1) - 1.0f : 0.0f; | return (use_motion()) ? 2.0f * step / (motion.size() - 1) - 1.0f : 0.0f; | ||||
| } | } | ||||
| int Camera::motion_step(float time) const | int Camera::motion_step(float time) const | ||||
| { | { | ||||
| if (use_motion()) { | if (use_motion()) { | ||||
| Show All 11 Lines | |||||