TrinityCore
Loading...
Searching...
No Matches
DynamicTree.h
Go to the documentation of this file.
1/*
2 * This file is part of the TrinityCore Project. See AUTHORS file for Copyright information
3 *
4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms of the GNU General Public License as published by the
6 * Free Software Foundation; either version 2 of the License, or (at your
7 * option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
12 * more details.
13 *
14 * You should have received a copy of the GNU General Public License along
15 * with this program. If not, see <http://www.gnu.org/licenses/>.
16 */
17
18#ifndef _DYNTREE_H
19#define _DYNTREE_H
20
21#include "Define.h"
22#include "Optional.h"
23
24namespace G3D
25{
26 class Ray;
27 class Vector3;
28}
29
30class GameObjectModel;
31struct DynTreeImpl;
32
33namespace VMAP
34{
35 struct AreaAndLiquidData;
36}
37
39{
41
42public:
43
46
47 bool isInLineOfSight(float x1, float y1, float z1, float x2, float y2,
48 float z2, uint32 phasemask) const;
49
50 bool getIntersectionTime(uint32 phasemask, const G3D::Ray& ray,
51 const G3D::Vector3& endPos, float& maxDist) const;
52 bool getAreaAndLiquidData(float x, float y, float z, uint32 phasemask, Optional<uint8> reqLiquidType, VMAP::AreaAndLiquidData& data) const;
53
54 bool getObjectHitPos(uint32 phasemask, const G3D::Vector3& pPos1,
55 const G3D::Vector3& pPos2, G3D::Vector3& pResultHitPos,
56 float pModifyDist) const;
57
58 float getHeight(float x, float y, float z, float maxSearchDist, uint32 phasemask) const;
59
60 void insert(GameObjectModel const&);
61 void remove(GameObjectModel const&);
62 bool contains(GameObjectModel const&) const;
63
64 void balance();
65 void update(uint32 diff);
66};
67
68#endif // _DYNTREE_H
#define TC_COMMON_API
Definition Define.h:96
uint32_t uint32
Definition Define.h:133
std::optional< T > Optional
Optional helper class to wrap optional values within.
Definition Optional.h:25
DynTreeImpl * impl
Definition DynamicTree.h:40