-
Notifications
You must be signed in to change notification settings - Fork 17
/
nav_mesh_query.go
31 lines (27 loc) · 1.02 KB
/
nav_mesh_query.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
package unityai
type NavMeshRaycastResult struct {
t float32 // hit parameter along the segment, 1 if no hit.
normal Vector3f // edge hit normal
totalCost float32 // weighed length of raycast, using filter weights.
lastPoly NavMeshPolyRef // last valid polygon
hitPoly NavMeshPolyRef // last polygon or polygon hit - zero if external edge
}
type NavMeshQueryData struct {
status NavMeshStatus
lastBestNode *NavMeshNode
startNode *NavMeshNode
lastBestNodeCost float32
startRef, endRef NavMeshPolyRef
startPos, endPos Vector3f
filter *QueryFilter
}
type NavMeshQuery struct {
m_NavMesh *NavMesh // Pointer to navmesh data.
m_QueryData NavMeshQueryData // Sliced query state.
m_TinyNodePool *NavMeshNodePool // Pointer to small node pool.
m_NodePool *NavMeshNodePool // Pointer to node pool.
m_OpenList *NavMeshNodeQueue // Pointer to open list queue.
}
func (this *NavMeshQuery) GetAttachedNavMesh() *NavMesh {
return this.m_NavMesh
}