28#ifndef INCLUDED_OGLTRANS_OPERATIONS_HXX_
29#define INCLUDED_OGLTRANS_OPERATIONS_HXX_
31#include <config_lgpl.h>
32#include <glm/gtc/type_ptr.hpp>
70 virtual void interpolate(glm::mat4& matrix,
double t,
double SlideWidthScale,
double SlideHeightScale)
const = 0;
73 Operation(
bool bInterpolate,
double nT0,
double nT1):
82 virtual void interpolate(glm::mat4&
matrix,
double t,
double SlideWidthScale,
double SlideHeightScale)
const override;
105 SRotate(
const glm::vec3& Axis,
const glm::vec3& Origin,
double Angle,
106 bool bInter,
double T0,
double T1);
121std::shared_ptr<SRotate>
122makeSRotate(
const glm::vec3& Axis,
const glm::vec3& Origin,
double Angle,
123 bool bInter,
double T0,
double T1);
130 virtual void interpolate(glm::mat4&
matrix,
double t,
double SlideWidthScale,
double SlideHeightScale)
const override;
150 SScale(
const glm::vec3&
Scale,
const glm::vec3& Origin,
bool bInter,
double T0,
double T1);
156std::shared_ptr<SScale>
157makeSScale(
const glm::vec3& Scale,
const glm::vec3& Origin,
bool bInter,
double T0,
double T1);
164 virtual void interpolate(glm::mat4&
matrix,
double t,
double SlideWidthScale,
double SlideHeightScale)
const override;
188std::shared_ptr<STranslate>
189makeSTranslate(
const glm::vec3& Vector,
bool bInter,
double T0,
double T1);
196 virtual void interpolate(glm::mat4&
matrix,
double t,
double SlideWidthScale,
double SlideHeightScale)
const override;
213 SEllipseTranslate(
double dWidth,
double dHeight,
double dStartPosition,
double dEndPosition,
bool bInter,
double T0,
double T1);
225std::shared_ptr<SEllipseTranslate>
226makeSEllipseTranslate(
double dWidth,
double dHeight,
double dStartPosition,
double dEndPosition,
bool bInter,
double T0,
double T1);
233 virtual void interpolate(glm::mat4&
matrix,
double t,
double SlideWidthScale,
double SlideHeightScale)
const override;
235 RotateAndScaleDepthByWidth(
const glm::vec3& Axis,
const glm::vec3& Origin,
double Angle,
bool bScale,
bool bInter,
double T0,
double T1);
243std::shared_ptr<RotateAndScaleDepthByWidth>
251 virtual void interpolate(glm::mat4&
matrix,
double t,
double SlideWidthScale,
double SlideHeightScale)
const override;
253 RotateAndScaleDepthByHeight(
const glm::vec3& Axis,
const glm::vec3& Origin,
double Angle,
bool bScale,
bool bInter,
double T0,
double T1);
261std::shared_ptr<RotateAndScaleDepthByHeight>
std::shared_ptr< RotateAndScaleDepthByWidth > makeRotateAndScaleDepthByWidth(const glm::vec3 &Axis, const glm::vec3 &Origin, double Angle, bool bScale, bool bInter, double T0, double T1)
std::shared_ptr< SRotate > makeSRotate(const glm::vec3 &Axis, const glm::vec3 &Origin, double Angle, bool bInter, double T0, double T1)
std::shared_ptr< SScale > makeSScale(const glm::vec3 &Scale, const glm::vec3 &Origin, bool bInter, double T0, double T1)
std::shared_ptr< SEllipseTranslate > makeSEllipseTranslate(double dWidth, double dHeight, double dStartPosition, double dEndPosition, bool bInter, double T0, double T1)
std::shared_ptr< RotateAndScaleDepthByHeight > makeRotateAndScaleDepthByHeight(const glm::vec3 &Axis, const glm::vec3 &Origin, double Angle, bool bScale, bool bInter, double T0, double T1)
std::shared_ptr< STranslate > makeSTranslate(const glm::vec3 &Vector, bool bInter, double T0, double T1)
This class is to be derived to make any operation (transform) you may need in order to construct your...
Operation(const Operation &)=delete
Operation(bool bInterpolate, double nT0, double nT1)
double mnT0
time to begin the transformation
bool mbInterpolate
Should this operation be interpolated .
virtual void interpolate(glm::mat4 &matrix, double t, double SlideWidthScale, double SlideHeightScale) const =0
this is the function that is called to give the Operation to OpenGL.
double mnT1
time to finish the transformation
Operation & operator=(const Operation &)=delete
Same as SRotate, except the depth is scaled by the width of the slide divided by the height of the wi...
virtual void interpolate(glm::mat4 &matrix, double t, double SlideWidthScale, double SlideHeightScale) const override
this is the function that is called to give the Operation to OpenGL.
RotateAndScaleDepthByHeight(const glm::vec3 &Axis, const glm::vec3 &Origin, double Angle, bool bScale, bool bInter, double T0, double T1)
Same as SRotate, except the depth is scaled by the width of the slide divided by the width of the win...
virtual void interpolate(glm::mat4 &matrix, double t, double SlideWidthScale, double SlideHeightScale) const override
this is the function that is called to give the Operation to OpenGL.
RotateAndScaleDepthByWidth(const glm::vec3 &Axis, const glm::vec3 &Origin, double Angle, bool bScale, bool bInter, double T0, double T1)
translation transformation
double width
width and length of the ellipse
double startPosition
start and end position on the ellipse <0,1>
virtual void interpolate(glm::mat4 &matrix, double t, double SlideWidthScale, double SlideHeightScale) const override
this is the function that is called to give the Operation to OpenGL.
SEllipseTranslate(double dWidth, double dHeight, double dStartPosition, double dEndPosition, bool bInter, double T0, double T1)
Constructor.
this class is a generic CounterClockWise(CCW) rotation with an axis angle
virtual void interpolate(glm::mat4 &matrix, double t, double SlideWidthScale, double SlideHeightScale) const override
this is the function that is called to give the Operation to OpenGL.
glm::vec3 origin
position that rotation axis runs through
glm::vec3 axis
axis to rotate CCW about
double angle
angle in degrees of CCW rotation
SRotate(const glm::vec3 &Axis, const glm::vec3 &Origin, double Angle, bool bInter, double T0, double T1)
Constructor.
virtual void interpolate(glm::mat4 &matrix, double t, double SlideWidthScale, double SlideHeightScale) const override
this is the function that is called to give the Operation to OpenGL.
SScale(const glm::vec3 &Scale, const glm::vec3 &Origin, bool bInter, double T0, double T1)
Constructor.
translation transformation
virtual void interpolate(glm::mat4 &matrix, double t, double SlideWidthScale, double SlideHeightScale) const override
this is the function that is called to give the Operation to OpenGL.
glm::vec3 vector
vector to translate by
STranslate(const glm::vec3 &Vector, bool bInter, double T0, double T1)
Constructor.