summaryrefslogtreecommitdiff
path: root/slideshow/source/inc
diff options
context:
space:
mode:
authorSarper Akdemir <q.sarperakdemir@gmail.com>2020-08-14 01:18:14 +0300
committerThorsten Behrens <Thorsten.Behrens@CIB.de>2020-08-22 11:24:16 +0200
commit394f74e6f168f034f7ed73e3027e4ff07f6b94b9 (patch)
treeb4da98e1d95e6bd3bf0e0a1cf30a9a5769907dc3 /slideshow/source/inc
parent8a360d04e43410e729c0ee270be5447ce6c1cd03 (diff)
add bounciness velocity and density options to physics animations
Adding new xml options to specify the starting velocity, bounciness, and density of the rigid body that physics animation control. Change-Id: Ifaba785e82c8ee17be00711a3e7a75257e7704ae Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101141 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
Diffstat (limited to 'slideshow/source/inc')
-rw-r--r--slideshow/source/inc/animationfactory.hxx3
-rw-r--r--slideshow/source/inc/box2dtools.hxx10
2 files changed, 12 insertions, 1 deletions
diff --git a/slideshow/source/inc/animationfactory.hxx b/slideshow/source/inc/animationfactory.hxx
index af3b9b9a4e49..3004c71308a9 100644
--- a/slideshow/source/inc/animationfactory.hxx
+++ b/slideshow/source/inc/animationfactory.hxx
@@ -137,6 +137,9 @@ namespace slideshow::internal
const double fDuration,
const ShapeManagerSharedPtr& rShapeManager,
const ::basegfx::B2DVector& rSlideSize,
+ const ::basegfx::B2DVector& rStartVelocity,
+ const double fDensity,
+ const double fBounciness,
int nFlags );
}
diff --git a/slideshow/source/inc/box2dtools.hxx b/slideshow/source/inc/box2dtools.hxx
index 08b0f4b557cf..0debf1da4ef0 100644
--- a/slideshow/source/inc/box2dtools.hxx
+++ b/slideshow/source/inc/box2dtools.hxx
@@ -221,7 +221,9 @@ public:
@param pShape
Pointer to the shape to alter the corresponding Box2D body of
*/
- Box2DBodySharedPtr makeShapeDynamic(const slideshow::internal::ShapeSharedPtr& pShape);
+ Box2DBodySharedPtr makeShapeDynamic(const css::uno::Reference<css::drawing::XShape>& xShape,
+ const basegfx::B2DVector& rStartVelocity,
+ const double fDensity, const double fBounciness);
/** Make the Box2D body corresponding to the given shape a static one
@@ -267,6 +269,8 @@ public:
void queueShapeAnimationEndUpdate(const css::uno::Reference<css::drawing::XShape>& xShape,
const slideshow::internal::AttributeType eAttrType);
+
+ void alertAnimationEndForShape(const slideshow::internal::ShapeSharedPtr& pShape);
};
/// Class that manages a single box2D Body
@@ -327,6 +331,10 @@ public:
void setAngle(const double fAngle);
+ void setDensityAndRestitution(const double fDensity, const double fRestitution);
+
+ void setRestitution(const double fRestitution);
+
/// Set type of the body
void setType(box2DBodyType eType);