/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * Copyright 2015 by Collabora, Ltd. * * OpenOffice.org - a multi-platform office productivity suite * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License version 3 * only, as published by the Free Software Foundation. * * OpenOffice.org is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License version 3 for more details * (a copy is included in the LICENSE file that accompanied this code). * * You should have received a copy of the GNU Lesser General Public License * version 3 along with OpenOffice.org. If not, see * <http://www.openoffice.org/license.html> * for a copy of the LGPLv3 License. *
************************************************************************/ #ifndef INCLUDED_OGLTRANS_OPERATIONS_HXX_ #define INCLUDED_OGLTRANS_OPERATIONS_HXX_
/** This class is to be derived to make any operation (transform) you may need in order to construct your transitions
*/ class Operation
{ public: virtual ~Operation(){}
Operation(const Operation&) = delete;
Operation& operator=(const Operation&) = delete;
protected: /** 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 ineffectual from t = 0 to mnT0, and completely transformed from t = mnT0 to 1.
*/ bool mbInterpolate;
/** time to begin the transformation
*/ double mnT0;
/** time to finish the transformation
*/ double mnT1; public: /** this is the function that is called to give the Operation to OpenGL.
@param t time from t = 0 to t = 1
@param SlideWidthScale width of slide divided by width of window
@param SlideHeightScale height of slide divided by height of window
/** this class is a generic CounterClockWise(CCW) rotation with an axis angle
*/ class SRotate: public Operation
{ public: virtualvoid interpolate(glm::mat4& matrix, double t, double SlideWidthScale, doubleSlideHeightScale) const override;
/** Constructor
@param Axis axis to rotate about
@param Origin position that rotation axis runs through
/** Same as SRotate, except the depth is scaled by the width of the slide divided by the width of the window.
*/ class RotateAndScaleDepthByWidth: public Operation
{ public: virtualvoid interpolate(glm::mat4& matrix, double t, double SlideWidthScale, doubleSlideHeightScale) const override;
/** Same as SRotate, except the depth is scaled by the width of the slide divided by the height of the window.
*/ class RotateAndScaleDepthByHeight: public Operation
{ public: virtualvoid interpolate(glm::mat4& matrix, double t, double SlideWidthScale, doubleSlideHeightScale) const override;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.