19 #ifndef DETOUROBSTACLEAVOIDANCE_H
20 #define DETOUROBSTACLEAVOIDANCE_H
44 bool init(
const int maxSamples);
46 void addSample(
const float* vel,
const float ssize,
const float pen,
47 const float vpen,
const float vcpen,
const float spen,
const float tpen);
103 bool init(
const int maxCircles,
const int maxSegments);
107 void addCircle(
const float* pos,
const float rad,
108 const float* vel,
const float* dvel);
110 void addSegment(
const float* p,
const float* q);
113 const float* vel,
const float* dvel,
float* nvel,
118 const float* vel,
const float* dvel,
float* nvel,
133 void prepare(
const float* pos,
const float* dvel);
135 float processSample(
const float* vcand,
const float cs,
136 const float* pos,
const float rad,
137 const float* vel,
const float* dvel,
138 const float minPenalty,
142 float m_invHorizTime;
dtObstacleAvoidanceDebugData * dtAllocObstacleAvoidanceDebugData()
Definition: DetourObstacleAvoidance.cpp:72
static const int DT_MAX_PATTERN_DIVS
Max numver of adaptive divs.
Definition: DetourObstacleAvoidance.h:80
void dtFreeObstacleAvoidanceDebugData(dtObstacleAvoidanceDebugData *ptr)
Definition: DetourObstacleAvoidance.cpp:79
void dtFreeObstacleAvoidanceQuery(dtObstacleAvoidanceQuery *ptr)
Definition: DetourObstacleAvoidance.cpp:201
static const int DT_MAX_PATTERN_RINGS
Max number of adaptive rings.
Definition: DetourObstacleAvoidance.h:81
dtObstacleAvoidanceQuery * dtAllocObstacleAvoidanceQuery()
Definition: DetourObstacleAvoidance.cpp:194
Definition: DetourObstacleAvoidance.h:39
void reset()
Definition: DetourObstacleAvoidance.cpp:141
float getSamplePenalty(const int i) const
Definition: DetourObstacleAvoidance.h:54
int getSampleCount() const
Definition: DetourObstacleAvoidance.h:51
bool init(const int maxSamples)
Definition: DetourObstacleAvoidance.cpp:111
float getSamplePreferredSidePenalty(const int i) const
Definition: DetourObstacleAvoidance.h:57
void addSample(const float *vel, const float ssize, const float pen, const float vpen, const float vcpen, const float spen, const float tpen)
Definition: DetourObstacleAvoidance.cpp:146
float getSampleCollisionTimePenalty(const int i) const
Definition: DetourObstacleAvoidance.h:58
const float * getSampleVelocity(const int i) const
Definition: DetourObstacleAvoidance.h:52
float getSampleSize(const int i) const
Definition: DetourObstacleAvoidance.h:53
float getSampleDesiredVelocityPenalty(const int i) const
Definition: DetourObstacleAvoidance.h:55
void normalizeSamples()
Definition: DetourObstacleAvoidance.cpp:184
~dtObstacleAvoidanceDebugData()
Definition: DetourObstacleAvoidance.cpp:100
float getSampleCurrentVelocityPenalty(const int i) const
Definition: DetourObstacleAvoidance.h:56
dtObstacleAvoidanceDebugData()
Definition: DetourObstacleAvoidance.cpp:87
Definition: DetourObstacleAvoidance.h:98
const dtObstacleCircle * getObstacleCircle(const int i)
Definition: DetourObstacleAvoidance.h:123
dtObstacleAvoidanceQuery()
Definition: DetourObstacleAvoidance.cpp:209
int getObstacleSegmentCount() const
Definition: DetourObstacleAvoidance.h:125
int sampleVelocityGrid(const float *pos, const float rad, const float vmax, const float *vel, const float *dvel, float *nvel, const dtObstacleAvoidanceParams *params, dtObstacleAvoidanceDebugData *debug=0)
Definition: DetourObstacleAvoidance.cpp:435
~dtObstacleAvoidanceQuery()
Definition: DetourObstacleAvoidance.cpp:222
const dtObstacleSegment * getObstacleSegment(const int i)
Definition: DetourObstacleAvoidance.h:126
void reset()
Definition: DetourObstacleAvoidance.cpp:247
bool init(const int maxCircles, const int maxSegments)
Definition: DetourObstacleAvoidance.cpp:228
void addSegment(const float *p, const float *q)
Definition: DetourObstacleAvoidance.cpp:266
void addCircle(const float *pos, const float rad, const float *vel, const float *dvel)
Definition: DetourObstacleAvoidance.cpp:253
int getObstacleCircleCount() const
Definition: DetourObstacleAvoidance.h:122
int sampleVelocityAdaptive(const float *pos, const float rad, const float vmax, const float *vel, const float *dvel, float *nvel, const dtObstacleAvoidanceParams *params, dtObstacleAvoidanceDebugData *debug=0)
Definition: DetourObstacleAvoidance.cpp:507
Definition: DetourObstacleAvoidance.h:84
float horizTime
Definition: DetourObstacleAvoidance.h:90
float weightSide
Definition: DetourObstacleAvoidance.h:88
unsigned char gridSize
grid
Definition: DetourObstacleAvoidance.h:91
float weightDesVel
Definition: DetourObstacleAvoidance.h:86
unsigned char adaptiveDepth
adaptive
Definition: DetourObstacleAvoidance.h:94
float weightToi
Definition: DetourObstacleAvoidance.h:89
unsigned char adaptiveDivs
adaptive
Definition: DetourObstacleAvoidance.h:92
float velBias
Definition: DetourObstacleAvoidance.h:85
unsigned char adaptiveRings
adaptive
Definition: DetourObstacleAvoidance.h:93
float weightCurVel
Definition: DetourObstacleAvoidance.h:87
Definition: DetourObstacleAvoidance.h:23
float np[3]
Use for side selection during sampling.
Definition: DetourObstacleAvoidance.h:28
float dp[3]
Definition: DetourObstacleAvoidance.h:28
float p[3]
Position of the obstacle.
Definition: DetourObstacleAvoidance.h:24
float dvel[3]
Velocity of the obstacle.
Definition: DetourObstacleAvoidance.h:26
float vel[3]
Velocity of the obstacle.
Definition: DetourObstacleAvoidance.h:25
float rad
Radius of the obstacle.
Definition: DetourObstacleAvoidance.h:27
Definition: DetourObstacleAvoidance.h:32
bool touch
Definition: DetourObstacleAvoidance.h:34
float q[3]
End points of the obstacle segment.
Definition: DetourObstacleAvoidance.h:33
float p[3]
Definition: DetourObstacleAvoidance.h:33