path: root/drawinglayer/inc/drawinglayer
diff options
authorArmin Le Grand <Armin.Le.Grand@Sun.COM>2009-10-07 14:25:40 +0200
committerArmin Le Grand <Armin.Le.Grand@Sun.COM>2009-10-07 14:25:40 +0200
commit407f7ae14844d0e55b9f0f87a19a7208762b05ed (patch)
tree2a24b06f3a318077961b66210bd097fe9aa66262 /drawinglayer/inc/drawinglayer
parent78fb1283ea0f5a059740790e3933fe60b520c7cf (diff)
#i105323# added FastPath for 3D scene HitTest for 3d CustomShapes by re-using the buffered last render result from the ScenePrimitive2D
Diffstat (limited to 'drawinglayer/inc/drawinglayer')
1 files changed, 16 insertions, 1 deletions
diff --git a/drawinglayer/inc/drawinglayer/primitive2d/sceneprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/sceneprimitive2d.hxx
index 1cb433e6bff1..a86e32adca26 100644
--- a/drawinglayer/inc/drawinglayer/primitive2d/sceneprimitive2d.hxx
+++ b/drawinglayer/inc/drawinglayer/primitive2d/sceneprimitive2d.hxx
@@ -41,6 +41,7 @@
#include <drawinglayer/attribute/sdrattribute3d.hxx>
#include <drawinglayer/geometry/viewinformation3d.hxx>
#include <basegfx/matrix/b2dhommatrix.hxx>
+#include <vcl/bitmapex.hxx>
@@ -70,9 +71,13 @@ namespace drawinglayer
double mfOldDiscreteSizeY;
basegfx::B2DRange maOldUnitVisiblePart;
+ // the last created BitmapEx, e.g. for fast HitTest. This does not really need
+ // memory since BitmapEx is internally RefCounted
+ BitmapEx maOldRenderedBitmap;
// private helpers
bool impGetShadow3D(const geometry::ViewInformation2D& rViewInformation) const;
- void calculateDsicreteSizes(
+ void calculateDiscreteSizes(
const geometry::ViewInformation2D& rViewInformation,
basegfx::B2DRange& rDiscreteRange,
basegfx::B2DRange& rVisibleDiscreteRange,
@@ -90,6 +95,16 @@ namespace drawinglayer
Primitive2DSequence getGeometry2D() const;
Primitive2DSequence getShadow2D(const geometry::ViewInformation2D& rViewInformation) const;
+ // Fast HitTest which uses the last buffered BitmapEx from the last
+ // rendered area if available. The return value describes if the check
+ // could be done with the current information, so do NOT use o_rResult
+ // when it returns false. o_rResult will be changed on return true and
+ // then contains a definitive answer if content of this scene is hit or
+ // not. On return false, it is normally necessary to use the geometric
+ // HitTest (see CutFindProcessor usages). The given HitPoint
+ // has to be in logic coordinates in scene's ObjectCoordinateSystem.
+ bool tryToCheckLastVisualisationDirectHit(const basegfx::B2DPoint& rLogicHitPoint, bool& o_rResult) const;
// constructor/destructor
const primitive3d::Primitive3DSequence& rxChildren3D,