Main Page | Modules | Alphabetical List | Data Structures | File List | Data Fields | Globals | Related Pages

orthocam.h

Go to the documentation of this file.
00001 /*********************************************************************
00002 * lescegra                                                           *
00003 *                                                                    *
00004 * http://geeky.kicks-ass.org/projects/lescegra.html                  *
00005 *                                                                    *
00006 * Copyright 2003 by Enno Cramer <uebergeek@web.de>                   *
00007 *                                                                    *
00008 * This library is free software; you can redistribute it and/or      *
00009 * modify it under the terms of the GNU Library General Public        *
00010 * License as published by the Free Software Foundation; either       *
00011 * version 2 of the License, or (at your option) any later version.   *
00012 *                                                                    *
00013 * This library is distributed in the hope that it will be useful,    *
00014 * but WITHOUT ANY WARRANTY; without even the implied warranty of     *
00015 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU  *
00016 * Library General Public License for more details.                   *
00017 *                                                                    *
00018 * You should have received a copy of the GNU Library General Public  *
00019 * License along with this library; if not, write to the Free         *
00020 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. *
00021 *********************************************************************/
00022 
00023 #ifndef LSG_ORTHOCAM_H
00024 #define LSG_ORTHOCAM_H 1
00025 
00026 /**
00027  * \file  orthocam.h
00028  * \brief Orthogonal projection camera
00029  */
00030 
00031 #include <lescegra/sg/camera.h>
00032 
00033 #include <lescegra/util/vertex.h>
00034 
00035 /**
00036  * \brief Orthogonal projection
00037  *
00038  * A camera with an axes parallel view cube defind by minimal and maximal value
00039  * for each axis.
00040  */
00041 typedef struct {
00042     LsgCamera super;
00043     Vertex min;
00044     Vertex max;
00045 } LsgOrthoCam;
00046 
00047 /**
00048  * \relates LsgOrthoCam
00049  * Allocate and initialize a new LsgOrthoCam.
00050  * @return A new LsgOrthoCam instance
00051  */
00052 LsgOrthoCam* LsgOrthoCam_create(void);
00053 
00054 /**
00055  * \relates LsgOrthoCam
00056  * Constructor method for LsgOrthoCam. Initialize view cube to [-1, +1] in all
00057  * dimensions.
00058  * @param self      The instance variable
00059  */
00060 void LsgOrthoCam_init(LsgOrthoCam* self);
00061 
00062 /**
00063  * \relates LsgOrthoCam
00064  * Display a node as seen from this camera.
00065  * @param self      The instance variable
00066  * @param frust     The initial view frustum
00067  * @param node      The node to display
00068  */
00069 void LsgOrthoCam_display(LsgOrthoCam* self, LsgFrustum* frust, LsgNode* node);
00070 
00071 /**
00072  * Destructor method for LsgOrthoCam. Reuse parent implementation.
00073  */
00074 #define LsgOrthoCam_destroy(self) LsgCamera_destroy(&(self)->super)
00075 
00076 #endif

(c) 2003, by Enno Cramer
generated on 13 Jul 2003
lescegra - doxygen