2 * ***** BEGIN GPL LICENSE BLOCK *****
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License
6 * as published by the Free Software Foundation; either version 2
7 * of the License, or (at your option) any later version.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software Foundation,
16 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18 * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
19 * All rights reserved.
21 * The Original Code is: all of this file.
23 * Contributor(s): none yet.
25 * ***** END GPL LICENSE BLOCK *****
28 #ifndef __BSP_GHOSTTEST3D_H__
29 #define __BSP_GHOSTTEST3D_H__
31 #include "GHOST_IEventConsumer.h"
32 #include "MT_Vector3.h"
33 #include "BSP_TMesh.h"
34 #include "BSP_MeshDrawer.h"
42 class BSP_GhostTestApp3D :
43 public GHOST_IEventConsumer
46 // Construct an instance of the application;
51 // initialize the applicaton
57 // Run the application untill internal return.
67 MEM_SmartPtr<BSP_TMesh> mesh
72 struct BSP_RotationSetting {
80 struct BSP_TranslationSetting {
89 // Return the transform of object i
96 // Perform an operation between the first two objects in the
104 // Swap mesh i and settings with the last mesh in list.
121 const MT_Vector3 & vec
124 // Create a frustum and projection matrix to
125 // look at the bounding box
129 const MT_Vector3 &min,
130 const MT_Vector3 &max
134 // inherited from GHOST_IEventConsumer
140 GHOST_IWindow *m_window;
141 GHOST_ISystem *m_system;
143 bool m_finish_me_off;
145 // List of current meshes.
146 std::vector< MEM_SmartPtr<BSP_TMesh> > m_meshes;
148 std::vector< BSP_RotationSetting> m_rotation_settings;
149 std::vector< BSP_TranslationSetting> m_translation_settings;
150 std::vector< MT_Scalar> m_scale_settings;
151 std::vector< int> m_render_modes;
153 int m_current_object;