Recast Navigation
Navigation-mesh Toolset for Games
Loading...
Searching...
No Matches
PartitionedMesh Struct Reference

A spatially-partitioned mesh (k/d tree), where each node contains at max trisPerChunk triangles. More...

#include <PartitionedMesh.h>

Classes

struct  Node
 

Public Member Functions

void PartitionMesh (const float *verts, const int *tris, int numTris, int trisPerChunk)
 
void GetNodesOverlappingRect (float bmin[2], float bmax[2], std::vector< int > &outNodes) const
 Finds the chunk indices that overlap the input rectangle.
 
void GetNodesOverlappingSegment (float start[2], float end[2], std::vector< int > &outNodes) const
 Returns the chunk indices which overlap the input segment.
 

Public Attributes

std::vector< Nodenodes {}
 
int nnodes = 0
 
std::vector< int > tris {}
 
int maxTrisPerChunk = 0
 

Description

A spatially-partitioned mesh (k/d tree), where each node contains at max trisPerChunk triangles.

Member Function Documentation

◆ GetNodesOverlappingRect()

void PartitionedMesh::GetNodesOverlappingRect ( float  bmin[2],
float  bmax[2],
std::vector< int > &  outNodes 
) const

Finds the chunk indices that overlap the input rectangle.

◆ GetNodesOverlappingSegment()

void PartitionedMesh::GetNodesOverlappingSegment ( float  start[2],
float  end[2],
std::vector< int > &  outNodes 
) const

Returns the chunk indices which overlap the input segment.

◆ PartitionMesh()

void PartitionedMesh::PartitionMesh ( const float *  verts,
const int *  tris,
int  numTris,
int  trisPerChunk 
)

Member Data Documentation

◆ maxTrisPerChunk

int PartitionedMesh::maxTrisPerChunk = 0

◆ nnodes

int PartitionedMesh::nnodes = 0

◆ nodes

std::vector<Node> PartitionedMesh::nodes {}

◆ tris

std::vector<int> PartitionedMesh::tris {}

The documentation for this struct was generated from the following files: