PixelLightAPI
.
|
00001 /*********************************************************\ 00002 * File: ContactInformation.h * 00003 * 00004 * Copyright (C) 2002-2011 The PixelLight Team (http://www.pixellight.org/) 00005 * 00006 * This file is part of PixelLight. 00007 * 00008 * PixelLight is free software: you can redistribute it and/or modify 00009 * it under the terms of the GNU Lesser General Public License as published by 00010 * the Free Software Foundation, either version 3 of the License, or 00011 * (at your option) any later version. 00012 * 00013 * PixelLight 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 00016 * GNU Lesser General Public License for more details. 00017 * 00018 * You should have received a copy of the GNU Lesser General Public License 00019 * along with PixelLight. If not, see <http://www.gnu.org/licenses/>. 00020 \*********************************************************/ 00021 00022 00023 #ifndef __PLPHYSICS_CONTACTINFORMATION_H__ 00024 #define __PLPHYSICS_CONTACTINFORMATION_H__ 00025 #pragma once 00026 00027 00028 //[-------------------------------------------------------] 00029 //[ Includes ] 00030 //[-------------------------------------------------------] 00031 #include "PLPhysics/PLPhysics.h" 00032 00033 00034 //[-------------------------------------------------------] 00035 //[ Namespace ] 00036 //[-------------------------------------------------------] 00037 namespace PLPhysics { 00038 00039 00040 //[-------------------------------------------------------] 00041 //[ Forward declarations ] 00042 //[-------------------------------------------------------] 00043 class Body; 00044 00045 00046 //[-------------------------------------------------------] 00047 //[ Classes ] 00048 //[-------------------------------------------------------] 00049 /** 00050 * @brief 00051 * Contact information class 00052 */ 00053 class ContactInformation { 00054 00055 00056 //[-------------------------------------------------------] 00057 //[ Public functions ] 00058 //[-------------------------------------------------------] 00059 public: 00060 /** 00061 * @brief 00062 * Constructor 00063 * 00064 * @param[in] cFirstBody 00065 * The first physics body 00066 * @param[in] cSecondBody 00067 * The second physics body 00068 */ 00069 PLPHYSICS_API ContactInformation(Body &cFirstBody, Body &cSecondBody); 00070 00071 /** 00072 * @brief 00073 * Destructor 00074 */ 00075 PLPHYSICS_API ~ContactInformation(); 00076 00077 /** 00078 * @brief 00079 * Returns the first physics body 00080 * 00081 * @return 00082 * The first physics body 00083 */ 00084 PLPHYSICS_API Body &GetFirstBody() const; 00085 00086 /** 00087 * @brief 00088 * Returns the first second body 00089 * 00090 * @return 00091 * The second physics body 00092 */ 00093 PLPHYSICS_API Body &GetSecondBody() const; 00094 00095 /** 00096 * @brief 00097 * Returns whether or not the contact is marked to be ignored 00098 * 00099 * @return 00100 * 'true' if the contact is marked as to be ignored, else 'false' 00101 */ 00102 PLPHYSICS_API bool IsContactIgnored() const; 00103 00104 /** 00105 * @brief 00106 * Marks the contact to be ignored 00107 * 00108 * @remarks 00109 * By default, detected contacts are used by the physics. Using this function one can 00110 * tell the physics not to use this contact. 00111 */ 00112 PLPHYSICS_API void IgnoreContact(); 00113 00114 00115 //[-------------------------------------------------------] 00116 //[ Private data ] 00117 //[-------------------------------------------------------] 00118 private: 00119 Body *m_pFirstBody; /**< The first physics body, always valid! */ 00120 Body *m_pSecondBody; /**< The second physics body, always valid! */ 00121 bool m_bIgnoreContact; /**< Is the contact marked to be ignored? */ 00122 00123 00124 }; 00125 00126 00127 //[-------------------------------------------------------] 00128 //[ Namespace ] 00129 //[-------------------------------------------------------] 00130 } // PLPhysics 00131 00132 00133 #endif // __PLPHYSICS_CONTACTINFORMATION_H__
|