[AE Engine logo] Public API Reference
Main Page   Modules   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  

viewport.h

00001 /*
00002  *  AE Engine
00003  *
00004  *  Copyright (C) 2003 Riku "Rakkis" Nurminen
00005  *
00006  *  This program is free software; you can redistribute it and/or modify
00007  *  it under the terms of the GNU General Public License as published by
00008  *  the Free Software Foundation; either version 2 of the License, or
00009  *  (at your option) any later version.
00010  *
00011  *  This program is distributed in the hope that it will be useful,
00012  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014  *  GNU General Public License for more details.
00015  *
00016  *  You should have received a copy of the GNU General Public License
00017  *  along with this program; if not, write to the Free Software
00018  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00019  *
00020  */
00021 
00022 #ifndef __AELIB_AEENGINE_VIEWPORT_H__
00023 #define __AELIB_AEENGINE_VIEWPORT_H__
00024 
00025 #include <aedefs.h>
00026 #include <aeengine/camera.h>
00027 #include <aerenderer/frustum.h>
00028 
00029 class aeViewport {
00030  private:
00031         char *viewportName;
00032         aeCameraLayer cameraLayer;
00033         aeCamera *activeCamera;
00034         aeFrustum *frustum;
00035         int viewX;
00036         int viewY;
00037         int viewWidth;
00038         int viewHeight;
00039 
00040  public:
00048         aeViewport(const char *vpName);
00049 
00060         aeViewport(const char *vpName, int vX, int vY, int vWidth, int vHeight);
00061 
00076         aeViewport(const char *vpName, aeFrustum *frust, aeCamera *cam, int vX, int vY, int vWidth,
00077                            int vHeight, bool becomesActive =a false);
00078 
00079         ~aeViewport();
00080 
00086         aeFrustum *getFrustum() const { return frustum; }
00087 
00093         void setFrustum(aeFrustum *frust) { frustum = frust; }
00094 
00101         void addCamera(aeCamera *cam, bool becomesActive = false);
00102 
00111         void removeCamera(const char *camName, bool deleteAlso = false);
00112 
00121         void removeAllCameras(bool deleteAlso = false);
00122 
00128         void setActiveCamera(const char *camName);
00129 
00136         aeCamera *getActiveCamera() const { return activeCamera; }
00137 
00143         void setX(int vX) { viewX = vX; }
00144 
00150         void setY(int vY) { viewY = vY; }
00151 
00157         void setWidth(int vWidth) { viewWidth = vWidth; }
00158 
00164         void setHeight(int vHeight) { viewHeight = vHeight; }
00165 
00171         int getX() const { return viewX; }
00172 
00178         int getY() const { return viewY; }
00179 
00185         int getWidth() const { return viewWidth; }
00186 
00192         int getHeight() const { return viewHeight; }
00193 };
00194 
00195 #endif // __AELIB_AEENGINE_VIEWPORT_H__

AE Engine Public API Reference
Generated on Wed Apr 9 09:43:40 2003 by Doxygen.