Nebula
Loading...
Searching...
No Matches
geometrysources.cc File Reference
#include "foundation/stdneb.h"
#include "navbuild/geometrysources.h"
#include "physics/geometry.h"
#include <algorithm>
#include <cfloat>
#include "DetourNavMesh.h"

Namespaces

namespace  Navigation
 Navigation::Build geometry sources.
namespace  Navigation::Build

Functions

Math::mat4 Navigation::Build::ColliderTransform (const Math::vec3 &position, const Math::quat &orientation, const Math::vec3 &localPosition, const Math::quat &localOrientation)
 world transform of a collider shape, placed like physics places it: the entity's world position and orientation composed with the collider offset.
Util::Array< Math::vec3 > Navigation::Build::ConvexHullXZ (const Util::Array< Math::vec3 > &input)
 Monotone chain.
AreaPrism Navigation::Build::MakeAreaPrism (const Math::mat4 &boxTransform, const Math::bbox &localBox, const Math::mat4 &pointTransform, const Math::vec3 *points, SizeT pointCount)
 the prism an area volume marks.
Util::Array< Math::vec3 > Navigation::Build::BoxOutlineXZ (const Math::mat4 &boxTransform, const Math::bbox &localBox)
 the outline of a box seen from above, the hull of its corners, in world space
static float Navigation::Build::SegmentDistanceSqXZ (const Math::vec3 &p, const Math::vec3 &a, const Math::vec3 &b)
IndexT Navigation::Build::OutlineInsertIndex (const Math::vec3 *outline, SizeT count, const Math::vec3 &point)
 where a point goes into an outline: the index of the edge closest to it seen from above, the point is inserted after that index, between the two outline points of the edge
static bool Navigation::Build::SegmentsCrossXZ (const Math::vec3 &a, const Math::vec3 &b, const Math::vec3 &c, const Math::vec3 &d)
bool Navigation::Build::IsSimpleOutlineXZ (const Math::vec3 *outline, SizeT count)
 true if no two edges of the outline cross each other seen from above
static bool Navigation::Build::RayTriangle (const Math::vec3 &o, const Math::vec3 &d, const float *a, const float *b, const float *c, float &t)
static bool Navigation::Build::RayBox (const Math::vec3 &o, const Math::vec3 &d, const float *bmin, const float *bmax)
bool Navigation::Build::RaycastNavMesh (const dtNavMesh &navMesh, const Math::point &start, const Math::vector &dir, float &outT)
 Walks the detail triangles of every polygon, the same triangles Detour gives heights with.
bool Navigation::Build::LoadMeshSource (Util::StringAtom resource, IndexT meshIndex, IndexT primGroup, const Math::mat4 &transform, MeshSource &out)
 fill a mesh source from a mesh URN, folder:file:msh, like a MeshCollider reads it
bool Navigation::Build::LoadHeightFieldSource (Util::StringAtom resource, float heightRange, float sizeX, float sizeZ, const Math::mat4 &transform, HeightFieldSource &out)
 fill a height field source from a heightmap URN, folder:file:tex, like a HeightFieldCollider reads it