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>2014-05-21 06:38:14 +0400
committerTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>2014-05-21 19:46:22 +0400
commit01ac74e4ad223b0b9a000fa9158355bf02615c7c (patch)
tree8fa898215369e357a8752680507bade76d4b5eea /source/blender/freestyle/intern/view_map/SilhouetteGeomEngine.cpp
parentc829c71c57545a2e68f817e95470cca6c66edfd8 (diff)
Freestyle: Added utility function SilhouetteGeomEngine::CameraToImage().
TODO: Fix for Z normalization in SilhouetteGeomEngine methods.
Diffstat (limited to 'source/blender/freestyle/intern/view_map/SilhouetteGeomEngine.cpp')
-rw-r--r--source/blender/freestyle/intern/view_map/SilhouetteGeomEngine.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/source/blender/freestyle/intern/view_map/SilhouetteGeomEngine.cpp b/source/blender/freestyle/intern/view_map/SilhouetteGeomEngine.cpp
index ee885f29211..00814c29776 100644
--- a/source/blender/freestyle/intern/view_map/SilhouetteGeomEngine.cpp
+++ b/source/blender/freestyle/intern/view_map/SilhouetteGeomEngine.cpp
@@ -319,4 +319,12 @@ Vec3r SilhouetteGeomEngine::WorldToImage(const Vec3r& M)
return newPoint;
}
+Vec3r SilhouetteGeomEngine::CameraToImage(const Vec3r& M)
+{
+ Vec3r newPoint, p;
+ GeomUtils::fromCameraToRetina(M, p, _projectionMatrix);
+ GeomUtils::fromRetinaToImage(p, newPoint, _viewport);
+ return newPoint;
+}
+
} /* namespace Freestyle */