Kemena3D
Loading...
Searching...
No Matches
knavobstacle.h
Go to the documentation of this file.
1
5
6#ifndef KNAVOBSTACLE_H
7#define KNAVOBSTACLE_H
8
9#include "kexport.h"
10#include "kdatatype.h"
11
12namespace kemena
13{
14 // -------------------------------------------------------------------------
15 // kNavObstacle
16 // -------------------------------------------------------------------------
17
31 {
32 public:
35
38
39 // --- Accessors -------------------------------------------------------
40
46
51 float getRadius() const;
52
57 float getHeight() const;
58
69 void setPosition(const kVec3 &pos);
70
72 bool isValid() const;
73
74 // --- Internal (used by kNavManager) ----------------------------------
75
89 bool init(void *tileCache, const kVec3 &position,
90 float radius, float height);
91
97 void uninit();
98
103 unsigned int getObstacleRef() const;
104
105 protected:
106 private:
107 struct Impl;
108 Impl *m_impl;
109 };
110
111} // namespace kemena
112
113#endif // KNAVOBSTACLE_H
void setPosition(const kVec3 &pos)
Moves the obstacle to a new world-space position.
bool isValid() const
Returns true if the obstacle is registered in the tile cache.
kVec3 getPosition() const
Returns the obstacle's current world-space centre position.
unsigned int getObstacleRef() const
Returns the underlying Detour obstacle reference.
void uninit()
Removes the obstacle from the tile cache and marks it invalid.
~kNavObstacle()
Destroys the obstacle, removing it from the tile cache if still valid.
bool init(void *tileCache, const kVec3 &position, float radius, float height)
Registers the obstacle as a cylinder in the given tile cache.
kNavObstacle()
Constructs an empty, uninitialised obstacle (no tile-cache binding).
float getRadius() const
Returns the obstacle cylinder's radius.
float getHeight() const
Returns the obstacle cylinder's height.
Core type aliases, enumerations, structs, and utility functions used throughout the engine.
Symbol visibility / linkage macro for the Kemena3D library.
#define KEMENA3D_API
Definition kexport.h:35
Top-level Kemena3D engine namespace.
Definition kanimation.h:23
glm::vec3 kVec3
3-component float vector.
Definition kdatatype.h:33