diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2014-08-27 17:01:23 +0200 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2014-09-02 01:08:50 +0200 |
commit | cf97444233248b94078c4d55c22fb8e6a3411cef (patch) | |
tree | d85c13858a65b3c8d45d60fa66f38fb25aa8400e /slideshow | |
parent | 9f3171fe01d27ba48339bdf253897ed035e119d4 (diff) |
use constructor initializer list
Change-Id: I0bb1345f05dbd835e3f7debc66a824ccf44ef88b
Diffstat (limited to 'slideshow')
-rw-r--r-- | slideshow/source/engine/OGLTrans/generic/OGLTrans_TransitionImpl.cxx | 74 | ||||
-rw-r--r-- | slideshow/source/engine/OGLTrans/generic/OGLTrans_TransitionImpl.hxx | 12 |
2 files changed, 37 insertions, 49 deletions
diff --git a/slideshow/source/engine/OGLTrans/generic/OGLTrans_TransitionImpl.cxx b/slideshow/source/engine/OGLTrans/generic/OGLTrans_TransitionImpl.cxx index d05e38ff3759..17bdff5e087e 100644 --- a/slideshow/source/engine/OGLTrans/generic/OGLTrans_TransitionImpl.cxx +++ b/slideshow/source/engine/OGLTrans/generic/OGLTrans_TransitionImpl.cxx @@ -876,54 +876,44 @@ boost::shared_ptr<OGLTransitionImpl> makeNByMTileFlip( ::sal_uInt16 n, ::sal_uIn SRotate::SRotate(const basegfx::B3DVector& Axis, const basegfx::B3DVector& Origin, double Angle, bool bInter, double T0, double T1): + Operation(bInter, T0, T1), axis(Axis), origin(Origin), angle(Angle) { - nT0 = T0; - nT1 = T1; - bInterpolate = bInter; } SScale::SScale(const basegfx::B3DVector& Scale, const basegfx::B3DVector& Origin, bool bInter, double T0, double T1): + Operation(bInter, T0, T1), scale(Scale), origin(Origin) { - nT0 = T0; - nT1 = T1; - bInterpolate = bInter; } RotateAndScaleDepthByWidth::RotateAndScaleDepthByWidth(const basegfx::B3DVector& Axis, const basegfx::B3DVector& Origin, double Angle, bool bInter, double T0, double T1): + Operation(bInter, T0, T1), axis(Axis), origin(Origin), angle(Angle) { - nT0 = T0; - nT1 = T1; - bInterpolate = bInter; } RotateAndScaleDepthByHeight::RotateAndScaleDepthByHeight(const basegfx::B3DVector& Axis, const basegfx::B3DVector& Origin, double Angle, bool bInter, double T0, double T1): + Operation(bInter, T0, T1), axis(Axis), origin(Origin), angle(Angle) { - nT0 = T0; - nT1 = T1; - bInterpolate = bInter; } STranslate::STranslate(const basegfx::B3DVector& Vector, bool bInter, double T0, double T1): + Operation(bInter, T0, T1), vector(Vector) { - nT0 = T0; - nT1 = T1; - bInterpolate = bInter; } boost::shared_ptr<SRotate> @@ -970,11 +960,11 @@ inline double intervalInter(double t, double T0, double T1) void STranslate::interpolate(double t,double SlideWidthScale,double SlideHeightScale) const { CHECK_GL_ERROR(); - if(t <= nT0) + if(t <= mnT0) return; - if(!bInterpolate || t > nT1) - t = nT1; - t = intervalInter(t,nT0,nT1); + if(!mbInterpolate || t > mnT1) + t = mnT1; + t = intervalInter(t,mnT0,mnT1); glTranslated(SlideWidthScale*t*vector.getX(),SlideHeightScale*t*vector.getY(),t*vector.getZ()); CHECK_GL_ERROR(); } @@ -982,11 +972,11 @@ void STranslate::interpolate(double t,double SlideWidthScale,double SlideHeightS void SRotate::interpolate(double t,double SlideWidthScale,double SlideHeightScale) const { CHECK_GL_ERROR(); - if(t <= nT0) + if(t <= mnT0) return; - if(!bInterpolate || t > nT1) - t = nT1; - t = intervalInter(t,nT0,nT1); + if(!mbInterpolate || t > mnT1) + t = mnT1; + t = intervalInter(t,mnT0,mnT1); glTranslated(SlideWidthScale*origin.getX(),SlideHeightScale*origin.getY(),origin.getZ()); glScaled(SlideWidthScale,SlideHeightScale,1); glRotated(t*angle,axis.getX(),axis.getY(),axis.getZ()); @@ -998,11 +988,11 @@ void SRotate::interpolate(double t,double SlideWidthScale,double SlideHeightScal void SScale::interpolate(double t,double SlideWidthScale,double SlideHeightScale) const { CHECK_GL_ERROR(); - if(t <= nT0) + if(t <= mnT0) return; - if(!bInterpolate || t > nT1) - t = nT1; - t = intervalInter(t,nT0,nT1); + if(!mbInterpolate || t > mnT1) + t = mnT1; + t = intervalInter(t,mnT0,mnT1); glTranslated(SlideWidthScale*origin.getX(),SlideHeightScale*origin.getY(),origin.getZ()); glScaled((1-t) + t*scale.getX(),(1-t) + t*scale.getY(),(1-t) + t*scale.getZ()); glTranslated(-SlideWidthScale*origin.getX(),-SlideHeightScale*origin.getY(),-origin.getZ()); @@ -1012,11 +1002,11 @@ void SScale::interpolate(double t,double SlideWidthScale,double SlideHeightScale void RotateAndScaleDepthByWidth::interpolate(double t,double SlideWidthScale,double SlideHeightScale) const { CHECK_GL_ERROR(); - if(t <= nT0) + if(t <= mnT0) return; - if(!bInterpolate || t > nT1) - t = nT1; - t = intervalInter(t,nT0,nT1); + if(!mbInterpolate || t > mnT1) + t = mnT1; + t = intervalInter(t,mnT0,mnT1); glTranslated(SlideWidthScale*origin.getX(),SlideHeightScale*origin.getY(),SlideWidthScale*origin.getZ()); glRotated(t*angle,axis.getX(),axis.getY(),axis.getZ()); glTranslated(-SlideWidthScale*origin.getX(),-SlideHeightScale*origin.getY(),-SlideWidthScale*origin.getZ()); @@ -1026,11 +1016,11 @@ void RotateAndScaleDepthByWidth::interpolate(double t,double SlideWidthScale,dou void RotateAndScaleDepthByHeight::interpolate(double t,double SlideWidthScale,double SlideHeightScale) const { CHECK_GL_ERROR(); - if(t <= nT0) + if(t <= mnT0) return; - if(!bInterpolate || t > nT1) - t = nT1; - t = intervalInter(t,nT0,nT1); + if(!mbInterpolate || t > mnT1) + t = mnT1; + t = intervalInter(t,mnT0,mnT1); glTranslated(SlideWidthScale*origin.getX(),SlideHeightScale*origin.getY(),SlideHeightScale*origin.getZ()); glRotated(t*angle,axis.getX(),axis.getY(),axis.getZ()); glTranslated(-SlideWidthScale*origin.getX(),-SlideHeightScale*origin.getY(),-SlideHeightScale*origin.getZ()); @@ -1038,11 +1028,9 @@ void RotateAndScaleDepthByHeight::interpolate(double t,double SlideWidthScale,do } SEllipseTranslate::SEllipseTranslate(double dWidth, double dHeight, double dStartPosition, - double dEndPosition, bool bInter, double T0, double T1) + double dEndPosition, bool bInter, double T0, double T1): + Operation(bInter, T0, T1) { - nT0 = T0; - nT1 = T1; - bInterpolate = bInter; width = dWidth; height = dHeight; startPosition = dStartPosition; @@ -1051,11 +1039,11 @@ SEllipseTranslate::SEllipseTranslate(double dWidth, double dHeight, double dStar void SEllipseTranslate::interpolate(double t,double /* SlideWidthScale */,double /* SlideHeightScale */) const { - if(t <= nT0) + if(t <= mnT0) return; - if(!bInterpolate || t > nT1) - t = nT1; - t = intervalInter(t,nT0,nT1); + if(!mbInterpolate || t > mnT1) + t = mnT1; + t = intervalInter(t,mnT0,mnT1); double a1, a2, x, y; a1 = startPosition*2*M_PI; diff --git a/slideshow/source/engine/OGLTrans/generic/OGLTrans_TransitionImpl.hxx b/slideshow/source/engine/OGLTrans/generic/OGLTrans_TransitionImpl.hxx index 0e8de1c55e5f..77bf3d6133d5 100644 --- a/slideshow/source/engine/OGLTrans/generic/OGLTrans_TransitionImpl.hxx +++ b/slideshow/source/engine/OGLTrans/generic/OGLTrans_TransitionImpl.hxx @@ -348,17 +348,17 @@ public: virtual ~Operation(){} protected: - /** Should this operation be interpolated . If TRUE, the transform will smoothly move from making no difference from t = 0.0 to nT0 to being completely transformed from t = nT1 to 1. If FALSE, the transform will be inneffectual from t = 0 to nT0, and completely transformed from t = nT0 to 1. + /** Should this operation be interpolated . If TRUE, the transform will smoothly move from making no difference from t = 0.0 to mnT0 to being completely transformed from t = mnT1 to 1. If FALSE, the transform will be inneffectual from t = 0 to mnT0, and completely transformed from t = mnT0 to 1. */ - bool bInterpolate; + bool mbInterpolate; /** time to begin the transformation */ - double nT0; + double mnT0; /** time to finish the transformation */ - double nT1; + double mnT1; public: /** this is the function that is called to give the Operation to OpenGL. @@ -375,8 +375,8 @@ public: virtual void interpolate(double t,double SlideWidthScale,double SlideHeightScale) const = 0; protected: - Operation(): - bInterpolate(false), nT0(0.0), nT1(0.0){} + Operation(bool bInterpolate, double nT0, double nT1): + mbInterpolate(bInterpolate), mnT0(nT0), mnT1(nT1){} }; /** this class is a generic CounterClockWise(CCW) rotation with an axis angle |