Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | Related Pages

frustum.h

Go to the documentation of this file.
00001 /***************************************************************************
00002                           frustum.h  -  View frustum 
00003                              -------------------
00004     begin                : Wed Sep 18 2002
00005     copyright            : (C) 2002 by Reality Rift Studios
00006     email                : mattias@realityrift.com
00007  ***************************************************************************
00008 
00009  The contents of this file are subject to the Mozilla Public License Version
00010  1.1 (the "License"); you may not use this file except in compliance with
00011  the License. You may obtain a copy of the License at 
00012  http://www.mozilla.org/MPL/
00013 
00014  Software distributed under the License is distributed on an "AS IS" basis,
00015  WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
00016  for the specific language governing rights and limitations under the
00017  License.
00018 
00019  The Original Code is the NeoEngine, frustum.h
00020 
00021  The Initial Developer of the Original Code is Mattias Jansson.
00022  Portions created by Mattias Jansson are Copyright (C) 2002
00023  Reality Rift Studios. All Rights Reserved.
00024 
00025  ***************************************************************************/
00026 
00027 #ifndef __NEFRUSTUM_H
00028 #define __NEFRUSTUM_H
00029 
00030 
00031 #include "base.h"
00032 #include "node.h"
00033 #include "plane.h"
00034 
00035 
00041 namespace NeoEngine
00042 {
00043 
00044 
00045 // External classes
00046 class Line;
00047 class Plane;
00048 
00049 
00059 class NEOENGINE_API Frustum : public SRTNode
00060 {
00061     public:
00062 
00067         enum FRUSTUMPLANE
00068         {
00069             LEFT                                      = 0,
00070             RIGHT                                     = 1,
00071             TOP                                       = 2,
00072             BOTTOM                                    = 3,
00073             FRONT                                     = 4,
00074             BACK                                      = 5,
00075             NUMPLANES                                 = 6
00076         };
00077 
00078 
00079     public:
00080 
00082         unsigned char                                 m_aiPVertexSign[6][3];
00083 
00085         unsigned char                                 m_aiNVertexSign[6][3];
00086 
00088         Matrix                                        m_kViewMatrix;
00089 
00091         Plane                                         m_akPlanes[6];
00092 
00094         Vector3d                                      m_kDirection;
00095 
00097         float                                         m_fZNear;
00098 
00100         float                                         m_fZFar;
00101 
00102 
00106                                                       Frustum();
00107 
00113         virtual bool                                  Intersection( const Vector3d &rkPoint );
00114 
00120         virtual bool                                  Intersection( const Line &rkLine );
00121 
00127         virtual bool                                  Intersection( const Plane &rkPlane );
00128 
00137         virtual bool                                  Intersection( const Vector3d &rkV0, const Vector3d &rkV1, const Vector3d &rkV2, const Vector3d &rkNormal = Vector3d::ORIGO );
00138 };
00139 
00140 
00141 };
00142 
00143 
00144 #endif

Generated on Wed Jan 21 14:21:06 2004 for NeoEngine by doxygen 1.3.5