Changeset View
Changeset View
Standalone View
Standalone View
source/blender/freestyle/intern/scene_graph/NodeCamera.cpp
| Show First 20 Lines • Show All 99 Lines • ▼ Show 20 Lines | NodeOrthographicCamera::NodeOrthographicCamera( | ||||
| projection_matrix_[0] = 2.0 / (right - left); | projection_matrix_[0] = 2.0 / (right - left); | ||||
| projection_matrix_[3] = -(right + left) / (right - left); | projection_matrix_[3] = -(right + left) / (right - left); | ||||
| projection_matrix_[5] = 2.0 / (top - bottom); | projection_matrix_[5] = 2.0 / (top - bottom); | ||||
| projection_matrix_[7] = -(top + bottom) / (top - bottom); | projection_matrix_[7] = -(top + bottom) / (top - bottom); | ||||
| projection_matrix_[10] = -2.0 / (zFar - zNear); | projection_matrix_[10] = -2.0 / (zFar - zNear); | ||||
| projection_matrix_[11] = -(zFar + zNear) / (zFar - zNear); | projection_matrix_[11] = -(zFar + zNear) / (zFar - zNear); | ||||
| } | } | ||||
| NodeOrthographicCamera::NodeOrthographicCamera(const NodeOrthographicCamera &iBrother) | |||||
| : NodeCamera(iBrother), | |||||
| left_(iBrother.left_), | |||||
| right_(iBrother.right_), | |||||
| bottom_(iBrother.bottom_), | |||||
| top_(iBrother.top_), | |||||
| zNear_(iBrother.zNear_), | |||||
| zFar_(iBrother.zFar_) | |||||
| { | |||||
| } | |||||
| NodePerspectiveCamera::NodePerspectiveCamera() : NodeCamera(NodeCamera::PERSPECTIVE) | NodePerspectiveCamera::NodePerspectiveCamera() : NodeCamera(NodeCamera::PERSPECTIVE) | ||||
| { | { | ||||
| } | } | ||||
| NodePerspectiveCamera::NodePerspectiveCamera(double fovy, double aspect, double zNear, double zFar) | NodePerspectiveCamera::NodePerspectiveCamera(double fovy, double aspect, double zNear, double zFar) | ||||
| : NodeCamera(NodeCamera::PERSPECTIVE) | : NodeCamera(NodeCamera::PERSPECTIVE) | ||||
| { | { | ||||
| loadIdentity(projection_matrix_); | loadIdentity(projection_matrix_); | ||||
| Show All 28 Lines | |||||