Change Encyclo button name and macros icon
[ryzomcore.git] / nel / src / 3d / visual_collision_entity_user.cpp
blobd13ca57c2dc35ee99e4c43485d60be8a68c06b3b
1 // NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/>
2 // Copyright (C) 2010 Winch Gate Property Limited
3 //
4 // This program is free software: you can redistribute it and/or modify
5 // it under the terms of the GNU Affero General Public License as
6 // published by the Free Software Foundation, either version 3 of the
7 // License, or (at your option) any later version.
8 //
9 // This program is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 // GNU Affero General Public License for more details.
14 // You should have received a copy of the GNU Affero General Public License
15 // along with this program. If not, see <http://www.gnu.org/licenses/>.
17 #include "std3d.h"
19 #include "nel/3d/visual_collision_entity_user.h"
20 #include "nel/3d/driver_user.h"
21 #include "nel/misc/hierarchical_timer.h"
23 #ifdef DEBUG_NEW
24 #define new DEBUG_NEW
25 #endif
27 namespace NL3D
30 H_AUTO_DECL( NL3D_UI_VisualCollisionEntity )
31 H_AUTO_DECL( NL3D_Misc_VisualCollisionEntity_Snap )
32 H_AUTO_DECL( NL3D_Misc_VisualCollisionEntity_GetLight )
34 #define NL3D_HAUTO_UI_VCE H_AUTO_USE( NL3D_UI_VisualCollisionEntity )
35 #define NL3D_HAUTO_SNAP_VCE H_AUTO_USE( NL3D_Misc_VisualCollisionEntity_Snap )
36 #define NL3D_HAUTO_LIGHT_VCE H_AUTO_USE( NL3D_Misc_VisualCollisionEntity_GetLight )
39 // ****************************************************************************
40 bool CVisualCollisionEntityUser::snapToGround(CVector &pos)
42 NL3D_HAUTO_SNAP_VCE;
44 return _Entity->snapToGround(pos);
46 bool CVisualCollisionEntityUser::snapToGround(CVector &pos, CVector &normal)
48 NL3D_HAUTO_SNAP_VCE;
50 return _Entity->snapToGround(pos, normal);
55 void CVisualCollisionEntityUser::setGroundMode(bool groundMode)
57 NL3D_HAUTO_UI_VCE;
59 _Entity->setGroundMode(groundMode);
61 void CVisualCollisionEntityUser::setCeilMode(bool ceilMode)
63 NL3D_HAUTO_UI_VCE;
65 _Entity->setCeilMode(ceilMode);
67 bool CVisualCollisionEntityUser::getGroundMode() const
69 NL3D_HAUTO_UI_VCE;
71 return _Entity->getGroundMode();
73 bool CVisualCollisionEntityUser::getCeilMode() const
75 NL3D_HAUTO_UI_VCE;
77 return _Entity->getCeilMode();
81 void CVisualCollisionEntityUser::setSnapToRenderedTesselation(bool snapMode)
83 NL3D_HAUTO_UI_VCE;
85 _Entity->setSnapToRenderedTesselation(snapMode);
87 bool CVisualCollisionEntityUser::getSnapToRenderedTesselation() const
89 NL3D_HAUTO_UI_VCE;
91 return _Entity->getSnapToRenderedTesselation();
95 bool CVisualCollisionEntityUser::getStaticLightSetup(NLMISC::CRGBA sunAmbient, const CVector &pos, std::vector<CPointLightInfluence> &pointLightList,
96 uint8 &sunContribution, NLMISC::CRGBA &localAmbient)
98 NL3D_HAUTO_LIGHT_VCE;
100 return _Entity->getStaticLightSetup(sunAmbient, pos, pointLightList, sunContribution, localAmbient);
103 void CVisualCollisionEntityUser::displayDebugGrid(UDriver &drv) const
105 CDriverUser &drvUser= static_cast<CDriverUser&>(drv);
106 _Entity->displayDebugGrid(*drvUser.getDriver());
109 bool CVisualCollisionEntityUser::getSurfaceInfo(const CVector &pos, CSurfaceInfo &surfaceInfo)
111 return _Entity->getSurfaceInfo (pos, surfaceInfo);
115 } // NL3D