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
24
namespace
G3D
25
{
26
class
Ray;
27
class
Vector3;
28
}
29
30
class
GameObjectModel
;
31
struct
DynTreeImpl
;
32
33
namespace
VMAP
34
{
35
struct
AreaAndLiquidData
;
36
}
37
38
class
TC_COMMON_API
DynamicMapTree
39
{
40
DynTreeImpl
*
impl
;
41
42
public
:
43
44
DynamicMapTree
();
45
~DynamicMapTree
();
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.h
TC_COMMON_API
#define TC_COMMON_API
Definition
Define.h:96
uint32
uint32_t uint32
Definition
Define.h:133
Optional.h
Optional
std::optional< T > Optional
Optional helper class to wrap optional values within.
Definition
Optional.h:25
DynamicMapTree
Definition
DynamicTree.h:39
DynamicMapTree::impl
DynTreeImpl * impl
Definition
DynamicTree.h:40
GameObjectModel
Definition
GameObjectModel.h:55
G3D
Definition
DynamicTree.h:25
VMAP
Definition
DynamicTree.h:34
DynTreeImpl
Definition
DynamicTree.cpp:62
VMAP::AreaAndLiquidData
Definition
IVMapManager.h:53
common
Collision
DynamicTree.h
Generated on Sun May 10 2026 02:30:12 for TrinityCore by
1.9.8