00001 00005 /* Copyright, 2001 Nevrax Ltd. 00006 * 00007 * This file is part of NEVRAX NEL. 00008 * NEVRAX NEL is free software; you can redistribute it and/or modify 00009 * it under the terms of the GNU General Public License as published by 00010 * the Free Software Foundation; either version 2, or (at your option) 00011 * any later version. 00012 00013 * NEVRAX NEL is distributed in the hope that it will be useful, but 00014 * WITHOUT ANY WARRANTY; without even the implied warranty of 00015 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00016 * General Public License for more details. 00017 00018 * You should have received a copy of the GNU General Public License 00019 * along with NEVRAX NEL; see the file COPYING. If not, write to the 00020 * Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, 00021 * MA 02111-1307, USA. 00022 */ 00023 00024 #ifndef NL_VISUAL_COLLISION_ENTITY_USER_H 00025 #define NL_VISUAL_COLLISION_ENTITY_USER_H 00026 00027 #include "nel/misc/types_nl.h" 00028 #include "nel/3d/u_visual_collision_entity.h" 00029 #include "nel/3d/visual_collision_entity.h" 00030 #include "nel/3d/visual_collision_manager.h" 00031 00032 00033 namespace NL3D 00034 { 00035 00036 00043 class CVisualCollisionEntityUser : public UVisualCollisionEntity 00044 { 00045 public: 00046 00048 CVisualCollisionEntityUser(CVisualCollisionManager *manager) 00049 { 00050 _Manager= manager; 00051 _Entity= _Manager->createEntity(); 00052 } 00054 ~CVisualCollisionEntityUser() 00055 { 00056 _Manager->deleteEntity(_Entity); 00057 } 00058 00059 00060 virtual bool snapToGround(CVector &pos); 00061 virtual bool snapToGround(CVector &pos, CVector &normal); 00062 00063 00064 00065 virtual void setGroundMode(bool groundMode); 00066 virtual void setCeilMode(bool ceilMode); 00067 virtual bool getGroundMode() const; 00068 virtual bool getCeilMode() const; 00069 00070 00071 virtual void setSnapToRenderedTesselation(bool snapMode); 00072 virtual bool getSnapToRenderedTesselation() const; 00073 00074 virtual bool getSurfaceInfo(const CVector &pos, CSurfaceInfo &surfaceInfo); 00075 00076 virtual bool getStaticLightSetup(NLMISC::CRGBA sunAmbient, const CVector &pos, std::vector<CPointLightInfluence> &pointLightList, 00077 uint8 &sunContribution, NLMISC::CRGBA &localAmbient); 00078 00079 00080 virtual void displayDebugGrid(UDriver &drv) const; 00081 00082 00083 private: 00084 CVisualCollisionManager *_Manager; 00085 CVisualCollisionEntity *_Entity; 00086 00087 }; 00088 00089 00090 } // NL3D 00091 00092 00093 #endif // NL_VISUAL_COLLISION_ENTITY_USER_H 00094 00095 /* End of visual_collision_entity_user.h */
1.6.1