Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>2010-02-01 01:56:19 +0300
committerTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>2010-02-01 01:56:19 +0300
commit107667d20a15593f5c94437cc57fe786bcb92f7a (patch)
tree996e7c61419c8e4927ceae5bc39625c969843273 /source/blender/freestyle/intern/view_map/ViewMapBuilder.h
parente307cb1c8c636a5c9290feaeb58b8f5c22072d43 (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/ViewMapBuilder.h')
-rwxr-xr-xsource/blender/freestyle/intern/view_map/ViewMapBuilder.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/source/blender/freestyle/intern/view_map/ViewMapBuilder.h b/source/blender/freestyle/intern/view_map/ViewMapBuilder.h
index 5ac100bae15..aad9aa245b7 100755
--- a/source/blender/freestyle/intern/view_map/ViewMapBuilder.h
+++ b/source/blender/freestyle/intern/view_map/ViewMapBuilder.h
@@ -58,6 +58,7 @@ private:
//SilhouetteGeomEngine _GeomEngine;
ProgressBar *_pProgressBar;
Vec3r _viewpoint;
+ bool _orthographicProjection;
Grid* _Grid;
ViewEdgeXBuilder *_pViewEdgeBuilder;
bool _EnableQI;
@@ -129,6 +130,7 @@ public:
real iFocalLength,
real iAspect,
real iFovy) {
+ _orthographicProjection = (iProjectionMatrix[3][3] != 0.0);
SilhouetteGeomEngine::setTransform(iModelViewMatrix, iProjectionMatrix, iViewport, iFocalLength);
}