diff options
author | Tamito Kajiyama <rd6t-kjym@asahi-net.or.jp> | 2010-02-01 01:56:19 +0300 |
---|---|---|
committer | Tamito Kajiyama <rd6t-kjym@asahi-net.or.jp> | 2010-02-01 01:56:19 +0300 |
commit | 107667d20a15593f5c94437cc57fe786bcb92f7a (patch) | |
tree | 996e7c61419c8e4927ceae5bc39625c969843273 /source/blender/freestyle/intern/view_map/FEdgeXDetector.h | |
parent | e307cb1c8c636a5c9290feaeb58b8f5c22072d43 (diff) |
Added support for orthographic camera.
The FEdgeXDetector class for silhouette edge detection and the
ViewMapBuilder class for view map creation are enhanced. All changes
are related to view point handling (i.e., the camera location). In
the perspective projection, the visibility of feature edges and edge
types (e.g., borders and crease lines) are computed based on a fixed
view point, whereas the view point in the orthographic projection is
an arbitrary point on the XY plane at the origin and is determined so
that a line segment from the view point to a point in the 3D space is
perpendicular to the XY plane. All view point related portions of the
class definitions were modified so as to deal with the two different
camera modes.
Diffstat (limited to 'source/blender/freestyle/intern/view_map/FEdgeXDetector.h')
-rwxr-xr-x | source/blender/freestyle/intern/view_map/FEdgeXDetector.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/source/blender/freestyle/intern/view_map/FEdgeXDetector.h b/source/blender/freestyle/intern/view_map/FEdgeXDetector.h index 5e6788c6ff8..28034f3f42b 100755 --- a/source/blender/freestyle/intern/view_map/FEdgeXDetector.h +++ b/source/blender/freestyle/intern/view_map/FEdgeXDetector.h @@ -56,6 +56,7 @@ public: _computeRidgesAndValleys = true; _computeSuggestiveContours = true; _sphereRadius = 1.0; + _orthographicProjection = false; _changes = false; _kr_derivative_epsilon = 0.0; } @@ -107,6 +108,7 @@ public: /*! Sets the current viewpoint */ inline void setViewpoint(const Vec3r& ivp) {_Viewpoint = ivp;} + inline void enableOrthographicProjection(bool b) {_orthographicProjection = b;} inline void enableRidgesAndValleysFlag(bool b) {_computeRidgesAndValleys = b;} inline void enableSuggestiveContours(bool b) {_computeSuggestiveContours = b;} /*! Sets the radius of the geodesic sphere around each vertex (for the curvature computation) @@ -136,6 +138,7 @@ protected: real _maxKr; unsigned _nPoints; real _meanEdgeSize; + bool _orthographicProjection; bool _computeRidgesAndValleys; bool _computeSuggestiveContours; |