Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

allow negative eye distance (for cross view) #257

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/graphics.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ class Camera {
dis = 0.5f*(float)width/tan(fov*pif/360.0f);
}
void input_N() {
eye_distance = fmax(eye_distance-0.2f, 0.0f);
eye_distance = eye_distance-0.2f;
}
void input_M() {
eye_distance += 0.2f;
Expand Down Expand Up @@ -362,4 +362,4 @@ void draw_triangle(const float3& p0, const float3& p1, const float3& p2, const i
void draw_triangle(const float3& p0, const float3& p1, const float3& p2, const int c0, const int c1, const int c2, const bool translucent=false);
void draw_text(const float3& p, const float r, const string& s, const int color);

#endif // GRAPHICS
#endif // GRAPHICS