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

collision.h

Go to the documentation of this file.
00001 /***************************************************************************
00002                  collision.h  -  Collision detection framework
00003                              -------------------
00004     begin                : Tue Apr 9 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, collision.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 
00028 #ifndef __NECOLLISION_H
00029 #define __NECOLLISION_H
00030 
00031 #include "base.h"
00032 #include "nemath.h"
00033 #include "util.h"
00034 
00035 
00042 namespace NeoEngine
00043 {
00044 
00045 
00046 // External classes
00047 class AABB;
00048 class OBB;
00049 class Sphere;
00050 class Capsule;
00051 class Frustum;
00052 class Ray;
00053 class Line;
00054 class Plane;
00055 class Contact;
00056 class ContactSet;
00057 
00058 
00067 bool NEOENGINE_API                                 Intersection( AABB *pkAABBOne, AABB *pkAABBTwo, ContactSet *pkContactSet = 0, bool bInvertNormal = false );
00068 
00077 bool NEOENGINE_API                                 Intersection( AABB *pkAABB, OBB *pkOBB, ContactSet *pkContactSet = 0, bool bInvertNormal = false );
00078 
00087 bool NEOENGINE_API                                 Intersection( AABB *pkAABB, Sphere *pkSphere, ContactSet *pkContactSet = 0, bool bInvertNormal = false );
00088 
00097 bool NEOENGINE_API                                 Intersection( AABB *pkAABB, Capsule *pkCapsule, ContactSet *pkContactSet = 0, bool bInvertNormal = false );
00098 
00107 bool NEOENGINE_API                                 Intersection( OBB *pkOBBOne, OBB *pkOBBTwo, ContactSet *pkContactSet = 0, bool bInvertNormal = false );
00108 
00117 bool NEOENGINE_API                                 Intersection( OBB *pkOBB, Sphere *pkSphere, ContactSet *pkContactSet = 0, bool bInvertNormal = false );
00118 
00127 bool NEOENGINE_API                                 Intersection( OBB *pkOBB, Capsule *pkCapsule, ContactSet *pkContactSet = 0, bool bInvertNormal = false );
00128 
00137 bool NEOENGINE_API                                 Intersection( Sphere *pkSphereOne, Sphere *pkSphereTwo, ContactSet *pkContactSet = 0, bool bInvertNormal = false );
00138 
00147 bool NEOENGINE_API                                 Intersection( Sphere *pkSphere, Capsule *pkCapsule, ContactSet *pkContactSet = 0, bool bInvertNormal = false );
00148 
00157 bool NEOENGINE_API                                 Intersection( Capsule *pkCapsuleOne, Capsule *pkCapsuleTwo, ContactSet *pkContactSet = 0, bool bInvertNormal = false );
00158 
00165 bool NEOENGINE_API                                 Intersection( AABB *pkAABB, Frustum *pkFrustum );
00166 
00173 bool NEOENGINE_API                                 Intersection( OBB *pkOBB, Frustum *pkFrustum );
00174 
00181 bool NEOENGINE_API                                 Intersection( Sphere *pkSphere, Frustum *pkFrustum );
00182 
00189 bool NEOENGINE_API                                 Intersection( Capsule *pkCapsule, Frustum *pkFrustum );
00190 
00201 bool NEOENGINE_API                                 Intersection( const Ray &rkRay, const Vector3d &rkV0, const Vector3d &rkV1, const Vector3d &rkV2, ContactSet *pkContactSet = 0, const Vector3d &rkNormal = Vector3d::ZERO );
00202 
00215 bool NEOENGINE_API                                 Slice( const Vector3d &rkV0, const Vector3d &rkV1, const Vector3d &rkV2, const Vector3d &rkU0, const Vector3d &rkU1, const Vector3d &rkU2, Vector3d *pkPoint0, Vector3d *pkPoint1, int *piCoplanar = 0 );
00216 
00225 int NEOENGINE_API                                  ClipRectPoly2D( float *pfRect, float *pfPoly, int iNum, float *pfClipped );
00226 
00237 int NEOENGINE_API                                  ClipPolyPoly2D( float *pfRefPoly, float *pfRefPolyNormals, int iNumRef, float *pfPoly, int iNum, float *pfClipped );
00238 
00248 void NEOENGINE_API                                 ClosestPointLineLine( const Vector3d &rkP0, const Vector3d &rkD0, const Vector3d &rkP1, const Vector3d &rkD1, float *pfT0, float *pfT1 );
00249 
00250 
00251 };
00252 
00253 
00254 #endif

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