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

contact.h

Go to the documentation of this file.
00001 /***************************************************************************
00002                  contact.h  -  Collision detection contact data
00003                              -------------------
00004     begin                : Wed Feb 26 2003
00005     copyright            : (C) 2003 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, colldata.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 __NECONTACT_H
00029 #define __NECONTACT_H
00030 
00031 #ifndef __NEED_VECTOR_FLOAT
00032 #  define __NEED_VECTOR_FLOAT
00033 #endif
00034 
00035 #include "base.h"
00036 #include "nemath.h"
00037 #include "material.h"
00038 #include "scenenode.h"
00039 
00040 #include <vector>
00041 
00042 
00049 namespace NeoEngine
00050 {
00051 
00052 
00053 #ifdef WIN32
00054 #  ifdef _MSC_VER
00055 #    pragma warning( disable : 4231 )
00056 #  endif
00057 #  ifndef __HAVE_VECTOR_NECONTACTDATA
00058      UDTVectorEXPIMP( class Contact* );
00059 #    define __HAVE_VECTOR_NECONTACTDATA
00060 #  endif
00061 #  ifndef __HAVE_VECTOR_NEVECTOR3D_NOPOINTER
00062      UDTVectorEXPIMP( class Vector3d );
00063 #    define __HAVE_VECTOR_NEVECTOR3D_NOPOINTER
00064 #  endif
00065 #endif
00066 
00067 
00073 class NEOENGINE_API Contact
00074 {
00075     public:
00076 
00078         std::vector< Vector3d >                       m_vkPoints;
00079 
00081         std::vector< float >                          m_vfDepths;
00082 
00084         Vector3d                                      m_kNormal;
00085 
00087         MaterialPtr                                   m_apkMaterials[2];
00088 
00090         SceneNode                                    *m_pkSceneNode;
00091 
00095                                                       Contact() : m_pkSceneNode( 0 ) {}
00096 };
00097 
00098 
00104 class NEOENGINE_API ContactSet
00105 {
00106     public:
00107 
00109         std::vector< Contact* >                       m_vpkContacts;
00110 
00111 
00112 
00115                                                       ContactSet() {}
00116 
00120         virtual                                      ~ContactSet();
00121 
00126         void                                          Add( Contact *pkData );
00127 
00131         void                                          Clear();
00132 };
00133 
00134 
00135 };
00136 
00137 
00138 #endif

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