diff --git a/OffMeshConnectionTool_8cpp.html b/AppState_8cpp.html similarity index 79% rename from OffMeshConnectionTool_8cpp.html rename to AppState_8cpp.html index 0fc321b2..2a4f486b 100644 --- a/OffMeshConnectionTool_8cpp.html +++ b/AppState_8cpp.html @@ -5,7 +5,7 @@ -Recast Navigation: OffMeshConnectionTool.cpp File Reference +Recast Navigation: AppState.cpp File Reference @@ -67,7 +67,7 @@ $(function() {
@@ -93,30 +93,22 @@ $(document).ready(function(){initNavTree('OffMeshConnectionTool_8cpp.html','');
-
OffMeshConnectionTool.cpp File Reference
+
AppState.cpp File Reference
-
#include <math.h>
-#include <stdio.h>
-#include <string.h>
-#include <float.h>
-#include "SDL.h"
-#include "SDL_opengl.h"
-#include <GL/glu.h>
-#include "imgui.h"
-#include "OffMeshConnectionTool.h"
+
#include "AppState.h"
#include "InputGeom.h"
+#include "SDL_opengl.h"
#include "Sample.h"
-#include "Recast.h"
-#include "RecastDebugDraw.h"
-#include "DetourDebugDraw.h"
+#include <GL/glu.h>
+#include <imgui.h>
@@ -95,16 +95,20 @@ $(document).ready(function(){initNavTree('MeshLoaderObj_8h.html',''); initResiza
-
MeshLoaderObj.h File Reference
+
AppState.h File Reference
-
#include <string>
+
#include "SDL.h"
+#include "SampleInterfaces.h"
+#include <memory>
+#include <string>
+#include <vector>
-

Go to the source code of this file.

+

Go to the source code of this file.

- +

Classes

class  rcMeshLoaderObj
struct  AppState
 
@@ -113,7 +117,7 @@ Classes -
313
-
-
318inline int dtGetDetailTriEdgeFlags(unsigned char triFlags, int edgeIndex)
-
319{
-
320 return (triFlags >> (edgeIndex * 2)) & 0x3;
-
321}
+
310
+
+
315inline int dtGetDetailTriEdgeFlags(unsigned char triFlags, int edgeIndex)
+
316{
+
317 return (triFlags >> (edgeIndex * 2)) & 0x3;
+
318}
-
322
-
- -
328{
-
329 float orig[3];
-
330 float tileWidth;
- - - -
334};
+
319
+
+ +
325{
+
326 float orig[3];
+
327 float tileWidth;
+ + + +
331};
-
335
-
- -
339{
-
340public:
-
341 dtNavMesh();
-
342 ~dtNavMesh();
+
332
+
+ +
336{
+
337public:
+
338 dtNavMesh();
+
339 ~dtNavMesh();
+
340
343
-
346
-
350 dtStatus init(const dtNavMeshParams* params);
-
351
-
358 dtStatus init(unsigned char* data, const int dataSize, const int flags);
-
359
-
361 const dtNavMeshParams* getParams() const;
-
362
-
370 dtStatus addTile(unsigned char* data, int dataSize, int flags, dtTileRef lastRef, dtTileRef* result);
-
371
-
377 dtStatus removeTile(dtTileRef ref, unsigned char** data, int* dataSize);
-
378
+
347 dtStatus init(const dtNavMeshParams* params);
+
348
+
355 dtStatus init(unsigned char* data, const int dataSize, const int flags);
+
356
+
358 const dtNavMeshParams* getParams() const;
+
359
+
367 dtStatus addTile(unsigned char* data, int dataSize, int flags, dtTileRef lastRef, dtTileRef* result);
+
368
+
374 dtStatus removeTile(dtTileRef ref, unsigned char** data, int* dataSize);
+
375
+
377
380
-
383
-
388 void calcTileLoc(const float* pos, int* tx, int* ty) const;
-
389
-
395 const dtMeshTile* getTileAt(const int x, const int y, const int layer) const;
-
396
-
403 int getTilesAt(const int x, const int y,
-
404 dtMeshTile const** tiles, const int maxTiles) const;
-
405
-
411 dtTileRef getTileRefAt(int x, int y, int layer) const;
-
412
-
416 dtTileRef getTileRef(const dtMeshTile* tile) const;
-
417
-
422 const dtMeshTile* getTileByRef(dtTileRef ref) const;
-
423
-
426 int getMaxTiles() const;
-
427
-
431 const dtMeshTile* getTile(int i) const;
-
432
-
438 dtStatus getTileAndPolyByRef(const dtPolyRef ref, const dtMeshTile** tile, const dtPoly** poly) const;
-
439
-
444 void getTileAndPolyByRefUnsafe(const dtPolyRef ref, const dtMeshTile** tile, const dtPoly** poly) const;
-
445
-
449 bool isValidPolyRef(dtPolyRef ref) const;
-
450
-
454 dtPolyRef getPolyRefBase(const dtMeshTile* tile) const;
-
455
-
462 dtStatus getOffMeshConnectionPolyEndPoints(dtPolyRef prevRef, dtPolyRef polyRef, float* startPos, float* endPos) const;
-
463
- -
468
-
470
-
474
-
479 dtStatus setPolyFlags(dtPolyRef ref, unsigned short flags);
-
480
-
485 dtStatus getPolyFlags(dtPolyRef ref, unsigned short* resultFlags) const;
-
486
-
491 dtStatus setPolyArea(dtPolyRef ref, unsigned char area);
-
492
-
497 dtStatus getPolyArea(dtPolyRef ref, unsigned char* resultArea) const;
-
498
-
502 int getTileStateSize(const dtMeshTile* tile) const;
-
503
-
509 dtStatus storeTileState(const dtMeshTile* tile, unsigned char* data, const int maxDataSize) const;
-
510
-
516 dtStatus restoreTileState(dtMeshTile* tile, const unsigned char* data, const int maxDataSize);
-
517
-
519
-
523
-
-
529 inline dtPolyRef encodePolyId(unsigned int salt, unsigned int it, unsigned int ip) const
-
530 {
-
531#ifdef DT_POLYREF64
-
532 return ((dtPolyRef)salt << (DT_POLY_BITS+DT_TILE_BITS)) | ((dtPolyRef)it << DT_POLY_BITS) | (dtPolyRef)ip;
-
533#else
-
534 return ((dtPolyRef)salt << (m_polyBits+m_tileBits)) | ((dtPolyRef)it << m_polyBits) | (dtPolyRef)ip;
-
535#endif
-
536 }
+
385 void calcTileLoc(const float* pos, int* tx, int* ty) const;
+
386
+
392 const dtMeshTile* getTileAt(const int x, const int y, const int layer) const;
+
393
+
400 int getTilesAt(const int x, const int y,
+
401 dtMeshTile const** tiles, const int maxTiles) const;
+
402
+
408 dtTileRef getTileRefAt(int x, int y, int layer) const;
+
409
+
413 dtTileRef getTileRef(const dtMeshTile* tile) const;
+
414
+
419 const dtMeshTile* getTileByRef(dtTileRef ref) const;
+
420
+
423 int getMaxTiles() const;
+
424
+
428 const dtMeshTile* getTile(int i) const;
+
429
+
435 dtStatus getTileAndPolyByRef(const dtPolyRef ref, const dtMeshTile** tile, const dtPoly** poly) const;
+
436
+
441 void getTileAndPolyByRefUnsafe(const dtPolyRef ref, const dtMeshTile** tile, const dtPoly** poly) const;
+
442
+
446 bool isValidPolyRef(dtPolyRef ref) const;
+
447
+
451 dtPolyRef getPolyRefBase(const dtMeshTile* tile) const;
+
452
+
459 dtStatus getOffMeshConnectionPolyEndPoints(dtPolyRef prevRef, dtPolyRef polyRef, float* startPos, float* endPos) const;
+
460
+ +
465
+
467
+
471
+
476 dtStatus setPolyFlags(dtPolyRef ref, unsigned short flags);
+
477
+
482 dtStatus getPolyFlags(dtPolyRef ref, unsigned short* resultFlags) const;
+
483
+
488 dtStatus setPolyArea(dtPolyRef ref, unsigned char area);
+
489
+
494 dtStatus getPolyArea(dtPolyRef ref, unsigned char* resultArea) const;
+
495
+
499 int getTileStateSize(const dtMeshTile* tile) const;
+
500
+
506 dtStatus storeTileState(const dtMeshTile* tile, unsigned char* data, const int maxDataSize) const;
+
507
+
513 dtStatus restoreTileState(dtMeshTile* tile, const unsigned char* data, const int maxDataSize);
+
514
+
516
+
520
+
+
526 inline dtPolyRef encodePolyId(unsigned int salt, unsigned int it, unsigned int ip) const
+
527 {
+
528#ifdef DT_POLYREF64
+
529 return ((dtPolyRef)salt << (DT_POLY_BITS+DT_TILE_BITS)) | ((dtPolyRef)it << DT_POLY_BITS) | (dtPolyRef)ip;
+
530#else
+
531 return ((dtPolyRef)salt << (m_polyBits+m_tileBits)) | ((dtPolyRef)it << m_polyBits) | (dtPolyRef)ip;
+
532#endif
+
533 }
-
537
-
-
545 inline void decodePolyId(dtPolyRef ref, unsigned int& salt, unsigned int& it, unsigned int& ip) const
-
546 {
-
547#ifdef DT_POLYREF64
-
548 const dtPolyRef saltMask = ((dtPolyRef)1<<DT_SALT_BITS)-1;
-
549 const dtPolyRef tileMask = ((dtPolyRef)1<<DT_TILE_BITS)-1;
-
550 const dtPolyRef polyMask = ((dtPolyRef)1<<DT_POLY_BITS)-1;
-
551 salt = (unsigned int)((ref >> (DT_POLY_BITS+DT_TILE_BITS)) & saltMask);
-
552 it = (unsigned int)((ref >> DT_POLY_BITS) & tileMask);
-
553 ip = (unsigned int)(ref & polyMask);
-
554#else
-
555 const dtPolyRef saltMask = ((dtPolyRef)1<<m_saltBits)-1;
-
556 const dtPolyRef tileMask = ((dtPolyRef)1<<m_tileBits)-1;
-
557 const dtPolyRef polyMask = ((dtPolyRef)1<<m_polyBits)-1;
-
558 salt = (unsigned int)((ref >> (m_polyBits+m_tileBits)) & saltMask);
-
559 it = (unsigned int)((ref >> m_polyBits) & tileMask);
-
560 ip = (unsigned int)(ref & polyMask);
-
561#endif
-
562 }
+
534
+
+
542 inline void decodePolyId(dtPolyRef ref, unsigned int& salt, unsigned int& it, unsigned int& ip) const
+
543 {
+
544#ifdef DT_POLYREF64
+
545 const dtPolyRef saltMask = ((dtPolyRef)1<<DT_SALT_BITS)-1;
+
546 const dtPolyRef tileMask = ((dtPolyRef)1<<DT_TILE_BITS)-1;
+
547 const dtPolyRef polyMask = ((dtPolyRef)1<<DT_POLY_BITS)-1;
+
548 salt = (unsigned int)((ref >> (DT_POLY_BITS+DT_TILE_BITS)) & saltMask);
+
549 it = (unsigned int)((ref >> DT_POLY_BITS) & tileMask);
+
550 ip = (unsigned int)(ref & polyMask);
+
551#else
+
552 const dtPolyRef saltMask = ((dtPolyRef)1<<m_saltBits)-1;
+
553 const dtPolyRef tileMask = ((dtPolyRef)1<<m_tileBits)-1;
+
554 const dtPolyRef polyMask = ((dtPolyRef)1<<m_polyBits)-1;
+
555 salt = (unsigned int)((ref >> (m_polyBits+m_tileBits)) & saltMask);
+
556 it = (unsigned int)((ref >> m_polyBits) & tileMask);
+
557 ip = (unsigned int)(ref & polyMask);
+
558#endif
+
559 }
-
563
-
-
568 inline unsigned int decodePolyIdSalt(dtPolyRef ref) const
-
569 {
-
570#ifdef DT_POLYREF64
-
571 const dtPolyRef saltMask = ((dtPolyRef)1<<DT_SALT_BITS)-1;
-
572 return (unsigned int)((ref >> (DT_POLY_BITS+DT_TILE_BITS)) & saltMask);
-
573#else
-
574 const dtPolyRef saltMask = ((dtPolyRef)1<<m_saltBits)-1;
-
575 return (unsigned int)((ref >> (m_polyBits+m_tileBits)) & saltMask);
-
576#endif
-
577 }
+
560
+
+
565 inline unsigned int decodePolyIdSalt(dtPolyRef ref) const
+
566 {
+
567#ifdef DT_POLYREF64
+
568 const dtPolyRef saltMask = ((dtPolyRef)1<<DT_SALT_BITS)-1;
+
569 return (unsigned int)((ref >> (DT_POLY_BITS+DT_TILE_BITS)) & saltMask);
+
570#else
+
571 const dtPolyRef saltMask = ((dtPolyRef)1<<m_saltBits)-1;
+
572 return (unsigned int)((ref >> (m_polyBits+m_tileBits)) & saltMask);
+
573#endif
+
574 }
-
578
-
-
583 inline unsigned int decodePolyIdTile(dtPolyRef ref) const
-
584 {
-
585#ifdef DT_POLYREF64
-
586 const dtPolyRef tileMask = ((dtPolyRef)1<<DT_TILE_BITS)-1;
-
587 return (unsigned int)((ref >> DT_POLY_BITS) & tileMask);
-
588#else
-
589 const dtPolyRef tileMask = ((dtPolyRef)1<<m_tileBits)-1;
-
590 return (unsigned int)((ref >> m_polyBits) & tileMask);
-
591#endif
-
592 }
+
575
+
+
580 inline unsigned int decodePolyIdTile(dtPolyRef ref) const
+
581 {
+
582#ifdef DT_POLYREF64
+
583 const dtPolyRef tileMask = ((dtPolyRef)1<<DT_TILE_BITS)-1;
+
584 return (unsigned int)((ref >> DT_POLY_BITS) & tileMask);
+
585#else
+
586 const dtPolyRef tileMask = ((dtPolyRef)1<<m_tileBits)-1;
+
587 return (unsigned int)((ref >> m_polyBits) & tileMask);
+
588#endif
+
589 }
-
593
-
-
598 inline unsigned int decodePolyIdPoly(dtPolyRef ref) const
-
599 {
-
600#ifdef DT_POLYREF64
-
601 const dtPolyRef polyMask = ((dtPolyRef)1<<DT_POLY_BITS)-1;
+
590
+
+
595 inline unsigned int decodePolyIdPoly(dtPolyRef ref) const
+
596 {
+
597#ifdef DT_POLYREF64
+
598 const dtPolyRef polyMask = ((dtPolyRef)1<<DT_POLY_BITS)-1;
+
599 return (unsigned int)(ref & polyMask);
+
600#else
+
601 const dtPolyRef polyMask = ((dtPolyRef)1<<m_polyBits)-1;
602 return (unsigned int)(ref & polyMask);
-
603#else
-
604 const dtPolyRef polyMask = ((dtPolyRef)1<<m_polyBits)-1;
-
605 return (unsigned int)(ref & polyMask);
-
606#endif
-
607 }
+
603#endif
+
604 }
-
608
-
610
-
611private:
-
612 // Explicitly disabled copy constructor and copy assignment operator.
-
613 dtNavMesh(const dtNavMesh&);
-
614 dtNavMesh& operator=(const dtNavMesh&);
+
605
+
607
+
608private:
+
609 // Explicitly disabled copy constructor and copy assignment operator.
+
610 dtNavMesh(const dtNavMesh&);
+
611 dtNavMesh& operator=(const dtNavMesh&);
+
612
+
614 dtMeshTile* getTile(int i);
615
-
617 dtMeshTile* getTile(int i);
-
618
-
620 int getTilesAt(const int x, const int y,
-
621 dtMeshTile** tiles, const int maxTiles) const;
-
622
-
624 int getNeighbourTilesAt(const int x, const int y, const int side,
-
625 dtMeshTile** tiles, const int maxTiles) const;
-
626
-
628 int findConnectingPolys(const float* va, const float* vb,
-
629 const dtMeshTile* tile, int side,
-
630 dtPolyRef* con, float* conarea, int maxcon) const;
-
631
-
633 void connectIntLinks(dtMeshTile* tile);
-
635 void baseOffMeshLinks(dtMeshTile* tile);
-
636
-
638 void connectExtLinks(dtMeshTile* tile, dtMeshTile* target, int side);
-
640 void connectExtOffMeshLinks(dtMeshTile* tile, dtMeshTile* target, int side);
+
617 int getTilesAt(const int x, const int y,
+
618 dtMeshTile** tiles, const int maxTiles) const;
+
619
+
621 int getNeighbourTilesAt(const int x, const int y, const int side,
+
622 dtMeshTile** tiles, const int maxTiles) const;
+
623
+
625 int findConnectingPolys(const float* va, const float* vb,
+
626 const dtMeshTile* tile, int side,
+
627 dtPolyRef* con, float* conarea, int maxcon) const;
+
628
+
630 void connectIntLinks(dtMeshTile* tile);
+
632 void baseOffMeshLinks(dtMeshTile* tile);
+
633
+
635 void connectExtLinks(dtMeshTile* tile, dtMeshTile* target, int side);
+
637 void connectExtOffMeshLinks(dtMeshTile* tile, dtMeshTile* target, int side);
+
638
+
640 void unconnectLinks(dtMeshTile* tile, dtMeshTile* target);
641
-
643 void unconnectLinks(dtMeshTile* tile, dtMeshTile* target);
+
642
+
643 // TODO: These methods are duplicates from dtNavMeshQuery, but are needed for off-mesh connection finding.
644
-
645
-
646 // TODO: These methods are duplicates from dtNavMeshQuery, but are needed for off-mesh connection finding.
-
647
-
649 int queryPolygonsInTile(const dtMeshTile* tile, const float* qmin, const float* qmax,
-
650 dtPolyRef* polys, const int maxPolys) const;
-
652 dtPolyRef findNearestPolyInTile(const dtMeshTile* tile, const float* center,
-
653 const float* halfExtents, float* nearestPt) const;
-
655 bool getPolyHeight(const dtMeshTile* tile, const dtPoly* poly, const float* pos, float* height) const;
-
657 void closestPointOnPoly(dtPolyRef ref, const float* pos, float* closest, bool* posOverPoly) const;
-
658
-
659 dtNavMeshParams m_params;
-
660 float m_orig[3];
-
661 float m_tileWidth, m_tileHeight;
-
662 int m_maxTiles;
-
663 int m_tileLutSize;
-
664 int m_tileLutMask;
-
665
-
666 dtMeshTile** m_posLookup;
-
667 dtMeshTile* m_nextFree;
-
668 dtMeshTile* m_tiles;
-
669
-
670#ifndef DT_POLYREF64
-
671 unsigned int m_saltBits;
-
672 unsigned int m_tileBits;
-
673 unsigned int m_polyBits;
-
674#endif
-
675
-
676 friend class dtNavMeshQuery;
-
677};
+
646 int queryPolygonsInTile(const dtMeshTile* tile, const float* qmin, const float* qmax,
+
647 dtPolyRef* polys, const int maxPolys) const;
+
649 dtPolyRef findNearestPolyInTile(const dtMeshTile* tile, const float* center,
+
650 const float* halfExtents, float* nearestPt) const;
+
652 bool getPolyHeight(const dtMeshTile* tile, const dtPoly* poly, const float* pos, float* height) const;
+
654 void closestPointOnPoly(dtPolyRef ref, const float* pos, float* closest, bool* posOverPoly) const;
+
655
+
656 dtNavMeshParams m_params;
+
657 float m_orig[3];
+
658 float m_tileWidth, m_tileHeight;
+
659 int m_maxTiles;
+
660 int m_tileLutSize;
+
661 int m_tileLutMask;
+
662
+
663 dtMeshTile** m_posLookup;
+
664 dtMeshTile* m_nextFree;
+
665 dtMeshTile* m_tiles;
+
666
+
667#ifndef DT_POLYREF64
+
668 unsigned int m_saltBits;
+
669 unsigned int m_tileBits;
+
670 unsigned int m_polyBits;
+
671#endif
+
672
+
673 friend class dtNavMeshQuery;
+
674};
-
678
- -
683
-
687void dtFreeNavMesh(dtNavMesh* navmesh);
-
688
-
689#endif // DETOURNAVMESH_H
-
690
+
675
+ +
680
+
684void dtFreeNavMesh(dtNavMesh* navmesh);
+
685
+
686#endif // DETOURNAVMESH_H
+
687
+
689
+
690// This section contains detailed documentation for members that don't have
+
691// a source file. It reduces clutter in the main section of the header.
692
-
693// This section contains detailed documentation for members that don't have
-
694// a source file. It reduces clutter in the main section of the header.
-
695
dtPolyTypes
Flags representing the type of a navigation mesh polygon.
Definition DetourNavMesh.h:145
@ DT_POLYTYPE_GROUND
The polygon is a standard convex polygon that is part of the surface of the mesh.
Definition DetourNavMesh.h:147
@@ -599,7 +596,7 @@ $(document).ready(function(){initNavTree('DetourNavMesh_8h_source.html',''); ini
dtDetailTriEdgeFlags
Definition DetourNavMesh.h:134
@ DT_DETAIL_EDGE_BOUNDARY
Detail triangle edge is part of the poly boundary.
Definition DetourNavMesh.h:135
static const float DT_RAY_CAST_LIMIT_PROPORTIONS
Limit raycasting during any angle pahfinding The limit is given as a multiple of the character radius...
Definition DetourNavMesh.h:141
-
int dtGetDetailTriEdgeFlags(unsigned char triFlags, int edgeIndex)
Get flags for edge in detail triangle.
Definition DetourNavMesh.h:318
+
int dtGetDetailTriEdgeFlags(unsigned char triFlags, int edgeIndex)
Get flags for edge in detail triangle.
Definition DetourNavMesh.h:315
static const int DT_NAVMESH_VERSION
A version number used to detect compatibility of navigation tile data.
Definition DetourNavMesh.h:73
dtRaycastOptions
Options for dtNavMeshQuery::raycast.
Definition DetourNavMesh.h:129
@ DT_RAYCAST_USE_COSTS
Raycast should calculate movement cost along the ray and fill RaycastHit::cost.
Definition DetourNavMesh.h:130
@@ -620,19 +617,19 @@ $(document).ready(function(){initNavTree('DetourNavMesh_8h_source.html',''); ini
unsigned int dtStatus
Definition DetourStatus.h:22
Provides the ability to perform pathfinding related queries against a navigation mesh.
Definition DetourNavMeshQuery.h:166
-
A navigation mesh based on tiles of convex polygons.
Definition DetourNavMesh.h:339
+
A navigation mesh based on tiles of convex polygons.
Definition DetourNavMesh.h:336
dtStatus init(const dtNavMeshParams *params)
Initializes the navigation mesh for tiled use.
Definition DetourNavMesh.cpp:224
dtPolyRef getPolyRefBase(const dtMeshTile *tile) const
Gets the polygon reference for the tile's base polygon.
Definition DetourNavMesh.cpp:1360
~dtNavMesh()
Definition DetourNavMesh.cpp:209
dtStatus storeTileState(const dtMeshTile *tile, unsigned char *data, const int maxDataSize) const
Stores the non-structural state of the tile in the specified buffer.
Definition DetourNavMesh.cpp:1394
-
dtPolyRef encodePolyId(unsigned int salt, unsigned int it, unsigned int ip) const
Derives a standard polygon reference.
Definition DetourNavMesh.h:529
+
dtPolyRef encodePolyId(unsigned int salt, unsigned int it, unsigned int ip) const
Derives a standard polygon reference.
Definition DetourNavMesh.h:526
int getMaxTiles() const
The maximum number of tiles supported by the navigation mesh.
Definition DetourNavMesh.cpp:1180
int getTilesAt(const int x, const int y, dtMeshTile const **tiles, const int maxTiles) const
Gets all tiles at the specified grid location.
Definition DetourNavMesh.cpp:1124
const dtOffMeshConnection * getOffMeshConnectionByRef(dtPolyRef ref) const
Gets the specified off-mesh connection.
Definition DetourNavMesh.cpp:1506
dtNavMesh()
Definition DetourNavMesh.cpp:188
dtStatus getTileAndPolyByRef(const dtPolyRef ref, const dtMeshTile **tile, const dtPoly **poly) const
Gets the tile and polygon for the specified polygon reference.
Definition DetourNavMesh.cpp:1201
const dtMeshTile * getTile(int i) const
Gets the tile at the specified index.
Definition DetourNavMesh.cpp:1190
-
unsigned int decodePolyIdSalt(dtPolyRef ref) const
Extracts a tile's salt value from the specified polygon reference.
Definition DetourNavMesh.h:568
+
unsigned int decodePolyIdSalt(dtPolyRef ref) const
Extracts a tile's salt value from the specified polygon reference.
Definition DetourNavMesh.h:565
dtStatus addTile(unsigned char *data, int dataSize, int flags, dtTileRef lastRef, dtTileRef *result)
Adds a tile to the navigation mesh.
Definition DetourNavMesh.cpp:912
dtStatus removeTile(dtTileRef ref, unsigned char **data, int *dataSize)
Removes the specified tile from the navigation mesh.
Definition DetourNavMesh.cpp:1244
dtStatus getOffMeshConnectionPolyEndPoints(dtPolyRef prevRef, dtPolyRef polyRef, float *startPos, float *endPos) const
Gets the endpoints for an off-mesh connection, ordered by "direction of travel".
Definition DetourNavMesh.cpp:1463
@@ -643,8 +640,8 @@ $(document).ready(function(){initNavTree('DetourNavMesh_8h_source.html',''); ini
dtTileRef getTileRefAt(int x, int y, int layer) const
Gets the tile reference for the tile at specified grid location.
Definition DetourNavMesh.cpp:1147
dtStatus getPolyFlags(dtPolyRef ref, unsigned short *resultFlags) const
Gets the user defined flags for the specified polygon.
Definition DetourNavMesh.cpp:1548
const dtNavMeshParams * getParams() const
The navigation mesh initialization params.
Definition DetourNavMesh.cpp:298
-
unsigned int decodePolyIdPoly(dtPolyRef ref) const
Extracts the polygon's index (within its tile) from the specified polygon reference.
Definition DetourNavMesh.h:598
-
unsigned int decodePolyIdTile(dtPolyRef ref) const
Extracts the tile's index from the specified polygon reference.
Definition DetourNavMesh.h:583
+
unsigned int decodePolyIdPoly(dtPolyRef ref) const
Extracts the polygon's index (within its tile) from the specified polygon reference.
Definition DetourNavMesh.h:595
+
unsigned int decodePolyIdTile(dtPolyRef ref) const
Extracts the tile's index from the specified polygon reference.
Definition DetourNavMesh.h:580
dtStatus getPolyArea(dtPolyRef ref, unsigned char *resultArea) const
Gets the user defined area for the specified polygon.
Definition DetourNavMesh.cpp:1580
int getTileStateSize(const dtMeshTile *tile) const
Gets the size of the buffer required by storeTileState to store the specified tile's state.
Definition DetourNavMesh.cpp:1381
void getTileAndPolyByRefUnsafe(const dtPolyRef ref, const dtMeshTile **tile, const dtPoly **poly) const
Returns the tile and polygon for the specified polygon reference.
Definition DetourNavMesh.cpp:1219
@@ -652,7 +649,7 @@ $(document).ready(function(){initNavTree('DetourNavMesh_8h_source.html',''); ini
const dtMeshTile * getTileAt(const int x, const int y, const int layer) const
Gets the tile at the specified grid location.
Definition DetourNavMesh.cpp:1061
dtStatus restoreTileState(dtMeshTile *tile, const unsigned char *data, const int maxDataSize)
Restores the state of the tile.
Definition DetourNavMesh.cpp:1426
dtStatus setPolyFlags(dtPolyRef ref, unsigned short flags)
Sets the user defined flags for the specified polygon.
Definition DetourNavMesh.cpp:1531
-
void decodePolyId(dtPolyRef ref, unsigned int &salt, unsigned int &it, unsigned int &ip) const
Decodes a standard polygon reference.
Definition DetourNavMesh.h:545
+
void decodePolyId(dtPolyRef ref, unsigned int &salt, unsigned int &it, unsigned int &ip) const
Decodes a standard polygon reference.
Definition DetourNavMesh.h:542
dtNavMesh * dtAllocNavMesh()
Allocates a navigation mesh object using the Detour allocator.
Definition DetourNavMesh.cpp:138
unsigned int dtTileRef
A handle to a tile within a navigation mesh.
Definition DetourNavMesh.h:56
static const int DT_VERTS_PER_POLYGON
The maximum number of vertices per navigation polygon.
Definition DetourNavMesh.h:61
@@ -708,12 +705,12 @@ $(document).ready(function(){initNavTree('DetourNavMesh_8h_source.html',''); ini
float * verts
The tile vertices. [(x, y, z) * dtMeshHeader::vertCount].
Definition DetourNavMesh.h:288
unsigned int linksFreeList
Index to the next free link.
Definition DetourNavMesh.h:285
unsigned char * data
The tile data. (Not directly accessed under normal situations.)
Definition DetourNavMesh.h:305
-
Configuration parameters used to define multi-tile navigation meshes.
Definition DetourNavMesh.h:328
-
float orig[3]
The world space origin of the navigation mesh's tile space. [(x, y, z)].
Definition DetourNavMesh.h:329
-
int maxPolys
The maximum number of polygons each tile can contain. This and maxTiles are used to calculate how man...
Definition DetourNavMesh.h:333
-
float tileWidth
The width of each tile. (Along the x-axis.)
Definition DetourNavMesh.h:330
-
float tileHeight
The height of each tile. (Along the z-axis.)
Definition DetourNavMesh.h:331
-
int maxTiles
The maximum number of tiles the navigation mesh can contain. This and maxPolys are used to calculate ...
Definition DetourNavMesh.h:332
+
Configuration parameters used to define multi-tile navigation meshes.
Definition DetourNavMesh.h:325
+
float orig[3]
The world space origin of the navigation mesh's tile space. [(x, y, z)].
Definition DetourNavMesh.h:326
+
int maxPolys
The maximum number of polygons each tile can contain. This and maxTiles are used to calculate how man...
Definition DetourNavMesh.h:330
+
float tileWidth
The width of each tile. (Along the x-axis.)
Definition DetourNavMesh.h:327
+
float tileHeight
The height of each tile. (Along the z-axis.)
Definition DetourNavMesh.h:328
+
int maxTiles
The maximum number of tiles the navigation mesh can contain. This and maxPolys are used to calculate ...
Definition DetourNavMesh.h:329
Defines an navigation mesh off-mesh connection within a dtMeshTile object.
Definition DetourNavMesh.h:225
unsigned int userId
The id of the offmesh connection. (User assigned when the navigation mesh is built....
Definition DetourNavMesh.h:244
float pos[6]
The endpoints of the connection. [(ax, ay, az, bx, by, bz)].
Definition DetourNavMesh.h:227
diff --git a/DetourPathQueue_8h_source.html b/DetourPathQueue_8h_source.html index 49528601..0f245d45 100644 --- a/DetourPathQueue_8h_source.html +++ b/DetourPathQueue_8h_source.html @@ -185,7 +185,7 @@ $(document).ready(function(){initNavTree('DetourPathQueue_8h_source.html',''); i
unsigned int dtPathQueueRef
Definition DetourPathQueue.h:27
unsigned int dtStatus
Definition DetourStatus.h:22
Provides the ability to perform pathfinding related queries against a navigation mesh.
Definition DetourNavMeshQuery.h:166
-
A navigation mesh based on tiles of convex polygons.
Definition DetourNavMesh.h:339
+
A navigation mesh based on tiles of convex polygons.
Definition DetourNavMesh.h:336
Definition DetourPathQueue.h:30
dtStatus getRequestStatus(dtPathQueueRef ref) const
Definition DetourPathQueue.cpp:171
~dtPathQueue()
Definition DetourPathQueue.cpp:37
diff --git a/DetourTileCache_8h_source.html b/DetourTileCache_8h_source.html index f6c30147..b98add12 100644 --- a/DetourTileCache_8h_source.html +++ b/DetourTileCache_8h_source.html @@ -396,7 +396,7 @@ $(document).ready(function(){initNavTree('DetourTileCache_8h_source.html',''); i
unsigned int dtCompressedTileRef
Definition DetourTileCache.h:7
dtCompressedTileFlags
Flags for addTile.
Definition DetourTileCache.h:11
@ DT_COMPRESSEDTILE_FREE_DATA
Navmesh owns the tile memory and should free it.
Definition DetourTileCache.h:12
-
A navigation mesh based on tiles of convex polygons.
Definition DetourNavMesh.h:339
+
A navigation mesh based on tiles of convex polygons.
Definition DetourNavMesh.h:336
Definition DetourTileCache.h:102
dtObstacleRef encodeObstacleId(unsigned int salt, unsigned int it) const
Encodes an obstacle id.
Definition DetourTileCache.h:188
const dtTileCacheParams * getParams() const
Definition DetourTileCache.h:109
diff --git a/Filelist_8cpp.js b/Filelist_8cpp.js deleted file mode 100644 index a7e14f98..00000000 --- a/Filelist_8cpp.js +++ /dev/null @@ -1,5 +0,0 @@ -var Filelist_8cpp = -[ - [ "scanDirectory", "Filelist_8cpp.html#a2baf53e840e4fefc5e6933fb3d53569e", null ], - [ "scanDirectoryAppend", "Filelist_8cpp.html#ab77bcf8d92348f01734b4aeafec8c4d6", null ] -]; \ No newline at end of file diff --git a/Filelist_8h.html b/Filelist_8h.html deleted file mode 100644 index 4e1fd114..00000000 --- a/Filelist_8h.html +++ /dev/null @@ -1,195 +0,0 @@ - - - - - - - -Recast Navigation: Filelist.h File Reference - - - - - - - - - - - - - - - -
-
- - - - - - - -
-
Recast Navigation -
-
Navigation-mesh Toolset for Games
-
-
- - - - - - - -
-
- -
-
-
- -
- -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- -
- -
Filelist.h File Reference
-
-
-
#include <vector>
-#include <string>
-
-

Go to the source code of this file.

- - - - - - -

-Functions

void scanDirectoryAppend (const std::string &path, const std::string &ext, std::vector< std::string > &fileList)
 
void scanDirectory (const std::string &path, const std::string &ext, std::vector< std::string > &fileList)
 
-

Function Documentation

- -

◆ scanDirectory()

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
void scanDirectory (const std::string & path,
const std::string & ext,
std::vector< std::string > & fileList 
)
-
- -
-
- -

◆ scanDirectoryAppend()

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
void scanDirectoryAppend (const std::string & path,
const std::string & ext,
std::vector< std::string > & fileList 
)
-
- -
-
-
-
- - - - - diff --git a/Filelist_8h.js b/Filelist_8h.js deleted file mode 100644 index db7ba488..00000000 --- a/Filelist_8h.js +++ /dev/null @@ -1,5 +0,0 @@ -var Filelist_8h = -[ - [ "scanDirectory", "Filelist_8h.html#a45c5368afb38260fa0c524b2b084efee", null ], - [ "scanDirectoryAppend", "Filelist_8h.html#ae20514067f3272c41e207bed25e530d8", null ] -]; \ No newline at end of file diff --git a/Filelist_8h_source.html b/Filelist_8h_source.html deleted file mode 100644 index f704153c..00000000 --- a/Filelist_8h_source.html +++ /dev/null @@ -1,147 +0,0 @@ - - - - - - - -Recast Navigation: Filelist.h Source File - - - - - - - - - - - - - - - -
-
- - - - - - - -
-
Recast Navigation -
-
Navigation-mesh Toolset for Games
-
-
- - - - - - - - -
-
- -
-
-
- -
- -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- -
-
Filelist.h
-
-
-Go to the documentation of this file.
1//
-
2// Copyright (c) 2009-2010 Mikko Mononen memon@inside.org
-
3//
-
4// This software is provided 'as-is', without any express or implied
-
5// warranty. In no event will the authors be held liable for any damages
-
6// arising from the use of this software.
-
7// Permission is granted to anyone to use this software for any purpose,
-
8// including commercial applications, and to alter it and redistribute it
-
9// freely, subject to the following restrictions:
-
10// 1. The origin of this software must not be misrepresented; you must not
-
11// claim that you wrote the original software. If you use this software
-
12// in a product, an acknowledgment in the product documentation would be
-
13// appreciated but is not required.
-
14// 2. Altered source versions must be plainly marked as such, and must not be
-
15// misrepresented as being the original software.
-
16// 3. This notice may not be removed or altered from any source distribution.
-
17//
-
18
-
19#ifndef FILELIST_H
-
20#define FILELIST_H
-
21
-
22#include <vector>
-
23#include <string>
-
24
-
25void scanDirectoryAppend(const std::string& path, const std::string& ext, std::vector<std::string>& fileList);
-
26void scanDirectory(const std::string& path, const std::string& ext, std::vector<std::string>& fileList);
-
27
-
28#endif // FILELIST_H
-
void scanDirectory(const std::string &path, const std::string &ext, std::vector< std::string > &fileList)
-
void scanDirectoryAppend(const std::string &path, const std::string &ext, std::vector< std::string > &fileList)
-
-
- - - - - diff --git a/InputGeom_8cpp.html b/InputGeom_8cpp.html index 774bb146..25a1e665 100644 --- a/InputGeom_8cpp.html +++ b/InputGeom_8cpp.html @@ -93,204 +93,18 @@ $(document).ready(function(){initNavTree('InputGeom_8cpp.html',''); initResizabl
-
InputGeom.cpp File Reference
-
#include <math.h>
-#include <stdio.h>
-#include <ctype.h>
-#include <string.h>
-#include <algorithm>
+
#include "InputGeom.h"
+#include "PartitionedMesh.h"
#include "Recast.h"
-#include "InputGeom.h"
-#include "ChunkyTriMesh.h"
-#include "MeshLoaderObj.h"
-#include "DebugDraw.h"
-#include "RecastDebugDraw.h"
-#include "DetourNavMesh.h"
-#include "Sample.h"
-
- - - - - - - -

-Functions

static bool intersectSegmentTriangle (const float *sp, const float *sq, const float *a, const float *b, const float *c, float &t)
 
static char * parseRow (char *buf, char *bufEnd, char *row, int len)
 
static bool isectSegAABB (const float *sp, const float *sq, const float *amin, const float *amax, float &tmin, float &tmax)
 
-

Function Documentation

- -

◆ intersectSegmentTriangle()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
static bool intersectSegmentTriangle (const float * sp,
const float * sq,
const float * a,
const float * b,
const float * c,
float & t 
)
-
-static
-
- -
-
- -

◆ isectSegAABB()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
static bool isectSegAABB (const float * sp,
const float * sq,
const float * amin,
const float * amax,
float & tmin,
float & tmax 
)
-
-static
-
- -
-
- -

◆ parseRow()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
static char * parseRow (char * buf,
char * bufEnd,
char * row,
int len 
)
-
-static
-
- -
-
-
+#include "SampleInterfaces.h"
+#include <algorithm>
+#include <cmath>
+#include <cstdio>
+#include <cstring>
+
diff --git a/InputGeom_8cpp.js b/InputGeom_8cpp.js deleted file mode 100644 index 1a9ad9dd..00000000 --- a/InputGeom_8cpp.js +++ /dev/null @@ -1,6 +0,0 @@ -var InputGeom_8cpp = -[ - [ "intersectSegmentTriangle", "InputGeom_8cpp.html#a89e05e1cf91226eb8b11ce816ec90a4e", null ], - [ "isectSegAABB", "InputGeom_8cpp.html#a6e7db3dabeb68c2e9c627812ee42c47e", null ], - [ "parseRow", "InputGeom_8cpp.html#a5b013f0ef0748c11fdbea5004542d1dd", null ] -]; \ No newline at end of file diff --git a/InputGeom_8h.html b/InputGeom_8h.html index 4efabffe..86310590 100644 --- a/InputGeom_8h.html +++ b/InputGeom_8h.html @@ -99,8 +99,9 @@ $(document).ready(function(){initNavTree('InputGeom_8h.html',''); initResizable(
InputGeom.h File Reference
-
#include "ChunkyTriMesh.h"
-#include "MeshLoaderObj.h"
+
#include "PartitionedMesh.h"
+#include <string>
+#include <vector>

Go to the source code of this file.

@@ -110,17 +111,19 @@ Classes + +
 
struct  BuildSettings
 
struct  Mesh
 
class  InputGeom
 
- - + +

Variables

static const int MAX_CONVEXVOL_PTS = 12
 
static constexpr int MAX_CONVEXVOL_PTS = 12
 

Variable Documentation

- -

◆ MAX_CONVEXVOL_PTS

+ +

◆ MAX_CONVEXVOL_PTS

@@ -129,12 +132,12 @@ Variables - +
const int MAX_CONVEXVOL_PTS = 12constexpr int MAX_CONVEXVOL_PTS = 12
-static +staticconstexpr
diff --git a/InputGeom_8h.js b/InputGeom_8h.js index 791ec683..acd6755e 100644 --- a/InputGeom_8h.js +++ b/InputGeom_8h.js @@ -2,6 +2,7 @@ var InputGeom_8h = [ [ "ConvexVolume", "structConvexVolume.html", "structConvexVolume" ], [ "BuildSettings", "structBuildSettings.html", "structBuildSettings" ], + [ "Mesh", "structMesh.html", "structMesh" ], [ "InputGeom", "classInputGeom.html", "classInputGeom" ], - [ "MAX_CONVEXVOL_PTS", "InputGeom_8h.html#ab051ae2a0b2e4b23f39190bc9127098a", null ] + [ "MAX_CONVEXVOL_PTS", "InputGeom_8h.html#a8e3d053b6f68734704b75ff40083fda2", null ] ]; \ No newline at end of file diff --git a/InputGeom_8h_source.html b/InputGeom_8h_source.html index 6198c41c..23bdeb6d 100644 --- a/InputGeom_8h_source.html +++ b/InputGeom_8h_source.html @@ -119,190 +119,194 @@ $(document).ready(function(){initNavTree('InputGeom_8h_source.html',''); initRes
16// 3. This notice may not be removed or altered from any source distribution.
17//
18
-
19#ifndef INPUTGEOM_H
-
20#define INPUTGEOM_H
-
21
-
22#include "ChunkyTriMesh.h"
-
23#include "MeshLoaderObj.h"
-
24
-
25static const int MAX_CONVEXVOL_PTS = 12;
-
- -
27{
- -
29 float hmin, hmax;
-
30 int nverts;
-
31 int area;
-
32};
+
19#pragma once
+
20
+
21#include "PartitionedMesh.h"
+
22
+
23#include <string>
+
24#include <vector>
+
25
+
26struct PartitionedMesh;
+
27class rcContext;
+
28struct duDebugDraw;
+
29
+
30static constexpr int MAX_CONVEXVOL_PTS = 12;
+
+ +
32{
+
33 float verts[MAX_CONVEXVOL_PTS * 3] = {};
+
34 int nverts = 0;
+
35 float hmin = 0.0f;
+
36 float hmax = 0.0f;
+
37 int area = 0;
+
38};
-
33
-
- -
35{
-
36 // Cell size in world units
-
37 float cellSize;
-
38 // Cell height in world units
- -
40 // Agent height in world units
- -
42 // Agent radius in world units
- -
44 // Agent max climb in world units
- -
46 // Agent max slope in degrees
- -
48 // Region minimum size in voxels.
-
49 // regionMinSize = sqrt(regionMinArea)
- -
51 // Region merge size in voxels.
-
52 // regionMergeSize = sqrt(regionMergeArea)
- -
54 // Edge max length in world units
- -
56 // Edge max error in voxels
- - -
59 // Detail sample distance in voxels
- -
61 // Detail sample max error in voxel heights.
- -
63 // Partition type, see SamplePartitionType
- -
65 // Bounds of the area to mesh
-
66 float navMeshBMin[3];
-
67 float navMeshBMax[3];
-
68 // Size of the tiles in voxels
-
69 float tileSize;
-
70};
+
39
+
+ +
41{
+
43 float cellSize = 0;
+
45 float cellHeight = 0;
+
47 float agentHeight = 0;
+
49 float agentRadius = 0;
+
51 float agentMaxClimb = 0;
+
53 float agentMaxSlope = 0;
+
55 float regionMinSize = 0;
+
57 float regionMergeSize = 0;
+
59 float edgeMaxLen = 0;
+
61 float edgeMaxError = 0;
+
62 int vertsPerPoly = 0;
+ + + +
70 float navMeshBMin[3]{};
+
71 float navMeshBMax[3]{};
+
73 float tileSize = 0;
+
74};
-
71
-
- -
73{
-
74 rcChunkyTriMesh* m_chunkyMesh;
-
75 rcMeshLoaderObj* m_mesh;
-
76 float m_meshBMin[3], m_meshBMax[3];
-
77 BuildSettings m_buildSettings;
-
78 bool m_hasBuildSettings;
-
79
-
82 static const int MAX_OFFMESH_CONNECTIONS = 256;
-
83 float m_offMeshConVerts[MAX_OFFMESH_CONNECTIONS*3*2];
-
84 float m_offMeshConRads[MAX_OFFMESH_CONNECTIONS];
-
85 unsigned char m_offMeshConDirs[MAX_OFFMESH_CONNECTIONS];
-
86 unsigned char m_offMeshConAreas[MAX_OFFMESH_CONNECTIONS];
-
87 unsigned short m_offMeshConFlags[MAX_OFFMESH_CONNECTIONS];
-
88 unsigned int m_offMeshConId[MAX_OFFMESH_CONNECTIONS];
-
89 int m_offMeshConCount;
+
75
+
+
76struct Mesh
+
77{
+
78 std::vector<float> verts;
+
79 std::vector<int> tris;
+
80 std::vector<float> normals; // face normals
+
81
+
+
82 void reset()
+
83 {
+
84 verts.clear();
+
85 tris.clear();
+
86 normals.clear();
+
87 }
+
+
88
+
89 [[nodiscard]] int getVertCount() const { return static_cast<int>(verts.size()) / 3; }
+
90 [[nodiscard]] int getTriCount() const { return static_cast<int>(tris.size()) / 3; }
91
-
94 static const int MAX_VOLUMES = 256;
-
95 ConvexVolume m_volumes[MAX_VOLUMES];
-
96 int m_volumeCount;
-
98
-
99 bool loadMesh(class rcContext* ctx, const std::string& filepath);
-
100 bool loadGeomSet(class rcContext* ctx, const std::string& filepath);
-
101public:
-
102 InputGeom();
-
103 ~InputGeom();
-
104
-
105
-
106 bool load(class rcContext* ctx, const std::string& filepath);
-
107 bool saveGeomSet(const BuildSettings* settings);
-
108
-
110 const rcMeshLoaderObj* getMesh() const { return m_mesh; }
-
111 const float* getMeshBoundsMin() const { return m_meshBMin; }
-
112 const float* getMeshBoundsMax() const { return m_meshBMax; }
-
113 const float* getNavMeshBoundsMin() const { return m_hasBuildSettings ? m_buildSettings.navMeshBMin : m_meshBMin; }
-
114 const float* getNavMeshBoundsMax() const { return m_hasBuildSettings ? m_buildSettings.navMeshBMax : m_meshBMax; }
-
115 const rcChunkyTriMesh* getChunkyMesh() const { return m_chunkyMesh; }
-
116 const BuildSettings* getBuildSettings() const { return m_hasBuildSettings ? &m_buildSettings : 0; }
-
117 bool raycastMesh(float* src, float* dst, float& tmin);
-
118
-
121 int getOffMeshConnectionCount() const { return m_offMeshConCount; }
-
122 const float* getOffMeshConnectionVerts() const { return m_offMeshConVerts; }
-
123 const float* getOffMeshConnectionRads() const { return m_offMeshConRads; }
-
124 const unsigned char* getOffMeshConnectionDirs() const { return m_offMeshConDirs; }
-
125 const unsigned char* getOffMeshConnectionAreas() const { return m_offMeshConAreas; }
-
126 const unsigned short* getOffMeshConnectionFlags() const { return m_offMeshConFlags; }
-
127 const unsigned int* getOffMeshConnectionId() const { return m_offMeshConId; }
-
128 void addOffMeshConnection(const float* spos, const float* epos, const float rad,
-
129 unsigned char bidir, unsigned char area, unsigned short flags);
-
130 void deleteOffMeshConnection(int i);
-
131 void drawOffMeshConnections(struct duDebugDraw* dd, bool hilight = false);
-
133
-
136 int getConvexVolumeCount() const { return m_volumeCount; }
-
137 const ConvexVolume* getConvexVolumes() const { return m_volumes; }
-
138 void addConvexVolume(const float* verts, const int nverts,
-
139 const float minh, const float maxh, unsigned char area);
-
140 void deleteConvexVolume(int i);
-
141 void drawConvexVolumes(struct duDebugDraw* dd, bool hilight = false);
-
143
-
144private:
-
145 // Explicitly disabled copy constructor and copy assignment operator.
-
146 InputGeom(const InputGeom&);
-
147 InputGeom& operator=(const InputGeom&);
-
148};
+
92 void readFromObj(char* buf, size_t bufLen);
+
93};
-
149
-
150#endif // INPUTGEOM_H
- -
static const int MAX_CONVEXVOL_PTS
Definition InputGeom.h:25
- -
Definition InputGeom.h:73
-
bool load(class rcContext *ctx, const std::string &filepath)
Definition InputGeom.cpp:299
-
void deleteConvexVolume(int i)
Definition InputGeom.cpp:541
-
int getConvexVolumeCount() const
Definition InputGeom.h:136
-
const unsigned char * getOffMeshConnectionDirs() const
Definition InputGeom.h:124
-
const rcMeshLoaderObj * getMesh() const
Method to return static mesh data.
Definition InputGeom.h:110
-
void addConvexVolume(const float *verts, const int nverts, const float minh, const float maxh, unsigned char area)
Definition InputGeom.cpp:528
-
const float * getNavMeshBoundsMax() const
Definition InputGeom.h:114
-
const unsigned char * getOffMeshConnectionAreas() const
Definition InputGeom.h:125
-
const float * getMeshBoundsMax() const
Definition InputGeom.h:112
-
const rcChunkyTriMesh * getChunkyMesh() const
Definition InputGeom.h:115
-
const float * getMeshBoundsMin() const
Definition InputGeom.h:111
-
void addOffMeshConnection(const float *spos, const float *epos, const float rad, unsigned char bidir, unsigned char area, unsigned short flags)
Definition InputGeom.cpp:469
-
bool saveGeomSet(const BuildSettings *settings)
Definition InputGeom.cpp:316
-
const float * getNavMeshBoundsMin() const
Definition InputGeom.h:113
-
bool raycastMesh(float *src, float *dst, float &tmin)
Definition InputGeom.cpp:424
-
const unsigned short * getOffMeshConnectionFlags() const
Definition InputGeom.h:126
-
const float * getOffMeshConnectionRads() const
Definition InputGeom.h:123
-
const BuildSettings * getBuildSettings() const
Definition InputGeom.h:116
-
const unsigned int * getOffMeshConnectionId() const
Definition InputGeom.h:127
-
const float * getOffMeshConnectionVerts() const
Definition InputGeom.h:122
-
void deleteOffMeshConnection(int i)
Definition InputGeom.cpp:484
-
int getOffMeshConnectionCount() const
Definition InputGeom.h:121
-
~InputGeom()
Definition InputGeom.cpp:118
-
void drawOffMeshConnections(struct duDebugDraw *dd, bool hilight=false)
Definition InputGeom.cpp:497
-
const ConvexVolume * getConvexVolumes() const
Definition InputGeom.h:137
-
void drawConvexVolumes(struct duDebugDraw *dd, bool hilight=false)
Definition InputGeom.cpp:547
-
InputGeom()
Definition InputGeom.cpp:109
+
94
+
+ +
96{
+
97 BuildSettings buildSettings;
+
98 bool hasBuildSettings = false;
+
99
+
100public:
+
101 std::string filename;
+
102
+ +
104 float meshBoundsMin[3] = {};
+
105 float meshBoundsMax[3] = {};
+
106
+ +
108
+
111 std::vector<float> offmeshConnVerts;
+
112 std::vector<float> offmeshConnRadius;
+
113 std::vector<unsigned char> offmeshConnBidirectional;
+
114 std::vector<unsigned char> offmeshConnArea;
+
115 std::vector<unsigned short> offmeshConnFlags;
+
116 std::vector<unsigned int> offmeshConnId;
+
118
+
119 std::vector<ConvexVolume> convexVolumes;
+
120
+
121 bool load(rcContext* ctx, const std::string& filepath);
+
122 bool saveGeomSet(const BuildSettings* settings);
+
123
+
125 [[nodiscard]] const float* getNavMeshBoundsMin() const { return hasBuildSettings ? buildSettings.navMeshBMin : meshBoundsMin; }
+
126 [[nodiscard]] const float* getNavMeshBoundsMax() const { return hasBuildSettings ? buildSettings.navMeshBMax : meshBoundsMax; }
+
127 [[nodiscard]] const BuildSettings* getBuildSettings() const { return hasBuildSettings ? &buildSettings : nullptr; }
+
128 bool raycastMesh(float* src, float* dst, float& tmin) const;
+
129
+
132 void addOffMeshConnection(const float* startPos, const float* endPos, float radius, unsigned char bidirectional, unsigned char area, unsigned short flags);
+
133 void deleteOffMeshConnection(int i);
+
134 void drawOffMeshConnections(duDebugDraw* dd, bool highlight = false);
+
136
+
139 void addConvexVolume(const float* verts, int nverts, float minh, float maxh, unsigned char area);
+
140 void deleteConvexVolume(int i);
+ +
143
+
144private:
+
145 bool loadMesh(rcContext* ctx, const std::string& filepath);
+
146 bool loadGeomSet(rcContext* ctx, const std::string& filepath);
+
147 bool loadGeomSet(rcContext* ctx, char* buffer, size_t bufferLen);
+
148
+
149 void clearOffMeshConnections()
+
150 {
+
151 offmeshConnVerts.clear();
+
152 offmeshConnRadius.clear();
+ +
154 offmeshConnArea.clear();
+
155 offmeshConnFlags.clear();
+
156 offmeshConnId.clear();
+
157 }
+
158};
+
+
159
+
static constexpr int MAX_CONVEXVOL_PTS
Definition InputGeom.h:30
+ +
Definition InputGeom.h:96
+
std::vector< unsigned char > offmeshConnBidirectional
Definition InputGeom.h:113
+
void deleteConvexVolume(int i)
Definition InputGeom.cpp:730
+
float meshBoundsMax[3]
Definition InputGeom.h:105
+
bool load(rcContext *ctx, const std::string &filepath)
Definition InputGeom.cpp:496
+
Mesh mesh
Definition InputGeom.h:103
+
void addOffMeshConnection(const float *startPos, const float *endPos, float radius, unsigned char bidirectional, unsigned char area, unsigned short flags)
Definition InputGeom.cpp:649
+
const float * getNavMeshBoundsMax() const
Definition InputGeom.h:126
+
void drawOffMeshConnections(duDebugDraw *dd, bool highlight=false)
Definition InputGeom.cpp:678
+
std::string filename
Definition InputGeom.h:101
+
void addConvexVolume(const float *verts, int nverts, float minh, float maxh, unsigned char area)
Definition InputGeom.cpp:719
+
bool saveGeomSet(const BuildSettings *settings)
Definition InputGeom.cpp:519
+
const float * getNavMeshBoundsMin() const
Method to return static mesh data.
Definition InputGeom.h:125
+
std::vector< unsigned int > offmeshConnId
Definition InputGeom.h:116
+
std::vector< float > offmeshConnRadius
Definition InputGeom.h:112
+
std::vector< ConvexVolume > convexVolumes
Definition InputGeom.h:119
+
float meshBoundsMin[3]
Definition InputGeom.h:104
+
const BuildSettings * getBuildSettings() const
Definition InputGeom.h:127
+
void drawConvexVolumes(duDebugDraw *dd)
Definition InputGeom.cpp:735
+
PartitionedMesh partitionedMesh
Definition InputGeom.h:107
+
std::vector< unsigned short > offmeshConnFlags
Definition InputGeom.h:115
+
std::vector< float > offmeshConnVerts
Definition InputGeom.h:111
+
void deleteOffMeshConnection(int i)
Definition InputGeom.cpp:668
+
std::vector< unsigned char > offmeshConnArea
Definition InputGeom.h:114
+
bool raycastMesh(float *src, float *dst, float &tmin) const
Definition InputGeom.cpp:600
Provides an interface for optional logging and performance tracking of the Recast build process.
Definition Recast.h:115
-
Definition MeshLoaderObj.h:25
-
Definition InputGeom.h:35
-
float agentHeight
Definition InputGeom.h:41
-
float navMeshBMin[3]
Definition InputGeom.h:66
-
int partitionType
Definition InputGeom.h:64
-
float regionMinSize
Definition InputGeom.h:50
-
float agentMaxSlope
Definition InputGeom.h:47
-
float detailSampleMaxError
Definition InputGeom.h:62
-
float agentMaxClimb
Definition InputGeom.h:45
-
float vertsPerPoly
Definition InputGeom.h:58
-
float edgeMaxError
Definition InputGeom.h:57
-
float agentRadius
Definition InputGeom.h:43
-
float cellSize
Definition InputGeom.h:37
-
float navMeshBMax[3]
Definition InputGeom.h:67
-
float tileSize
Definition InputGeom.h:69
-
float detailSampleDist
Definition InputGeom.h:60
-
float cellHeight
Definition InputGeom.h:39
-
float edgeMaxLen
Definition InputGeom.h:55
-
float regionMergeSize
Definition InputGeom.h:53
-
Definition InputGeom.h:27
-
float hmax
Definition InputGeom.h:29
-
float hmin
Definition InputGeom.h:29
-
float verts[MAX_CONVEXVOL_PTS *3]
Definition InputGeom.h:28
-
int nverts
Definition InputGeom.h:30
-
int area
Definition InputGeom.h:31
+
Definition InputGeom.h:41
+
float agentHeight
Agent height in world units.
Definition InputGeom.h:47
+
float navMeshBMin[3]
Bounds of the area to mesh.
Definition InputGeom.h:70
+
int vertsPerPoly
Definition InputGeom.h:62
+
int partitionType
Partition type, see SamplePartitionType.
Definition InputGeom.h:68
+
float regionMinSize
Region minimum size in voxels.
Definition InputGeom.h:55
+
float agentMaxSlope
Agent max slope in degrees.
Definition InputGeom.h:53
+
float detailSampleMaxError
Detail sample max error in voxel heights.
Definition InputGeom.h:66
+
float agentMaxClimb
Agent max climb in world units.
Definition InputGeom.h:51
+
float edgeMaxError
Edge max error in voxels.
Definition InputGeom.h:61
+
float agentRadius
Agent radius in world units.
Definition InputGeom.h:49
+
float cellSize
Cell size in world units.
Definition InputGeom.h:43
+
float navMeshBMax[3]
Definition InputGeom.h:71
+
float tileSize
Size of the tiles in voxels.
Definition InputGeom.h:73
+
float detailSampleDist
Detail sample distance in voxels.
Definition InputGeom.h:64
+
float cellHeight
Cell height in world units.
Definition InputGeom.h:45
+
float edgeMaxLen
Edge max length in world units.
Definition InputGeom.h:59
+
float regionMergeSize
Region merge size in voxels. regionMergeSize = sqrt(regionMergeArea)
Definition InputGeom.h:57
+
Definition InputGeom.h:32
+
float hmax
Definition InputGeom.h:36
+
float hmin
Definition InputGeom.h:35
+
float verts[MAX_CONVEXVOL_PTS *3]
Definition InputGeom.h:33
+
int nverts
Definition InputGeom.h:34
+
int area
Definition InputGeom.h:37
+
Definition InputGeom.h:77
+
std::vector< float > verts
Definition InputGeom.h:78
+
int getVertCount() const
Definition InputGeom.h:89
+
std::vector< float > normals
Definition InputGeom.h:80
+
void reset()
Definition InputGeom.h:82
+
int getTriCount() const
Definition InputGeom.h:90
+
void readFromObj(char *buf, size_t bufLen)
Definition InputGeom.cpp:249
+
std::vector< int > tris
Definition InputGeom.h:79
+
A spatially-partitioned mesh (k/d tree), where each node contains at max trisPerChunk triangles.
Definition PartitionedMesh.h:26
Abstract debug draw interface.
Definition DebugDraw.h:35
-
Definition ChunkyTriMesh.h:31
diff --git a/MeshLoaderObj_8cpp.html b/MeshLoaderObj_8cpp.html deleted file mode 100644 index be65f21a..00000000 --- a/MeshLoaderObj_8cpp.html +++ /dev/null @@ -1,224 +0,0 @@ - - - - - - - -Recast Navigation: MeshLoaderObj.cpp File Reference - - - - - - - - - - - - - - - -
-
- - - - - - - -
-
Recast Navigation -
-
Navigation-mesh Toolset for Games
-
-
- - - - - - - -
-
- -
-
-
- -
- -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- -
- -
MeshLoaderObj.cpp File Reference
-
-
-
#include "MeshLoaderObj.h"
-#include <stdio.h>
-#include <stdlib.h>
-#include <cstring>
-#include <math.h>
-
- - - - - -

-Functions

static char * parseRow (char *buf, char *bufEnd, char *row, int len)
 
static int parseFace (char *row, int *data, int n, int vcnt)
 
-

Function Documentation

- -

◆ parseFace()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
static int parseFace (char * row,
int * data,
int n,
int vcnt 
)
-
-static
-
- -
-
- -

◆ parseRow()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
static char * parseRow (char * buf,
char * bufEnd,
char * row,
int len 
)
-
-static
-
- -
-
-
-
- - - - - diff --git a/MeshLoaderObj_8cpp.js b/MeshLoaderObj_8cpp.js deleted file mode 100644 index 4a75e38c..00000000 --- a/MeshLoaderObj_8cpp.js +++ /dev/null @@ -1,5 +0,0 @@ -var MeshLoaderObj_8cpp = -[ - [ "parseFace", "MeshLoaderObj_8cpp.html#a2c2c592a29fbae9b5bded3d2cf1bede7", null ], - [ "parseRow", "MeshLoaderObj_8cpp.html#a5b013f0ef0748c11fdbea5004542d1dd", null ] -]; \ No newline at end of file diff --git a/MeshLoaderObj_8h.js b/MeshLoaderObj_8h.js deleted file mode 100644 index 2218810e..00000000 --- a/MeshLoaderObj_8h.js +++ /dev/null @@ -1,4 +0,0 @@ -var MeshLoaderObj_8h = -[ - [ "rcMeshLoaderObj", "classrcMeshLoaderObj.html", "classrcMeshLoaderObj" ] -]; \ No newline at end of file diff --git a/MeshLoaderObj_8h_source.html b/MeshLoaderObj_8h_source.html deleted file mode 100644 index 4ce5c4ad..00000000 --- a/MeshLoaderObj_8h_source.html +++ /dev/null @@ -1,185 +0,0 @@ - - - - - - - -Recast Navigation: MeshLoaderObj.h Source File - - - - - - - - - - - - - - - -
-
- - - - - - - -
-
Recast Navigation -
-
Navigation-mesh Toolset for Games
-
-
- - - - - - - - -
-
- -
-
-
- -
- -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- -
-
MeshLoaderObj.h
-
-
-Go to the documentation of this file.
1//
-
2// Copyright (c) 2009-2010 Mikko Mononen memon@inside.org
-
3//
-
4// This software is provided 'as-is', without any express or implied
-
5// warranty. In no event will the authors be held liable for any damages
-
6// arising from the use of this software.
-
7// Permission is granted to anyone to use this software for any purpose,
-
8// including commercial applications, and to alter it and redistribute it
-
9// freely, subject to the following restrictions:
-
10// 1. The origin of this software must not be misrepresented; you must not
-
11// claim that you wrote the original software. If you use this software
-
12// in a product, an acknowledgment in the product documentation would be
-
13// appreciated but is not required.
-
14// 2. Altered source versions must be plainly marked as such, and must not be
-
15// misrepresented as being the original software.
-
16// 3. This notice may not be removed or altered from any source distribution.
-
17//
-
18
-
19#ifndef MESHLOADER_OBJ
-
20#define MESHLOADER_OBJ
-
21
-
22#include <string>
-
23
-
- -
25{
-
26public:
- - -
29
-
30 bool load(const std::string& fileName);
-
31
-
32 const float* getVerts() const { return m_verts; }
-
33 const float* getNormals() const { return m_normals; }
-
34 const int* getTris() const { return m_tris; }
-
35 int getVertCount() const { return m_vertCount; }
-
36 int getTriCount() const { return m_triCount; }
-
37 const std::string& getFileName() const { return m_filename; }
-
38
-
39private:
-
40 // Explicitly disabled copy constructor and copy assignment operator.
- -
42 rcMeshLoaderObj& operator=(const rcMeshLoaderObj&);
-
43
-
44 void addVertex(float x, float y, float z, int& cap);
-
45 void addTriangle(int a, int b, int c, int& cap);
-
46
-
47 std::string m_filename;
-
48 float m_scale;
-
49 float* m_verts;
-
50 int* m_tris;
-
51 float* m_normals;
-
52 int m_vertCount;
-
53 int m_triCount;
-
54};
-
-
55
-
56#endif // MESHLOADER_OBJ
-
Definition MeshLoaderObj.h:25
-
int getVertCount() const
Definition MeshLoaderObj.h:35
-
int getTriCount() const
Definition MeshLoaderObj.h:36
-
const float * getNormals() const
Definition MeshLoaderObj.h:33
-
const std::string & getFileName() const
Definition MeshLoaderObj.h:37
-
~rcMeshLoaderObj()
Definition MeshLoaderObj.cpp:35
-
const int * getTris() const
Definition MeshLoaderObj.h:34
-
bool load(const std::string &fileName)
Definition MeshLoaderObj.cpp:138
-
const float * getVerts() const
Definition MeshLoaderObj.h:32
-
rcMeshLoaderObj()
Definition MeshLoaderObj.cpp:25
-
-
- - - - - diff --git a/NavMeshPruneTool_8cpp.html b/NavMeshPruneTool_8cpp.html deleted file mode 100644 index 7ad2bc5d..00000000 --- a/NavMeshPruneTool_8cpp.html +++ /dev/null @@ -1,228 +0,0 @@ - - - - - - - -Recast Navigation: NavMeshPruneTool.cpp File Reference - - - - - - - - - - - - - - - -
-
- - - - - - - -
-
Recast Navigation -
-
Navigation-mesh Toolset for Games
-
-
- - - - - - - -
-
- -
-
-
- -
- -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- -
- -
NavMeshPruneTool.cpp File Reference
-
-
-
#include <math.h>
-#include <stdio.h>
-#include <string.h>
-#include <float.h>
-#include <vector>
-#include "SDL.h"
-#include "SDL_opengl.h"
-#include "imgui.h"
-#include "NavMeshPruneTool.h"
-#include "InputGeom.h"
-#include "Sample.h"
-#include "DetourNavMesh.h"
-#include "DetourCommon.h"
-#include "DetourAssert.h"
-#include "DetourDebugDraw.h"
-
- - - -

-Classes

class  NavmeshFlags
 
- - - - - -

-Functions

static void floodNavmesh (dtNavMesh *nav, NavmeshFlags *flags, dtPolyRef start, unsigned char flag)
 
static void disableUnvisitedPolys (dtNavMesh *nav, NavmeshFlags *flags)
 
-

Function Documentation

- -

◆ disableUnvisitedPolys()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - -
static void disableUnvisitedPolys (dtNavMeshnav,
NavmeshFlagsflags 
)
-
-static
-
- -
-
- -

◆ floodNavmesh()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
static void floodNavmesh (dtNavMeshnav,
NavmeshFlagsflags,
dtPolyRef start,
unsigned char flag 
)
-
-static
-
- -
-
-
-
- - - - - diff --git a/NavMeshPruneTool_8cpp.js b/NavMeshPruneTool_8cpp.js deleted file mode 100644 index 15273173..00000000 --- a/NavMeshPruneTool_8cpp.js +++ /dev/null @@ -1,6 +0,0 @@ -var NavMeshPruneTool_8cpp = -[ - [ "NavmeshFlags", "classNavmeshFlags.html", "classNavmeshFlags" ], - [ "disableUnvisitedPolys", "NavMeshPruneTool_8cpp.html#a99526da170fe64ed5ca767aba6bac662", null ], - [ "floodNavmesh", "NavMeshPruneTool_8cpp.html#aabe57f3100ff784616cd66607f181017", null ] -]; \ No newline at end of file diff --git a/NavMeshPruneTool_8h.js b/NavMeshPruneTool_8h.js deleted file mode 100644 index 692edb21..00000000 --- a/NavMeshPruneTool_8h.js +++ /dev/null @@ -1,4 +0,0 @@ -var NavMeshPruneTool_8h = -[ - [ "NavMeshPruneTool", "classNavMeshPruneTool.html", "classNavMeshPruneTool" ] -]; \ No newline at end of file diff --git a/NavMeshPruneTool_8h_source.html b/NavMeshPruneTool_8h_source.html deleted file mode 100644 index 8b953bd7..00000000 --- a/NavMeshPruneTool_8h_source.html +++ /dev/null @@ -1,193 +0,0 @@ - - - - - - - -Recast Navigation: NavMeshPruneTool.h Source File - - - - - - - - - - - - - - - -
-
- - - - - - - -
-
Recast Navigation -
-
Navigation-mesh Toolset for Games
-
-
- - - - - - - - -
-
- -
-
-
- -
- -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- -
-
NavMeshPruneTool.h
-
-
-Go to the documentation of this file.
1//
-
2// Copyright (c) 2009-2010 Mikko Mononen memon@inside.org
-
3//
-
4// This software is provided 'as-is', without any express or implied
-
5// warranty. In no event will the authors be held liable for any damages
-
6// arising from the use of this software.
-
7// Permission is granted to anyone to use this software for any purpose,
-
8// including commercial applications, and to alter it and redistribute it
-
9// freely, subject to the following restrictions:
-
10// 1. The origin of this software must not be misrepresented; you must not
-
11// claim that you wrote the original software. If you use this software
-
12// in a product, an acknowledgment in the product documentation would be
-
13// appreciated but is not required.
-
14// 2. Altered source versions must be plainly marked as such, and must not be
-
15// misrepresented as being the original software.
-
16// 3. This notice may not be removed or altered from any source distribution.
-
17//
-
18
-
19#ifndef NAVMESHPRUNETOOL_H
-
20#define NAVMESHPRUNETOOL_H
-
21
-
22#include "Sample.h"
-
23
-
24// Prune navmesh to accessible locations from a point.
-
25
-
- -
27{
-
28 Sample* m_sample;
-
29
-
30 class NavmeshFlags* m_flags;
-
31
-
32 float m_hitPos[3];
-
33 bool m_hitPosSet;
-
34
-
35public:
- -
37 virtual ~NavMeshPruneTool();
-
38
-
39 virtual int type() { return TOOL_NAVMESH_PRUNE; }
-
40 virtual void init(Sample* sample);
-
41 virtual void reset();
-
42 virtual void handleMenu();
-
43 virtual void handleClick(const float* s, const float* p, bool shift);
-
44 virtual void handleToggle();
-
45 virtual void handleStep();
-
46 virtual void handleUpdate(const float dt);
-
47 virtual void handleRender();
-
48 virtual void handleRenderOverlay(double* proj, double* model, int* view);
-
49
-
50private:
-
51 // Explicitly disabled copy constructor and copy assignment operator.
- -
53 NavMeshPruneTool& operator=(const NavMeshPruneTool&);
-
54};
-
-
55
-
56#endif // NAVMESHPRUNETOOL_H
- -
@ TOOL_NAVMESH_PRUNE
Definition Sample.h:34
-
Definition NavMeshPruneTool.h:27
-
virtual void handleStep()
Definition NavMeshPruneTool.cpp:266
-
NavMeshPruneTool()
Definition NavMeshPruneTool.cpp:189
-
virtual ~NavMeshPruneTool()
Definition NavMeshPruneTool.cpp:196
-
virtual int type()
Definition NavMeshPruneTool.h:39
-
virtual void handleUpdate(const float dt)
Definition NavMeshPruneTool.cpp:270
-
virtual void handleRender()
Definition NavMeshPruneTool.cpp:274
-
virtual void reset()
Definition NavMeshPruneTool.cpp:206
-
virtual void handleClick(const float *s, const float *p, bool shift)
Definition NavMeshPruneTool.cpp:232
-
virtual void handleToggle()
Definition NavMeshPruneTool.cpp:262
-
virtual void handleMenu()
Definition NavMeshPruneTool.cpp:213
-
virtual void handleRenderOverlay(double *proj, double *model, int *view)
Definition NavMeshPruneTool.cpp:313
-
virtual void init(Sample *sample)
Definition NavMeshPruneTool.cpp:201
-
Definition NavMeshPruneTool.cpp:40
-
Definition Sample.h:100
-
Definition Sample.h:76
-
-
- - - - - diff --git a/NavMeshTesterTool_8cpp.html b/NavMeshTesterTool_8cpp.html deleted file mode 100644 index 320f21fc..00000000 --- a/NavMeshTesterTool_8cpp.html +++ /dev/null @@ -1,414 +0,0 @@ - - - - - - - -Recast Navigation: NavMeshTesterTool.cpp File Reference - - - - - - - - - - - - - - - -
-
- - - - - - - -
-
Recast Navigation -
-
Navigation-mesh Toolset for Games
-
-
- - - - - - - -
-
- -
-
-
- -
- -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- -
- -
NavMeshTesterTool.cpp File Reference
-
-
-
#include <math.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include "SDL.h"
-#include "SDL_opengl.h"
-#include <GL/glu.h>
-#include "imgui.h"
-#include "NavMeshTesterTool.h"
-#include "Sample.h"
-#include "Recast.h"
-#include "RecastDebugDraw.h"
-#include "DetourNavMesh.h"
-#include "DetourNavMeshBuilder.h"
-#include "DetourDebugDraw.h"
-#include "DetourCommon.h"
-#include "DetourPathCorridor.h"
-
- - - -

-Macros

#define DUMP_REQS
 
- - - - - - - - - - - -

-Functions

static float frand ()
 
bool inRange (const float *v1, const float *v2, const float r, const float h)
 
static int fixupShortcuts (dtPolyRef *path, int npath, dtNavMeshQuery *navQuery)
 
static bool getSteerTarget (dtNavMeshQuery *navQuery, const float *startPos, const float *endPos, const float minTargetDist, const dtPolyRef *path, const int pathSize, float *steerPos, unsigned char &steerPosFlag, dtPolyRef &steerPosRef, float *outPoints=0, int *outPointCount=0)
 
static void getPolyCenter (dtNavMesh *navMesh, dtPolyRef ref, float *center)
 
-

Macro Definition Documentation

- -

◆ DUMP_REQS

- -
-
- - - - -
#define DUMP_REQS
-
- -
-
-

Function Documentation

- -

◆ fixupShortcuts()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - -
static int fixupShortcuts (dtPolyRefpath,
int npath,
dtNavMeshQuerynavQuery 
)
-
-static
-
- -
-
- -

◆ frand()

- -
-
- - - - - -
- - - - - - - -
static float frand ()
-
-static
-
- -
-
- -

◆ getPolyCenter()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - -
static void getPolyCenter (dtNavMeshnavMesh,
dtPolyRef ref,
float * center 
)
-
-static
-
- -
-
- -

◆ getSteerTarget()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
static bool getSteerTarget (dtNavMeshQuerynavQuery,
const float * startPos,
const float * endPos,
const float minTargetDist,
const dtPolyRefpath,
const int pathSize,
float * steerPos,
unsigned char & steerPosFlag,
dtPolyRefsteerPosRef,
float * outPoints = 0,
int * outPointCount = 0 
)
-
-static
-
- -
-
- -

◆ inRange()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
bool inRange (const float * v1,
const float * v2,
const float r,
const float h 
)
-
-inline
-
- -
-
-
-
- - - - - diff --git a/NavMeshTesterTool_8cpp.js b/NavMeshTesterTool_8cpp.js deleted file mode 100644 index 66a2e4d7..00000000 --- a/NavMeshTesterTool_8cpp.js +++ /dev/null @@ -1,9 +0,0 @@ -var NavMeshTesterTool_8cpp = -[ - [ "DUMP_REQS", "NavMeshTesterTool_8cpp.html#a59ed5f3f1c7bd16332ada259b66afe3f", null ], - [ "fixupShortcuts", "NavMeshTesterTool_8cpp.html#afdd1fc4764fb0feadc7f2ae478064b69", null ], - [ "frand", "NavMeshTesterTool_8cpp.html#ac8e3cc6c626394b36e557edb46eb23c5", null ], - [ "getPolyCenter", "NavMeshTesterTool_8cpp.html#a813b28088279288c343afbad843ada3a", null ], - [ "getSteerTarget", "NavMeshTesterTool_8cpp.html#ab556b9cab58165a7bb55dc0eefe89fb9", null ], - [ "inRange", "NavMeshTesterTool_8cpp.html#a5b7b330e2de37289d8ae69f304d334a9", null ] -]; \ No newline at end of file diff --git a/OffMeshConnectionTool_8h_source.html b/OffMeshConnectionTool_8h_source.html deleted file mode 100644 index 2293696e..00000000 --- a/OffMeshConnectionTool_8h_source.html +++ /dev/null @@ -1,186 +0,0 @@ - - - - - - - -Recast Navigation: OffMeshConnectionTool.h Source File - - - - - - - - - - - - - - - -
-
- - - - - - - -
-
Recast Navigation -
-
Navigation-mesh Toolset for Games
-
-
- - - - - - - - -
-
- -
-
-
- -
- -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- -
-
OffMeshConnectionTool.h
-
-
-Go to the documentation of this file.
1//
-
2// Copyright (c) 2009-2010 Mikko Mononen memon@inside.org
-
3//
-
4// This software is provided 'as-is', without any express or implied
-
5// warranty. In no event will the authors be held liable for any damages
-
6// arising from the use of this software.
-
7// Permission is granted to anyone to use this software for any purpose,
-
8// including commercial applications, and to alter it and redistribute it
-
9// freely, subject to the following restrictions:
-
10// 1. The origin of this software must not be misrepresented; you must not
-
11// claim that you wrote the original software. If you use this software
-
12// in a product, an acknowledgment in the product documentation would be
-
13// appreciated but is not required.
-
14// 2. Altered source versions must be plainly marked as such, and must not be
-
15// misrepresented as being the original software.
-
16// 3. This notice may not be removed or altered from any source distribution.
-
17//
-
18
-
19#ifndef OFFMESHCONNECTIONTOOL_H
-
20#define OFFMESHCONNECTIONTOOL_H
-
21
-
22#include "Sample.h"
-
23
-
24// Tool to create off-mesh connection for InputGeom
-
25
-
- -
27{
-
28 Sample* m_sample;
-
29 float m_hitPos[3];
-
30 bool m_hitPosSet;
-
31 bool m_bidir;
-
32 unsigned char m_oldFlags;
-
33
-
34public:
- - -
37
-
38 virtual int type() { return TOOL_OFFMESH_CONNECTION; }
-
39 virtual void init(Sample* sample);
-
40 virtual void reset();
-
41 virtual void handleMenu();
-
42 virtual void handleClick(const float* s, const float* p, bool shift);
-
43 virtual void handleToggle();
-
44 virtual void handleStep();
-
45 virtual void handleUpdate(const float dt);
-
46 virtual void handleRender();
-
47 virtual void handleRenderOverlay(double* proj, double* model, int* view);
-
48};
-
-
49
-
50#endif // OFFMESHCONNECTIONTOOL_H
- -
@ TOOL_OFFMESH_CONNECTION
Definition Sample.h:35
-
Definition OffMeshConnectionTool.h:27
-
virtual void handleStep()
Definition OffMeshConnectionTool.cpp:134
-
virtual void handleRender()
Definition OffMeshConnectionTool.cpp:142
-
virtual void init(Sample *sample)
Definition OffMeshConnectionTool.cpp:58
-
virtual void handleUpdate(const float dt)
Definition OffMeshConnectionTool.cpp:138
-
virtual int type()
Definition OffMeshConnectionTool.h:38
-
virtual void handleMenu()
Definition OffMeshConnectionTool.cpp:73
-
virtual void reset()
Definition OffMeshConnectionTool.cpp:68
-
virtual void handleToggle()
Definition OffMeshConnectionTool.cpp:130
-
~OffMeshConnectionTool()
Definition OffMeshConnectionTool.cpp:50
-
virtual void handleRenderOverlay(double *proj, double *model, int *view)
Definition OffMeshConnectionTool.cpp:155
-
OffMeshConnectionTool()
Definition OffMeshConnectionTool.cpp:42
-
virtual void handleClick(const float *s, const float *p, bool shift)
Definition OffMeshConnectionTool.cpp:81
-
Definition Sample.h:100
-
Definition Sample.h:76
-
-
- - - - - diff --git a/NavMeshPruneTool_8h.html b/PartitionedMesh_8cpp.html similarity index 85% rename from NavMeshPruneTool_8h.html rename to PartitionedMesh_8cpp.html index 098e59f7..57d42052 100644 --- a/NavMeshPruneTool_8h.html +++ b/PartitionedMesh_8cpp.html @@ -5,7 +5,7 @@ -Recast Navigation: NavMeshPruneTool.h File Reference +Recast Navigation: PartitionedMesh.cpp File Reference @@ -67,7 +67,7 @@ $(function() {
@@ -95,16 +95,16 @@ $(document).ready(function(){initNavTree('NavMeshPruneTool_8h.html',''); initRes
-
NavMeshPruneTool.h File Reference
+
PartitionedMesh.cpp File Reference
-
#include "Sample.h"
-
-

Go to the source code of this file.

- +
#include "PartitionedMesh.h"
+#include <cmath>
+#include <cstdlib>
+
- +

Classes

class  NavMeshPruneTool
struct  IndexedBounds
 
@@ -113,7 +113,7 @@ Classes
#include "PerfTimer.h"
-#include <sys/time.h>
+#include <chrono>
- + - + +

Functions

TimeVal getPerfTime ()
TimeVal getPerfTime ()
 
int getPerfTimeUsec (const TimeVal duration)
int getPerfTimeUsec (const TimeVal duration)
 
+ + +

+Variables

static const std::chrono::high_resolution_clock::time_point startup = std::chrono::high_resolution_clock::now()
 

Function Documentation

@@ -116,7 +122,7 @@ Functions
- + @@ -135,13 +141,36 @@ Functions - +
TimeVal getPerfTime TimeVal getPerfTime ( )
int getPerfTimeUsec (const TimeVal const TimeVal  duration)
+
+
+

Variable Documentation

+ +

◆ startup

+ +
+
+ + + + + +
+ + + + +
const std::chrono::high_resolution_clock::time_point startup = std::chrono::high_resolution_clock::now()
+
+static
+
+
diff --git a/PerfTimer_8cpp.js b/PerfTimer_8cpp.js index 7e6a0998..a590c441 100644 --- a/PerfTimer_8cpp.js +++ b/PerfTimer_8cpp.js @@ -1,5 +1,6 @@ var PerfTimer_8cpp = [ [ "getPerfTime", "PerfTimer_8cpp.html#a4d18b93b9130c4ec1c2f5ffe91457b48", null ], - [ "getPerfTimeUsec", "PerfTimer_8cpp.html#aee1c2f57e875e53264038a845598267f", null ] + [ "getPerfTimeUsec", "PerfTimer_8cpp.html#aee1c2f57e875e53264038a845598267f", null ], + [ "startup", "PerfTimer_8cpp.html#aade47aff2e70f988099aa9a98fb28bdd", null ] ]; \ No newline at end of file diff --git a/PerfTimer_8h.html b/PerfTimer_8h.html index 9208e5f0..b8e4e616 100644 --- a/PerfTimer_8h.html +++ b/PerfTimer_8h.html @@ -99,30 +99,31 @@ $(document).ready(function(){initNavTree('PerfTimer_8h.html',''); initResizable(
PerfTimer.h File Reference
- +
#include <stdint.h>
+

Go to the source code of this file.

- - + +

Typedefs

typedef __int64 TimeVal
 
typedef int64_t TimeVal
 
- + - - + +

Functions

TimeVal getPerfTime ()
TimeVal getPerfTime ()
 
int getPerfTimeUsec (const TimeVal duration)
 
int getPerfTimeUsec (TimeVal duration)
 

Typedef Documentation

- -

◆ TimeVal

+ +

◆ TimeVal

- +
typedef __int64 TimeValtypedef int64_t TimeVal
@@ -137,7 +138,7 @@ Functions
- + @@ -147,8 +148,8 @@ Functions - -

◆ getPerfTimeUsec()

+ +

◆ getPerfTimeUsec()

@@ -156,7 +157,7 @@ Functions
- + diff --git a/PerfTimer_8h.js b/PerfTimer_8h.js index aad788ae..1235bc8b 100644 --- a/PerfTimer_8h.js +++ b/PerfTimer_8h.js @@ -1,6 +1,6 @@ var PerfTimer_8h = [ - [ "TimeVal", "PerfTimer_8h.html#a2036838e11aa9bd864a72295e6017d52", null ], + [ "TimeVal", "PerfTimer_8h.html#a655eaedfb70da06315db6ed40392a30f", null ], [ "getPerfTime", "PerfTimer_8h.html#a4d18b93b9130c4ec1c2f5ffe91457b48", null ], - [ "getPerfTimeUsec", "PerfTimer_8h.html#aee1c2f57e875e53264038a845598267f", null ] + [ "getPerfTimeUsec", "PerfTimer_8h.html#a1bffe956f410ffc28aa5d04207fdbd90", null ] ]; \ No newline at end of file diff --git a/PerfTimer_8h_source.html b/PerfTimer_8h_source.html index dcb51e86..c4ca3fd9 100644 --- a/PerfTimer_8h_source.html +++ b/PerfTimer_8h_source.html @@ -119,24 +119,16 @@ $(document).ready(function(){initNavTree('PerfTimer_8h_source.html',''); initRes
16// 3. This notice may not be removed or altered from any source distribution.
17//
18
-
19#ifndef PERFTIMER_H
-
20#define PERFTIMER_H
-
21
-
22#ifdef __GNUC__
-
23#include <stdint.h>
-
24typedef int64_t TimeVal;
-
25#else
-
26typedef __int64 TimeVal;
-
27#endif
-
28
- -
30int getPerfTimeUsec(const TimeVal duration);
-
31
-
32#endif // PERFTIMER_H
-
33
-
__int64 TimeVal
Definition PerfTimer.h:26
-
TimeVal getPerfTime()
Definition PerfTimer.cpp:47
-
int getPerfTimeUsec(const TimeVal duration)
Definition PerfTimer.cpp:54
+
19#pragma once
+
20
+
21#include <stdint.h>
+
22typedef int64_t TimeVal;
+
23
+ +
25int getPerfTimeUsec(TimeVal duration);
+
int getPerfTimeUsec(TimeVal duration)
Definition PerfTimer.cpp:32
+
TimeVal getPerfTime()
Definition PerfTimer.cpp:25
+
int64_t TimeVal
Definition PerfTimer.h:22
diff --git a/RecastDump_8h.html b/RecastDump_8h.html index 285676e2..af141cb0 100644 --- a/RecastDump_8h.html +++ b/RecastDump_8h.html @@ -99,7 +99,8 @@ $(document).ready(function(){initNavTree('RecastDump_8h.html',''); initResizable
RecastDump.h File Reference
- +
#include <stddef.h>
+

Go to the source code of this file.

TimeVal getPerfTime TimeVal getPerfTime ( )
int getPerfTimeUsec (const TimeVal TimeVal  duration)
- -

◆ SampleToolType

+ +

◆ SampleToolType

+

diff --git a/RecastDump_8h_source.html b/RecastDump_8h_source.html index 38012e07..df2942d2 100644 --- a/RecastDump_8h_source.html +++ b/RecastDump_8h_source.html @@ -122,29 +122,31 @@ $(document).ready(function(){initNavTree('RecastDump_8h_source.html',''); initRe
19#ifndef RECAST_DUMP_H
20#define RECAST_DUMP_H
21
-
- -
23{
-
24 virtual ~duFileIO();
-
25 virtual bool isWriting() const = 0;
-
26 virtual bool isReading() const = 0;
-
27 virtual bool write(const void* ptr, const size_t size) = 0;
-
28 virtual bool read(void* ptr, const size_t size) = 0;
-
29};
+
22#include <stddef.h>
+
23
+
+ +
25{
+
26 virtual ~duFileIO();
+
27 virtual bool isWriting() const = 0;
+
28 virtual bool isReading() const = 0;
+
29 virtual bool write(const void* ptr, const size_t size) = 0;
+
30 virtual bool read(void* ptr, const size_t size) = 0;
+
31};
-
30
-
31bool duDumpPolyMeshToObj(struct rcPolyMesh& pmesh, duFileIO* io);
- -
33
-
34bool duDumpContourSet(struct rcContourSet& cset, duFileIO* io);
-
35bool duReadContourSet(struct rcContourSet& cset, duFileIO* io);
-
36
- - -
39
-
40void duLogBuildTimes(rcContext& ctx, const int totalTileUsec);
+
32
+
33bool duDumpPolyMeshToObj(struct rcPolyMesh& pmesh, duFileIO* io);
+ +
35
+
36bool duDumpContourSet(struct rcContourSet& cset, duFileIO* io);
+
37bool duReadContourSet(struct rcContourSet& cset, duFileIO* io);
+
38
+ +
41
-
42#endif // RECAST_DUMP_H
+
42void duLogBuildTimes(rcContext& ctx, const int totalTileUsec);
+
43
+
44#endif // RECAST_DUMP_H
bool duDumpPolyMeshToObj(struct rcPolyMesh &pmesh, duFileIO *io)
Definition RecastDump.cpp:43
bool duDumpPolyMeshDetailToObj(struct rcPolyMeshDetail &dmesh, duFileIO *io)
Definition RecastDump.cpp:90
void duLogBuildTimes(rcContext &ctx, const int totalTileUsec)
Definition RecastDump.cpp:417
@@ -153,7 +155,7 @@ $(document).ready(function(){initNavTree('RecastDump_8h_source.html',''); initRe
bool duReadCompactHeightfield(struct rcCompactHeightfield &chf, duFileIO *io)
Definition RecastDump.cpp:315
bool duDumpCompactHeightfield(struct rcCompactHeightfield &chf, duFileIO *io)
Definition RecastDump.cpp:262
Provides an interface for optional logging and performance tracking of the Recast build process.
Definition Recast.h:115
-
Definition RecastDump.h:23
+
Definition RecastDump.h:25
virtual bool isReading() const =0
virtual bool isWriting() const =0
virtual bool write(const void *ptr, const size_t size)=0
diff --git a/SampleInterfaces_8cpp.html b/SampleInterfaces_8cpp.html index 7a572da7..c835c219 100644 --- a/SampleInterfaces_8cpp.html +++ b/SampleInterfaces_8cpp.html @@ -99,16 +99,12 @@ $(document).ready(function(){initNavTree('SampleInterfaces_8cpp.html',''); initR
SampleInterfaces.cpp File Reference
-
#include <math.h>
-#include <stdio.h>
-#include <stdarg.h>
-#include "SampleInterfaces.h"
-#include "Recast.h"
-#include "RecastDebugDraw.h"
-#include "DetourDebugDraw.h"
-#include "PerfTimer.h"
-#include "SDL.h"
+
#include "SampleInterfaces.h"
#include "SDL_opengl.h"
+#include <algorithm>
+#include <cstdarg>
+#include <dirent.h>
+#include <cstring>
diff --git a/SampleInterfaces_8h.html b/SampleInterfaces_8h.html index 85b105b2..d6001b98 100644 --- a/SampleInterfaces_8h.html +++ b/SampleInterfaces_8h.html @@ -99,9 +99,12 @@ $(document).ready(function(){initNavTree('SampleInterfaces_8h.html',''); initRes
#include "DebugDraw.h"
+#include "PerfTimer.h"
#include "Recast.h"
#include "RecastDump.h"
-#include "PerfTimer.h"
+#include <array>
+#include <string>
+#include <vector>

Go to the source code of this file.

Classes

diff --git a/SampleInterfaces_8h_source.html b/SampleInterfaces_8h_source.html index f8ada376..1ce9a273 100644 --- a/SampleInterfaces_8h_source.html +++ b/SampleInterfaces_8h_source.html @@ -119,122 +119,127 @@ $(document).ready(function(){initNavTree('SampleInterfaces_8h_source.html','');
16// 3. This notice may not be removed or altered from any source distribution.
17//
18
-
19#ifndef SAMPLEINTERFACES_H
-
20#define SAMPLEINTERFACES_H
-
21
-
22#include "DebugDraw.h"
+
19#pragma once
+
20
+
21#include "DebugDraw.h"
+
22#include "PerfTimer.h"
23#include "Recast.h"
24#include "RecastDump.h"
-
25#include "PerfTimer.h"
-
26
-
27// These are example implementations of various interfaces used in Recast and Detour.
-
28
-
-
30class BuildContext : public rcContext
-
31{
-
32 TimeVal m_startTime[RC_MAX_TIMERS];
-
33 TimeVal m_accTime[RC_MAX_TIMERS];
-
34
-
35 static const int MAX_MESSAGES = 1000;
-
36 const char* m_messages[MAX_MESSAGES];
-
37 int m_messageCount;
-
38 static const int TEXT_POOL_SIZE = 8000;
-
39 char m_textPool[TEXT_POOL_SIZE];
-
40 int m_textPoolSize;
-
41
-
42public:
- -
44
-
46 void dumpLog(const char* format, ...);
-
48 int getLogCount() const;
-
50 const char* getLogText(const int i) const;
-
51
-
52protected:
-
55 virtual void doResetLog();
-
56 virtual void doLog(const rcLogCategory category, const char* msg, const int len);
-
57 virtual void doResetTimers();
-
58 virtual void doStartTimer(const rcTimerLabel label);
-
59 virtual void doStopTimer(const rcTimerLabel label);
-
60 virtual int doGetAccumulatedTime(const rcTimerLabel label) const;
-
62};
+
25
+
26#include <array>
+
27#include <string>
+
28#include <vector>
+
29
+
30// These are example implementations of various interfaces used in Recast and Detour.
+
31
+
+
33class BuildContext final : public rcContext
+
34{
+
35 std::array<TimeVal, RC_MAX_TIMERS> startTime;
+
36 std::array<TimeVal, RC_MAX_TIMERS> accTime;
+
37
+
38 std::vector<std::string> logMessages;
+
39
+
40public:
+ +
42
+
44 void dumpLog(const char* format, ...);
+
46 [[nodiscard]] int getLogCount() const;
+
48 [[nodiscard]] const char* getLogText(int i) const;
+
49
+
50protected:
+
51 void doResetLog() override;
+
52 void doLog(rcLogCategory category, const char* msg, const int len) override;
+
53 void doResetTimers() override;
+
54 void doStartTimer(rcTimerLabel label) override;
+
55 void doStopTimer(rcTimerLabel label) override;
+
56 [[nodiscard]] int doGetAccumulatedTime(rcTimerLabel label) const override;
+
57};
-
63
-
- -
66{
-
67public:
-
68 virtual void depthMask(bool state);
-
69 virtual void texture(bool state);
-
70 virtual void begin(duDebugDrawPrimitives prim, float size = 1.0f);
-
71 virtual void vertex(const float* pos, unsigned int color);
-
72 virtual void vertex(const float x, const float y, const float z, unsigned int color);
-
73 virtual void vertex(const float* pos, unsigned int color, const float* uv);
-
74 virtual void vertex(const float x, const float y, const float z, unsigned int color, const float u, const float v);
-
75 virtual void end();
-
76};
+
58
+
+ +
61{
+
62public:
+
63 void depthMask(bool state) override;
+
64 void texture(bool state) override;
+
65 void begin(duDebugDrawPrimitives prim, float size = 1.0f) override;
+
66 void vertex(const float* pos, unsigned int color) override;
+
67 void vertex(const float* pos, unsigned int color, const float* uv) override;
+
68 void vertex(float x, float y, float z, unsigned int color) override;
+
69 void vertex(float x, float y, float z, unsigned int color, float u, float v) override;
+
70 void end() override;
+
71};
-
77
-
-
79class FileIO : public duFileIO
-
80{
-
81 FILE* m_fp;
-
82 int m_mode;
-
83public:
-
84 FileIO();
-
85 virtual ~FileIO();
-
86 bool openForWrite(const char* path);
-
87 bool openForRead(const char* path);
-
88 virtual bool isWriting() const;
-
89 virtual bool isReading() const;
-
90 virtual bool write(const void* ptr, const size_t size);
-
91 virtual bool read(void* ptr, const size_t size);
-
92private:
-
93 // Explicitly disabled copy constructor and copy assignment operator.
-
94 FileIO(const FileIO&);
-
95 FileIO& operator=(const FileIO&);
-
96};
+
72
+
+
74class FileIO final : public duFileIO
+
75{
+
76public:
+
77 FileIO() = default;
+
78 FileIO(const FileIO&) = delete;
+
79 FileIO& operator=(const FileIO&) = delete;
+
80 FileIO(FileIO&&) = default;
+
81 FileIO& operator=(FileIO&&) = default;
+
82 ~FileIO() override;
+
83
+
84 bool openForWrite(const char* path);
+
85 bool openForRead(const char* path);
+
86 [[nodiscard]] bool isWriting() const override;
+
87 [[nodiscard]] bool isReading() const override;
+
88 bool write(const void* ptr, size_t size) override;
+
89 bool read(void* ptr, size_t size) override;
+
90 size_t getFileSize() const;
+
91
+
92 static void scanDirectory(const std::string& path, const std::string& ext, std::vector<std::string>& fileList);
+
93private:
+
94 FILE* fp = nullptr;
+
95 enum class Mode { none, reading, writing };
+
96 Mode mode = Mode::none;
+
97};
-
97
-
98#endif // SAMPLEINTERFACES_H
-
99
duDebugDrawPrimitives
Definition DebugDraw.h:26
-
__int64 TimeVal
Definition PerfTimer.h:26
rcTimerLabel
Recast performance timer categories.
Definition Recast.h:40
-
@ RC_MAX_TIMERS
The maximum number of timers. (Used for iterating timers.)
Definition Recast.h:98
rcLogCategory
Recast log categories.
Definition Recast.h:31
-
Recast build context.
Definition SampleInterfaces.h:31
-
BuildContext()
Definition SampleInterfaces.cpp:18
-
virtual void doStopTimer(const rcTimerLabel label)
Stops the specified performance timer.
Definition SampleInterfaces.cpp:67
-
virtual void doResetLog()
Virtual functions for custom implementations.
Definition SampleInterfaces.cpp:28
-
virtual void doResetTimers()
Clears all timers. (Resets all to unused.)
Definition SampleInterfaces.cpp:56
-
int getLogCount() const
Returns number of log messages.
Definition SampleInterfaces.cpp:127
-
virtual void doLog(const rcLogCategory category, const char *msg, const int len)
Logs a message.
Definition SampleInterfaces.cpp:34
-
virtual void doStartTimer(const rcTimerLabel label)
Starts the specified performance timer.
Definition SampleInterfaces.cpp:62
+
Recast build context.
Definition SampleInterfaces.h:34
+
BuildContext()
Definition SampleInterfaces.cpp:17
+
void doStartTimer(rcTimerLabel label) override
Starts the specified performance timer.
Definition SampleInterfaces.cpp:58
+
int getLogCount() const
Returns number of log messages.
Definition SampleInterfaces.cpp:128
+
void doLog(rcLogCategory category, const char *msg, const int len) override
Logs a message.
Definition SampleInterfaces.cpp:27
+
const char * getLogText(int i) const
Returns log message text.
Definition SampleInterfaces.cpp:133
+
void doResetTimers() override
Clears all timers. (Resets all to unused.)
Definition SampleInterfaces.cpp:50
+
void doResetLog() override
Clears all log entries.
Definition SampleInterfaces.cpp:22
+
int doGetAccumulatedTime(rcTimerLabel label) const override
Returns the total accumulated time of the specified performance timer.
Definition SampleInterfaces.cpp:77
void dumpLog(const char *format,...)
Dumps the log to stdout.
Definition SampleInterfaces.cpp:82
-
const char * getLogText(const int i) const
Returns log message text.
Definition SampleInterfaces.cpp:132
-
virtual int doGetAccumulatedTime(const rcTimerLabel label) const
Returns the total accumulated time of the specified performance timer.
Definition SampleInterfaces.cpp:77
-
OpenGL debug draw implementation.
Definition SampleInterfaces.h:66
-
virtual void end()
End drawing primitives.
Definition SampleInterfaces.cpp:254
-
virtual void vertex(const float *pos, unsigned int color)
Submit a vertex.
Definition SampleInterfaces.cpp:228
-
virtual void texture(bool state)
Definition SampleInterfaces.cpp:194
-
virtual void begin(duDebugDrawPrimitives prim, float size=1.0f)
Begin drawing primitives.
Definition SampleInterfaces.cpp:207
-
virtual void depthMask(bool state)
Definition SampleInterfaces.cpp:189
-
stdio file implementation.
Definition SampleInterfaces.h:80
-
virtual bool isWriting() const
Definition SampleInterfaces.cpp:292
-
virtual bool read(void *ptr, const size_t size)
Definition SampleInterfaces.cpp:309
-
bool openForRead(const char *path)
Definition SampleInterfaces.cpp:283
-
FileIO()
Definition SampleInterfaces.cpp:263
-
virtual bool write(const void *ptr, const size_t size)
Definition SampleInterfaces.cpp:302
-
virtual bool isReading() const
Definition SampleInterfaces.cpp:297
-
virtual ~FileIO()
Definition SampleInterfaces.cpp:269
-
bool openForWrite(const char *path)
Definition SampleInterfaces.cpp:274
+
void doStopTimer(rcTimerLabel label) override
Stops the specified performance timer.
Definition SampleInterfaces.cpp:63
+
OpenGL debug draw implementation.
Definition SampleInterfaces.h:61
+
void begin(duDebugDrawPrimitives prim, float size=1.0f) override
Begin drawing primitives.
Definition SampleInterfaces.cpp:211
+
void end() override
End drawing primitives.
Definition SampleInterfaces.cpp:258
+
void texture(bool state) override
Definition SampleInterfaces.cpp:198
+
void vertex(const float *pos, unsigned int color) override
Submit a vertex.
Definition SampleInterfaces.cpp:232
+
void depthMask(bool state) override
Definition SampleInterfaces.cpp:193
+
stdio file implementation.
Definition SampleInterfaces.h:75
+
FileIO & operator=(const FileIO &)=delete
+
bool isWriting() const override
Definition SampleInterfaces.cpp:305
+
bool openForRead(const char *path)
Definition SampleInterfaces.cpp:290
+
bool write(const void *ptr, size_t size) override
Definition SampleInterfaces.cpp:315
+
bool isReading() const override
Definition SampleInterfaces.cpp:310
+
size_t getFileSize() const
Definition SampleInterfaces.cpp:335
+
FileIO(const FileIO &)=delete
+
~FileIO() override
Definition SampleInterfaces.cpp:267
+
FileIO(FileIO &&)=default
+
FileIO & operator=(FileIO &&)=default
+
bool read(void *ptr, size_t size) override
Definition SampleInterfaces.cpp:325
+
FileIO()=default
+
bool openForWrite(const char *path)
Definition SampleInterfaces.cpp:275
+
static void scanDirectory(const std::string &path, const std::string &ext, std::vector< std::string > &fileList)
Definition SampleInterfaces.cpp:354
Provides an interface for optional logging and performance tracking of the Recast build process.
Definition Recast.h:115
Abstract debug draw interface.
Definition DebugDraw.h:35
-
Definition RecastDump.h:23
+
Definition RecastDump.h:25
diff --git a/Sample_8cpp.html b/Sample_8cpp.html index 2b5bfc13..538b2217 100644 --- a/Sample_8cpp.html +++ b/Sample_8cpp.html @@ -94,82 +94,47 @@ $(document).ready(function(){initNavTree('Sample_8cpp.html',''); initResizable()
Sample.cpp File Reference
-
#include <math.h>
-#include <stdio.h>
-#include "Sample.h"
-#include "InputGeom.h"
-#include "Recast.h"
-#include "RecastDebugDraw.h"
-#include "DetourDebugDraw.h"
-#include "DetourNavMesh.h"
-#include "DetourNavMeshQuery.h"
+
#include "Sample.h"
#include "DetourCrowd.h"
-#include "imgui.h"
-#include "SDL.h"
-#include "SDL_opengl.h"
+#include "DetourDebugDraw.h"
+#include "InputGeom.h"
+#include "RecastDebugDraw.h"
+#include "imguiHelpers.h"
+#include <imgui.h>
- - - - - -

-Classes

struct  NavMeshSetHeader
 
struct  NavMeshTileHeader
 
- - - - + +

Variables

static const int NAVMESHSET_MAGIC = 'M'<<24 | 'S'<<16 | 'E'<<8 | 'T'
 
static const int NAVMESHSET_VERSION = 1
 
const char * toolNames []
 

Variable Documentation

- -

◆ NAVMESHSET_MAGIC

+ +

◆ toolNames

- - - - - -
- +
const int NAVMESHSET_MAGIC = 'M'<<24 | 'S'<<16 | 'E'<<8 | 'T'const char* toolNames[]
-
-static
- -
-
- -

◆ NAVMESHSET_VERSION

- -
-
- - - - - -
- - - - -
const int NAVMESHSET_VERSION = 1
-
-static
-
- +Initial value:
= {
+
"None",
+
"Create Tiles",
+
"Highlight Tile Cache",
+
"Create Temp Obstacles",
+
"Test Navmesh",
+
"Prune Navmesh",
+
"Create Off-Mesh Connections",
+
"Create Convex Volumes",
+
"Create Crowds",
+
}
+
diff --git a/Sample_8cpp.js b/Sample_8cpp.js index 186d8952..4de05725 100644 --- a/Sample_8cpp.js +++ b/Sample_8cpp.js @@ -1,7 +1,4 @@ var Sample_8cpp = [ - [ "NavMeshSetHeader", "structNavMeshSetHeader.html", "structNavMeshSetHeader" ], - [ "NavMeshTileHeader", "structNavMeshTileHeader.html", "structNavMeshTileHeader" ], - [ "NAVMESHSET_MAGIC", "Sample_8cpp.html#a4df6b7baccb2e22c35e50eec65a51a76", null ], - [ "NAVMESHSET_VERSION", "Sample_8cpp.html#a4f9236737e82de35f8d48f6bc55c704a", null ] + [ "toolNames", "Sample_8cpp.html#a120bc69e1ed454430337ba8231f2aee4", null ] ]; \ No newline at end of file diff --git a/Sample_8h.html b/Sample_8h.html index fcfcdb39..f5e2af62 100644 --- a/Sample_8h.html +++ b/Sample_8h.html @@ -95,12 +95,13 @@ $(document).ready(function(){initNavTree('Sample_8h.html',''); initResizable();
Sample.h File Reference
-
#include "Recast.h"
-#include "SampleInterfaces.h"
+
#include "SampleInterfaces.h"
+#include <cstdint>

Go to the source code of this file.

@@ -117,23 +118,23 @@ Classes
- - - + + - - + +

Enumerations

enum  SampleToolType {
-  TOOL_NONE = 0 -, TOOL_TILE_EDIT -, TOOL_TILE_HIGHLIGHT -, TOOL_TEMP_OBSTACLE +
enum class  SampleToolType : uint8_t {
+  NONE = 0 +, TILE_EDIT +, TILE_HIGHLIGHT +, TEMP_OBSTACLE ,
-  TOOL_NAVMESH_TESTER -, TOOL_NAVMESH_PRUNE -, TOOL_OFFMESH_CONNECTION -, TOOL_CONVEX_VOLUME +  NAVMESH_TESTER +, NAVMESH_PRUNE +, OFFMESH_CONNECTION +, CONVEX_VOLUME ,
-  TOOL_CROWD -, MAX_TOOLS +  CROWD +, MAX_TOOLS
}
 Tool types. More...
 
 Tool types. More...
 
enum  SamplePolyAreas {
  SAMPLE_POLYAREA_GROUND , SAMPLE_POLYAREA_WATER @@ -147,38 +148,51 @@ Enumerations
 These are just sample areas to use consistent values across the samples. More...
 
enum  SamplePolyFlags {
-  SAMPLE_POLYFLAGS_WALK = 0x01 -, SAMPLE_POLYFLAGS_SWIM = 0x02 -, SAMPLE_POLYFLAGS_DOOR = 0x04 -, SAMPLE_POLYFLAGS_JUMP = 0x08 +  SAMPLE_POLYFLAGS_WALK = 1 << 0 +, SAMPLE_POLYFLAGS_SWIM = 1 << 1 +, SAMPLE_POLYFLAGS_DOOR = 1 << 2 +, SAMPLE_POLYFLAGS_JUMP = 1 << 3 ,
-  SAMPLE_POLYFLAGS_DISABLED = 0x10 -, SAMPLE_POLYFLAGS_ALL = 0xffff +  SAMPLE_POLYFLAGS_DISABLED = 1 << 4 +, SAMPLE_POLYFLAGS_ALL = ~0
}
 
enum  SamplePartitionType { SAMPLE_PARTITION_WATERSHED -, SAMPLE_PARTITION_MONOTONE -, SAMPLE_PARTITION_LAYERS +
enum class  SamplePartitionType : uint8_t { WATERSHED +, MONOTONE +, LAYERS }
 
 
+ + +

+Variables

const char * toolNames []
 

Enumeration Type Documentation

- -

◆ SamplePartitionType

+ +

◆ SamplePartitionType

+ + + + + +
- +
enum SamplePartitionTypeenum class SamplePartitionType : uint8_t
+
+strong
- - - + + +
Enumerator
SAMPLE_PARTITION_WATERSHED 
SAMPLE_PARTITION_MONOTONE 
SAMPLE_PARTITION_LAYERS 
Enumerator
WATERSHED 
MONOTONE 
LAYERS 
@@ -230,32 +244,63 @@ Enumerations

+ + + + +
- +
enum SampleToolTypeenum class SampleToolType : uint8_t
+
+strong

Tool types.

- - - - - - - - - - + + + + + + + + + +
Enumerator
TOOL_NONE 
TOOL_TILE_EDIT 
TOOL_TILE_HIGHLIGHT 
TOOL_TEMP_OBSTACLE 
TOOL_NAVMESH_TESTER 
TOOL_NAVMESH_PRUNE 
TOOL_OFFMESH_CONNECTION 
TOOL_CONVEX_VOLUME 
TOOL_CROWD 
MAX_TOOLS 
Enumerator
NONE 
TILE_EDIT 
TILE_HIGHLIGHT 
TEMP_OBSTACLE 
NAVMESH_TESTER 
NAVMESH_PRUNE 
OFFMESH_CONNECTION 
CONVEX_VOLUME 
CROWD 
MAX_TOOLS 
+
+
+

Variable Documentation

+ +

◆ toolNames

+ +
+
+ + + + + +
+ + + + +
const char* toolNames[]
+
+extern
+
+
diff --git a/Sample_8h.js b/Sample_8h.js index d83f5148..6bb19721 100644 --- a/Sample_8h.js +++ b/Sample_8h.js @@ -4,10 +4,10 @@ var Sample_8h = [ "SampleTool", "structSampleTool.html", "structSampleTool" ], [ "SampleToolState", "structSampleToolState.html", "structSampleToolState" ], [ "Sample", "classSample.html", "classSample" ], - [ "SamplePartitionType", "Sample_8h.html#a73f95e7eb01a7e948ecfa34b9cebcdc1", [ - [ "SAMPLE_PARTITION_WATERSHED", "Sample_8h.html#a73f95e7eb01a7e948ecfa34b9cebcdc1a4fe0d0ba0791fe2280ff3821177766a9", null ], - [ "SAMPLE_PARTITION_MONOTONE", "Sample_8h.html#a73f95e7eb01a7e948ecfa34b9cebcdc1aa44dc0eb2004b683d4297b7d46cfe979", null ], - [ "SAMPLE_PARTITION_LAYERS", "Sample_8h.html#a73f95e7eb01a7e948ecfa34b9cebcdc1a1fae7df00c1a8f165833e48c67692627", null ] + [ "SamplePartitionType", "Sample_8h.html#afbdbec55cd7e47cdf94167ba9dc3ca60", [ + [ "WATERSHED", "Sample_8h.html#afbdbec55cd7e47cdf94167ba9dc3ca60ac2f2890e29f7dbe371b5a48e6db70dac", null ], + [ "MONOTONE", "Sample_8h.html#afbdbec55cd7e47cdf94167ba9dc3ca60a0f9e8e3552c7f87e044893e7620b476d", null ], + [ "LAYERS", "Sample_8h.html#afbdbec55cd7e47cdf94167ba9dc3ca60ab934b953171009520c7f7336a552801b", null ] ] ], [ "SamplePolyAreas", "Sample_8h.html#a588cb37d59e832fa4f2606474769b6da", [ [ "SAMPLE_POLYAREA_GROUND", "Sample_8h.html#a588cb37d59e832fa4f2606474769b6daade496ba823714eb3b6d31fa9c1297388", null ], @@ -25,16 +25,17 @@ var Sample_8h = [ "SAMPLE_POLYFLAGS_DISABLED", "Sample_8h.html#a7f96856c3ec53bcd8dab2396ae743f8da2646db68ba40d4004ffb88a37717c4d1", null ], [ "SAMPLE_POLYFLAGS_ALL", "Sample_8h.html#a7f96856c3ec53bcd8dab2396ae743f8daa00f1707b9fb5af90130ee64d133e68f", null ] ] ], - [ "SampleToolType", "Sample_8h.html#ae448bf9be534170ca5b5f8c97256125b", [ - [ "TOOL_NONE", "Sample_8h.html#ae448bf9be534170ca5b5f8c97256125baea1b4490f1a21f7bd637324c9a46474e", null ], - [ "TOOL_TILE_EDIT", "Sample_8h.html#ae448bf9be534170ca5b5f8c97256125ba3cf3ab9c4ec7c40ff509f7eaab437d1b", null ], - [ "TOOL_TILE_HIGHLIGHT", "Sample_8h.html#ae448bf9be534170ca5b5f8c97256125ba9657bb5c075ec7d34b297a657ce25d74", null ], - [ "TOOL_TEMP_OBSTACLE", "Sample_8h.html#ae448bf9be534170ca5b5f8c97256125ba5b84b6b324182b6d84255bf90ba84468", null ], - [ "TOOL_NAVMESH_TESTER", "Sample_8h.html#ae448bf9be534170ca5b5f8c97256125ba0b913f987aa3e318b76065cfa4985815", null ], - [ "TOOL_NAVMESH_PRUNE", "Sample_8h.html#ae448bf9be534170ca5b5f8c97256125ba23046ac29087338ff7e8b24cc1778fef", null ], - [ "TOOL_OFFMESH_CONNECTION", "Sample_8h.html#ae448bf9be534170ca5b5f8c97256125ba0c30e9d3ebdeca5bddecc218dc342b98", null ], - [ "TOOL_CONVEX_VOLUME", "Sample_8h.html#ae448bf9be534170ca5b5f8c97256125ba0a31d2fb717946c688d04888a81c2063", null ], - [ "TOOL_CROWD", "Sample_8h.html#ae448bf9be534170ca5b5f8c97256125ba2c02ab36128a429e63f30ac3beea2a12", null ], - [ "MAX_TOOLS", "Sample_8h.html#ae448bf9be534170ca5b5f8c97256125baf21d3b3c7a6296454122cffd465fcb25", null ] - ] ] + [ "SampleToolType", "Sample_8h.html#a8b7905ae89a9d21531c2fe65110bebc1", [ + [ "NONE", "Sample_8h.html#a8b7905ae89a9d21531c2fe65110bebc1ab50339a10e1de285ac99d4c3990b8693", null ], + [ "TILE_EDIT", "Sample_8h.html#a8b7905ae89a9d21531c2fe65110bebc1a51be1ace90af5ea9d836a7f8498fac87", null ], + [ "TILE_HIGHLIGHT", "Sample_8h.html#a8b7905ae89a9d21531c2fe65110bebc1a256fc5c1aed48268750fdedc29b47079", null ], + [ "TEMP_OBSTACLE", "Sample_8h.html#a8b7905ae89a9d21531c2fe65110bebc1a6eee38d969cb457212b4dc525a24ec9c", null ], + [ "NAVMESH_TESTER", "Sample_8h.html#a8b7905ae89a9d21531c2fe65110bebc1a40c52dfb795cef659dccbc99ed798c00", null ], + [ "NAVMESH_PRUNE", "Sample_8h.html#a8b7905ae89a9d21531c2fe65110bebc1a366638a99cc30a5605e48187c7a3463c", null ], + [ "OFFMESH_CONNECTION", "Sample_8h.html#a8b7905ae89a9d21531c2fe65110bebc1adfe732610d1431a2723d8f851895a3ad", null ], + [ "CONVEX_VOLUME", "Sample_8h.html#a8b7905ae89a9d21531c2fe65110bebc1adbfd86821e2b262ac197472e1a21879f", null ], + [ "CROWD", "Sample_8h.html#a8b7905ae89a9d21531c2fe65110bebc1adb2f668eda4022cbebc528b605ce84cf", null ], + [ "MAX_TOOLS", "Sample_8h.html#a8b7905ae89a9d21531c2fe65110bebc1a1b2f7fca644d3076648e41ceeb02c78c", null ] + ] ], + [ "toolNames", "Sample_8h.html#a120bc69e1ed454430337ba8231f2aee4", null ] ]; \ No newline at end of file diff --git a/Sample_8h_source.html b/Sample_8h_source.html index b4d91b31..3646b436 100644 --- a/Sample_8h_source.html +++ b/Sample_8h_source.html @@ -119,314 +119,299 @@ $(document).ready(function(){initNavTree('Sample_8h_source.html',''); initResiza
16// 3. This notice may not be removed or altered from any source distribution.
17//
18
-
19#ifndef RECASTSAMPLE_H
-
20#define RECASTSAMPLE_H
-
21
-
22#include "Recast.h"
-
23#include "SampleInterfaces.h"
+
19#pragma once
+
20
+
21#include "SampleInterfaces.h"
+
22
+
23#include <cstdint>
24
-
25
- -
40
-
- -
44{
- - - - - - -
51};
+
25class Sample;
+
26class InputGeom;
+
27class dtNavMesh;
+
28class dtNavMeshQuery;
+
29class dtCrowd;
+
30
+
+
32enum class SampleToolType : uint8_t
+
33{
+
34 NONE = 0,
+
35
+ + + + + + + +
43 CROWD,
+
44
+ +
46};
+
47
+
48extern const char* toolNames[];
+
49
- +
53{
-
54 SAMPLE_POLYFLAGS_WALK = 0x01, // Ability to walk (ground, grass, road)
-
55 SAMPLE_POLYFLAGS_SWIM = 0x02, // Ability to swim (water).
-
56 SAMPLE_POLYFLAGS_DOOR = 0x04, // Ability to move through doors.
-
57 SAMPLE_POLYFLAGS_JUMP = 0x08, // Ability to jump.
-
58 SAMPLE_POLYFLAGS_DISABLED = 0x10, // Disabled polygon
-
59 SAMPLE_POLYFLAGS_ALL = 0xffff // All abilities.
-
60};
+ + + + + + +
60};
-
61
-
- -
63{
-
64public:
-
65 virtual unsigned int areaToCol(unsigned int area);
-
66};
+
+ +
62{
+
63 SAMPLE_POLYFLAGS_WALK = 1 << 0, // 0x01, // Ability to walk (ground, grass, road)
+
64 SAMPLE_POLYFLAGS_SWIM = 1 << 1, // 0x02, // Ability to swim (water).
+
65 SAMPLE_POLYFLAGS_DOOR = 1 << 2, // 0x04, // Ability to move through doors.
+
66 SAMPLE_POLYFLAGS_JUMP = 1 << 3, // 0x08, // Ability to jump.
+
67 SAMPLE_POLYFLAGS_DISABLED = 1 << 4, // 0x10, // Disabled polygon
+
68 SAMPLE_POLYFLAGS_ALL = ~0 // 0xff // All abilities.
+
69};
-
67
-
- -
69{
- - - -
73};
+
70
+
+
71enum class SamplePartitionType : uint8_t
+
72{
+ + +
75 LAYERS
+
76};
-
74
-
- -
76{
-
77 virtual ~SampleTool();
-
78 virtual int type() = 0;
-
79 virtual void init(class Sample* sample) = 0;
-
80 virtual void reset() = 0;
-
81 virtual void handleMenu() = 0;
-
82 virtual void handleClick(const float* s, const float* p, bool shift) = 0;
-
83 virtual void handleRender() = 0;
-
84 virtual void handleRenderOverlay(double* proj, double* model, int* view) = 0;
-
85 virtual void handleToggle() = 0;
-
86 virtual void handleStep() = 0;
-
87 virtual void handleUpdate(const float dt) = 0;
-
88};
-
-
89
-
- -
91 virtual ~SampleToolState();
-
92 virtual void init(class Sample* sample) = 0;
-
93 virtual void reset() = 0;
-
94 virtual void handleRender() = 0;
-
95 virtual void handleRenderOverlay(double* proj, double* model, int* view) = 0;
-
96 virtual void handleUpdate(const float dt) = 0;
-
97};
+
77
+
+ +
79{
+
80public:
+
81 unsigned int areaToCol(unsigned int area) override;
+
82};
+
83
+
+ +
85{
+
86 virtual ~SampleTool() = default;
+
87
+
88 virtual SampleToolType type() = 0;
+
89 virtual void init(Sample* sample) = 0;
+
90 virtual void reset() = 0;
+
91
+
92 virtual void singleStep() = 0;
+
93 virtual void update(float dt) = 0;
+
94 virtual void render() = 0;
+
95
+
96 virtual void drawMenuUI() = 0;
+
97 virtual void drawOverlayUI() = 0;
98
-
-
99class Sample
-
100{
-
101protected:
- - - - -
106
-
107 unsigned char m_navMeshDrawFlags;
-
108
- - - - - - - - - - - - - - -
123
- - - -
127
- - -
130
- -
132
- -
134
-
135 dtNavMesh* loadAll(const char* path);
-
136 void saveAll(const char* path, const dtNavMesh* mesh);
-
137
-
138public:
-
139 Sample();
-
140 virtual ~Sample();
-
141
-
142 void setContext(BuildContext* ctx) { m_ctx = ctx; }
-
143
-
144 void setTool(SampleTool* tool);
-
145 SampleToolState* getToolState(int type) { return m_toolStates[type]; }
-
146 void setToolState(int type, SampleToolState* s) { m_toolStates[type] = s; }
-
147
- -
149
-
150 virtual void handleSettings();
-
151 virtual void handleTools();
-
152 virtual void handleDebugMode();
-
153 virtual void handleClick(const float* s, const float* p, bool shift);
-
154 virtual void handleToggle();
-
155 virtual void handleStep();
-
156 virtual void handleRender();
-
157 virtual void handleRenderOverlay(double* proj, double* model, int* view);
-
158 virtual void handleMeshChanged(class InputGeom* geom);
-
159 virtual bool handleBuild();
-
160 virtual void handleUpdate(const float dt);
-
161 virtual void collectSettings(struct BuildSettings& settings);
-
162
-
163 virtual class InputGeom* getInputGeom() { return m_geom; }
-
164 virtual class dtNavMesh* getNavMesh() { return m_navMesh; }
-
165 virtual class dtNavMeshQuery* getNavMeshQuery() { return m_navQuery; }
-
166 virtual class dtCrowd* getCrowd() { return m_crowd; }
-
167 virtual float getAgentRadius() { return m_agentRadius; }
-
168 virtual float getAgentHeight() { return m_agentHeight; }
-
169 virtual float getAgentClimb() { return m_agentMaxClimb; }
-
170
-
171 unsigned char getNavMeshDrawFlags() const { return m_navMeshDrawFlags; }
-
172 void setNavMeshDrawFlags(unsigned char flags) { m_navMeshDrawFlags = flags; }
-
173
-
174 void updateToolStates(const float dt);
-
175 void initToolStates(Sample* sample);
-
176 void resetToolStates();
-
177 void renderToolStates();
-
178 void renderOverlayToolStates(double* proj, double* model, int* view);
-
179
-
180 void resetCommonSettings();
- -
182
-
183private:
-
184 // Explicitly disabled copy constructor and copy assignment operator.
-
185 Sample(const Sample&);
-
186 Sample& operator=(const Sample&);
-
187};
+
99 virtual void onClick(const float* rayStartPos, const float* rayHitPos, bool shift) = 0;
+
100 virtual void onToggle() = 0;
+
101};
+
+
102
+
+ +
104{
+
105 virtual ~SampleToolState() = default;
+
106 virtual void init(Sample* sample) = 0;
+
107
+
108 virtual void update(float dt) = 0;
+
109
+
110 virtual void reset() = 0;
+
111 virtual void render() = 0;
+
112 virtual void renderOverlay() = 0;
+
113};
+
+
114
+
+ +
116{
+
117public:
+ +
119 dtNavMesh* navMesh = nullptr;
+ +
121 dtCrowd* crowd = nullptr;
+ +
123
+
124 unsigned char navMeshDrawFlags;
+
125
+
126 float cellSize;
+ + + + + + + + + + + + + +
140
+ +
142 bool filterLedgeSpans = true;
+ +
144
+
145 SampleTool* tool = nullptr;
+ +
147
+ +
149
+
150 dtNavMesh* loadAll(const char* path);
+
151 void saveAll(const char* path, const dtNavMesh* mesh);
+
152
+
153 Sample();
+
154 virtual ~Sample();
+
155 Sample(const Sample&) = delete;
+
156 Sample(const Sample&&) = delete;
+
157 Sample& operator=(const Sample&) = delete;
+
158 Sample& operator=(const Sample&&) = delete;
+
159
+
160 void setTool(SampleTool* tool);
+
161
+
162 virtual void drawSettingsUI();
+
163 virtual void drawToolsUI();
+
164 virtual void drawDebugUI();
+
165
+
166 virtual void onClick(const float* rayStartPos, const float* rayHitPos, bool shift);
+
167 virtual void onToggle();
+
168 virtual void singleStep();
+
169 virtual void render();
+
170 virtual void renderOverlay();
+
171 virtual void onMeshChanged(InputGeom* geom);
+
172 virtual bool build();
+
173 virtual void update(float dt);
+
174 virtual void collectSettings(struct BuildSettings& settings);
+
175
+
176 void updateToolStates(float dt) const;
+
177 void initToolStates(Sample* sample) const;
+
178 void resetToolStates() const;
+
179 void renderToolStates() const;
+
180 void renderOverlayToolStates() const;
+
181
+
182 void resetCommonSettings();
+ +
184};
-
188
-
189
-
190#endif // RECASTSAMPLE_H
- -
SamplePolyAreas
These are just sample areas to use consistent values across the samples.
Definition Sample.h:44
-
@ SAMPLE_POLYAREA_WATER
Definition Sample.h:46
-
@ SAMPLE_POLYAREA_DOOR
Definition Sample.h:48
-
@ SAMPLE_POLYAREA_GRASS
Definition Sample.h:49
-
@ SAMPLE_POLYAREA_JUMP
Definition Sample.h:50
-
@ SAMPLE_POLYAREA_ROAD
Definition Sample.h:47
-
@ SAMPLE_POLYAREA_GROUND
Definition Sample.h:45
-
SamplePartitionType
Definition Sample.h:69
-
@ SAMPLE_PARTITION_LAYERS
Definition Sample.h:72
-
@ SAMPLE_PARTITION_WATERSHED
Definition Sample.h:70
-
@ SAMPLE_PARTITION_MONOTONE
Definition Sample.h:71
-
SamplePolyFlags
Definition Sample.h:53
-
@ SAMPLE_POLYFLAGS_SWIM
Definition Sample.h:55
-
@ SAMPLE_POLYFLAGS_JUMP
Definition Sample.h:57
-
@ SAMPLE_POLYFLAGS_DISABLED
Definition Sample.h:58
-
@ SAMPLE_POLYFLAGS_WALK
Definition Sample.h:54
-
@ SAMPLE_POLYFLAGS_DOOR
Definition Sample.h:56
-
@ SAMPLE_POLYFLAGS_ALL
Definition Sample.h:59
-
SampleToolType
Tool types.
Definition Sample.h:28
-
@ TOOL_CONVEX_VOLUME
Definition Sample.h:36
-
@ TOOL_NAVMESH_TESTER
Definition Sample.h:33
-
@ TOOL_OFFMESH_CONNECTION
Definition Sample.h:35
-
@ TOOL_NAVMESH_PRUNE
Definition Sample.h:34
-
@ TOOL_CROWD
Definition Sample.h:37
-
@ TOOL_TILE_EDIT
Definition Sample.h:30
-
@ TOOL_TEMP_OBSTACLE
Definition Sample.h:32
-
@ TOOL_TILE_HIGHLIGHT
Definition Sample.h:31
-
@ TOOL_NONE
Definition Sample.h:29
-
@ MAX_TOOLS
Definition Sample.h:38
-
Recast build context.
Definition SampleInterfaces.h:31
-
OpenGL debug draw implementation.
Definition SampleInterfaces.h:66
-
Definition InputGeom.h:73
-
Definition Sample.h:63
-
virtual unsigned int areaToCol(unsigned int area)
Compute a color for given area.
Definition Sample.cpp:47
-
Definition Sample.h:100
-
virtual void handleDebugMode()
Definition Sample.cpp:114
-
virtual void handleClick(const float *s, const float *p, bool shift)
Definition Sample.cpp:258
-
void setTool(SampleTool *tool)
Definition Sample.cpp:98
-
virtual void handleSettings()
Definition Sample.cpp:106
-
float m_cellSize
Definition Sample.h:109
-
void setNavMeshDrawFlags(unsigned char flags)
Definition Sample.h:172
-
unsigned char m_navMeshDrawFlags
Definition Sample.h:107
-
SampleToolState * getToolState(int type)
Definition Sample.h:145
-
float m_regionMergeSize
Definition Sample.h:116
-
unsigned char getNavMeshDrawFlags() const
Definition Sample.h:171
-
class dtNavMeshQuery * m_navQuery
Definition Sample.h:104
-
BuildContext * m_ctx
Definition Sample.h:131
-
SampleTool * m_tool
Definition Sample.h:128
-
void resetCommonSettings()
Definition Sample.cpp:179
-
void initToolStates(Sample *sample)
Definition Sample.cpp:298
-
void setToolState(int type, SampleToolState *s)
Definition Sample.h:146
-
virtual float getAgentRadius()
Definition Sample.h:167
-
void renderOverlayToolStates(double *proj, double *model, int *view)
Definition Sample.cpp:325
-
dtNavMesh * loadAll(const char *path)
Definition Sample.cpp:351
-
virtual void handleMeshChanged(class InputGeom *geom)
Definition Sample.cpp:136
-
Sample()
Definition Sample.cpp:68
-
virtual class dtNavMeshQuery * getNavMeshQuery()
Definition Sample.h:165
-
virtual void handleTools()
Definition Sample.cpp:110
-
class InputGeom * m_geom
Definition Sample.h:102
-
void saveAll(const char *path, const dtNavMesh *mesh)
Definition Sample.cpp:421
-
bool m_filterLedgeSpans
Definition Sample.h:125
-
bool m_filterLowHangingObstacles
Definition Sample.h:124
-
float m_regionMinSize
Definition Sample.h:115
-
float m_edgeMaxLen
Definition Sample.h:117
-
void updateToolStates(const float dt)
Definition Sample.cpp:289
-
virtual class dtCrowd * getCrowd()
Definition Sample.h:166
-
virtual void handleStep()
Definition Sample.cpp:270
-
virtual class dtNavMesh * getNavMesh()
Definition Sample.h:164
-
virtual float getAgentHeight()
Definition Sample.h:168
-
SampleToolState * m_toolStates[MAX_TOOLS]
Definition Sample.h:129
-
class dtNavMesh * m_navMesh
Definition Sample.h:103
-
void setContext(BuildContext *ctx)
Definition Sample.h:142
-
float m_agentMaxSlope
Definition Sample.h:114
-
int m_partitionType
Definition Sample.h:122
-
float m_detailSampleDist
Definition Sample.h:120
-
float m_detailSampleMaxError
Definition Sample.h:121
-
virtual void handleToggle()
Definition Sample.cpp:264
-
float m_edgeMaxError
Definition Sample.h:118
-
float m_cellHeight
Definition Sample.h:110
-
SampleDebugDraw & getDebugDraw()
Definition Sample.h:148
-
virtual void handleRenderOverlay(double *proj, double *model, int *view)
Definition Sample.cpp:132
-
virtual void collectSettings(struct BuildSettings &settings)
Definition Sample.cpp:160
-
SampleDebugDraw m_dd
Definition Sample.h:133
-
virtual class InputGeom * getInputGeom()
Definition Sample.h:163
-
class dtCrowd * m_crowd
Definition Sample.h:105
-
void resetToolStates()
Definition Sample.cpp:307
-
void handleCommonSettings()
Definition Sample.cpp:197
-
virtual void handleRender()
Definition Sample.cpp:118
-
bool m_filterWalkableLowHeightSpans
Definition Sample.h:126
-
float m_agentMaxClimb
Definition Sample.h:113
-
virtual void handleUpdate(const float dt)
Definition Sample.cpp:281
-
void renderToolStates()
Definition Sample.cpp:316
-
float m_agentRadius
Definition Sample.h:112
-
virtual float getAgentClimb()
Definition Sample.h:169
-
virtual ~Sample()
Definition Sample.cpp:88
-
virtual bool handleBuild()
Definition Sample.cpp:276
-
float m_vertsPerPoly
Definition Sample.h:119
-
float m_agentHeight
Definition Sample.h:111
+
const char * toolNames[]
Definition Sample.cpp:29
+
SamplePolyAreas
These are just sample areas to use consistent values across the samples.
Definition Sample.h:53
+
@ SAMPLE_POLYAREA_WATER
Definition Sample.h:55
+
@ SAMPLE_POLYAREA_DOOR
Definition Sample.h:57
+
@ SAMPLE_POLYAREA_GRASS
Definition Sample.h:58
+
@ SAMPLE_POLYAREA_JUMP
Definition Sample.h:59
+
@ SAMPLE_POLYAREA_ROAD
Definition Sample.h:56
+
@ SAMPLE_POLYAREA_GROUND
Definition Sample.h:54
+
SamplePolyFlags
Definition Sample.h:62
+
@ SAMPLE_POLYFLAGS_SWIM
Definition Sample.h:64
+
@ SAMPLE_POLYFLAGS_JUMP
Definition Sample.h:66
+
@ SAMPLE_POLYFLAGS_DISABLED
Definition Sample.h:67
+
@ SAMPLE_POLYFLAGS_WALK
Definition Sample.h:63
+
@ SAMPLE_POLYFLAGS_DOOR
Definition Sample.h:65
+
@ SAMPLE_POLYFLAGS_ALL
Definition Sample.h:68
+
SampleToolType
Tool types.
Definition Sample.h:33
+ + + + + + + + + + +
SamplePartitionType
Definition Sample.h:72
+ + + +
Recast build context.
Definition SampleInterfaces.h:34
+
OpenGL debug draw implementation.
Definition SampleInterfaces.h:61
+
Definition InputGeom.h:96
+
Definition Sample.h:79
+
unsigned int areaToCol(unsigned int area) override
Compute a color for given area.
Definition Sample.cpp:63
+
Definition Sample.h:116
+
bool filterLowHangingObstacles
Definition Sample.h:141
+
Sample(const Sample &)=delete
+
void setTool(SampleTool *tool)
Definition Sample.cpp:110
+
float agentMaxSlope
Definition Sample.h:131
+
Sample & operator=(const Sample &)=delete
+
float detailSampleDist
Definition Sample.h:137
+
virtual void onToggle()
Definition Sample.cpp:283
+
SampleTool * tool
Definition Sample.h:145
+
virtual void renderOverlay()
Definition Sample.cpp:156
+
void updateToolStates(float dt) const
Definition Sample.cpp:313
+
virtual void onMeshChanged(InputGeom *geom)
Definition Sample.cpp:158
+
float regionMergeSize
Definition Sample.h:133
+
void resetCommonSettings()
Definition Sample.cpp:197
+
bool filterWalkableLowHeightSpans
Definition Sample.h:143
+
dtNavMesh * loadAll(const char *path)
Definition Sample.cpp:368
+
void resetToolStates() const
Definition Sample.cpp:335
+
Sample()
Definition Sample.cpp:91
+
SamplePartitionType partitionType
Definition Sample.h:139
+
virtual void update(float dt)
Definition Sample.cpp:304
+
InputGeom * inputGeometry
Definition Sample.h:118
+
float agentMaxClimb
Definition Sample.h:130
+
void saveAll(const char *path, const dtNavMesh *mesh)
Definition Sample.cpp:446
+
float cellHeight
Definition Sample.h:127
+
float cellSize
Definition Sample.h:126
+
dtCrowd * crowd
Definition Sample.h:121
+
void initToolStates(Sample *sample) const
Definition Sample.cpp:324
+
void renderToolStates() const
Definition Sample.cpp:346
+
Sample(const Sample &&)=delete
+
virtual void drawToolsUI()
Definition Sample.cpp:122
+
virtual bool build()
Definition Sample.cpp:299
+
int vertsPerPoly
Definition Sample.h:136
+
float agentRadius
Definition Sample.h:129
+
float detailSampleMaxError
Definition Sample.h:138
+
Sample & operator=(const Sample &&)=delete
+
void drawCommonSettingsUI()
Definition Sample.cpp:215
+
dtNavMesh * navMesh
Definition Sample.h:119
+
virtual void singleStep()
Definition Sample.cpp:291
+
float edgeMaxLen
Definition Sample.h:134
+
virtual void collectSettings(struct BuildSettings &settings)
Definition Sample.cpp:180
+
bool filterLedgeSpans
Definition Sample.h:142
+
virtual void drawSettingsUI()
Definition Sample.cpp:120
+
dtNavMeshQuery * navQuery
Definition Sample.h:120
+
float regionMinSize
Definition Sample.h:132
+
virtual void render()
Definition Sample.cpp:126
+
float agentHeight
Definition Sample.h:128
+
float edgeMaxError
Definition Sample.h:135
+
virtual void onClick(const float *rayStartPos, const float *rayHitPos, bool shift)
Definition Sample.cpp:275
+
void renderOverlayToolStates() const
Definition Sample.cpp:357
+
SampleDebugDraw debugDraw
Definition Sample.h:122
+
virtual ~Sample()
Definition Sample.cpp:98
+
virtual void drawDebugUI()
Definition Sample.cpp:124
+
SampleToolState * toolStates[static_cast< size_t >(SampleToolType::MAX_TOOLS)]
Definition Sample.h:146
+
BuildContext * buildContext
Definition Sample.h:148
+
unsigned char navMeshDrawFlags
Definition Sample.h:124
Provides local steering behaviors for a group of agents.
Definition DetourCrowd.h:204
Provides the ability to perform pathfinding related queries against a navigation mesh.
Definition DetourNavMeshQuery.h:166
-
A navigation mesh based on tiles of convex polygons.
Definition DetourNavMesh.h:339
-
Definition InputGeom.h:35
-
Definition Sample.h:90
-
virtual ~SampleToolState()
Definition Sample.cpp:42
-
virtual void handleUpdate(const float dt)=0
+
A navigation mesh based on tiles of convex polygons.
Definition DetourNavMesh.h:336
+
Definition InputGeom.h:41
+
Definition Sample.h:104
+
virtual ~SampleToolState()=default
+
virtual void init(Sample *sample)=0
+
virtual void update(float dt)=0
virtual void reset()=0
-
virtual void handleRenderOverlay(double *proj, double *model, int *view)=0
-
virtual void init(class Sample *sample)=0
-
virtual void handleRender()=0
-
Definition Sample.h:76
-
virtual void handleStep()=0
-
virtual void handleRenderOverlay(double *proj, double *model, int *view)=0
-
virtual void handleMenu()=0
-
virtual int type()=0
-
virtual ~SampleTool()
Definition Sample.cpp:37
-
virtual void init(class Sample *sample)=0
-
virtual void handleToggle()=0
+
virtual void render()=0
+
virtual void renderOverlay()=0
+
Definition Sample.h:85
+
virtual void onClick(const float *rayStartPos, const float *rayHitPos, bool shift)=0
+
virtual void singleStep()=0
+
virtual void update(float dt)=0
+
virtual void onToggle()=0
+
virtual void drawOverlayUI()=0
+
virtual ~SampleTool()=default
+
virtual void init(Sample *sample)=0
+
virtual void drawMenuUI()=0
virtual void reset()=0
-
virtual void handleClick(const float *s, const float *p, bool shift)=0
-
virtual void handleUpdate(const float dt)=0
-
virtual void handleRender()=0
+
virtual void render()=0
+
virtual SampleToolType type()=0
diff --git a/Sample__Debug_8h.js b/Sample__Debug_8h.js deleted file mode 100644 index 79a76b07..00000000 --- a/Sample__Debug_8h.js +++ /dev/null @@ -1,4 +0,0 @@ -var Sample__Debug_8h = -[ - [ "Sample_Debug", "classSample__Debug.html", "classSample__Debug" ] -]; \ No newline at end of file diff --git a/Sample__Debug_8h_source.html b/Sample__Debug_8h_source.html deleted file mode 100644 index 196f803b..00000000 --- a/Sample__Debug_8h_source.html +++ /dev/null @@ -1,212 +0,0 @@ - - - - - - - -Recast Navigation: Sample_Debug.h Source File - - - - - - - - - - - - - - - -
-
- - - - - - - -
-
Recast Navigation -
-
Navigation-mesh Toolset for Games
-
-
- - - - - - - - -
-
- -
-
-
- -
- -
-
- - -
-
-
-
-
-
Loading...
-
Searching...
-
No Matches
-
-
-
-
- -
-
Sample_Debug.h
-
-
-Go to the documentation of this file.
1//
-
2// Copyright (c) 2009-2010 Mikko Mononen memon@inside.org
-
3//
-
4// This software is provided 'as-is', without any express or implied
-
5// warranty. In no event will the authors be held liable for any damages
-
6// arising from the use of this software.
-
7// Permission is granted to anyone to use this software for any purpose,
-
8// including commercial applications, and to alter it and redistribute it
-
9// freely, subject to the following restrictions:
-
10// 1. The origin of this software must not be misrepresented; you must not
-
11// claim that you wrote the original software. If you use this software
-
12// in a product, an acknowledgment in the product documentation would be
-
13// appreciated but is not required.
-
14// 2. Altered source versions must be plainly marked as such, and must not be
-
15// misrepresented as being the original software.
-
16// 3. This notice may not be removed or altered from any source distribution.
-
17//
-
18
-
19#ifndef RECASTSAMPLEDEBUG_H
-
20#define RECASTSAMPLEDEBUG_H
-
21
-
22#include "Sample.h"
-
23#include "DetourNavMesh.h"
-
24#include "Recast.h"
-
25
-
-
27class Sample_Debug : public Sample
-
28{
-
29protected:
- - - -
33
-
34 float m_halfExtents[3];
-
35 float m_center[3];
-
36 float m_bmin[3], m_bmax[3];
- -
38
-
39public:
- -
41 virtual ~Sample_Debug();
-
42
-
43 virtual void handleSettings();
-
44 virtual void handleTools();
-
45 virtual void handleDebugMode();
-
46 virtual void handleClick(const float* s, const float* p, bool shift);
-
47 virtual void handleToggle();
-
48 virtual void handleRender();
-
49 virtual void handleRenderOverlay(double* proj, double* model, int* view);
-
50 virtual void handleMeshChanged(class InputGeom* geom);
-
51 virtual bool handleBuild();
-
52
-
53 virtual const float* getBoundsMin();
-
54 virtual const float* getBoundsMax();
-
55
-
56private:
-
57 // Explicitly disabled copy constructor and copy assignment operator.
- -
59 Sample_Debug& operator=(const Sample_Debug&);
-
60};
-
-
61
-
62
-
63#endif // RECASTSAMPLE_H
- - - -
Definition InputGeom.h:73
-
Sample used for random debugging.
Definition Sample_Debug.h:28
-
float m_halfExtents[3]
Definition Sample_Debug.h:34
-
virtual void handleClick(const float *s, const float *p, bool shift)
Definition Sample_Debug.cpp:351
-
virtual ~Sample_Debug()
Definition Sample_Debug.cpp:172
-
virtual void handleRenderOverlay(double *proj, double *model, int *view)
Definition Sample_Debug.cpp:320
-
virtual void handleDebugMode()
Definition Sample_Debug.cpp:187
-
virtual void handleRender()
Definition Sample_Debug.cpp:191
-
dtPolyRef m_ref
Definition Sample_Debug.h:37
-
virtual bool handleBuild()
Definition Sample_Debug.cpp:363
-
rcCompactHeightfield * m_chf
Definition Sample_Debug.h:30
-
float m_bmin[3]
Definition Sample_Debug.h:36
-
virtual const float * getBoundsMin()
Definition Sample_Debug.cpp:329
-
rcContourSet * m_cset
Definition Sample_Debug.h:31
-
virtual const float * getBoundsMax()
Definition Sample_Debug.cpp:340
-
float m_center[3]
Definition Sample_Debug.h:35
-
virtual void handleTools()
Definition Sample_Debug.cpp:183
-
virtual void handleMeshChanged(class InputGeom *geom)
Definition Sample_Debug.cpp:324
-
float m_bmax[3]
Definition Sample_Debug.h:36
-
rcPolyMesh * m_pmesh
Definition Sample_Debug.h:32
-
virtual void handleToggle()
Definition Sample_Debug.cpp:357
-
virtual void handleSettings()
Definition Sample_Debug.cpp:179
-
Sample_Debug()
Definition Sample_Debug.cpp:51
-
Definition Sample.h:100
-
unsigned int dtPolyRef
A handle to a polygon within a navigation mesh tile.
Definition DetourNavMesh.h:48
-
A compact, static heightfield representing unobstructed space.
Definition Recast.h:354
-
Represents a group of related contours.
Definition Recast.h:433
-
Represents a polygon mesh suitable for use in building a navigation mesh.
Definition Recast.h:457
-
-
- - - - - diff --git a/Sample__SoloMesh_8cpp.html b/Sample__SoloMesh_8cpp.html index f500d371..33f24061 100644 --- a/Sample__SoloMesh_8cpp.html +++ b/Sample__SoloMesh_8cpp.html @@ -93,30 +93,67 @@ $(document).ready(function(){initNavTree('Sample__SoloMesh_8cpp.html',''); initR
+
Sample_SoloMesh.cpp File Reference
-
#include <math.h>
-#include <stdio.h>
-#include <string.h>
-#include "SDL.h"
-#include "SDL_opengl.h"
-#include "imgui.h"
-#include "InputGeom.h"
-#include "Sample.h"
-#include "Sample_SoloMesh.h"
-#include "Recast.h"
-#include "RecastDebugDraw.h"
-#include "RecastDump.h"
-#include "DetourNavMesh.h"
-#include "DetourNavMeshBuilder.h"
+
#include "Sample_SoloMesh.h"
#include "DetourDebugDraw.h"
-#include "NavMeshTesterTool.h"
-#include "NavMeshPruneTool.h"
-#include "OffMeshConnectionTool.h"
-#include "ConvexVolumeTool.h"
-#include "CrowdTool.h"
-
+#include "DetourNavMeshBuilder.h"
+#include "InputGeom.h"
+#include "RecastDebugDraw.h"
+#include "SDL_opengl.h"
+#include "Tool_ConvexVolume.h"
+#include "Tool_Crowd.h"
+#include "Tool_NavMeshPrune.h"
+#include "Tool_NavMeshTester.h"
+#include "Tool_OffMeshConnection.h"
+#include <imgui.h>
+#include <cmath>
+
+ + + +

+Macros

#define TOOL(toolType, toolClass)
 
+

Macro Definition Documentation

+ +

◆ TOOL

+ +
+
+ + + + + + + + + + + + + + + + + + +
#define TOOL( toolType,
 toolClass 
)
+
+Value:
if (ImGui::RadioButton( \
+
toolNames[static_cast<uint8_t>(SampleToolType::toolType)], \
+
currentType == SampleToolType::toolType)) \
+
{ \
+
setTool(new (toolClass){}); \
+
}
+
const char * toolNames[]
Definition Sample.cpp:29
+
+
+
+
diff --git a/Sample__SoloMesh_8cpp.js b/Sample__SoloMesh_8cpp.js new file mode 100644 index 00000000..8f6264a0 --- /dev/null +++ b/Sample__SoloMesh_8cpp.js @@ -0,0 +1,4 @@ +var Sample__SoloMesh_8cpp = +[ + [ "TOOL", "Sample__SoloMesh_8cpp.html#a5333eff9abec7c9a7d902bef73309daa", null ] +]; \ No newline at end of file diff --git a/Sample__SoloMesh_8h.html b/Sample__SoloMesh_8h.html index 7a8e37cd..641a2cb9 100644 --- a/Sample__SoloMesh_8h.html +++ b/Sample__SoloMesh_8h.html @@ -98,9 +98,9 @@ $(document).ready(function(){initNavTree('Sample__SoloMesh_8h.html',''); initRes
Sample_SoloMesh.h File Reference
-
#include "Sample.h"
-#include "DetourNavMesh.h"
-#include "Recast.h"
+
#include "Recast.h"
+#include "Sample.h"
+#include <cstdint>

Go to the source code of this file.

diff --git a/Sample__SoloMesh_8h_source.html b/Sample__SoloMesh_8h_source.html index b363496a..32574a53 100644 --- a/Sample__SoloMesh_8h_source.html +++ b/Sample__SoloMesh_8h_source.html @@ -119,123 +119,123 @@ $(document).ready(function(){initNavTree('Sample__SoloMesh_8h_source.html','');
16// 3. This notice may not be removed or altered from any source distribution.
17//
18
-
19#ifndef RECASTSAMPLESOLOMESH_H
-
20#define RECASTSAMPLESOLOMESH_H
-
21
+
19#pragma once
+
20
+
21#include "Recast.h"
22#include "Sample.h"
-
23#include "DetourNavMesh.h"
-
24#include "Recast.h"
+
23
+
24#include <cstdint>
25
26class Sample_SoloMesh : public Sample
27{
28protected:
- - -
31
-
32 unsigned char* m_triareas;
- - - - - - -
39
+ +
30
+ +
32
+
33 unsigned char* triAreas = nullptr;
+ + + +
37 rcPolyMesh* polyMesh = nullptr;
+ +
39
-
61
- -
63
-
64 void cleanup();
-
65
-
66public:
- -
68 virtual ~Sample_SoloMesh();
-
69
-
70 virtual void handleSettings();
-
71 virtual void handleTools();
-
72 virtual void handleDebugMode();
-
73
-
74 virtual void handleRender();
-
75 virtual void handleRenderOverlay(double* proj, double* model, int* view);
-
76 virtual void handleMeshChanged(class InputGeom* geom);
-
77 virtual bool handleBuild();
-
78
-
79private:
-
80 // Explicitly disabled copy constructor and copy assignment operator.
- -
82 Sample_SoloMesh& operator=(const Sample_SoloMesh&);
-
83};
+ +
61 static const char* drawModeNames[];
+
62
+
63 void cleanup();
+
64
+
65public:
+ +
67 ~Sample_SoloMesh() override;
+ + + + +
72
+
73 void drawSettingsUI() override;
+
74 void drawToolsUI() override;
+
75 void drawDebugUI() override;
+
76
+
77 void render() override;
+
78 void renderOverlay() override;
+
79 void onMeshChanged(InputGeom* geom) override;
+
80 bool build() override;
+
81
+
82private:
+
83 void UI_DrawModeOption(DrawMode drawMode, bool enabled);
+
84};
-
84
-
85
-
86#endif // RECASTSAMPLESOLOMESHSIMPLE_H
- -
Definition InputGeom.h:73
+
Definition InputGeom.h:96
Definition Sample_SoloMesh.h:27
-
virtual void handleRender()
Definition Sample_SoloMesh.cpp:230
-
DrawMode
Definition Sample_SoloMesh.h:41
-
@ DRAWMODE_VOXELS_WALKABLE
Definition Sample_SoloMesh.h:49
-
@ DRAWMODE_REGION_CONNECTIONS
Definition Sample_SoloMesh.h:53
-
@ DRAWMODE_POLYMESH_DETAIL
Definition Sample_SoloMesh.h:58
-
@ DRAWMODE_COMPACT_REGIONS
Definition Sample_SoloMesh.h:52
-
@ DRAWMODE_VOXELS
Definition Sample_SoloMesh.h:48
-
@ DRAWMODE_MESH
Definition Sample_SoloMesh.h:47
-
@ DRAWMODE_COMPACT
Definition Sample_SoloMesh.h:50
-
@ DRAWMODE_BOTH_CONTOURS
Definition Sample_SoloMesh.h:55
-
@ DRAWMODE_NAVMESH_INVIS
Definition Sample_SoloMesh.h:46
-
@ DRAWMODE_NAVMESH_TRANS
Definition Sample_SoloMesh.h:43
-
@ DRAWMODE_COMPACT_DISTANCE
Definition Sample_SoloMesh.h:51
-
@ DRAWMODE_POLYMESH
Definition Sample_SoloMesh.h:57
-
@ DRAWMODE_RAW_CONTOURS
Definition Sample_SoloMesh.h:54
-
@ MAX_DRAWMODE
Definition Sample_SoloMesh.h:59
-
@ DRAWMODE_NAVMESH_BVTREE
Definition Sample_SoloMesh.h:44
-
@ DRAWMODE_NAVMESH
Definition Sample_SoloMesh.h:42
-
@ DRAWMODE_NAVMESH_NODES
Definition Sample_SoloMesh.h:45
-
@ DRAWMODE_CONTOURS
Definition Sample_SoloMesh.h:56
-
rcPolyMesh * m_pmesh
Definition Sample_SoloMesh.h:36
-
virtual void handleDebugMode()
Definition Sample_SoloMesh.cpp:152
-
DrawMode m_drawMode
Definition Sample_SoloMesh.h:62
-
rcConfig m_cfg
Definition Sample_SoloMesh.h:37
-
unsigned char * m_triareas
Definition Sample_SoloMesh.h:32
-
rcPolyMeshDetail * m_dmesh
Definition Sample_SoloMesh.h:38
-
bool m_keepInterResults
Definition Sample_SoloMesh.h:29
-
virtual void handleSettings()
Definition Sample_SoloMesh.cpp:82
-
Sample_SoloMesh()
Definition Sample_SoloMesh.cpp:45
-
virtual ~Sample_SoloMesh()
Definition Sample_SoloMesh.cpp:59
-
rcCompactHeightfield * m_chf
Definition Sample_SoloMesh.h:34
-
virtual void handleRenderOverlay(double *proj, double *model, int *view)
Definition Sample_SoloMesh.cpp:346
-
virtual bool handleBuild()
Definition Sample_SoloMesh.cpp:370
-
rcContourSet * m_cset
Definition Sample_SoloMesh.h:35
-
float m_totalBuildTimeMs
Definition Sample_SoloMesh.h:30
-
virtual void handleTools()
Definition Sample_SoloMesh.cpp:116
-
rcHeightfield * m_solid
Definition Sample_SoloMesh.h:33
-
virtual void handleMeshChanged(class InputGeom *geom)
Definition Sample_SoloMesh.cpp:353
+
void renderOverlay() override
Definition Sample_SoloMesh.cpp:320
+
DrawMode currentDrawMode
Definition Sample_SoloMesh.h:60
+
rcConfig config
Definition Sample_SoloMesh.h:31
+
float totalBuildTimeMs
Definition Sample_SoloMesh.h:29
+
~Sample_SoloMesh() override
Definition Sample_SoloMesh.cpp:59
+
Sample_SoloMesh(const Sample_SoloMesh &&)=delete
+
unsigned char * triAreas
Definition Sample_SoloMesh.h:33
+
Sample_SoloMesh & operator=(const Sample_SoloMesh &&)=delete
+
void drawSettingsUI() override
Definition Sample_SoloMesh.cpp:82
+
void render() override
Definition Sample_SoloMesh.cpp:175
+
rcHeightfield * heightfield
Definition Sample_SoloMesh.h:34
+
static const char * drawModeNames[]
Definition Sample_SoloMesh.h:35
+
void drawDebugUI() override
Definition Sample_SoloMesh.cpp:149
+
bool build() override
Definition Sample_SoloMesh.cpp:345
+
Sample_SoloMesh()
Definition Sample_SoloMesh.cpp:54
+
Sample_SoloMesh(const Sample_SoloMesh &)=delete
+
Sample_SoloMesh & operator=(const Sample_SoloMesh &)=delete
+
void drawToolsUI() override
Definition Sample_SoloMesh.cpp:105
+
rcPolyMesh * polyMesh
Definition Sample_SoloMesh.h:37
+
DrawMode
Definition Sample_SoloMesh.h:41
+ + + + + + + + + + + + + + + + + +
void onMeshChanged(InputGeom *geom) override
Definition Sample_SoloMesh.cpp:329
+
rcContourSet * contourSet
Definition Sample_SoloMesh.h:36
+
rcPolyMeshDetail * detailMesh
Definition Sample_SoloMesh.h:38
+
rcCompactHeightfield * compactHeightfield
Definition Sample_SoloMesh.h:35
void cleanup()
Definition Sample_SoloMesh.cpp:64
-
Definition Sample.h:100
+
Definition Sample.h:116
A compact, static heightfield representing unobstructed space.
Definition Recast.h:354
Specifies a configuration to use when performing Recast builds.
Definition Recast.h:217
Represents a group of related contours.
Definition Recast.h:433
diff --git a/Sample__TempObstacles_8cpp.html b/Sample__TempObstacles_8cpp.html index 59336a82..7d224383 100644 --- a/Sample__TempObstacles_8cpp.html +++ b/Sample__TempObstacles_8cpp.html @@ -95,39 +95,30 @@ $(document).ready(function(){initNavTree('Sample__TempObstacles_8cpp.html','');
Sample_TempObstacles.cpp File Reference
-
#include <math.h>
-#include <stdio.h>
-#include <string.h>
-#include <float.h>
-#include <new>
-#include "SDL.h"
-#include "SDL_opengl.h"
-#include <GL/glu.h>
-#include "imgui.h"
+
#include "Sample_TempObstacles.h"
+#include "DetourCommon.h"
+#include "DetourDebugDraw.h"
+#include "DetourNavMeshBuilder.h"
+#include "DetourTileCache.h"
#include "InputGeom.h"
-#include "Sample.h"
-#include "Sample_TempObstacles.h"
+#include "PartitionedMesh.h"
#include "Recast.h"
#include "RecastDebugDraw.h"
-#include "DetourAssert.h"
-#include "DetourNavMesh.h"
-#include "DetourNavMeshBuilder.h"
-#include "DetourDebugDraw.h"
-#include "DetourCommon.h"
-#include "DetourTileCache.h"
-#include "NavMeshTesterTool.h"
-#include "OffMeshConnectionTool.h"
-#include "ConvexVolumeTool.h"
-#include "CrowdTool.h"
-#include "RecastAlloc.h"
-#include "RecastAssert.h"
-#include "fastlz.h"
+#include "SDL_opengl.h"
+#include "Sample.h"
+#include "Tool_ConvexVolume.h"
+#include "Tool_Crowd.h"
+#include "Tool_NavMeshTester.h"
+#include "Tool_OffMeshConnection.h"
+#include "imguiHelpers.h"
+#include <fastlz.h>
+#include <imgui.h>
+#include <algorithm>
+#include <cfloat>
@@ -141,7 +132,7 @@ Classes - + @@ -150,434 +141,36 @@ Classes

Classes

 
struct  RasterizationContext
 
class  TempObstacleHilightTool
class  TempObstacleHighlightTool
 
class  TempObstacleCreateTool
 
struct  TileCacheTileHeader
 
- - - -

-Enumerations

enum  DrawDetailType { DRAWDETAIL_AREAS -, DRAWDETAIL_REGIONS -, DRAWDETAIL_CONTOURS -, DRAWDETAIL_MESH - }
 
- - - - - - - - - - - - - - - -

-Functions

static bool isectSegAABB (const float *sp, const float *sq, const float *amin, const float *amax, float &tmin, float &tmax)
 
static int calcLayerBufferSize (const int gridWidth, const int gridHeight)
 
void drawTiles (duDebugDraw *dd, dtTileCache *tc)
 
void drawDetail (duDebugDraw *dd, dtTileCache *tc, const int tx, const int ty, int type)
 
void drawDetailOverlay (const dtTileCache *tc, const int tx, const int ty, double *proj, double *model, int *view)
 
dtObstacleRef hitTestObstacle (const dtTileCache *tc, const float *sp, const float *sq)
 
void drawObstacles (duDebugDraw *dd, const dtTileCache *tc)
 
- - - - - - - - - + + +

-Variables

static const int EXPECTED_LAYERS_PER_TILE = 4
 
static const int MAX_LAYERS = 32
 
static const int TILECACHESET_MAGIC = 'T'<<24 | 'S'<<16 | 'E'<<8 | 'T'
 
static const int TILECACHESET_VERSION = 1
 

+Macros

#define TOOL(toolType, toolClass)   if (ImGui::RadioButton(toolNames[static_cast<int>(SampleToolType::toolType)], currentTool == SampleToolType::toolType)) { setTool(new toolClass{}); }
 
-

Enumeration Type Documentation

- -

◆ DrawDetailType

+

Macro Definition Documentation

+ +

◆ TOOL

- - -
enum DrawDetailType
-
- - - - - -
Enumerator
DRAWDETAIL_AREAS 
DRAWDETAIL_REGIONS 
DRAWDETAIL_CONTOURS 
DRAWDETAIL_MESH 
- -
-
-

Function Documentation

- -

◆ calcLayerBufferSize()

- -
-
- - - - - -
- - - + - - + + - - + + - +
static int calcLayerBufferSize #define TOOL (const int gridWidth,  toolType,
const int gridHeight  toolClass 
)   if (ImGui::RadioButton(toolNames[static_cast<int>(SampleToolType::toolType)], currentTool == SampleToolType::toolType)) { setTool(new toolClass{}); }
-
-static
-
- -
-
- -

◆ drawDetail()

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void drawDetail (duDebugDrawdd,
dtTileCachetc,
const int tx,
const int ty,
int type 
)
-
- -
-
- -

◆ drawDetailOverlay()

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void drawDetailOverlay (const dtTileCachetc,
const int tx,
const int ty,
double * proj,
double * model,
int * view 
)
-
- -
-
- -

◆ drawObstacles()

- -
-
- - - - - - - - - - - - - - - - - - -
void drawObstacles (duDebugDrawdd,
const dtTileCachetc 
)
-
- -
-
- -

◆ drawTiles()

- -
-
- - - - - - - - - - - - - - - - - - -
void drawTiles (duDebugDrawdd,
dtTileCachetc 
)
-
- -
-
- -

◆ hitTestObstacle()

- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
dtObstacleRef hitTestObstacle (const dtTileCachetc,
const float * sp,
const float * sq 
)
-
- -
-
- -

◆ isectSegAABB()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
static bool isectSegAABB (const float * sp,
const float * sq,
const float * amin,
const float * amax,
float & tmin,
float & tmax 
)
-
-static
-
- -
-
-

Variable Documentation

- -

◆ EXPECTED_LAYERS_PER_TILE

- -
-
- - - - - -
- - - - -
const int EXPECTED_LAYERS_PER_TILE = 4
-
-static
-
- -
-
- -

◆ MAX_LAYERS

- -
-
- - - - - -
- - - - -
const int MAX_LAYERS = 32
-
-static
-
- -
-
- -

◆ TILECACHESET_MAGIC

- -
-
- - - - - -
- - - - -
const int TILECACHESET_MAGIC = 'T'<<24 | 'S'<<16 | 'E'<<8 | 'T'
-
-static
-
- -
-
- -

◆ TILECACHESET_VERSION

- -
-
- - - - - -
- - - - -
const int TILECACHESET_VERSION = 1
-
-static
diff --git a/Sample__TempObstacles_8cpp.js b/Sample__TempObstacles_8cpp.js index 4af225bc..2da76e57 100644 --- a/Sample__TempObstacles_8cpp.js +++ b/Sample__TempObstacles_8cpp.js @@ -5,25 +5,9 @@ var Sample__TempObstacles_8cpp = [ "MeshProcess", "structMeshProcess.html", "structMeshProcess" ], [ "TileCacheData", "structTileCacheData.html", "structTileCacheData" ], [ "RasterizationContext", "structRasterizationContext.html", "structRasterizationContext" ], - [ "TempObstacleHilightTool", "classTempObstacleHilightTool.html", "classTempObstacleHilightTool" ], + [ "TempObstacleHighlightTool", "classTempObstacleHighlightTool.html", "classTempObstacleHighlightTool" ], [ "TempObstacleCreateTool", "classTempObstacleCreateTool.html", "classTempObstacleCreateTool" ], [ "TileCacheSetHeader", "structTileCacheSetHeader.html", "structTileCacheSetHeader" ], [ "TileCacheTileHeader", "structTileCacheTileHeader.html", "structTileCacheTileHeader" ], - [ "DrawDetailType", "Sample__TempObstacles_8cpp.html#a07b411d5626ca18669a36dbce259699a", [ - [ "DRAWDETAIL_AREAS", "Sample__TempObstacles_8cpp.html#a07b411d5626ca18669a36dbce259699aa2b3e973aac1d955e6f393405f46a975f", null ], - [ "DRAWDETAIL_REGIONS", "Sample__TempObstacles_8cpp.html#a07b411d5626ca18669a36dbce259699aa9298e963d230a3f0d094748821ecc09c", null ], - [ "DRAWDETAIL_CONTOURS", "Sample__TempObstacles_8cpp.html#a07b411d5626ca18669a36dbce259699aa2f2ebb162afcf9d8049d46c65724a304", null ], - [ "DRAWDETAIL_MESH", "Sample__TempObstacles_8cpp.html#a07b411d5626ca18669a36dbce259699aa2583848fa9a65a13d8d705a41b45ac81", null ] - ] ], - [ "calcLayerBufferSize", "Sample__TempObstacles_8cpp.html#a4298a24291a2d5201ff7a2b1cbfcf56d", null ], - [ "drawDetail", "Sample__TempObstacles_8cpp.html#a9ecfb35d2460e0a349a7ad6e26a7484b", null ], - [ "drawDetailOverlay", "Sample__TempObstacles_8cpp.html#a8cdaa89bf12f5b9ed7fb37f156873f16", null ], - [ "drawObstacles", "Sample__TempObstacles_8cpp.html#af5c7622ddbc075ed3b5b02fdd4c7ca04", null ], - [ "drawTiles", "Sample__TempObstacles_8cpp.html#a86c92574bc37c2279e1cd899ba2dd8c7", null ], - [ "hitTestObstacle", "Sample__TempObstacles_8cpp.html#ad121bf7e4e054c2e9fc910193eff7439", null ], - [ "isectSegAABB", "Sample__TempObstacles_8cpp.html#a6e7db3dabeb68c2e9c627812ee42c47e", null ], - [ "EXPECTED_LAYERS_PER_TILE", "Sample__TempObstacles_8cpp.html#a0c7f06a51de07a0953540cb0a5f089fb", null ], - [ "MAX_LAYERS", "Sample__TempObstacles_8cpp.html#a79bfaaec8df17228648fc51c7c302f72", null ], - [ "TILECACHESET_MAGIC", "Sample__TempObstacles_8cpp.html#a877a1485eecb109f3d6431356bf30e94", null ], - [ "TILECACHESET_VERSION", "Sample__TempObstacles_8cpp.html#a95caba88445c1ffa1faa5c9b931aba69", null ] + [ "TOOL", "Sample__TempObstacles_8cpp.html#a5333eff9abec7c9a7d902bef73309daa", null ] ]; \ No newline at end of file diff --git a/Sample__TempObstacles_8h.html b/Sample__TempObstacles_8h.html index c539fe40..d79b820f 100644 --- a/Sample__TempObstacles_8h.html +++ b/Sample__TempObstacles_8h.html @@ -99,9 +99,6 @@ $(document).ready(function(){initNavTree('Sample__TempObstacles_8h.html',''); in
#include "Sample.h"
-#include "DetourNavMesh.h"
-#include "Recast.h"
-#include "ChunkyTriMesh.h"

Go to the source code of this file.

diff --git a/Sample__TempObstacles_8h_source.html b/Sample__TempObstacles_8h_source.html index ec823604..efa56b30 100644 --- a/Sample__TempObstacles_8h_source.html +++ b/Sample__TempObstacles_8h_source.html @@ -119,33 +119,33 @@ $(document).ready(function(){initNavTree('Sample__TempObstacles_8h_source.html',
16// 3. This notice may not be removed or altered from any source distribution.
17//
18
-
19#ifndef RECASTSAMPLETEMPOBSTACLE_H
-
20#define RECASTSAMPLETEMPOBSTACLE_H
-
21
-
22#include "Sample.h"
-
23#include "DetourNavMesh.h"
-
24#include "Recast.h"
-
25#include "ChunkyTriMesh.h"
-
26
+
19#pragma once
+
20
+
21#include "Sample.h"
+
22
+
23struct LinearAllocator;
+
24struct FastLZCompressor;
+
25struct MeshProcess;
+
26class dtTileCache;
27
29{
30protected:
- +
32
- - - + + +
36
- -
38
- - - - - -
44
+ +
38
+ + +
41 int cacheRawSize = 0;
+ +
43 unsigned int cacheBuildMemUsage = 0;
+
44
46 {
@@ -160,67 +160,63 @@ $(document).ready(function(){initNavTree('Sample__TempObstacles_8h_source.html',
56 };
-
57
- -
59
- - - -
63
-
64public:
- -
66 virtual ~Sample_TempObstacles();
-
67
-
68 virtual void handleSettings();
-
69 virtual void handleTools();
-
70 virtual void handleDebugMode();
-
71 virtual void handleRender();
-
72 virtual void handleRenderOverlay(double* proj, double* model, int* view);
-
73 virtual void handleMeshChanged(class InputGeom* geom);
-
74 virtual bool handleBuild();
-
75 virtual void handleUpdate(const float dt);
-
76
-
77 void getTilePos(const float* pos, int& tx, int& ty);
-
78
-
79 void renderCachedTile(const int tx, const int ty, const int type);
-
80 void renderCachedTileOverlay(const int tx, const int ty, double* proj, double* model, int* view);
+ +
58
+
59 int maxTiles = 0;
+ +
61 int tileSize = 48;
+
62
+
63public:
+ +
65 ~Sample_TempObstacles() override;
+ + + + +
70
+
71 void drawSettingsUI() override;
+
72 void drawToolsUI() override;
+
73 void drawDebugUI() override;
+
74 void render() override;
+
75 void renderOverlay() override;
+
76 void onMeshChanged(InputGeom* geom) override;
+
77 bool build() override;
+
78 void update(float dt) override;
+
79
+
80 void getTilePos(const float* pos, int& tx, int& ty);
81
-
82 void addTempObstacle(const float* pos);
-
83 void removeTempObstacle(const float* sp, const float* sq);
- -
85
-
86 void saveAll(const char* path);
-
87 void loadAll(const char* path);
+
82 void renderCachedTile(int tx, int ty, int type);
+
83 void renderCachedTileOverlay(int tx, int ty) const;
+
84
+
85 void addTempObstacle(const float* pos) const;
+
86 void removeTempObstacle(const float* sp, const float* sq) const;
+
87 void clearAllTempObstacles() const;
88
-
89private:
-
90 // Explicitly disabled copy constructor and copy assignment operator.
- - -
93
-
94 int rasterizeTileLayers(const int tx, const int ty, const rcConfig& cfg, struct TileCacheData* tiles, const int maxTiles);
-
95};
+
89 void saveAll(const char* path) const;
+
90 void loadAll(const char* path);
+
91
+
92private:
+
93 int rasterizeTileLayers(int tx, int ty, const rcConfig& cfg, struct TileCacheData* tiles, int maxTiles) const;
+
94};
-
96
-
97
-
98#endif // RECASTSAMPLETEMPOBSTACLE_H
- - - -
Definition InputGeom.h:73
+
Definition InputGeom.h:96
Definition Sample_TempObstacles.h:29
-
void getTilePos(const float *pos, int &tx, int &ty)
Definition Sample_TempObstacles.cpp:1386
-
virtual void handleTools()
Definition Sample_TempObstacles.cpp:952
-
int m_maxPolysPerTile
Definition Sample_TempObstacles.h:61
-
virtual ~Sample_TempObstacles()
Definition Sample_TempObstacles.cpp:859
-
float m_tileSize
Definition Sample_TempObstacles.h:62
-
virtual void handleRender()
Definition Sample_TempObstacles.cpp:1043
-
DrawMode m_drawMode
Definition Sample_TempObstacles.h:58
-
struct MeshProcess * m_tmproc
Definition Sample_TempObstacles.h:35
-
virtual void handleRenderOverlay(double *proj, double *model, int *view)
Definition Sample_TempObstacles.cpp:1125
-
float m_cacheBuildTimeMs
Definition Sample_TempObstacles.h:39
-
virtual void handleUpdate(const float dt)
Definition Sample_TempObstacles.cpp:1374
-
void loadAll(const char *path)
Definition Sample_TempObstacles.cpp:1455
+
bool keepIntermediateResults
Definition Sample_TempObstacles.h:31
+
void getTilePos(const float *pos, int &tx, int &ty)
Definition Sample_TempObstacles.cpp:1457
+
void render() override
Definition Sample_TempObstacles.cpp:1074
+
int tileSize
Definition Sample_TempObstacles.h:61
+
float cacheBuildTimeMs
Definition Sample_TempObstacles.h:39
+
int maxPolysPerTile
Definition Sample_TempObstacles.h:60
+
void addTempObstacle(const float *pos) const
Definition Sample_TempObstacles.cpp:1229
+
int cacheRawSize
Definition Sample_TempObstacles.h:41
+
Sample_TempObstacles(const Sample_TempObstacles &)=delete
+
int cacheLayerCount
Definition Sample_TempObstacles.h:42
+
Sample_TempObstacles & operator=(const Sample_TempObstacles &)=delete
+
void saveAll(const char *path) const
Definition Sample_TempObstacles.cpp:1486
+
void renderCachedTileOverlay(int tx, int ty) const
Definition Sample_TempObstacles.cpp:1170
+
void loadAll(const char *path)
Definition Sample_TempObstacles.cpp:1537
+
int maxTiles
Definition Sample_TempObstacles.h:59
DrawMode
Definition Sample_TempObstacles.h:46
@ DRAWMODE_MESH
Definition Sample_TempObstacles.h:53
@ DRAWMODE_NAVMESH_PORTALS
Definition Sample_TempObstacles.h:51
@@ -231,32 +227,33 @@ $(document).ready(function(){initNavTree('Sample__TempObstacles_8h_source.html',
@ DRAWMODE_CACHE_BOUNDS
Definition Sample_TempObstacles.h:54
@ DRAWMODE_NAVMESH_INVIS
Definition Sample_TempObstacles.h:52
@ DRAWMODE_NAVMESH
Definition Sample_TempObstacles.h:47
-
void renderCachedTile(const int tx, const int ty, const int type)
Definition Sample_TempObstacles.cpp:1113
-
struct FastLZCompressor * m_tcomp
Definition Sample_TempObstacles.h:34
-
Sample_TempObstacles()
Definition Sample_TempObstacles.cpp:837
-
bool m_keepInterResults
Definition Sample_TempObstacles.h:31
-
void clearAllTempObstacles()
Definition Sample_TempObstacles.cpp:1193
-
int m_cacheRawSize
Definition Sample_TempObstacles.h:41
-
void removeTempObstacle(const float *sp, const float *sq)
Definition Sample_TempObstacles.cpp:1185
-
void addTempObstacle(const float *pos)
Definition Sample_TempObstacles.cpp:1175
-
virtual void handleSettings()
Definition Sample_TempObstacles.cpp:866
-
virtual bool handleBuild()
Definition Sample_TempObstacles.cpp:1205
-
unsigned int m_cacheBuildMemUsage
Definition Sample_TempObstacles.h:43
-
struct LinearAllocator * m_talloc
Definition Sample_TempObstacles.h:33
-
void saveAll(const char *path)
Definition Sample_TempObstacles.cpp:1415
-
void renderCachedTileOverlay(const int tx, const int ty, double *proj, double *model, int *view)
Definition Sample_TempObstacles.cpp:1119
-
int m_cacheCompressedSize
Definition Sample_TempObstacles.h:40
-
virtual void handleDebugMode()
Definition Sample_TempObstacles.cpp:991
-
class dtTileCache * m_tileCache
Definition Sample_TempObstacles.h:37
-
int m_maxTiles
Definition Sample_TempObstacles.h:60
-
int m_cacheLayerCount
Definition Sample_TempObstacles.h:42
-
virtual void handleMeshChanged(class InputGeom *geom)
Definition Sample_TempObstacles.cpp:1155
-
Definition Sample.h:100
+
void clearAllTempObstacles() const
Definition Sample_TempObstacles.cpp:1252
+
void renderOverlay() override
Definition Sample_TempObstacles.cpp:1178
+
void onMeshChanged(InputGeom *geom) override
Definition Sample_TempObstacles.cpp:1209
+
int cacheCompressedSize
Definition Sample_TempObstacles.h:40
+
MeshProcess * tMeshProcess
Definition Sample_TempObstacles.h:35
+
Sample_TempObstacles()
Definition Sample_TempObstacles.cpp:863
+
LinearAllocator * tAllocator
Definition Sample_TempObstacles.h:33
+
void drawDebugUI() override
Definition Sample_TempObstacles.cpp:981
+
bool build() override
Definition Sample_TempObstacles.cpp:1271
+
DrawMode drawMode
Definition Sample_TempObstacles.h:57
+
void drawToolsUI() override
Definition Sample_TempObstacles.cpp:961
+
unsigned int cacheBuildMemUsage
Definition Sample_TempObstacles.h:43
+
void renderCachedTile(int tx, int ty, int type)
Definition Sample_TempObstacles.cpp:1162
+
~Sample_TempObstacles() override
Definition Sample_TempObstacles.cpp:874
+
FastLZCompressor * tCompressor
Definition Sample_TempObstacles.h:34
+
Sample_TempObstacles(const Sample_TempObstacles &&)=delete
+
dtTileCache * tileCache
Definition Sample_TempObstacles.h:37
+
void removeTempObstacle(const float *sp, const float *sq) const
Definition Sample_TempObstacles.cpp:1242
+
void update(float dt) override
Definition Sample_TempObstacles.cpp:1441
+
void drawSettingsUI() override
Definition Sample_TempObstacles.cpp:881
+
Sample_TempObstacles & operator=(const Sample_TempObstacles &&)=delete
+
Definition Sample.h:116
Definition DetourTileCache.h:102
-
Definition Sample_TempObstacles.cpp:110
-
Definition Sample_TempObstacles.cpp:139
-
Definition Sample_TempObstacles.cpp:189
-
Definition Sample_TempObstacles.cpp:250
+
Definition Sample_TempObstacles.cpp:357
+
Definition Sample_TempObstacles.cpp:386
+
Definition Sample_TempObstacles.cpp:432
+
Definition Sample_TempObstacles.cpp:479
Specifies a configuration to use when performing Recast builds.
Definition Recast.h:217
diff --git a/Sample__TileMesh_8cpp.html b/Sample__TileMesh_8cpp.html index ec043e51..0be84ead 100644 --- a/Sample__TileMesh_8cpp.html +++ b/Sample__TileMesh_8cpp.html @@ -95,94 +95,70 @@ $(document).ready(function(){initNavTree('Sample__TileMesh_8cpp.html',''); initR
Sample_TileMesh.cpp File Reference
-
#include <math.h>
-#include <stdio.h>
-#include <string.h>
-#include "SDL.h"
-#include "SDL_opengl.h"
-#include <GL/glu.h>
-#include "imgui.h"
-#include "InputGeom.h"
-#include "Sample.h"
-#include "Sample_TileMesh.h"
-#include "Recast.h"
-#include "RecastDebugDraw.h"
+
#include "Sample_TileMesh.h"
+#include "DetourDebugDraw.h"
#include "DetourNavMesh.h"
#include "DetourNavMeshBuilder.h"
-#include "DetourDebugDraw.h"
-#include "NavMeshTesterTool.h"
-#include "NavMeshPruneTool.h"
-#include "OffMeshConnectionTool.h"
-#include "ConvexVolumeTool.h"
-#include "CrowdTool.h"
+#include "InputGeom.h"
+#include "PartitionedMesh.h"
+#include "RecastDebugDraw.h"
+#include "SDL_opengl.h"
+#include "Tool_ConvexVolume.h"
+#include "Tool_Crowd.h"
+#include "Tool_NavMeshPrune.h"
+#include "Tool_NavMeshTester.h"
+#include "Tool_OffMeshConnection.h"
+#include "imguiHelpers.h"
+#include <imgui.h>

Classes

class  NavMeshTileTool
 
- - - - - + + +

-Functions

unsigned int nextPow2 (unsigned int v)
 
unsigned int ilog2 (unsigned int v)
 

+Macros

#define TOOL(toolType, toolClass)
 
-

Function Documentation

- -

◆ ilog2()

+

Macro Definition Documentation

+ +

◆ TOOL

- - - - - -
- + - - - + + -
unsigned int ilog2 #define TOOL (unsigned int v) toolType,
-
-inline
-
- -
-
- -

◆ nextPow2()

- -
-
- - - - - -
- - - - - + + + + + + + +
unsigned int nextPow2 (unsigned int v)  toolClass 
)
-
-inline
- +Value:
if (ImGui::RadioButton( \
+
toolNames[static_cast<uint8_t>(SampleToolType::toolType)], \
+
currentType == SampleToolType::toolType)) \
+
{ \
+
setTool(new (toolClass){}); \
+
}
+
const char * toolNames[]
Definition Sample.cpp:29
+
diff --git a/Sample__TileMesh_8cpp.js b/Sample__TileMesh_8cpp.js index 87ded864..520f4945 100644 --- a/Sample__TileMesh_8cpp.js +++ b/Sample__TileMesh_8cpp.js @@ -1,6 +1,5 @@ var Sample__TileMesh_8cpp = [ [ "NavMeshTileTool", "classNavMeshTileTool.html", "classNavMeshTileTool" ], - [ "ilog2", "Sample__TileMesh_8cpp.html#ae9adac380db2fcc0a78bee0bcf9ac86a", null ], - [ "nextPow2", "Sample__TileMesh_8cpp.html#a34ed4a57db9ff4dce4be2b8282c5f51a", null ] + [ "TOOL", "Sample__TileMesh_8cpp.html#a5333eff9abec7c9a7d902bef73309daa", null ] ]; \ No newline at end of file diff --git a/Sample__TileMesh_8h.html b/Sample__TileMesh_8h.html index fbf2841a..61babe72 100644 --- a/Sample__TileMesh_8h.html +++ b/Sample__TileMesh_8h.html @@ -98,10 +98,9 @@ $(document).ready(function(){initNavTree('Sample__TileMesh_8h.html',''); initRes
Sample_TileMesh.h File Reference
-
#include "Sample.h"
-#include "DetourNavMesh.h"
-#include "Recast.h"
-#include "ChunkyTriMesh.h"
+
#include "Recast.h"
+#include "Sample.h"
+#include <cstdint>

Go to the source code of this file.

diff --git a/Sample__TileMesh_8h_source.html b/Sample__TileMesh_8h_source.html index 24356ba1..d640afdc 100644 --- a/Sample__TileMesh_8h_source.html +++ b/Sample__TileMesh_8h_source.html @@ -119,172 +119,121 @@ $(document).ready(function(){initNavTree('Sample__TileMesh_8h_source.html','');
16// 3. This notice may not be removed or altered from any source distribution.
17//
18
-
19#ifndef RECASTSAMPLETILEMESH_H
-
20#define RECASTSAMPLETILEMESH_H
-
21
+
19#pragma once
+
20
+
21#include "Recast.h"
22#include "Sample.h"
-
23#include "DetourNavMesh.h"
-
24#include "Recast.h"
-
25#include "ChunkyTriMesh.h"
-
26
-
-
27class Sample_TileMesh : public Sample
-
28{
-
29protected:
- - - -
33
-
34 unsigned char* m_triareas;
- - - - - - -
41
-
- -
43 {
- - - - - - - - - - - - - - - - - - - -
63 };
+
23
+
24#include <cstdint>
+
25
+
+
26class Sample_TileMesh : public Sample
+
27{
+
28private:
+
29 bool buildAll = true;
+
30 float totalBuildTimeMs = 0.0f;
+
31
+
32 // Recast state
+
33 rcConfig config{};
+
34 unsigned char* triareas = nullptr;
+
35 rcHeightfield* heightfield = nullptr;
+
36 rcCompactHeightfield* compactHeightfield = nullptr;
+
37 rcContourSet* contourSet = nullptr;
+
38 rcPolyMesh* polyMesh = nullptr;
+
39 rcPolyMeshDetail* detailPolyMesh = nullptr;
+
40
+
41 enum class DrawMode : uint8_t
+
42 {
+
43 MESH,
+
44 NAVMESH,
+
45 NAVMESH_INVIS,
+
46 NAVMESH_TRANS,
+
47 NAVMESH_BVTREE,
+
48 NAVMESH_NODES,
+
49 NAVMESH_PORTALS,
+
50 VOXELS,
+
51 VOXELS_WALKABLE,
+
52 COMPACT,
+
53 COMPACT_DISTANCE,
+
54 COMPACT_REGIONS,
+
55 REGION_CONNECTIONS,
+
56 RAW_CONTOURS,
+
57 BOTH_CONTOURS,
+
58 CONTOURS,
+
59 POLYMESH,
+
60 POLYMESH_DETAIL
+
61 };
+
62 DrawMode currentDrawMode = DrawMode::NAVMESH;
+
63 static const char* drawModeNames[];
+
64
+
65 int maxTiles = 0;
+
66 int maxPolysPerTile = 0;
+
68 int tileSize = 32;
+
69
+
70 unsigned int tileColor = duRGBA(0, 0, 0, 32);
+
71 float lastBuiltTileBoundsMin[3] = {0.0f, 0.0f, 0.0f};
+
72 float lastBuiltTileBoundsMax[3] = {0.0f, 0.0f, 0.0f};
+
73 float tileBuildTime = 0.0f;
+
74 float tileMemUsage = 0.0f;
+
75 int tileTriCount = 0;
+
76
+
77 unsigned char* buildTileMesh(int tileX, int tileY, const float* boundsMin, const float* boundsMax, int& outDataSize);
+
78
+
79 void cleanup();
+
80 void UI_DrawModeOption(DrawMode drawMode, bool enabled);
+
81
+
82public:
+ +
84 ~Sample_TileMesh() override;
+ + + + +
89
+
90 // Sample methods
+
91 void drawSettingsUI() override;
+
92 void drawToolsUI() override;
+
93 void drawDebugUI() override;
+
94 void render() override;
+
95 void renderOverlay() override;
+
96 void onMeshChanged(InputGeom* geom) override;
+
97 bool build() override;
+
98 void collectSettings(BuildSettings& settings) override;
+
99
+
100 void getTilePos(const float* pos, int& outTileX, int& outTileY) const;
+
101
+
102 void buildTile(const float* pos);
+
103 void removeTile(const float* pos);
+
104 void buildAllTiles();
+
105 void removeAllTiles() const;
+
106};
-
64
- -
66
- - - -
70
-
71 unsigned int m_tileCol;
- - - - - -
77
-
78 unsigned char* buildTileMesh(const int tx, const int ty, const float* bmin, const float* bmax, int& dataSize);
-
79
-
80 void cleanup();
-
81
-
82 void saveAll(const char* path, const dtNavMesh* mesh);
-
83 dtNavMesh* loadAll(const char* path);
-
84
-
85public:
- -
87 virtual ~Sample_TileMesh();
-
88
-
89 virtual void handleSettings();
-
90 virtual void handleTools();
-
91 virtual void handleDebugMode();
-
92 virtual void handleRender();
-
93 virtual void handleRenderOverlay(double* proj, double* model, int* view);
-
94 virtual void handleMeshChanged(class InputGeom* geom);
-
95 virtual bool handleBuild();
-
96 virtual void collectSettings(struct BuildSettings& settings);
-
97
-
98 void getTilePos(const float* pos, int& tx, int& ty);
-
99
-
100 void buildTile(const float* pos);
-
101 void removeTile(const float* pos);
-
102 void buildAllTiles();
-
103 void removeAllTiles();
-
104
-
105private:
-
106 // Explicitly disabled copy constructor and copy assignment operator.
- -
108 Sample_TileMesh& operator=(const Sample_TileMesh&);
-
109};
-
-
110
-
111
-
112#endif // RECASTSAMPLETILEMESH_H
- - +
unsigned int duRGBA(int r, int g, int b, int a)
Definition DebugDraw.h:76
-
Definition InputGeom.h:73
-
Definition Sample_TileMesh.h:28
-
float m_lastBuiltTileBmin[3]
Definition Sample_TileMesh.h:72
-
float m_totalBuildTimeMs
Definition Sample_TileMesh.h:32
-
float m_tileMemUsage
Definition Sample_TileMesh.h:75
-
virtual void handleRenderOverlay(double *proj, double *model, int *view)
Definition Sample_TileMesh.cpp:549
-
rcHeightfield * m_solid
Definition Sample_TileMesh.h:35
-
virtual bool handleBuild()
Definition Sample_TileMesh.cpp:589
-
DrawMode
Definition Sample_TileMesh.h:43
-
@ DRAWMODE_REGION_CONNECTIONS
Definition Sample_TileMesh.h:56
-
@ DRAWMODE_NAVMESH_PORTALS
Definition Sample_TileMesh.h:48
-
@ DRAWMODE_NAVMESH_BVTREE
Definition Sample_TileMesh.h:46
-
@ DRAWMODE_NAVMESH_TRANS
Definition Sample_TileMesh.h:45
-
@ DRAWMODE_CONTOURS
Definition Sample_TileMesh.h:59
-
@ DRAWMODE_MESH
Definition Sample_TileMesh.h:50
-
@ DRAWMODE_NAVMESH_NODES
Definition Sample_TileMesh.h:47
-
@ DRAWMODE_COMPACT_DISTANCE
Definition Sample_TileMesh.h:54
-
@ DRAWMODE_RAW_CONTOURS
Definition Sample_TileMesh.h:57
-
@ DRAWMODE_VOXELS
Definition Sample_TileMesh.h:51
-
@ DRAWMODE_NAVMESH
Definition Sample_TileMesh.h:44
-
@ DRAWMODE_NAVMESH_INVIS
Definition Sample_TileMesh.h:49
-
@ MAX_DRAWMODE
Definition Sample_TileMesh.h:62
-
@ DRAWMODE_BOTH_CONTOURS
Definition Sample_TileMesh.h:58
-
@ DRAWMODE_POLYMESH
Definition Sample_TileMesh.h:60
-
@ DRAWMODE_COMPACT
Definition Sample_TileMesh.h:53
-
@ DRAWMODE_POLYMESH_DETAIL
Definition Sample_TileMesh.h:61
-
@ DRAWMODE_COMPACT_REGIONS
Definition Sample_TileMesh.h:55
-
@ DRAWMODE_VOXELS_WALKABLE
Definition Sample_TileMesh.h:52
-
virtual void handleTools()
Definition Sample_TileMesh.cpp:300
-
dtNavMesh * loadAll(const char *path)
-
void getTilePos(const float *pos, int &tx, int &ty)
Definition Sample_TileMesh.cpp:688
-
Sample_TileMesh()
Definition Sample_TileMesh.cpp:177
-
unsigned char * m_triareas
Definition Sample_TileMesh.h:34
-
rcPolyMesh * m_pmesh
Definition Sample_TileMesh.h:38
-
int m_maxPolysPerTile
Definition Sample_TileMesh.h:68
-
virtual void handleSettings()
Definition Sample_TileMesh.cpp:226
-
rcPolyMeshDetail * m_dmesh
Definition Sample_TileMesh.h:39
-
rcCompactHeightfield * m_chf
Definition Sample_TileMesh.h:36
-
virtual void handleRender()
Definition Sample_TileMesh.cpp:421
-
void removeAllTiles()
Definition Sample_TileMesh.cpp:775
-
void saveAll(const char *path, const dtNavMesh *mesh)
-
bool m_keepInterResults
Definition Sample_TileMesh.h:30
-
virtual void handleMeshChanged(class InputGeom *geom)
Definition Sample_TileMesh.cpp:567
-
virtual void collectSettings(struct BuildSettings &settings)
Definition Sample_TileMesh.cpp:639
-
virtual ~Sample_TileMesh()
Definition Sample_TileMesh.cpp:203
-
rcContourSet * m_cset
Definition Sample_TileMesh.h:37
-
rcConfig m_cfg
Definition Sample_TileMesh.h:40
-
void buildTile(const float *pos)
Definition Sample_TileMesh.cpp:646
-
unsigned int m_tileCol
Definition Sample_TileMesh.h:71
-
void cleanup()
Definition Sample_TileMesh.cpp:210
-
bool m_buildAll
Definition Sample_TileMesh.h:31
-
float m_tileBuildTime
Definition Sample_TileMesh.h:74
-
void removeTile(const float *pos)
Definition Sample_TileMesh.cpp:699
-
int m_tileTriCount
Definition Sample_TileMesh.h:76
-
DrawMode m_drawMode
Definition Sample_TileMesh.h:65
-
int m_maxTiles
Definition Sample_TileMesh.h:67
-
virtual void handleDebugMode()
Definition Sample_TileMesh.cpp:339
-
float m_lastBuiltTileBmax[3]
Definition Sample_TileMesh.h:73
-
void buildAllTiles()
Definition Sample_TileMesh.cpp:724
-
unsigned char * buildTileMesh(const int tx, const int ty, const float *bmin, const float *bmax, int &dataSize)
Definition Sample_TileMesh.cpp:794
-
float m_tileSize
Definition Sample_TileMesh.h:69
-
Definition Sample.h:100
-
A navigation mesh based on tiles of convex polygons.
Definition DetourNavMesh.h:339
-
Definition InputGeom.h:35
+
Definition InputGeom.h:96
+
Definition Sample_TileMesh.h:27
+
Sample_TileMesh(const Sample_TileMesh &&)=delete
+
void renderOverlay() override
Definition Sample_TileMesh.cpp:522
+
void drawSettingsUI() override
Definition Sample_TileMesh.cpp:215
+
void getTilePos(const float *pos, int &outTileX, int &outTileY) const
Definition Sample_TileMesh.cpp:677
+
bool build() override
Definition Sample_TileMesh.cpp:568
+
~Sample_TileMesh() override
Definition Sample_TileMesh.cpp:192
+
void drawToolsUI() override
Definition Sample_TileMesh.cpp:278
+
Sample_TileMesh & operator=(const Sample_TileMesh &)=delete
+
Sample_TileMesh()
Definition Sample_TileMesh.cpp:186
+
void render() override
Definition Sample_TileMesh.cpp:348
+
Sample_TileMesh(const Sample_TileMesh &)=delete
+
void removeAllTiles() const
Definition Sample_TileMesh.cpp:780
+
void buildTile(const float *pos)
Definition Sample_TileMesh.cpp:627
+
void collectSettings(BuildSettings &settings) override
Definition Sample_TileMesh.cpp:620
+
void removeTile(const float *pos)
Definition Sample_TileMesh.cpp:691
+
void drawDebugUI() override
Definition Sample_TileMesh.cpp:321
+
void buildAllTiles()
Definition Sample_TileMesh.cpp:722
+
Sample_TileMesh & operator=(const Sample_TileMesh &&)=delete
+
void onMeshChanged(InputGeom *geom) override
Definition Sample_TileMesh.cpp:544
+
Definition Sample.h:116
+
Definition InputGeom.h:41
A compact, static heightfield representing unobstructed space.
Definition Recast.h:354
Specifies a configuration to use when performing Recast builds.
Definition Recast.h:217
Represents a group of related contours.
Definition Recast.h:433
diff --git a/TestCase_8cpp.html b/TestCase_8cpp.html index 6c0ef335..db37b9fa 100644 --- a/TestCase_8cpp.html +++ b/TestCase_8cpp.html @@ -98,19 +98,13 @@ $(document).ready(function(){initNavTree('TestCase_8cpp.html',''); initResizable
TestCase.cpp File Reference
-
#include <stdio.h>
-#include <ctype.h>
-#include <string.h>
-#include <math.h>
-#include "TestCase.h"
-#include "DetourNavMesh.h"
-#include "DetourNavMeshQuery.h"
+
#include "TestCase.h"
#include "DetourCommon.h"
-#include "SDL.h"
+#include "DetourNavMeshQuery.h"
#include "SDL_opengl.h"
-#include <GL/glu.h>
-#include "imgui.h"
-#include "PerfTimer.h"
+#include "SampleInterfaces.h"
+#include "imguiHelpers.h"
+#include <imgui.h>
diff --git a/TestCase_8h.html b/TestCase_8h.html index 89b62188..93b04654 100644 --- a/TestCase_8h.html +++ b/TestCase_8h.html @@ -98,8 +98,10 @@ $(document).ready(function(){initNavTree('TestCase_8h.html',''); initResizable()
TestCase.h File Reference
-
#include <string>
-#include "DetourNavMesh.h"
+
#include "DetourNavMesh.h"
+#include <cstdint>
+#include <string>
+#include <vector>

Go to the source code of this file.

Functions

diff --git a/TestCase_8h_source.html b/TestCase_8h_source.html index 701a28b6..13867d4e 100644 --- a/TestCase_8h_source.html +++ b/TestCase_8h_source.html @@ -119,118 +119,69 @@ $(document).ready(function(){initNavTree('TestCase_8h_source.html',''); initResi
16// 3. This notice may not be removed or altered from any source distribution.
17//
18
-
19#ifndef TESTCASE_H
-
20#define TESTCASE_H
-
21
-
22#include <string>
-
23#include "DetourNavMesh.h"
-
24
-
- -
26{
-
27 enum TestType
-
28 {
-
29 TEST_PATHFIND,
-
30 TEST_RAYCAST
-
31 };
-
32
-
33 struct Test
-
34 {
-
35 Test() :
-
36 type(),
-
37 spos(),
-
38 epos(),
-
39 nspos(),
-
40 nepos(),
-
41 radius(0),
-
42 includeFlags(0),
-
43 excludeFlags(0),
-
44 expand(false),
-
45 straight(0),
-
46 nstraight(0),
-
47 polys(0),
-
48 npolys(0),
-
49 findNearestPolyTime(0),
-
50 findPathTime(0),
-
51 findStraightPathTime(0),
-
52 next(0)
-
53 {
-
54 }
-
55
-
56 ~Test()
-
57 {
-
58 delete [] straight;
-
59 delete [] polys;
-
60 }
-
61
-
62 TestType type;
-
63 float spos[3];
-
64 float epos[3];
-
65 float nspos[3];
-
66 float nepos[3];
-
67 float radius;
-
68 unsigned short includeFlags;
-
69 unsigned short excludeFlags;
-
70 bool expand;
-
71
-
72 float* straight;
-
73 int nstraight;
-
74 dtPolyRef* polys;
-
75 int npolys;
-
76
-
77 int findNearestPolyTime;
-
78 int findPathTime;
-
79 int findStraightPathTime;
-
80
-
81 Test* next;
-
82 private:
-
83 // Explicitly disabled copy constructor and copy assignment operator.
-
84 Test(const Test&);
-
85 Test& operator=(const Test&);
-
86 };
-
87
-
88 std::string m_sampleName;
-
89 std::string m_geomFileName;
-
90 Test* m_tests;
-
91
-
92 void resetTimes();
-
93
-
94public:
-
95 TestCase();
-
96 ~TestCase();
-
97
-
98 bool load(const std::string& filePath);
-
99
-
100 const std::string& getSampleName() const { return m_sampleName; }
-
101 const std::string& getGeomFileName() const { return m_geomFileName; }
-
102
-
103 void doTests(class dtNavMesh* navmesh, class dtNavMeshQuery* navquery);
-
104
-
105 void handleRender();
-
106 bool handleRenderOverlay(double* proj, double* model, int* view);
-
107
-
108private:
-
109 // Explicitly disabled copy constructor and copy assignment operator.
-
110 TestCase(const TestCase&);
-
111 TestCase& operator=(const TestCase&);
-
112};
+
19#pragma once
+
20
+
21#include "DetourNavMesh.h"
+
22
+
23#include <cstdint>
+
24#include <string>
+
25#include <vector>
+
26
+
+ +
28{
+
29 enum class TestType : uint8_t
+
30 {
+
31 PATHFIND,
+
32 RAYCAST
+
33 };
+
34
+
35 struct Test
+
36 {
+
37 TestCase::TestType type{};
+
38 float spos[3]{};
+
39 float epos[3]{};
+
40 float nspos[3]{};
+
41 float nepos[3]{};
+
42 float radius = 0;
+
43 unsigned short includeFlags = 0;
+
44 unsigned short excludeFlags = 0;
+
45 bool expand = false;
+
46
+
47 std::vector<float> straight {};
+
48 std::vector<dtPolyRef*> polys {};
+
49
+
50 int findNearestPolyTime = 0;
+
51 int findPathTime = 0;
+
52 int findStraightPathTime = 0;
+
53 };
+
54
+
55 std::vector<Test> tests;
+
56
+
57 void resetTimes();
+
58
+
59public:
+
60 bool load(const std::string& filePath);
+
61
+
62 std::string sampleName;
+
63 std::string geomFileName;
+
64
+
65 void doTests(class dtNavMesh* navmesh, class dtNavMeshQuery* navquery);
+
66
+
67 void render();
+
68 bool renderOverlay();
+
69};
-
113
-
114#endif // TESTCASE_H
-
int next(int i, int n)
Definition DetourTileCacheBuilder.cpp:1080
-
Definition TestCase.h:26
-
void doTests(class dtNavMesh *navmesh, class dtNavMeshQuery *navquery)
Definition TestCase.cpp:197
-
bool handleRenderOverlay(double *proj, double *model, int *view)
Definition TestCase.cpp:387
-
void handleRender()
Definition TestCase.cpp:328
-
const std::string & getSampleName() const
Definition TestCase.h:100
-
TestCase()
Definition TestCase.cpp:41
-
const std::string & getGeomFileName() const
Definition TestCase.h:101
-
bool load(const std::string &filePath)
Definition TestCase.cpp:100
-
~TestCase()
Definition TestCase.cpp:46
+
Definition TestCase.h:28
+
std::string geomFileName
Definition TestCase.h:63
+
void doTests(class dtNavMesh *navmesh, class dtNavMeshQuery *navquery)
Definition TestCase.cpp:175
+
std::string sampleName
Definition TestCase.h:62
+
void render()
Definition TestCase.cpp:315
+
bool renderOverlay()
Definition TestCase.cpp:382
+
bool load(const std::string &filePath)
Definition TestCase.cpp:85
Provides the ability to perform pathfinding related queries against a navigation mesh.
Definition DetourNavMeshQuery.h:166
-
A navigation mesh based on tiles of convex polygons.
Definition DetourNavMesh.h:339
-
unsigned int dtPolyRef
A handle to a polygon within a navigation mesh tile.
Definition DetourNavMesh.h:48
+
A navigation mesh based on tiles of convex polygons.
Definition DetourNavMesh.h:336
diff --git a/structNavMeshTileHeader-members.html b/Tool__ConvexVolume_8cpp.html similarity index 79% rename from structNavMeshTileHeader-members.html rename to Tool__ConvexVolume_8cpp.html index 4195b31d..544b22b2 100644 --- a/structNavMeshTileHeader-members.html +++ b/Tool__ConvexVolume_8cpp.html @@ -5,7 +5,7 @@ -Recast Navigation: Member List +Recast Navigation: Tool_ConvexVolume.cpp File Reference @@ -67,7 +67,7 @@ $(function() {
@@ -93,20 +93,20 @@ $(document).ready(function(){initNavTree('structNavMeshTileHeader.html',''); ini
-
NavMeshTileHeader Member List
+
Tool_ConvexVolume.cpp File Reference
- -

This is the complete list of members for NavMeshTileHeader, including all inherited members.

-
- - -
dataSizeNavMeshTileHeader
tileRefNavMeshTileHeader
+
#include "Tool_ConvexVolume.h"
+#include "InputGeom.h"
+#include "imguiHelpers.h"
+#include <imgui.h>
+
@@ -95,16 +95,17 @@ $(document).ready(function(){initNavTree('ConvexVolumeTool_8h.html',''); initRes
-
ConvexVolumeTool.h File Reference
+
Tool_ConvexVolume.h File Reference
#include "Sample.h"
-

Go to the source code of this file.

+

Go to the source code of this file.

+

Classes

class  ConvexVolumeTool
 Tool to create convex volumes for InputGeom. More...
 
@@ -113,7 +114,7 @@ Classes
@@ -95,79 +95,55 @@ $(document).ready(function(){initNavTree('Filelist_8cpp.html',''); initResizable
-
Filelist.cpp File Reference
+
Tool_Crowd.cpp File Reference
-
#include "Filelist.h"
-#include <algorithm>
-#include <dirent.h>
-#include <cstring>
+
#include "Tool_Crowd.h"
+#include "DetourCommon.h"
+#include "DetourDebugDraw.h"
+#include "DetourNode.h"
+#include "Recast.h"
+#include "imguiHelpers.h"
+#include <imgui.h>
- - - - + +

Functions

void scanDirectoryAppend (const string &path, const string &ext, vector< string > &filelist)
 
void scanDirectory (const string &path, const string &ext, vector< string > &filelist)
 
static void calcVel (float *vel, const float *pos, const float *tgt, const float speed)
 

Function Documentation

- -

◆ scanDirectory()

+ +

◆ calcVel()

+ + + + + +
- + - - + + - - + + - - - - - - - - -
void scanDirectory static void calcVel (const string & path, float * vel,
const string & ext, const float * pos,
vector< string > & filelist 
)
-
- -
- - -

◆ scanDirectoryAppend()

- -
-
- - - - - - - - - - - - - - - - - - + + + + + + + + @@ -175,6 +151,11 @@ Functions
void scanDirectoryAppend (const string & path,
const string & ext,
vector< string > & filelist const float * tgt,
const float speed 
+
+static
@@ -185,7 +166,7 @@ Functions
@@ -95,22 +95,21 @@ $(document).ready(function(){initNavTree('CrowdTool_8h.html',''); initResizable(
-
CrowdTool.h File Reference
+
Tool_Crowd.h File Reference
-
#include "Sample.h"
-#include "DetourNavMesh.h"
-#include "DetourObstacleAvoidance.h"
+
#include "DetourCrowd.h"
+#include "Sample.h"
#include "ValueHistory.h"
-#include "DetourCrowd.h"
-

Go to the source code of this file.

+

Go to the source code of this file.

+ @@ -121,7 +120,7 @@ Classes

Classes

struct  CrowdToolParams
 
class  CrowdToolState
 Tool to create crowds. More...
 
class  CrowdTool
 
+ + + + + + +
+
Recast Navigation +
+
Navigation-mesh Toolset for Games
+
+
+ + + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
Tool_Crowd.h
+
+
+Go to the documentation of this file.
1//
+
2// Copyright (c) 2009-2010 Mikko Mononen memon@inside.org
+
3//
+
4// This software is provided 'as-is', without any express or implied
+
5// warranty. In no event will the authors be held liable for any damages
+
6// arising from the use of this software.
+
7// Permission is granted to anyone to use this software for any purpose,
+
8// including commercial applications, and to alter it and redistribute it
+
9// freely, subject to the following restrictions:
+
10// 1. The origin of this software must not be misrepresented; you must not
+
11// claim that you wrote the original software. If you use this software
+
12// in a product, an acknowledgment in the product documentation would be
+
13// appreciated but is not required.
+
14// 2. Altered source versions must be plainly marked as such, and must not be
+
15// misrepresented as being the original software.
+
16// 3. This notice may not be removed or altered from any source distribution.
+
17//
+
18
+
19#pragma once
+
20
+
21#include "DetourCrowd.h"
+
22#include "Sample.h"
+
23#include "ValueHistory.h"
+
24
+
+ +
26{
+
27 bool showCorners = false;
+ +
29 bool showPath = false;
+
30 bool showVO = false;
+
31 bool showOpt = false;
+
32 bool showNeighbors = false;
+
33
+
34 bool showLabels = false;
+
35 bool showGrid = false;
+
36 bool showNodes = false;
+
37 bool showPerfGraph = false;
+
38 bool showDetailAll = false;
+
39
+
40 bool anticipateTurns = true;
+
41 bool optimizeVis = true;
+
42 bool optimizeTopo = true;
+
43 bool obstacleAvoidance = true;
+ +
45 bool separation = false;
+
46 float separationWeight = 2.0f;
+
47};
+
+
48
+
+ +
51{
+
52 Sample* sample = nullptr;
+
53
+
54 float targetPosition[3]{};
+
55 dtPolyRef targetPolyRef{0};
+
56
+
57 dtCrowdAgentDebugInfo agentDebug;
+
58 dtObstacleAvoidanceDebugData* obstacleAvoidanceDebugData = nullptr;
+
59
+
60 static constexpr int AGENT_MAX_TRAIL = 64;
+
61 static constexpr int MAX_AGENTS = 128;
+
62
+
63 struct AgentTrail
+
64 {
+
65 float trail[AGENT_MAX_TRAIL * 3];
+
66 int htrail;
+
67 };
+
68 AgentTrail trails[MAX_AGENTS];
+
69
+
70 ValueHistory crowdTotalTime;
+
71 ValueHistory crowdSampleCount;
+
72
+
73 CrowdToolParams toolParams;
+
74
+
75 bool run = true;
+
76
+
77public:
+ + +
80 CrowdToolState(const CrowdToolState&&) = delete;
+ + +
83 ~CrowdToolState() override;
+
84
+
85 void init(Sample* newSample) override;
+
86 void reset() override;
+
87 void render() override;
+
88 void renderOverlay() override;
+
89 void update(float dt) override;
+
90
+
91 [[nodiscard]] bool isRunning() const { return run; }
+
92 void setRunning(const bool s) { run = s; }
+
93
+
94 void addAgent(const float* pos);
+
95 void removeAgent(int idx);
+
96 void highlightAgent(int idx);
+
97 void updateAgentParams();
+
98 int hitTestAgents(const float* s, const float* p);
+
99 void setMoveTarget(const float* p, bool adjust);
+
100 void updateTick(float dt);
+
101
+
102 CrowdToolParams* getToolParams() { return &toolParams; }
+
103};
+
+
104
+
+
105class CrowdTool : public SampleTool
+
106{
+
107 Sample* sample = nullptr;
+
108 CrowdToolState* state = nullptr;
+
109
+
110 enum class ToolMode : uint8_t
+
111 {
+
112 CREATE,
+
113 MOVE_TARGET,
+
114 SELECT,
+
115 TOGGLE_POLYS
+
116 };
+
117 ToolMode mode = ToolMode::CREATE;
+
118
+
119public:
+ +
121 void init(Sample* sample) override;
+
122 void reset() override;
+
123 void drawMenuUI() override;
+
124 void onClick(const float* s, const float* p, bool shift) override;
+
125 void onToggle() override;
+
126 void singleStep() override;
+
127 void update(float dt) override;
+
128 void render() override;
+
129 void drawOverlayUI() override;
+
130};
+
+ + +
SampleToolType
Tool types.
Definition Sample.h:33
+ + +
Tool to create crowds.
Definition Tool_Crowd.h:51
+
void setMoveTarget(const float *p, bool adjust)
Definition Tool_Crowd.cpp:809
+
CrowdToolParams * getToolParams()
Definition Tool_Crowd.h:102
+
CrowdToolState & operator=(const CrowdToolState &&)=delete
+
CrowdToolState & operator=(const CrowdToolState &)=delete
+
CrowdToolState()
Definition Tool_Crowd.cpp:94
+
void render() override
Definition Tool_Crowd.cpp:169
+
int hitTestAgents(const float *s, const float *p)
Definition Tool_Crowd.cpp:876
+
void reset() override
Definition Tool_Crowd.cpp:167
+
CrowdToolState(const CrowdToolState &&)=delete
+
void setRunning(const bool s)
Definition Tool_Crowd.h:92
+
void updateAgentParams()
Definition Tool_Crowd.cpp:910
+
void updateTick(float dt)
Definition Tool_Crowd.cpp:948
+
void removeAgent(int idx)
Definition Tool_Crowd.cpp:780
+
void init(Sample *newSample) override
Definition Tool_Crowd.cpp:111
+
~CrowdToolState() override
Definition Tool_Crowd.cpp:106
+
void update(float dt) override
Definition Tool_Crowd.cpp:714
+
void highlightAgent(int idx)
Definition Tool_Crowd.cpp:796
+
void addAgent(const float *pos)
Definition Tool_Crowd.cpp:722
+
CrowdToolState(const CrowdToolState &)=delete
+
void renderOverlay() override
Definition Tool_Crowd.cpp:587
+
bool isRunning() const
Definition Tool_Crowd.h:91
+
Definition Tool_Crowd.h:106
+
void render() override
Definition Tool_Crowd.cpp:1173
+
void onToggle() override
Definition Tool_Crowd.cpp:1159
+
void singleStep() override
Definition Tool_Crowd.cpp:1146
+
void update(float dt) override
Definition Tool_Crowd.cpp:1168
+
SampleToolType type() override
Definition Tool_Crowd.h:120
+
void init(Sample *sample) override
Definition Tool_Crowd.cpp:987
+
void reset() override
Definition Tool_Crowd.cpp:1004
+
void drawOverlayUI() override
Definition Tool_Crowd.cpp:1175
+
void drawMenuUI() override
Definition Tool_Crowd.cpp:1006
+
void onClick(const float *s, const float *p, bool shift) override
Definition Tool_Crowd.cpp:1074
+
Definition Sample.h:116
+
Definition ValueHistory.h:7
+
Definition DetourObstacleAvoidance.h:39
+
unsigned int dtPolyRef
A handle to a polygon within a navigation mesh tile.
Definition DetourNavMesh.h:48
+
Definition Tool_Crowd.h:26
+
bool showNeighbors
Definition Tool_Crowd.h:32
+
bool showNodes
Definition Tool_Crowd.h:36
+
bool showLabels
Definition Tool_Crowd.h:34
+
bool showGrid
Definition Tool_Crowd.h:35
+
bool showPath
Definition Tool_Crowd.h:29
+
bool optimizeVis
Definition Tool_Crowd.h:41
+
bool separation
Definition Tool_Crowd.h:45
+
int obstacleAvoidanceType
Definition Tool_Crowd.h:44
+
bool showDetailAll
Definition Tool_Crowd.h:38
+
bool showCorners
Definition Tool_Crowd.h:27
+
bool showVO
Definition Tool_Crowd.h:30
+
bool anticipateTurns
Definition Tool_Crowd.h:40
+
bool showPerfGraph
Definition Tool_Crowd.h:37
+
bool showCollisionSegments
Definition Tool_Crowd.h:28
+
bool optimizeTopo
Definition Tool_Crowd.h:42
+
float separationWeight
Definition Tool_Crowd.h:46
+
bool obstacleAvoidance
Definition Tool_Crowd.h:43
+
bool showOpt
Definition Tool_Crowd.h:31
+
Definition Sample.h:104
+
Definition Sample.h:85
+
Definition DetourCrowd.h:195
+
+
+ + + + + diff --git a/Sample__Debug_8cpp.html b/Tool__NavMeshPrune_8cpp.html similarity index 78% rename from Sample__Debug_8cpp.html rename to Tool__NavMeshPrune_8cpp.html index 007b26e1..699720c2 100644 --- a/Sample__Debug_8cpp.html +++ b/Tool__NavMeshPrune_8cpp.html @@ -5,7 +5,7 @@ -Recast Navigation: Sample_Debug.cpp File Reference +Recast Navigation: Tool_NavMeshPrune.cpp File Reference @@ -67,7 +67,7 @@ $(function() {
@@ -93,28 +93,22 @@ $(document).ready(function(){initNavTree('Sample__Debug_8cpp.html',''); initResi
-
Sample_Debug.cpp File Reference
+
Tool_NavMeshPrune.cpp File Reference
-
#include <math.h>
-#include <stdio.h>
-#include "Sample_Debug.h"
-#include "InputGeom.h"
-#include "Recast.h"
-#include "DetourNavMesh.h"
-#include "RecastDebugDraw.h"
+
#include "Tool_NavMeshPrune.h"
+#include "DetourCommon.h"
#include "DetourDebugDraw.h"
-#include "RecastDump.h"
-#include "imgui.h"
-#include "SDL.h"
-#include "SDL_opengl.h"
+#include "DetourNavMesh.h"
+#include "imguiHelpers.h"
+#include <imgui.h>
@@ -95,19 +95,21 @@ $(document).ready(function(){initNavTree('Sample__Debug_8h.html',''); initResiza
-
Sample_Debug.h File Reference
+
Tool_NavMeshPrune.h File Reference
-
#include "Sample.h"
+
#include "DetourAssert.h"
#include "DetourNavMesh.h"
-#include "Recast.h"
+#include "Sample.h"
-

Go to the source code of this file.

+

Go to the source code of this file.

- - + + + +

Classes

class  Sample_Debug
 Sample used for random debugging. More...
class  NavmeshFlags
 
class  NavMeshPruneTool
 Prune navmesh to only accessible locations from a point. More...
 
@@ -116,7 +118,7 @@ Classes
@@ -95,14 +95,14 @@ $(document).ready(function(){initNavTree('NavMeshTesterTool_8h.html',''); initRe
-
NavMeshTesterTool.h File Reference
+
Tool_NavMeshTester.h File Reference
-
#include "Sample.h"
-#include "DetourNavMesh.h"
+
#include "DetourNavMesh.h"
#include "DetourNavMeshQuery.h"
+#include "Sample.h"
-

Go to the source code of this file.

+

Go to the source code of this file.

@@ -115,7 +115,7 @@ Classes
@@ -98,10 +98,10 @@ $(document).ready(function(){initNavTree('NavMeshTesterTool_8h_source.html','');
-
NavMeshTesterTool.h
+
Tool_NavMeshTester.h
-Go to the documentation of this file.
1//
+Go to the documentation of this file.
1//
2// Copyright (c) 2009-2010 Mikko Mononen memon@inside.org
3//
4// This software is provided 'as-is', without any express or implied
@@ -119,136 +119,132 @@ $(document).ready(function(){initNavTree('NavMeshTesterTool_8h_source.html','');
16// 3. This notice may not be removed or altered from any source distribution.
17//
18
-
19#ifndef NAVMESHTESTERTOOL_H
-
20#define NAVMESHTESTERTOOL_H
-
21
-
22#include "Sample.h"
-
23#include "DetourNavMesh.h"
-
24#include "DetourNavMeshQuery.h"
-
25
-
- -
27{
-
28 Sample* m_sample;
-
29
-
30 dtNavMesh* m_navMesh;
-
31 dtNavMeshQuery* m_navQuery;
+
19#pragma once
+
20
+
21#include "DetourNavMesh.h"
+
22#include "DetourNavMeshQuery.h"
+
23#include "Sample.h"
+
24
+
+ +
26{
+
27 static constexpr int MAX_POLYS = 256;
+
28 static constexpr int MAX_SMOOTH = 2048;
+
29 static constexpr int MAX_RAND_POINTS = 64;
+
30
+
31 Sample* sample = nullptr;
32
-
33 dtQueryFilter m_filter;
-
34
-
35 dtStatus m_pathFindStatus;
-
36
-
37 enum ToolMode
-
38 {
-
39 TOOLMODE_PATHFIND_FOLLOW,
-
40 TOOLMODE_PATHFIND_STRAIGHT,
-
41 TOOLMODE_PATHFIND_SLICED,
-
42 TOOLMODE_RAYCAST,
-
43 TOOLMODE_DISTANCE_TO_WALL,
-
44 TOOLMODE_FIND_POLYS_IN_CIRCLE,
-
45 TOOLMODE_FIND_POLYS_IN_SHAPE,
-
46 TOOLMODE_FIND_LOCAL_NEIGHBOURHOOD
-
47 };
-
48
-
49 ToolMode m_toolMode;
+
33 dtQueryFilter filter;
+
34 dtStatus pathFindStatus = DT_FAILURE;
+
35
+
36 enum class ToolMode : uint8_t
+
37 {
+
38 PATHFIND_FOLLOW,
+
39 PATHFIND_STRAIGHT,
+
40 PATHFIND_SLICED,
+
41 RAYCAST,
+
42 DISTANCE_TO_WALL,
+
43 FIND_POLYS_IN_CIRCLE,
+
44 FIND_POLYS_IN_SHAPE,
+
45 FIND_LOCAL_NEIGHBORHOOD
+
46 };
+
47 ToolMode toolMode = ToolMode::PATHFIND_FOLLOW;
+
48
+
49 int straightPathOptions = 0;
50
-
51 int m_straightPathOptions;
-
52
-
53 static const int MAX_POLYS = 256;
-
54 static const int MAX_SMOOTH = 2048;
-
55
-
56 dtPolyRef m_startRef;
-
57 dtPolyRef m_endRef;
-
58 dtPolyRef m_polys[MAX_POLYS];
-
59 dtPolyRef m_parent[MAX_POLYS];
-
60 int m_npolys;
-
61 float m_straightPath[MAX_POLYS*3];
-
62 unsigned char m_straightPathFlags[MAX_POLYS];
-
63 dtPolyRef m_straightPathPolys[MAX_POLYS];
-
64 int m_nstraightPath;
-
65 float m_polyPickExt[3];
-
66 float m_smoothPath[MAX_SMOOTH*3];
-
67 int m_nsmoothPath;
-
68 float m_queryPoly[4*3];
+
51 dtPolyRef startRef = 0;
+
52 dtPolyRef endRef = 0;
+
53 dtPolyRef polys[MAX_POLYS];
+
54 dtPolyRef parent[MAX_POLYS];
+
55 int npolys = 0;
+
56 float straightPath[MAX_POLYS * 3];
+
57 unsigned char straightPathFlags[MAX_POLYS];
+
58 dtPolyRef straightPathPolys[MAX_POLYS];
+
59 int nstraightPath = 0;
+
60 float polyPickExt[3] = {2, 4, 2};
+
61
+
62 float smoothPath[MAX_SMOOTH * 3];
+
63 int nsmoothPath = 0;
+
64 float queryPoly[4 * 3];
+
65
+
66 float randPoints[MAX_RAND_POINTS * 3];
+
67 int nrandPoints = 0;
+
68 bool randPointsInCircle = false;
69
-
70 static const int MAX_RAND_POINTS = 64;
-
71 float m_randPoints[MAX_RAND_POINTS*3];
-
72 int m_nrandPoints;
-
73 bool m_randPointsInCircle;
-
74
-
75 float m_spos[3];
-
76 float m_epos[3];
-
77 float m_hitPos[3];
-
78 float m_hitNormal[3];
-
79 bool m_hitResult;
-
80 float m_distanceToWall;
-
81 float m_neighbourhoodRadius;
-
82 float m_randomRadius;
-
83 bool m_sposSet;
-
84 bool m_eposSet;
-
85
-
86 int m_pathIterNum;
-
87 dtPolyRef m_pathIterPolys[MAX_POLYS];
-
88 int m_pathIterPolyCount;
-
89 float m_prevIterPos[3], m_iterPos[3], m_steerPos[3], m_targetPos[3];
-
90
-
91 static const int MAX_STEER_POINTS = 10;
-
92 float m_steerPoints[MAX_STEER_POINTS*3];
-
93 int m_steerPointCount;
-
94
-
95public:
- -
97
-
98 virtual int type() { return TOOL_NAVMESH_TESTER; }
-
99 virtual void init(Sample* sample);
-
100 virtual void reset();
-
101 virtual void handleMenu();
-
102 virtual void handleClick(const float* s, const float* p, bool shift);
-
103 virtual void handleToggle();
-
104 virtual void handleStep();
-
105 virtual void handleUpdate(const float dt);
-
106 virtual void handleRender();
-
107 virtual void handleRenderOverlay(double* proj, double* model, int* view);
-
108
-
109 void recalc();
-
110 void drawAgent(const float* pos, float r, float h, float c, const unsigned int col);
-
111};
+
70 bool sposSet = false;
+
71 float spos[3];
+
72 bool eposSet = false;
+
73 float epos[3];
+
74
+
75 float hitPos[3];
+
76 float hitNormal[3];
+
77 bool hitResult = false;
+
78 float distanceToWall = 0;
+
79 float neighborhoodRadius = 2.5f;
+
80 float randomRadius = 5.0f;
+
81
+
82 int pathIterNum = 0;
+
83 dtPolyRef pathIterPolys[MAX_POLYS];
+
84 int pathIterPolyCount = 0;
+
85 float prevIterPos[3];
+
86 float iterPos[3];
+
87 float steerPos[3];
+
88 float targetPos[3];
+
89
+
90 static constexpr int MAX_STEER_POINTS = 10;
+
91 float steerPoints[MAX_STEER_POINTS * 3];
+
92 int steerPointCount = 0;
+
93
+
94public:
+ +
96
+ +
98 void init(Sample* newSample) override;
+
99 void reset() override;
+
100 void drawMenuUI() override;
+
101 void onClick(const float* s, const float* p, bool shift) override;
+
102 void onToggle() override;
+
103 void singleStep() override;
+
104 void update(const float dt) override;
+
105 void render() override;
+
106 void drawOverlayUI() override;
+
107
+
108 void recalc();
+
109 void drawAgent(const float* pos, float r, float h, float c, const unsigned int col) const;
+
110};
-
112
-
113#endif // NAVMESHTESTERTOOL_H
-
114
unsigned int dtStatus
Definition DetourStatus.h:22
+
static const unsigned int DT_FAILURE
Definition DetourStatus.h:25
-
@ TOOL_NAVMESH_TESTER
Definition Sample.h:33
-
Definition NavMeshTesterTool.h:27
-
virtual void reset()
Definition NavMeshTesterTool.cpp:622
-
virtual void handleUpdate(const float dt)
Definition NavMeshTesterTool.cpp:592
-
virtual int type()
Definition NavMeshTesterTool.h:98
-
virtual void handleToggle()
Definition NavMeshTesterTool.cpp:441
-
virtual void handleStep()
Definition NavMeshTesterTool.cpp:437
-
virtual void handleMenu()
Definition NavMeshTesterTool.cpp:226
-
virtual void init(Sample *sample)
Definition NavMeshTesterTool.cpp:204
-
void drawAgent(const float *pos, float r, float h, float c, const unsigned int col)
Definition NavMeshTesterTool.cpp:1353
-
virtual void handleRenderOverlay(double *proj, double *model, int *view)
Definition NavMeshTesterTool.cpp:1332
-
void recalc()
Definition NavMeshTesterTool.cpp:635
-
virtual void handleClick(const float *s, const float *p, bool shift)
Definition NavMeshTesterTool.cpp:422
-
virtual void handleRender()
Definition NavMeshTesterTool.cpp:996
-
NavMeshTesterTool()
Definition NavMeshTesterTool.cpp:171
-
Definition Sample.h:100
-
Provides the ability to perform pathfinding related queries against a navigation mesh.
Definition DetourNavMeshQuery.h:166
-
A navigation mesh based on tiles of convex polygons.
Definition DetourNavMesh.h:339
+
SampleToolType
Tool types.
Definition Sample.h:33
+ +
Definition Tool_NavMeshTester.h:26
+
void onClick(const float *s, const float *p, bool shift) override
Definition Tool_NavMeshTester.cpp:422
+
void update(const float dt) override
Definition Tool_NavMeshTester.cpp:602
+
void drawMenuUI() override
Definition Tool_NavMeshTester.cpp:222
+
void init(Sample *newSample) override
Definition Tool_NavMeshTester.cpp:202
+
void onToggle() override
Definition Tool_NavMeshTester.cpp:439
+
void reset() override
Definition Tool_NavMeshTester.cpp:642
+
SampleToolType type() override
Definition Tool_NavMeshTester.h:97
+
void render() override
Definition Tool_NavMeshTester.cpp:1064
+
void drawAgent(const float *pos, float r, float h, float c, const unsigned int col) const
Definition Tool_NavMeshTester.cpp:1483
+
void drawOverlayUI() override
Definition Tool_NavMeshTester.cpp:1467
+
void recalc()
Definition Tool_NavMeshTester.cpp:654
+
NavMeshTesterTool()
Definition Tool_NavMeshTester.cpp:196
+
void singleStep() override
Definition Tool_NavMeshTester.cpp:437
+
Definition Sample.h:116
Defines polygon filtering and traversal costs for navigation mesh query operations.
Definition DetourNavMeshQuery.h:36
unsigned int dtPolyRef
A handle to a polygon within a navigation mesh tile.
Definition DetourNavMesh.h:48
-
Definition Sample.h:76
+
Definition Sample.h:85

Classes

+ + + + + + +
+
Recast Navigation +
+
Navigation-mesh Toolset for Games
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
Tool_OffMeshConnection.cpp File Reference
+
+
+
#include "Tool_OffMeshConnection.h"
+#include "DetourDebugDraw.h"
+#include "InputGeom.h"
+#include "imguiHelpers.h"
+#include <imgui.h>
+
+
+ + + + + diff --git a/OffMeshConnectionTool_8h.html b/Tool__OffMeshConnection_8h.html similarity index 86% rename from OffMeshConnectionTool_8h.html rename to Tool__OffMeshConnection_8h.html index ef69b3c6..d69afc1a 100644 --- a/OffMeshConnectionTool_8h.html +++ b/Tool__OffMeshConnection_8h.html @@ -5,7 +5,7 @@ -Recast Navigation: OffMeshConnectionTool.h File Reference +Recast Navigation: Tool_OffMeshConnection.h File Reference @@ -67,7 +67,7 @@ $(function() {
@@ -95,16 +95,17 @@ $(document).ready(function(){initNavTree('OffMeshConnectionTool_8h.html',''); in
-
OffMeshConnectionTool.h File Reference
+
Tool_OffMeshConnection.h File Reference
#include "Sample.h"
-

Go to the source code of this file.

+

Go to the source code of this file.

+

Classes

class  OffMeshConnectionTool
 Tool to create off-mesh connections for InputGeom. More...
 
@@ -113,7 +114,7 @@ Classes
#include "ValueHistory.h"
-#include "imgui.h"
-#include <string.h>
-#include <stdio.h>
- - - - + + + +

Functions

void drawGraphBackground (const GraphParams *p)
 
void drawGraph (const GraphParams *p, const ValueHistory *graph, int idx, const char *label, const unsigned int col)
 
void drawGraphBackground (const GraphParams *params)
 
void drawGraph (const GraphParams *params, const ValueHistory *graph, int index, const char *label, const unsigned int color)
 

Function Documentation

- -

◆ drawGraph()

+ +

◆ drawGraph()

@@ -121,7 +118,7 @@ Functions void drawGraph ( const GraphParams *  - p, + params, @@ -133,7 +130,7 @@ Functions int  - idx, + index, @@ -145,7 +142,7 @@ Functions const unsigned int  - col  + color  @@ -157,8 +154,8 @@ Functions
- -

◆ drawGraphBackground()

+ +

◆ drawGraphBackground()

@@ -167,7 +164,7 @@ Functions void drawGraphBackground ( const GraphParams *  - p) + params) diff --git a/ValueHistory_8cpp.js b/ValueHistory_8cpp.js index 793d47ad..67324cd8 100644 --- a/ValueHistory_8cpp.js +++ b/ValueHistory_8cpp.js @@ -1,5 +1,5 @@ var ValueHistory_8cpp = [ - [ "drawGraph", "ValueHistory_8cpp.html#ac579b593d7d8316a79163fba0140aa92", null ], - [ "drawGraphBackground", "ValueHistory_8cpp.html#afffb45be2045eb5a3b2e0a21be12ff8a", null ] + [ "drawGraph", "ValueHistory_8cpp.html#ae3a823ecb8bed51d3b5fd5ab2ba0e087", null ], + [ "drawGraphBackground", "ValueHistory_8cpp.html#a9eee38a8da399138efdd9638189cb11b", null ] ]; \ No newline at end of file diff --git a/ValueHistory_8h.html b/ValueHistory_8h.html index 69afcbcf..fb020849 100644 --- a/ValueHistory_8h.html +++ b/ValueHistory_8h.html @@ -99,7 +99,9 @@ $(document).ready(function(){initNavTree('ValueHistory_8h.html',''); initResizab
ValueHistory.h File Reference
- +
#include <string>
+#include <vector>
+

Go to the source code of this file.

Functions - - + +

@@ -113,12 +115,12 @@ Classes

void drawGraphBackground (const GraphParams *p)
 
void drawGraph (const GraphParams *p, const ValueHistory *graph, int idx, const char *label, const unsigned int col)
 
void drawGraph (const GraphParams *params, const ValueHistory *graph, int index, const char *label, const unsigned int color)
 

Function Documentation

- -

◆ drawGraph()

+ +

◆ drawGraph()

@@ -127,7 +129,7 @@ Functions void drawGraph ( const GraphParams *  - p, + params, @@ -139,7 +141,7 @@ Functions int  - idx, + index, @@ -151,7 +153,7 @@ Functions const unsigned int  - col  + color  diff --git a/ValueHistory_8h.js b/ValueHistory_8h.js index 065d1cab..d6622ea2 100644 --- a/ValueHistory_8h.js +++ b/ValueHistory_8h.js @@ -2,6 +2,6 @@ var ValueHistory_8h = [ [ "ValueHistory", "classValueHistory.html", "classValueHistory" ], [ "GraphParams", "structGraphParams.html", "structGraphParams" ], - [ "drawGraph", "ValueHistory_8h.html#ac579b593d7d8316a79163fba0140aa92", null ], + [ "drawGraph", "ValueHistory_8h.html#ae3a823ecb8bed51d3b5fd5ab2ba0e087", null ], [ "drawGraphBackground", "ValueHistory_8h.html#afffb45be2045eb5a3b2e0a21be12ff8a", null ] ]; \ No newline at end of file diff --git a/ValueHistory_8h_source.html b/ValueHistory_8h_source.html index 548fda72..eba39e1b 100644 --- a/ValueHistory_8h_source.html +++ b/ValueHistory_8h_source.html @@ -101,89 +101,90 @@ $(document).ready(function(){initNavTree('ValueHistory_8h_source.html',''); init
ValueHistory.h
-Go to the documentation of this file.
1#ifndef VALUEHISTORY_H
-
2#define VALUEHISTORY_H
-
3
-
- -
5{
-
6 static const int MAX_HISTORY = 256;
-
7 float m_samples[MAX_HISTORY];
-
8 int m_hsamples;
-
9public:
- +Go to the documentation of this file.
1#pragma once
+
2
+
3#include <string>
+
4#include <vector>
+
5
+
+ +
7{
+
8 static constexpr int MAX_HISTORY = 256;
+
9 std::vector<float> samples{};
+
10 int nextSampleIndex = 0;
11
-
-
12 inline void addSample(const float val)
-
13 {
-
14 m_hsamples = (m_hsamples+MAX_HISTORY-1) % MAX_HISTORY;
-
15 m_samples[m_hsamples] = val;
-
16 }
-
-
17
-
-
18 inline int getSampleCount() const
-
19 {
-
20 return MAX_HISTORY;
-
21 }
-
-
22
-
-
23 inline float getSample(const int i) const
-
24 {
-
25 return m_samples[(m_hsamples+i) % MAX_HISTORY];
+
12public:
+
13 ValueHistory() { samples.reserve(MAX_HISTORY); }
+
14
+
+
15 void addSample(const float val)
+
16 {
+
17 if (samples.size() < MAX_HISTORY)
+
18 {
+
19 samples.push_back(val);
+
20 }
+
21 else
+
22 {
+
23 samples[nextSampleIndex] = val;
+
24 nextSampleIndex = (nextSampleIndex + 1) % MAX_HISTORY;
+
25 }
26 }
-
27
-
28 float getSampleMin() const;
-
29 float getSampleMax() const;
-
30 float getAverage() const;
-
31};
+
27
+
28 [[nodiscard]] int getSampleCount() const { return static_cast<int>(samples.size()); }
+
29
+
30 [[nodiscard]] float getSample(const int i) const { return samples[(nextSampleIndex + i) % MAX_HISTORY]; }
+
31
+
32 [[nodiscard]] float getSampleMin() const;
+
33 [[nodiscard]] float getSampleMax() const;
+
34 [[nodiscard]] float getAverage() const;
+
35};
-
32
-
- -
34{
-
35 void setRect(int ix, int iy, int iw, int ih, int ipad);
-
36 void setValueRange(float ivmin, float ivmax, int indiv, const char* iunits);
-
37
-
38 int x, y, w, h, pad;
-
39 float vmin, vmax;
-
40 int ndiv;
-
41 char units[16];
-
42};
-
-
43
-
44void drawGraphBackground(const GraphParams* p);
-
45
-
46void drawGraph(const GraphParams* p, const ValueHistory* graph,
-
47 int idx, const char* label, const unsigned int col);
-
48
-
49
-
50#endif // VALUEHISTORY_H
+
36
+
+ +
38{
+
39 void setRect(int ix, int iy, int iw, int ih, int ipad);
+
40 void setValueRange(float minValue, float maxValue, int numDivisions, const std::string& units);
+
41
+
42 int x;
+
43 int y;
+
44 int width;
+
45 int height;
+ +
47
+
48 float rangeMin;
+
49 float rangeMax;
+
51
-
void drawGraph(const GraphParams *p, const ValueHistory *graph, int idx, const char *label, const unsigned int col)
Definition ValueHistory.cpp:82
-
void drawGraphBackground(const GraphParams *p)
Definition ValueHistory.cpp:60
-
Definition ValueHistory.h:5
-
int getSampleCount() const
Definition ValueHistory.h:18
-
ValueHistory()
Definition ValueHistory.cpp:10
-
void addSample(const float val)
Definition ValueHistory.h:12
-
float getSampleMin() const
Definition ValueHistory.cpp:17
-
float getSampleMax() const
Definition ValueHistory.cpp:26
-
float getSample(const int i) const
Definition ValueHistory.h:23
-
float getAverage() const
Definition ValueHistory.cpp:35
-
Definition ValueHistory.h:34
-
void setRect(int ix, int iy, int iw, int ih, int ipad)
Definition ValueHistory.cpp:43
-
int pad
Definition ValueHistory.h:38
-
float vmin
Definition ValueHistory.h:39
-
int ndiv
Definition ValueHistory.h:40
-
void setValueRange(float ivmin, float ivmax, int indiv, const char *iunits)
Definition ValueHistory.cpp:52
-
int x
Definition ValueHistory.h:38
-
float vmax
Definition ValueHistory.h:39
-
int h
Definition ValueHistory.h:38
-
char units[16]
Definition ValueHistory.h:41
-
int y
Definition ValueHistory.h:38
-
int w
Definition ValueHistory.h:38
+
52 std::string units;
+
53};
+
+
54
+
55void drawGraphBackground(const GraphParams* p);
+
56void drawGraph(const GraphParams* params, const ValueHistory* graph, int index, const char* label, const unsigned int color);
+
void drawGraph(const GraphParams *params, const ValueHistory *graph, int index, const char *label, const unsigned int color)
Definition ValueHistory.cpp:96
+
void drawGraphBackground(const GraphParams *p)
Definition ValueHistory.cpp:54
+
Definition ValueHistory.h:7
+
int getSampleCount() const
Definition ValueHistory.h:28
+
ValueHistory()
Definition ValueHistory.h:13
+
void addSample(const float val)
Definition ValueHistory.h:15
+
float getSampleMin() const
Definition ValueHistory.cpp:7
+
float getSampleMax() const
Definition ValueHistory.cpp:17
+
float getSample(const int i) const
Definition ValueHistory.h:30
+
float getAverage() const
Definition ValueHistory.cpp:27
+
Definition ValueHistory.h:38
+
int padding
Definition ValueHistory.h:46
+
float rangeMax
Definition ValueHistory.h:49
+
void setValueRange(float minValue, float maxValue, int numDivisions, const std::string &units)
Definition ValueHistory.cpp:46
+
float rangeMin
Definition ValueHistory.h:48
+
int rangeDivisions
Definition ValueHistory.h:50
+
std::string units
Definition ValueHistory.h:52
+
int height
Definition ValueHistory.h:45
+
void setRect(int ix, int iy, int iw, int ih, int ipad)
Definition ValueHistory.cpp:37
+
int width
Definition ValueHistory.h:44
+
int x
Definition ValueHistory.h:42
+
int y
Definition ValueHistory.h:43
diff --git a/annotated.html b/annotated.html index 6ba75bc0..6790db79 100644 --- a/annotated.html +++ b/annotated.html @@ -97,16 +97,16 @@ $(document).ready(function(){initNavTree('annotated.html',''); initResizable();
Here are the classes, structs, unions and interfaces with brief descriptions:
- - +
[detail level 12]
 CBoundsItem
+ - + - + @@ -172,71 +172,64 @@ $(document).ready(function(){initNavTree('annotated.html',''); initResizable(); - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
 CAppState
 CBuildContextRecast build context
 CBuildSettings
 CBVItem
 CConvexVolume
 CConvexVolumeTool
 CConvexVolumeToolTool to create convex volumes for InputGeom
 CCrowdTool
 CCrowdToolParams
 CCrowdToolState
 CCrowdToolStateTool to create crowds
 CDebugDrawGLOpenGL debug draw implementation
 CDirtyEntry
 CdtBVNodeBounding volume node
 CFileIOStdio file implementation
 CGLCheckerTexture
 CGraphParams
 CGuiState
 CimguiGfxCmd
 CimguiGfxLine
 CimguiGfxRect
 CimguiGfxText
 CInputGeom
 CLinearAllocator
 CMeshProcess
 CNavmeshFlags
 CNavMeshPruneTool
 CNavMeshSetHeader
 CNavMeshTesterTool
 CNavMeshTileBuildContext
 CNavMeshTileHeader
 CNavMeshTileTool
 COffMeshConnectionTool
 CRasterizationContext
 CrcChunkyTriMesh
 CrcChunkyTriMeshNode
 CrcCompactCellProvides information on the content of a cell column in a compact heightfield
 CrcCompactHeightfieldA compact, static heightfield representing unobstructed space
 CrcCompactSpanRepresents a span of unobstructed space within a compact heightfield
 CrcConfigSpecifies a configuration to use when performing Recast builds
 CrcContextProvides an interface for optional logging and performance tracking of the Recast build process
 CrcContourRepresents a simple, non-overlapping contour in field space
 CrcContourHole
 CrcContourRegion
 CrcContourSetRepresents a group of related contours
 CrcEdge
 CrcHeightfieldA dynamic heightfield representing obstructed space
 CrcHeightfieldLayerRepresents a heightfield layer within a layer set
 CrcHeightfieldLayerSetRepresents a set of heightfield layers
 CrcHeightPatch
 CrcLayerRegion
 CrcLayerSweepSpan
 CrcMeshLoaderObj
 CrcNewTagAn implementation of operator new usable for placement new
 CrcPermVector
 CrcPolyMeshRepresents a polygon mesh suitable for use in building a navigation mesh
 CrcPolyMeshDetailContains triangle meshes that represent detailed height data associated with the polygons in its associated polygon mesh object
 CrcPotentialDiagonal
 CrcRegion
 CrcScopedDeleteA simple helper class used to delete an array when it goes out of scope
 CrcScopedTimerA helper to first start a timer and then stop it when this helper goes out of scope
 CrcSpanRepresents a span in a heightfield
 CrcSpanPoolA memory pool used for quick allocation of spans within a heightfield
 CrcSweepSpan
 CrcTempVector
 CrcVectorBaseVariable-sized storage type
 CSample
 CSample_DebugSample used for random debugging
 CSample_SoloMesh
 CSample_TempObstacles
 CSample_TileMesh
 CSampleDebugDraw
 CSampleItem
 CSampleTool
 CSampleToolState
 CTempObstacleCreateTool
 CTempObstacleHilightTool
 CTestCase
 CTileCacheData
 CTileCacheSetHeader
 CTileCacheTileHeader
 CValueHistory
 CIndexedBounds
 CInputGeom
 CLinearAllocator
 CMesh
 CMeshProcess
 CNavmeshFlags
 CNavMeshPruneToolPrune navmesh to only accessible locations from a point
 CNavMeshTesterTool
 CNavMeshTileBuildContext
 CNavMeshTileTool
 COffMeshConnectionToolTool to create off-mesh connections for InputGeom
 CPartitionedMeshA spatially-partitioned mesh (k/d tree), where each node contains at max trisPerChunk triangles
 CRasterizationContext
 CrcCompactCellProvides information on the content of a cell column in a compact heightfield
 CrcCompactHeightfieldA compact, static heightfield representing unobstructed space
 CrcCompactSpanRepresents a span of unobstructed space within a compact heightfield
 CrcConfigSpecifies a configuration to use when performing Recast builds
 CrcContextProvides an interface for optional logging and performance tracking of the Recast build process
 CrcContourRepresents a simple, non-overlapping contour in field space
 CrcContourHole
 CrcContourRegion
 CrcContourSetRepresents a group of related contours
 CrcEdge
 CrcHeightfieldA dynamic heightfield representing obstructed space
 CrcHeightfieldLayerRepresents a heightfield layer within a layer set
 CrcHeightfieldLayerSetRepresents a set of heightfield layers
 CrcHeightPatch
 CrcLayerRegion
 CrcLayerSweepSpan
 CrcNewTagAn implementation of operator new usable for placement new
 CrcPermVector
 CrcPolyMeshRepresents a polygon mesh suitable for use in building a navigation mesh
 CrcPolyMeshDetailContains triangle meshes that represent detailed height data associated with the polygons in its associated polygon mesh object
 CrcPotentialDiagonal
 CrcRegion
 CrcScopedDeleteA simple helper class used to delete an array when it goes out of scope
 CrcScopedTimerA helper to first start a timer and then stop it when this helper goes out of scope
 CrcSpanRepresents a span in a heightfield
 CrcSpanPoolA memory pool used for quick allocation of spans within a heightfield
 CrcSweepSpan
 CrcTempVector
 CrcVectorBaseVariable-sized storage type
 CSample
 CSample_SoloMesh
 CSample_TempObstacles
 CSample_TileMesh
 CSampleDebugDraw
 CSampleItem
 CSampleTool
 CSampleToolState
 CTempObstacleCreateTool
 CTempObstacleHighlightTool
 CTestCase
 CTileCacheData
 CTileCacheSetHeader
 CTileCacheTileHeader
 CValueHistory
diff --git a/annotated_dup.js b/annotated_dup.js index 2e25555f..817d92bd 100644 --- a/annotated_dup.js +++ b/annotated_dup.js @@ -1,6 +1,6 @@ var annotated_dup = [ - [ "BoundsItem", "structBoundsItem.html", "structBoundsItem" ], + [ "AppState", "structAppState.html", "structAppState" ], [ "BuildContext", "classBuildContext.html", "classBuildContext" ], [ "BuildSettings", "structBuildSettings.html", "structBuildSettings" ], [ "BVItem", "structBVItem.html", "structBVItem" ], @@ -74,25 +74,19 @@ var annotated_dup = [ "FileIO", "classFileIO.html", "classFileIO" ], [ "GLCheckerTexture", "classGLCheckerTexture.html", "classGLCheckerTexture" ], [ "GraphParams", "structGraphParams.html", "structGraphParams" ], - [ "GuiState", "structGuiState.html", "structGuiState" ], - [ "imguiGfxCmd", "structimguiGfxCmd.html", "structimguiGfxCmd" ], - [ "imguiGfxLine", "structimguiGfxLine.html", "structimguiGfxLine" ], - [ "imguiGfxRect", "structimguiGfxRect.html", "structimguiGfxRect" ], - [ "imguiGfxText", "structimguiGfxText.html", "structimguiGfxText" ], + [ "IndexedBounds", "structIndexedBounds.html", "structIndexedBounds" ], [ "InputGeom", "classInputGeom.html", "classInputGeom" ], [ "LinearAllocator", "structLinearAllocator.html", "structLinearAllocator" ], + [ "Mesh", "structMesh.html", "structMesh" ], [ "MeshProcess", "structMeshProcess.html", "structMeshProcess" ], [ "NavmeshFlags", "classNavmeshFlags.html", "classNavmeshFlags" ], [ "NavMeshPruneTool", "classNavMeshPruneTool.html", "classNavMeshPruneTool" ], - [ "NavMeshSetHeader", "structNavMeshSetHeader.html", "structNavMeshSetHeader" ], [ "NavMeshTesterTool", "classNavMeshTesterTool.html", "classNavMeshTesterTool" ], [ "NavMeshTileBuildContext", "structNavMeshTileBuildContext.html", "structNavMeshTileBuildContext" ], - [ "NavMeshTileHeader", "structNavMeshTileHeader.html", "structNavMeshTileHeader" ], [ "NavMeshTileTool", "classNavMeshTileTool.html", "classNavMeshTileTool" ], [ "OffMeshConnectionTool", "classOffMeshConnectionTool.html", "classOffMeshConnectionTool" ], + [ "PartitionedMesh", "structPartitionedMesh.html", "structPartitionedMesh" ], [ "RasterizationContext", "structRasterizationContext.html", "structRasterizationContext" ], - [ "rcChunkyTriMesh", "structrcChunkyTriMesh.html", "structrcChunkyTriMesh" ], - [ "rcChunkyTriMeshNode", "structrcChunkyTriMeshNode.html", "structrcChunkyTriMeshNode" ], [ "rcCompactCell", "structrcCompactCell.html", "structrcCompactCell" ], [ "rcCompactHeightfield", "structrcCompactHeightfield.html", "structrcCompactHeightfield" ], [ "rcCompactSpan", "structrcCompactSpan.html", "structrcCompactSpan" ], @@ -109,7 +103,6 @@ var annotated_dup = [ "rcHeightPatch", "structrcHeightPatch.html", "structrcHeightPatch" ], [ "rcLayerRegion", "structrcLayerRegion.html", "structrcLayerRegion" ], [ "rcLayerSweepSpan", "structrcLayerSweepSpan.html", "structrcLayerSweepSpan" ], - [ "rcMeshLoaderObj", "classrcMeshLoaderObj.html", "classrcMeshLoaderObj" ], [ "rcNewTag", "structrcNewTag.html", null ], [ "rcPermVector", "classrcPermVector.html", "classrcPermVector" ], [ "rcPolyMesh", "structrcPolyMesh.html", "structrcPolyMesh" ], @@ -124,7 +117,6 @@ var annotated_dup = [ "rcTempVector", "classrcTempVector.html", "classrcTempVector" ], [ "rcVectorBase", "classrcVectorBase.html", "classrcVectorBase" ], [ "Sample", "classSample.html", "classSample" ], - [ "Sample_Debug", "classSample__Debug.html", "classSample__Debug" ], [ "Sample_SoloMesh", "classSample__SoloMesh.html", "classSample__SoloMesh" ], [ "Sample_TempObstacles", "classSample__TempObstacles.html", "classSample__TempObstacles" ], [ "Sample_TileMesh", "classSample__TileMesh.html", "classSample__TileMesh" ], @@ -133,7 +125,7 @@ var annotated_dup = [ "SampleTool", "structSampleTool.html", "structSampleTool" ], [ "SampleToolState", "structSampleToolState.html", "structSampleToolState" ], [ "TempObstacleCreateTool", "classTempObstacleCreateTool.html", "classTempObstacleCreateTool" ], - [ "TempObstacleHilightTool", "classTempObstacleHilightTool.html", "classTempObstacleHilightTool" ], + [ "TempObstacleHighlightTool", "classTempObstacleHighlightTool.html", "classTempObstacleHighlightTool" ], [ "TestCase", "classTestCase.html", "classTestCase" ], [ "TileCacheData", "structTileCacheData.html", "structTileCacheData" ], [ "TileCacheSetHeader", "structTileCacheSetHeader.html", "structTileCacheSetHeader" ], diff --git a/classBuildContext-members.html b/classBuildContext-members.html index 31b1d03b..3d36b0fd 100644 --- a/classBuildContext-members.html +++ b/classBuildContext-members.html @@ -100,18 +100,18 @@ $(document).ready(function(){initNavTree('classBuildContext.html',''); initResiz

This is the complete list of members for BuildContext, including all inherited members.

- - - - - - + + + + + + - + diff --git a/classBuildContext.html b/classBuildContext.html index e6b10fb6..ffed5fb7 100644 --- a/classBuildContext.html +++ b/classBuildContext.html @@ -95,8 +95,9 @@ $(document).ready(function(){initNavTree('classBuildContext.html',''); initResiz
-
BuildContext Class Reference
+
BuildContext Class Referencefinal
@@ -124,9 +125,9 @@ Public Member Functions
- - - + + + @@ -160,25 +161,24 @@ Public Member Functions
BuildContext()BuildContext
doGetAccumulatedTime(const rcTimerLabel label) constBuildContextprotectedvirtual
doLog(const rcLogCategory category, const char *msg, const int len)BuildContextprotectedvirtual
doResetLog()BuildContextprotectedvirtual
doResetTimers()BuildContextprotectedvirtual
doStartTimer(const rcTimerLabel label)BuildContextprotectedvirtual
doStopTimer(const rcTimerLabel label)BuildContextprotectedvirtual
doGetAccumulatedTime(rcTimerLabel label) const overrideBuildContextprotectedvirtual
doLog(rcLogCategory category, const char *msg, const int len) overrideBuildContextprotectedvirtual
doResetLog() overrideBuildContextprotectedvirtual
doResetTimers() overrideBuildContextprotectedvirtual
doStartTimer(rcTimerLabel label) overrideBuildContextprotectedvirtual
doStopTimer(rcTimerLabel label) overrideBuildContextprotectedvirtual
dumpLog(const char *format,...)BuildContext
enableLog(bool state)rcContextinline
enableTimer(bool state)rcContextinline
getAccumulatedTime(const rcTimerLabel label) constrcContextinline
getLogCount() constBuildContext
getLogText(const int i) constBuildContext
getLogText(int i) constBuildContext
log(const rcLogCategory category, const char *format,...)rcContext
m_logEnabledrcContextprotected
m_timerEnabledrcContextprotected
int getLogCount () const
 Returns number of log messages.
 
const char * getLogText (const int i) const
 Returns log message text.
 
const char * getLogText (int i) const
 Returns log message text.
 
- Public Member Functions inherited from rcContext
 rcContext (bool state=true)
 Constructor.
- - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + +

Protected Member Functions

virtual void doResetLog ()
 Virtual functions for custom implementations.
 
virtual void doLog (const rcLogCategory category, const char *msg, const int len)
 Logs a message.
 
virtual void doResetTimers ()
 Clears all timers. (Resets all to unused.)
 
virtual void doStartTimer (const rcTimerLabel label)
 Starts the specified performance timer.
 
virtual void doStopTimer (const rcTimerLabel label)
 Stops the specified performance timer.
 
virtual int doGetAccumulatedTime (const rcTimerLabel label) const
 Returns the total accumulated time of the specified performance timer.
 
void doResetLog () override
 Clears all log entries.
 
void doLog (rcLogCategory category, const char *msg, const int len) override
 Logs a message.
 
void doResetTimers () override
 Clears all timers. (Resets all to unused.)
 
void doStartTimer (rcTimerLabel label) override
 Starts the specified performance timer.
 
void doStopTimer (rcTimerLabel label) override
 Stops the specified performance timer.
 
int doGetAccumulatedTime (rcTimerLabel label) const override
 Returns the total accumulated time of the specified performance timer.
 
@@ -211,8 +211,8 @@ Additional Inherited Members

Member Function Documentation

- -

◆ doGetAccumulatedTime()

+ +

◆ doGetAccumulatedTime()

@@ -223,14 +223,14 @@ Additional Inherited Members
- +

Additional Inherited Members

int BuildContext::doGetAccumulatedTime (const rcTimerLabel rcTimerLabel  label) const
-protectedvirtual +overrideprotectedvirtual
@@ -248,8 +248,8 @@ Additional Inherited Members
- -

◆ doLog()

+ +

◆ doLog()

@@ -260,7 +260,7 @@ Additional Inherited Members void BuildContext::doLog ( - const rcLogCategory  + rcLogCategory  category, @@ -283,7 +283,7 @@ Additional Inherited Members -protectedvirtual +overrideprotectedvirtual
@@ -302,8 +302,8 @@ Additional Inherited Members
- -

◆ doResetLog()

+ +

◆ doResetLog()

@@ -320,19 +320,19 @@ Additional Inherited Members -protectedvirtual +overrideprotectedvirtual
-

Virtual functions for custom implementations.

+

Clears all log entries.

Reimplemented from rcContext.

- -

◆ doResetTimers()

+ +

◆ doResetTimers()

@@ -349,7 +349,7 @@ Additional Inherited Members -protectedvirtual +overrideprotectedvirtual
@@ -360,8 +360,8 @@ Additional Inherited Members
- -

◆ doStartTimer()

+ +

◆ doStartTimer()

@@ -372,14 +372,14 @@ Additional Inherited Members void BuildContext::doStartTimer ( - const rcTimerLabel  + rcTimerLabel  label) -protectedvirtual +overrideprotectedvirtual
@@ -396,8 +396,8 @@ Additional Inherited Members
- -

◆ doStopTimer()

+ +

◆ doStopTimer()

@@ -408,14 +408,14 @@ Additional Inherited Members void BuildContext::doStopTimer ( - const rcTimerLabel  + rcTimerLabel  label) -protectedvirtual +overrideprotectedvirtual
@@ -481,8 +481,8 @@ Additional Inherited Members
- -

◆ getLogText()

+ +

◆ getLogText()

@@ -490,7 +490,7 @@ Additional Inherited Members const char * BuildContext::getLogText ( - const int  + int  i) const diff --git a/classBuildContext.js b/classBuildContext.js index 027bc2b5..91f1c10e 100644 --- a/classBuildContext.js +++ b/classBuildContext.js @@ -1,13 +1,13 @@ var classBuildContext = [ [ "BuildContext", "classBuildContext.html#a3103b5538cfde15052e20019018fb3de", null ], - [ "doGetAccumulatedTime", "classBuildContext.html#afe967c44fb17381c0269d10dc3ca29e2", null ], - [ "doLog", "classBuildContext.html#abede9aa172801c0823a679f2431ea932", null ], - [ "doResetLog", "classBuildContext.html#a509a0b0bb977dde5bf7a37d949a1e5f9", null ], - [ "doResetTimers", "classBuildContext.html#a8b823f519f70e837cade2c4c0ef9f12e", null ], - [ "doStartTimer", "classBuildContext.html#ace76debfb627862f622539622f118a55", null ], - [ "doStopTimer", "classBuildContext.html#a4be9c92146f0b433a330a965ffa37d3c", null ], + [ "doGetAccumulatedTime", "classBuildContext.html#adbeab3805bca4fe27f42f04874b007a9", null ], + [ "doLog", "classBuildContext.html#aac93235d9a987dd702172270910dda66", null ], + [ "doResetLog", "classBuildContext.html#ad6c02487f6a5795ed2d5351f7ae84572", null ], + [ "doResetTimers", "classBuildContext.html#ad2ef30593451022119f7aab34e0814af", null ], + [ "doStartTimer", "classBuildContext.html#a69b445bd78177cd139fe4e1d142af1ca", null ], + [ "doStopTimer", "classBuildContext.html#aeb39b1dae27dca7fce8885d019bd4c28", null ], [ "dumpLog", "classBuildContext.html#aeaaab27f3952ade9fbb1e5ac85c4bf8b", null ], [ "getLogCount", "classBuildContext.html#a94c60dd0d7398cddc2898a3b7b0ec220", null ], - [ "getLogText", "classBuildContext.html#af63760315f9dcdd54dad7bc82bdc9e9f", null ] + [ "getLogText", "classBuildContext.html#ac7189956782d7749ac7932940b587479", null ] ]; \ No newline at end of file diff --git a/classConvexVolumeTool-members.html b/classConvexVolumeTool-members.html index 81cbe3be..64e98efd 100644 --- a/classConvexVolumeTool-members.html +++ b/classConvexVolumeTool-members.html @@ -99,18 +99,17 @@ $(document).ready(function(){initNavTree('classConvexVolumeTool.html',''); initR

This is the complete list of members for ConvexVolumeTool, including all inherited members.

- - - - - - - - - - - - + + + + + + + + + + +
ConvexVolumeTool()ConvexVolumeTool
handleClick(const float *s, const float *p, bool shift)ConvexVolumeToolvirtual
handleMenu()ConvexVolumeToolvirtual
handleRender()ConvexVolumeToolvirtual
handleRenderOverlay(double *proj, double *model, int *view)ConvexVolumeToolvirtual
handleStep()ConvexVolumeToolvirtual
handleToggle()ConvexVolumeToolvirtual
handleUpdate(const float dt)ConvexVolumeToolvirtual
init(Sample *sample)ConvexVolumeToolvirtual
reset()ConvexVolumeToolvirtual
type()ConvexVolumeToolinlinevirtual
~SampleTool()SampleToolvirtual
drawMenuUI() overrideConvexVolumeToolvirtual
drawOverlayUI() overrideConvexVolumeToolvirtual
init(Sample *sample) overrideConvexVolumeToolinlinevirtual
onClick(const float *s, const float *p, bool shift) overrideConvexVolumeToolvirtual
onToggle() overrideConvexVolumeToolinlinevirtual
render() overrideConvexVolumeToolvirtual
reset() overrideConvexVolumeToolinlinevirtual
singleStep() overrideConvexVolumeToolinlinevirtual
type() overrideConvexVolumeToolinlinevirtual
update(const float) overrideConvexVolumeToolinlinevirtual
~SampleTool()=defaultSampleToolvirtual
diff --git a/classConvexVolumeTool.html b/classConvexVolumeTool.html index 45891cf2..fa495235 100644 --- a/classConvexVolumeTool.html +++ b/classConvexVolumeTool.html @@ -100,7 +100,10 @@ $(document).ready(function(){initNavTree('classConvexVolumeTool.html',''); initR
-

#include <ConvexVolumeTool.h>

+

Tool to create convex volumes for InputGeom. + More...

+ +

#include <Tool_ConvexVolume.h>

Inheritance diagram for ConvexVolumeTool:
@@ -113,53 +116,35 @@ Inheritance diagram for ConvexVolumeTool:
- - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + - - + +

Public Member Functions

 ConvexVolumeTool ()
 
virtual int type ()
 
virtual void init (Sample *sample)
 
virtual void reset ()
 
virtual void handleMenu ()
 
virtual void handleClick (const float *s, const float *p, bool shift)
 
virtual void handleToggle ()
 
virtual void handleStep ()
 
virtual void handleUpdate (const float dt)
 
virtual void handleRender ()
 
virtual void handleRenderOverlay (double *proj, double *model, int *view)
 
SampleToolType type () override
 
void init (Sample *sample) override
 
void reset () override
 
void singleStep () override
 
void update (const float) override
 
void render () override
 
void onClick (const float *s, const float *p, bool shift) override
 
void onToggle () override
 
void drawMenuUI () override
 
void drawOverlayUI () override
 
- Public Member Functions inherited from SampleTool
virtual ~SampleTool ()
 
virtual ~SampleTool ()=default
 
-

Constructor & Destructor Documentation

- -

◆ ConvexVolumeTool()

- -
-
- - - - - - - -
ConvexVolumeTool::ConvexVolumeTool ()
-
- -
-
-

Member Function Documentation

- -

◆ handleClick()

+

Description

+

Tool to create convex volumes for InputGeom.

+

Member Function Documentation

+ +

◆ drawMenuUI()

@@ -168,7 +153,89 @@ Public Member Functions - + + + + + +
void ConvexVolumeTool::handleClick void ConvexVolumeTool::drawMenuUI ()
+ + +overridevirtual + + +
+ +

Implements SampleTool.

+ +
+
+ +

◆ drawOverlayUI()

+ +
+
+ + + + + +
+ + + + + + + +
void ConvexVolumeTool::drawOverlayUI ()
+
+overridevirtual
+
+ +

Implements SampleTool.

+ +
+
+ +

◆ init()

+ +
+
+ + + + + +
+ + + + + + + + +
void ConvexVolumeTool::init (Samplesample)
+
+inlineoverridevirtual
+
+ +

Implements SampleTool.

+ +
+
+ +

◆ onClick()

+ +
+
+ + + +overridevirtual
+ + + @@ -193,17 +260,17 @@ Public Member Functions
void ConvexVolumeTool::onClick ( const float *  s,
-virtual
-

Implements SampleTool.

+

Implements SampleTool.

- -

◆ handleMenu()

+ +

◆ onToggle()

@@ -212,7 +279,7 @@ Public Member Functions - + @@ -220,17 +287,17 @@ Public Member Functions
void ConvexVolumeTool::handleMenu void ConvexVolumeTool::onToggle ( )
-virtual +inlineoverridevirtual
-

Implements SampleTool.

+

Implements SampleTool.

- -

◆ handleRender()

+ +

◆ render()

@@ -239,7 +306,7 @@ Public Member Functions - + @@ -247,171 +314,17 @@ Public Member Functions
void ConvexVolumeTool::handleRender void ConvexVolumeTool::render ( )
-virtual +overridevirtual
-

Implements SampleTool.

+

Implements SampleTool.

- -

◆ handleRenderOverlay()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - -
void ConvexVolumeTool::handleRenderOverlay (double * proj,
double * model,
int * view 
)
-
-virtual
-
- -

Implements SampleTool.

- -
-
- -

◆ handleStep()

- -
-
- - - - - -
- - - - - - - -
void ConvexVolumeTool::handleStep ()
-
-virtual
-
- -

Implements SampleTool.

- -
-
- -

◆ handleToggle()

- -
-
- - - - - -
- - - - - - - -
void ConvexVolumeTool::handleToggle ()
-
-virtual
-
- -

Implements SampleTool.

- -
-
- -

◆ handleUpdate()

- -
-
- - - - - -
- - - - - - - - -
void ConvexVolumeTool::handleUpdate (const float dt)
-
-virtual
-
- -

Implements SampleTool.

- -
-
- -

◆ init()

- -
-
- - - - - -
- - - - - - - - -
void ConvexVolumeTool::init (Samplesample)
-
-virtual
-
- -

Implements SampleTool.

- -
-
- -

◆ reset()

+ +

◆ reset()

@@ -428,7 +341,7 @@ Public Member Functions -virtual +inlineoverridevirtual
@@ -437,8 +350,8 @@ Public Member Functions
- -

◆ type()

+ +

◆ singleStep()

@@ -447,7 +360,7 @@ Public Member Functions - + @@ -455,18 +368,73 @@ Public Member Functions
virtual int ConvexVolumeTool::type void ConvexVolumeTool::singleStep ( )
-inlinevirtual +inlineoverridevirtual
-

Implements SampleTool.

+

Implements SampleTool.

+ +
+
+ +

◆ type()

+ +
+
+ + + + + +
+ + + + + + + +
SampleToolType ConvexVolumeTool::type ()
+
+inlineoverridevirtual
+
+ +

Implements SampleTool.

+ +
+
+ +

◆ update()

+ +
+
+ + + + + +
+ + + + + + + + +
void ConvexVolumeTool::update (const float )
+
+inlineoverridevirtual
+
+ +

Implements SampleTool.


The documentation for this class was generated from the following files:
diff --git a/classConvexVolumeTool.js b/classConvexVolumeTool.js index dd058909..8d7458b8 100644 --- a/classConvexVolumeTool.js +++ b/classConvexVolumeTool.js @@ -1,14 +1,13 @@ var classConvexVolumeTool = [ - [ "ConvexVolumeTool", "classConvexVolumeTool.html#a45d29f1ecd1ea648fee54ea1aa10b6c3", null ], - [ "handleClick", "classConvexVolumeTool.html#ab08815465ecb5f424ec136663221cbda", null ], - [ "handleMenu", "classConvexVolumeTool.html#ad59fb729fe96406bc4254083189d01b0", null ], - [ "handleRender", "classConvexVolumeTool.html#a83f337f3a9a96ad6464c9179ad663a11", null ], - [ "handleRenderOverlay", "classConvexVolumeTool.html#af1ebf43ef0309a5f058ae8094dd83312", null ], - [ "handleStep", "classConvexVolumeTool.html#a5b0e8ab26df0ee701a69b291691cfcbf", null ], - [ "handleToggle", "classConvexVolumeTool.html#af1e59f31ba0dd44fdf18bb3abccc81c2", null ], - [ "handleUpdate", "classConvexVolumeTool.html#ab3a94dcc4cab914af5ae1d0b8446c951", null ], - [ "init", "classConvexVolumeTool.html#a9787b22592b80a6494450c60ccd50165", null ], - [ "reset", "classConvexVolumeTool.html#a1d76b864c30767fc81ade0dbaa44e6af", null ], - [ "type", "classConvexVolumeTool.html#abb88ba3138d3e187b32e94dcf9874aeb", null ] + [ "drawMenuUI", "classConvexVolumeTool.html#a9655191c26b9f36f9835e84e4fad2693", null ], + [ "drawOverlayUI", "classConvexVolumeTool.html#acc48b7174a6adef0a21c6a472c3327de", null ], + [ "init", "classConvexVolumeTool.html#a3cb7d4394fa457b02658d6e65460b8ae", null ], + [ "onClick", "classConvexVolumeTool.html#a122e3da886a3697cff2a62885ea10ad0", null ], + [ "onToggle", "classConvexVolumeTool.html#abe5d9cde4da739343139216679efd890", null ], + [ "render", "classConvexVolumeTool.html#afcd2874d888000e0f014861478c9fec1", null ], + [ "reset", "classConvexVolumeTool.html#a57ad6d0148a0e8fb4d1b8555e657dfc1", null ], + [ "singleStep", "classConvexVolumeTool.html#af4da1fee7f12a5c9ef02d97823c1f67f", null ], + [ "type", "classConvexVolumeTool.html#ae5da887d6e2fa761f8355c65cd68295a", null ], + [ "update", "classConvexVolumeTool.html#a3358ff5e05f7dc3eec116bf453ad2ad6", null ] ]; \ No newline at end of file diff --git a/classCrowdTool-members.html b/classCrowdTool-members.html index 2525fb93..16a645a0 100644 --- a/classCrowdTool-members.html +++ b/classCrowdTool-members.html @@ -99,18 +99,17 @@ $(document).ready(function(){initNavTree('classCrowdTool.html',''); initResizabl

This is the complete list of members for CrowdTool, including all inherited members.

- - - - - - - - - - - - + + + + + + + + + + +
CrowdTool()CrowdTool
handleClick(const float *s, const float *p, bool shift)CrowdToolvirtual
handleMenu()CrowdToolvirtual
handleRender()CrowdToolvirtual
handleRenderOverlay(double *proj, double *model, int *view)CrowdToolvirtual
handleStep()CrowdToolvirtual
handleToggle()CrowdToolvirtual
handleUpdate(const float dt)CrowdToolvirtual
init(Sample *sample)CrowdToolvirtual
reset()CrowdToolvirtual
type()CrowdToolinlinevirtual
~SampleTool()SampleToolvirtual
drawMenuUI() overrideCrowdToolvirtual
drawOverlayUI() overrideCrowdToolvirtual
init(Sample *sample) overrideCrowdToolvirtual
onClick(const float *s, const float *p, bool shift) overrideCrowdToolvirtual
onToggle() overrideCrowdToolvirtual
render() overrideCrowdToolvirtual
reset() overrideCrowdToolvirtual
singleStep() overrideCrowdToolvirtual
type() overrideCrowdToolinlinevirtual
update(float dt) overrideCrowdToolvirtual
~SampleTool()=defaultSampleToolvirtual
diff --git a/classCrowdTool.html b/classCrowdTool.html index 765dd717..beb5669d 100644 --- a/classCrowdTool.html +++ b/classCrowdTool.html @@ -100,7 +100,7 @@ $(document).ready(function(){initNavTree('classCrowdTool.html',''); initResizabl
-

#include <CrowdTool.h>

+

#include <Tool_Crowd.h>

Inheritance diagram for CrowdTool:
@@ -113,53 +113,33 @@ Inheritance diagram for CrowdTool:
- - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + - - + +

Public Member Functions

 CrowdTool ()
 
virtual int type ()
 
virtual void init (Sample *sample)
 
virtual void reset ()
 
virtual void handleMenu ()
 
virtual void handleClick (const float *s, const float *p, bool shift)
 
virtual void handleToggle ()
 
virtual void handleStep ()
 
virtual void handleUpdate (const float dt)
 
virtual void handleRender ()
 
virtual void handleRenderOverlay (double *proj, double *model, int *view)
 
SampleToolType type () override
 
void init (Sample *sample) override
 
void reset () override
 
void drawMenuUI () override
 
void onClick (const float *s, const float *p, bool shift) override
 
void onToggle () override
 
void singleStep () override
 
void update (float dt) override
 
void render () override
 
void drawOverlayUI () override
 
- Public Member Functions inherited from SampleTool
virtual ~SampleTool ()
 
virtual ~SampleTool ()=default
 
-

Constructor & Destructor Documentation

- -

◆ CrowdTool()

- -
-
- - - - - - - -
CrowdTool::CrowdTool ()
-
- -
-

Member Function Documentation

- -

◆ handleClick()

+ +

◆ drawMenuUI()

@@ -168,7 +148,89 @@ Public Member Functions - + + + + + +
void CrowdTool::handleClick void CrowdTool::drawMenuUI ()
+ + +overridevirtual + + +
+ +

Implements SampleTool.

+ +
+
+ +

◆ drawOverlayUI()

+ +
+
+ + + + + +
+ + + + + + + +
void CrowdTool::drawOverlayUI ()
+
+overridevirtual
+
+ +

Implements SampleTool.

+ +
+
+ +

◆ init()

+ +
+
+ + + + + +
+ + + + + + + + +
void CrowdTool::init (Samplesample)
+
+overridevirtual
+
+ +

Implements SampleTool.

+ +
+
+ +

◆ onClick()

+ +
+
+ + + +overridevirtual
+ + + @@ -193,17 +255,17 @@ Public Member Functions
void CrowdTool::onClick ( const float *  s,
-virtual
-

Implements SampleTool.

+

Implements SampleTool.

- -

◆ handleMenu()

+ +

◆ onToggle()

@@ -212,7 +274,7 @@ Public Member Functions - + @@ -220,17 +282,17 @@ Public Member Functions
void CrowdTool::handleMenu void CrowdTool::onToggle ( )
-virtual +overridevirtual
-

Implements SampleTool.

+

Implements SampleTool.

- -

◆ handleRender()

+ +

◆ render()

@@ -239,7 +301,7 @@ Public Member Functions - + @@ -247,171 +309,17 @@ Public Member Functions
void CrowdTool::handleRender void CrowdTool::render ( )
-virtual +overridevirtual
-

Implements SampleTool.

+

Implements SampleTool.

- -

◆ handleRenderOverlay()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - -
void CrowdTool::handleRenderOverlay (double * proj,
double * model,
int * view 
)
-
-virtual
-
- -

Implements SampleTool.

- -
-
- -

◆ handleStep()

- -
-
- - - - - -
- - - - - - - -
void CrowdTool::handleStep ()
-
-virtual
-
- -

Implements SampleTool.

- -
-
- -

◆ handleToggle()

- -
-
- - - - - -
- - - - - - - -
void CrowdTool::handleToggle ()
-
-virtual
-
- -

Implements SampleTool.

- -
-
- -

◆ handleUpdate()

- -
-
- - - - - -
- - - - - - - - -
void CrowdTool::handleUpdate (const float dt)
-
-virtual
-
- -

Implements SampleTool.

- -
-
- -

◆ init()

- -
-
- - - - - -
- - - - - - - - -
void CrowdTool::init (Samplesample)
-
-virtual
-
- -

Implements SampleTool.

- -
-
- -

◆ reset()

+ +

◆ reset()

@@ -428,7 +336,7 @@ Public Member Functions -virtual +overridevirtual
@@ -437,8 +345,8 @@ Public Member Functions
- -

◆ type()

+ +

◆ singleStep()

@@ -447,7 +355,7 @@ Public Member Functions - + @@ -455,18 +363,73 @@ Public Member Functions
virtual int CrowdTool::type void CrowdTool::singleStep ( )
-inlinevirtual +overridevirtual
-

Implements SampleTool.

+

Implements SampleTool.

+ +
+
+ +

◆ type()

+ +
+
+ + + + + +
+ + + + + + + +
SampleToolType CrowdTool::type ()
+
+inlineoverridevirtual
+
+ +

Implements SampleTool.

+ +
+
+ +

◆ update()

+ +
+
+ + + + + +
+ + + + + + + + +
void CrowdTool::update (float dt)
+
+overridevirtual
+
+ +

Implements SampleTool.


The documentation for this class was generated from the following files:
diff --git a/classCrowdTool.js b/classCrowdTool.js index 0b6b3cf2..b7a15845 100644 --- a/classCrowdTool.js +++ b/classCrowdTool.js @@ -1,14 +1,13 @@ var classCrowdTool = [ - [ "CrowdTool", "classCrowdTool.html#aa66d04ddef79672215f8702a2b063f3c", null ], - [ "handleClick", "classCrowdTool.html#a8b1890ee57fab07f458d8370a86a6daa", null ], - [ "handleMenu", "classCrowdTool.html#a10481889d96be986ffbba99e4f4d751f", null ], - [ "handleRender", "classCrowdTool.html#a298f481f68d5e8a0cb183c276d182d44", null ], - [ "handleRenderOverlay", "classCrowdTool.html#a00641ff12ce93e817d07f9cfda7d500b", null ], - [ "handleStep", "classCrowdTool.html#aff96223c09183019e6d97ec67e6ad60d", null ], - [ "handleToggle", "classCrowdTool.html#ac2427807187d8c2469d021a714f99266", null ], - [ "handleUpdate", "classCrowdTool.html#a8d815cab99740e219ef4ef2d1172936a", null ], - [ "init", "classCrowdTool.html#ab6c04d1bc27ac8ce00124e3f8936e7f4", null ], - [ "reset", "classCrowdTool.html#ad997d15d14cf4815d57f843186faeba7", null ], - [ "type", "classCrowdTool.html#a5b7f620a8f1f319990286c12a4ce2e2d", null ] + [ "drawMenuUI", "classCrowdTool.html#adfcbabf368b390d28d69c31ea424076a", null ], + [ "drawOverlayUI", "classCrowdTool.html#ad416e06e653f8c2bdeaa882314715fb9", null ], + [ "init", "classCrowdTool.html#ab811de76e9b23d728b263339ed3dfc21", null ], + [ "onClick", "classCrowdTool.html#afd1dfc4b2d07c0b880468ba3fdee3b91", null ], + [ "onToggle", "classCrowdTool.html#a619091983dd164e8be152a62215cbc09", null ], + [ "render", "classCrowdTool.html#a4f8d751417244a6e5cd680d956a7791e", null ], + [ "reset", "classCrowdTool.html#ac9d5433c8bafae965383f96173fcdc8a", null ], + [ "singleStep", "classCrowdTool.html#a74da16acb478f8d38eae30b0e6194e18", null ], + [ "type", "classCrowdTool.html#aad030289e0e40d34da172fb8dcc63ce9", null ], + [ "update", "classCrowdTool.html#a7f3a2b0ba71ac6930c3440ab03160e44", null ] ]; \ No newline at end of file diff --git a/classCrowdToolState-members.html b/classCrowdToolState-members.html index 3d0e28d2..d40e9578 100644 --- a/classCrowdToolState-members.html +++ b/classCrowdToolState-members.html @@ -101,22 +101,26 @@ $(document).ready(function(){initNavTree('classCrowdToolState.html',''); initRes + + - - - - - - - - - - - + + + + + + + + + + + + + - - - + + +
addAgent(const float *pos)CrowdToolState
CrowdToolState()CrowdToolState
CrowdToolState(const CrowdToolState &)=deleteCrowdToolState
CrowdToolState(const CrowdToolState &&)=deleteCrowdToolState
getToolParams()CrowdToolStateinline
handleRender()CrowdToolStatevirtual
handleRenderOverlay(double *proj, double *model, int *view)CrowdToolStatevirtual
handleUpdate(const float dt)CrowdToolStatevirtual
hilightAgent(const int idx)CrowdToolState
hitTestAgents(const float *s, const float *p)CrowdToolState
init(class Sample *sample)CrowdToolStatevirtual
isRunning() constCrowdToolStateinline
removeAgent(const int idx)CrowdToolState
reset()CrowdToolStatevirtual
setMoveTarget(const float *p, bool adjust)CrowdToolState
setRunning(const bool s)CrowdToolStateinline
highlightAgent(int idx)CrowdToolState
hitTestAgents(const float *s, const float *p)CrowdToolState
init(Sample *newSample) overrideCrowdToolStatevirtual
isRunning() constCrowdToolStateinline
operator=(const CrowdToolState &)=deleteCrowdToolState
operator=(const CrowdToolState &&)=deleteCrowdToolState
removeAgent(int idx)CrowdToolState
render() overrideCrowdToolStatevirtual
renderOverlay() overrideCrowdToolStatevirtual
reset() overrideCrowdToolStatevirtual
setMoveTarget(const float *p, bool adjust)CrowdToolState
setRunning(const bool s)CrowdToolStateinline
update(float dt) overrideCrowdToolStatevirtual
updateAgentParams()CrowdToolState
updateTick(const float dt)CrowdToolState
~CrowdToolState()CrowdToolStatevirtual
~SampleToolState()SampleToolStatevirtual
updateTick(float dt)CrowdToolState
~CrowdToolState() overrideCrowdToolState
~SampleToolState()=defaultSampleToolStatevirtual
diff --git a/classCrowdToolState.html b/classCrowdToolState.html index 64a82830..abf497f0 100644 --- a/classCrowdToolState.html +++ b/classCrowdToolState.html @@ -101,7 +101,10 @@ $(document).ready(function(){initNavTree('classCrowdToolState.html',''); initRes
-

#include <CrowdTool.h>

+

Tool to create crowds. + More...

+ +

#include <Tool_Crowd.h>

Inheritance diagram for CrowdToolState:
@@ -116,45 +119,55 @@ Inheritance diagram for CrowdToolState:
Public Member Functions  CrowdToolState ()   -virtual ~CrowdToolState () -  -virtual void init (class Sample *sample) -  -virtual void reset () -  -virtual void handleRender () -  -virtual void handleRenderOverlay (double *proj, double *model, int *view) -  -virtual void handleUpdate (const float dt) -  + CrowdToolState (const CrowdToolState &)=delete +  + CrowdToolState (const CrowdToolState &&)=delete +  +CrowdToolStateoperator= (const CrowdToolState &)=delete +  +CrowdToolStateoperator= (const CrowdToolState &&)=delete +  + ~CrowdToolState () override +  +void init (Sample *newSample) override +  +void reset () override +  +void render () override +  +void renderOverlay () override +  +void update (float dt) override +  bool isRunning () const   void setRunning (const bool s)   void addAgent (const float *pos)   -void removeAgent (const int idx) -  -void hilightAgent (const int idx) -  +void removeAgent (int idx) +  +void highlightAgent (int idx) +  void updateAgentParams ()   int hitTestAgents (const float *s, const float *p)   void setMoveTarget (const float *p, bool adjust)   -void updateTick (const float dt) -  +void updateTick (float dt) +  CrowdToolParamsgetToolParams ()   - Public Member Functions inherited from SampleToolState -virtual ~SampleToolState () -  +virtual ~SampleToolState ()=default +  -

Constructor & Destructor Documentation

+

Description

+

Tool to create crowds.

+

Constructor & Destructor Documentation

-

◆ CrowdToolState()

+

◆ CrowdToolState() [1/3]

@@ -170,8 +183,60 @@ Public Member Functions
- -

◆ ~CrowdToolState()

+ +

◆ CrowdToolState() [2/3]

+ +
+
+ + + + + +
+ + + + + + + + +
CrowdToolState::CrowdToolState (const CrowdToolState)
+
+delete
+
+ +
+
+ +

◆ CrowdToolState() [3/3]

+ +
+
+ + + + + +
+ + + + + + + + +
CrowdToolState::CrowdToolState (const CrowdToolState && )
+
+delete
+
+ +
+
+ +

◆ ~CrowdToolState()

@@ -188,7 +253,7 @@ Public Member Functions -virtual +override
@@ -239,115 +304,16 @@ Public Member Functions
- -

◆ handleRender()

- -
-
- - - - - -
- - - - - - - -
void CrowdToolState::handleRender ()
-
-virtual
-
- -

Implements SampleToolState.

- -
-
- -

◆ handleRenderOverlay()

- -
-
- - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - -
void CrowdToolState::handleRenderOverlay (double * proj,
double * model,
int * view 
)
-
-virtual
-
- -

Implements SampleToolState.

- -
-
- -

◆ handleUpdate()

- -
-
- - - - - -
- - - - - - - - -
void CrowdToolState::handleUpdate (const float dt)
-
-virtual
-
- -

Implements SampleToolState.

- -
-
- -

◆ hilightAgent()

+ +

◆ highlightAgent()

- + - + @@ -384,8 +350,8 @@ Public Member Functions - -

◆ init()

+ +

◆ init()

@@ -396,19 +362,19 @@ Public Member Functions
- - + +
void CrowdToolState::hilightAgent void CrowdToolState::highlightAgent (const int int  idx)
void CrowdToolState::init (class Samplesample)SamplenewSample)
-virtual +overridevirtual
-

Implements SampleToolState.

+

Implements SampleToolState.

@@ -437,8 +403,60 @@ Public Member Functions
- -

◆ removeAgent()

+ +

◆ operator=() [1/2]

+ +
+
+ + + + + +
+ + + + + + + + +
CrowdToolState & CrowdToolState::operator= (const CrowdToolState && )
+
+delete
+
+ +
+
+ +

◆ operator=() [2/2]

+ +
+
+ + + + + +
+ + + + + + + + +
CrowdToolState & CrowdToolState::operator= (const CrowdToolState)
+
+delete
+
+ +
+
+ +

◆ removeAgent()

@@ -446,7 +464,7 @@ Public Member Functions void CrowdToolState::removeAgent ( - const int  + int  idx) @@ -455,8 +473,62 @@ Public Member Functions
- -

◆ reset()

+ +

◆ render()

+ +
+
+ + + + + +
+ + + + + + + +
void CrowdToolState::render ()
+
+overridevirtual
+
+ +

Implements SampleToolState.

+ +
+
+ +

◆ renderOverlay()

+ +
+
+ + + + + +
+ + + + + + + +
void CrowdToolState::renderOverlay ()
+
+overridevirtual
+
+ +

Implements SampleToolState.

+ +
+
+ +

◆ reset()

@@ -473,7 +545,7 @@ Public Member Functions -virtual +overridevirtual
@@ -534,6 +606,34 @@ Public Member Functions
+
+
+ +

◆ update()

+ +
+
+ + + + + +
+ + + + + + + + +
void CrowdToolState::update (float dt)
+
+overridevirtual
+
+ +

Implements SampleToolState.

+
@@ -553,8 +653,8 @@ Public Member Functions
- -

◆ updateTick()

+ +

◆ updateTick()

@@ -562,7 +662,7 @@ Public Member Functions void CrowdToolState::updateTick ( - const float  + float  dt) @@ -572,8 +672,8 @@ Public Member Functions

The documentation for this class was generated from the following files:
diff --git a/classCrowdToolState.js b/classCrowdToolState.js index 4da576a9..9ccaa329 100644 --- a/classCrowdToolState.js +++ b/classCrowdToolState.js @@ -1,20 +1,24 @@ var classCrowdToolState = [ [ "CrowdToolState", "classCrowdToolState.html#a27c76b496c852259d7f13cba5d3486a2", null ], - [ "~CrowdToolState", "classCrowdToolState.html#a565655ca9441a3df105c266743937f8b", null ], + [ "CrowdToolState", "classCrowdToolState.html#ad01a2f3b0274ff5e5471196322d7de46", null ], + [ "CrowdToolState", "classCrowdToolState.html#a57e851c665c00018833983d911264eb2", null ], + [ "~CrowdToolState", "classCrowdToolState.html#a90183e27dbc6d177e055a47cb7199fb9", null ], [ "addAgent", "classCrowdToolState.html#aa9104be644522ca092091108506ca29c", null ], [ "getToolParams", "classCrowdToolState.html#a248935d7933d330dd13f1ee4e9c6d953", null ], - [ "handleRender", "classCrowdToolState.html#a127ea871607dd8ca52c254100be1e0af", null ], - [ "handleRenderOverlay", "classCrowdToolState.html#aaaf12376476f0e109150ce7b0e618357", null ], - [ "handleUpdate", "classCrowdToolState.html#a5533329be79b7cc61a18dcc5dfe11ecd", null ], - [ "hilightAgent", "classCrowdToolState.html#abd1ba6578e4b0bbc48eabbafaaaab2bc", null ], + [ "highlightAgent", "classCrowdToolState.html#a9b9fee7d6c08bf6d7b98d5dafaaef4c3", null ], [ "hitTestAgents", "classCrowdToolState.html#a35659ce49a4932cefbb925ea6153c825", null ], - [ "init", "classCrowdToolState.html#a009cf74974dde6147a7f21b0901ad4c4", null ], + [ "init", "classCrowdToolState.html#a869d2a944cc0252ee712faf2b45a95c4", null ], [ "isRunning", "classCrowdToolState.html#ae79c25d7281fbe91325cf7395bc6e6ee", null ], - [ "removeAgent", "classCrowdToolState.html#a17350c7e2780825c7e0d1ee8d72efc51", null ], - [ "reset", "classCrowdToolState.html#a759f52b7630a3799e6c616ab28b9e2df", null ], + [ "operator=", "classCrowdToolState.html#a26a60f12ca9646a8d642e48c07aea36f", null ], + [ "operator=", "classCrowdToolState.html#a26fe40542852ca11d63cfd0e45ddd042", null ], + [ "removeAgent", "classCrowdToolState.html#a85b3a5488e36ac92e7db0d81582a9f72", null ], + [ "render", "classCrowdToolState.html#a298ffb6a031ea838b40c35d7da2bda5b", null ], + [ "renderOverlay", "classCrowdToolState.html#adb7791d585d40e074c24982d7e07003e", null ], + [ "reset", "classCrowdToolState.html#a3fa9f43e8075073145db91ca31b8aa9c", null ], [ "setMoveTarget", "classCrowdToolState.html#a07c2b6234747c5a0e412ee65d3be038a", null ], [ "setRunning", "classCrowdToolState.html#a5ec55b2d7b4eae5639fdf77534e7db93", null ], + [ "update", "classCrowdToolState.html#a9b9dc30b65f4c62ca5b9b2e4be74dc8a", null ], [ "updateAgentParams", "classCrowdToolState.html#a6054eb8441ec36876cbd2354b9c9957a", null ], - [ "updateTick", "classCrowdToolState.html#a57ac46cd3a33bd91e3e2280d03fb30d7", null ] + [ "updateTick", "classCrowdToolState.html#a74f95a1c0e3c8c0880a18ec9f39bedcf", null ] ]; \ No newline at end of file diff --git a/classDebugDrawGL-members.html b/classDebugDrawGL-members.html index a2795923..546d9f08 100644 --- a/classDebugDrawGL-members.html +++ b/classDebugDrawGL-members.html @@ -100,14 +100,14 @@ $(document).ready(function(){initNavTree('classDebugDrawGL.html',''); initResiza

This is the complete list of members for DebugDrawGL, including all inherited members.

- - - - - - - - + + + + + + + +
areaToCol(unsigned int area)duDebugDrawvirtual
begin(duDebugDrawPrimitives prim, float size=1.0f)DebugDrawGLvirtual
depthMask(bool state)DebugDrawGLvirtual
end()DebugDrawGLvirtual
texture(bool state)DebugDrawGLvirtual
vertex(const float *pos, unsigned int color)DebugDrawGLvirtual
vertex(const float x, const float y, const float z, unsigned int color)DebugDrawGLvirtual
vertex(const float *pos, unsigned int color, const float *uv)DebugDrawGLvirtual
vertex(const float x, const float y, const float z, unsigned int color, const float u, const float v)DebugDrawGLvirtual
begin(duDebugDrawPrimitives prim, float size=1.0f) overrideDebugDrawGLvirtual
depthMask(bool state) overrideDebugDrawGLvirtual
end() overrideDebugDrawGLvirtual
texture(bool state) overrideDebugDrawGLvirtual
vertex(const float *pos, unsigned int color) overrideDebugDrawGLvirtual
vertex(const float *pos, unsigned int color, const float *uv) overrideDebugDrawGLvirtual
vertex(float x, float y, float z, unsigned int color) overrideDebugDrawGLvirtual
vertex(float x, float y, float z, unsigned int color, float u, float v) overrideDebugDrawGLvirtual
~duDebugDraw()=0duDebugDrawpure virtual
diff --git a/classDebugDrawGL.html b/classDebugDrawGL.html index 46dee778..48d263bd 100644 --- a/classDebugDrawGL.html +++ b/classDebugDrawGL.html @@ -117,28 +117,28 @@ Inheritance diagram for DebugDrawGL:
- - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + @@ -149,8 +149,8 @@ Public Member Functions

Description

OpenGL debug draw implementation.

Member Function Documentation

- -

◆ begin()

+ +

◆ begin()

@@ -178,7 +178,7 @@ Public Member Functions

Public Member Functions

virtual void depthMask (bool state)
 
virtual void texture (bool state)
 
virtual void begin (duDebugDrawPrimitives prim, float size=1.0f)
 Begin drawing primitives.
 
virtual void vertex (const float *pos, unsigned int color)
 Submit a vertex.
 
virtual void vertex (const float x, const float y, const float z, unsigned int color)
 Submit a vertex.
 
virtual void vertex (const float *pos, unsigned int color, const float *uv)
 Submit a vertex.
 
virtual void vertex (const float x, const float y, const float z, unsigned int color, const float u, const float v)
 Submit a vertex.
 
virtual void end ()
 End drawing primitives.
 
void depthMask (bool state) override
 
void texture (bool state) override
 
void begin (duDebugDrawPrimitives prim, float size=1.0f) override
 Begin drawing primitives.
 
void vertex (const float *pos, unsigned int color) override
 Submit a vertex.
 
void vertex (const float *pos, unsigned int color, const float *uv) override
 Submit a vertex.
 
void vertex (float x, float y, float z, unsigned int color) override
 Submit a vertex.
 
void vertex (float x, float y, float z, unsigned int color, float u, float v) override
 Submit a vertex.
 
void end () override
 End drawing primitives.
 
- Public Member Functions inherited from duDebugDraw
virtual ~duDebugDraw ()=0
 
-virtual +overridevirtual
@@ -196,8 +196,8 @@ Public Member Functions
- -

◆ depthMask()

+ +

◆ depthMask()

@@ -215,7 +215,7 @@ Public Member Functions -virtual +overridevirtual
@@ -224,8 +224,8 @@ Public Member Functions
- -

◆ end()

+ +

◆ end()

@@ -242,7 +242,7 @@ Public Member Functions -virtual +overridevirtual
@@ -253,8 +253,8 @@ Public Member Functions
- -

◆ texture()

+ +

◆ texture()

@@ -272,7 +272,7 @@ Public Member Functions -virtual +overridevirtual
@@ -281,8 +281,8 @@ Public Member Functions
- -

◆ vertex() [1/4]

+ +

◆ vertex() [1/4]

@@ -310,7 +310,7 @@ Public Member Functions -virtual +overridevirtual
@@ -328,8 +328,8 @@ Public Member Functions
- -

◆ vertex() [2/4]

+ +

◆ vertex() [2/4]

@@ -363,7 +363,7 @@ Public Member Functions -virtual +overridevirtual
@@ -382,8 +382,8 @@ Public Member Functions
- -

◆ vertex() [3/4]

+ +

◆ vertex() [3/4]

@@ -394,19 +394,19 @@ Public Member Functions void DebugDrawGL::vertex ( - const float  + float  x, - const float  + float  y, - const float  + float  z, @@ -423,7 +423,7 @@ Public Member Functions -virtual +overridevirtual
@@ -441,8 +441,8 @@ Public Member Functions
- -

◆ vertex() [4/4]

+ +

◆ vertex() [4/4]

@@ -453,19 +453,19 @@ Public Member Functions void DebugDrawGL::vertex ( - const float  + float  x, - const float  + float  y, - const float  + float  z, @@ -477,13 +477,13 @@ Public Member Functions - const float  + float  u, - const float  + float  v  @@ -494,7 +494,7 @@ Public Member Functions -virtual +overridevirtual
diff --git a/classDebugDrawGL.js b/classDebugDrawGL.js index ab565a5b..7b20bab2 100644 --- a/classDebugDrawGL.js +++ b/classDebugDrawGL.js @@ -1,11 +1,11 @@ var classDebugDrawGL = [ - [ "begin", "classDebugDrawGL.html#ad7f56b0a3ab7c29b6a58e4cf72c78568", null ], - [ "depthMask", "classDebugDrawGL.html#ae57953a7117cdacd04416403531cb9aa", null ], - [ "end", "classDebugDrawGL.html#a28de738a8a277da6c534e46850ffc1e8", null ], - [ "texture", "classDebugDrawGL.html#ad51f99f7707ed09bc19623cd31e9881c", null ], - [ "vertex", "classDebugDrawGL.html#a5c44e91d886860827e4131cea9b03181", null ], - [ "vertex", "classDebugDrawGL.html#a25db0b2def0f18e5f3c87ce50847ed4f", null ], - [ "vertex", "classDebugDrawGL.html#a231dbb0906f35a3a3e782ddc04bd2365", null ], - [ "vertex", "classDebugDrawGL.html#ae2ea264e176f08445b983ae6e3701639", null ] + [ "begin", "classDebugDrawGL.html#a186cb6c61c221ae4e080a05f35e420cd", null ], + [ "depthMask", "classDebugDrawGL.html#af242c37216276b46edac94128f1957c3", null ], + [ "end", "classDebugDrawGL.html#a19027ca5c7e3bdca0681d1909c8cce6e", null ], + [ "texture", "classDebugDrawGL.html#a5eee2792d00351bbcc5dfc0191c0d164", null ], + [ "vertex", "classDebugDrawGL.html#af2311bdc15ff25ec511b1f4cc2c3bd73", null ], + [ "vertex", "classDebugDrawGL.html#af6011b376dbb79467523b8582e1b9a05", null ], + [ "vertex", "classDebugDrawGL.html#ab2e2d7d8adf90d4e429dd5cbd436e342", null ], + [ "vertex", "classDebugDrawGL.html#a2a4b6c4d798bf4e31bec6aee763b0d62", null ] ]; \ No newline at end of file diff --git a/classFileIO-members.html b/classFileIO-members.html index 6c6d1b82..37a337d6 100644 --- a/classFileIO-members.html +++ b/classFileIO-members.html @@ -99,15 +99,21 @@ $(document).ready(function(){initNavTree('classFileIO.html',''); initResizable()

This is the complete list of members for FileIO, including all inherited members.

- - - - - - - + + + + + + + + + + + + + - +
FileIO()FileIO
isReading() constFileIOvirtual
isWriting() constFileIOvirtual
openForRead(const char *path)FileIO
openForWrite(const char *path)FileIO
read(void *ptr, const size_t size)FileIOvirtual
write(const void *ptr, const size_t size)FileIOvirtual
FileIO()=defaultFileIO
FileIO(const FileIO &)=deleteFileIO
FileIO(FileIO &&)=defaultFileIO
getFileSize() constFileIO
isReading() const overrideFileIOvirtual
isWriting() const overrideFileIOvirtual
openForRead(const char *path)FileIO
openForWrite(const char *path)FileIO
operator=(const FileIO &)=deleteFileIO
operator=(FileIO &&)=defaultFileIO
read(void *ptr, size_t size) overrideFileIOvirtual
scanDirectory(const std::string &path, const std::string &ext, std::vector< std::string > &fileList)FileIOstatic
write(const void *ptr, size_t size) overrideFileIOvirtual
~duFileIO()duFileIOvirtual
~FileIO()FileIOvirtual
~FileIO() overrideFileIO
diff --git a/classFileIO.html b/classFileIO.html index 7a4403e0..9f93e749 100644 --- a/classFileIO.html +++ b/classFileIO.html @@ -95,8 +95,9 @@ $(document).ready(function(){initNavTree('classFileIO.html',''); initResizable()
Public Member Functions | +Static Public Member Functions | List of all members
-
FileIO Class Reference
+
FileIO Class Referencefinal
@@ -116,34 +117,52 @@ Inheritance diagram for FileIO:
- - - - + + + + + + + + + + + + - - - - - - - - + + + + + + + + + + +

Public Member Functions

 FileIO ()
 
virtual ~FileIO ()
 
 FileIO ()=default
 
 FileIO (const FileIO &)=delete
 
FileIOoperator= (const FileIO &)=delete
 
 FileIO (FileIO &&)=default
 
FileIOoperator= (FileIO &&)=default
 
 ~FileIO () override
 
bool openForWrite (const char *path)
 
bool openForRead (const char *path)
 
virtual bool isWriting () const
 
virtual bool isReading () const
 
virtual bool write (const void *ptr, const size_t size)
 
virtual bool read (void *ptr, const size_t size)
 
bool isWriting () const override
 
bool isReading () const override
 
bool write (const void *ptr, size_t size) override
 
bool read (void *ptr, size_t size) override
 
size_t getFileSize () const
 
- Public Member Functions inherited from duFileIO
virtual ~duFileIO ()
 
+ + +

+Static Public Member Functions

static void scanDirectory (const std::string &path, const std::string &ext, std::vector< std::string > &fileList)
 

Description

stdio file implementation.

Constructor & Destructor Documentation

- -

◆ FileIO()

+ +

◆ FileIO() [1/3]

+ + + + + +
@@ -152,12 +171,69 @@ Public Member Functions
FileIO::FileIO
+
+default
- -

◆ ~FileIO()

+ +

◆ FileIO() [2/3]

+ +
+
+ + + + + +
+ + + + + + + + +
FileIO::FileIO (const FileIO)
+
+delete
+
+ +
+
+ +

◆ FileIO() [3/3]

+ +
+
+ + + + + +
+ + + + + + + + +
FileIO::FileIO (FileIO && )
+
+default
+
+ +
+
+ +

◆ ~FileIO()

@@ -174,7 +250,7 @@ Public Member Functions -virtual +override
@@ -182,8 +258,25 @@ Public Member Functions

Member Function Documentation

- -

◆ isReading()

+ +

◆ getFileSize()

+ +
+
+ + + + + + + +
size_t FileIO::getFileSize () const
+
+ +
+
+ +

◆ isReading()

@@ -200,7 +293,7 @@ Public Member Functions -virtual +overridevirtual
@@ -209,8 +302,8 @@ Public Member Functions
- -

◆ isWriting()

+ +

◆ isWriting()

@@ -227,7 +320,7 @@ Public Member Functions -virtual +overridevirtual
@@ -272,8 +365,60 @@ Public Member Functions
- -

◆ read()

+ +

◆ operator=() [1/2]

+ +
+
+ + + + + +
+ + + + + + + + +
FileIO & FileIO::operator= (const FileIO)
+
+delete
+
+ +
+
+ +

◆ operator=() [2/2]

+ +
+
+ + + + + +
+ + + + + + + + +
FileIO & FileIO::operator= (FileIO && )
+
+default
+
+ +
+
+ +

◆ read()

@@ -290,7 +435,7 @@ Public Member Functions - const size_t  + size_t  size  @@ -301,7 +446,7 @@ Public Member Functions -virtual +overridevirtual
@@ -310,8 +455,50 @@ Public Member Functions
- -

◆ write()

+ +

◆ scanDirectory()

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
void FileIO::scanDirectory (const std::string & path,
const std::string & ext,
std::vector< std::string > & fileList 
)
+
+static
+
+ +
+
+ +

◆ write()

@@ -328,7 +515,7 @@ Public Member Functions - const size_t  + size_t  size  @@ -339,7 +526,7 @@ Public Member Functions -virtual +overridevirtual
diff --git a/classFileIO.js b/classFileIO.js index 2f9cd2a4..bc2524d6 100644 --- a/classFileIO.js +++ b/classFileIO.js @@ -1,11 +1,17 @@ var classFileIO = [ - [ "FileIO", "classFileIO.html#a8b0d602c3461181e12c05f655dea5018", null ], - [ "~FileIO", "classFileIO.html#adc3caa8f1e5d76274d8ffb8b5c17288b", null ], - [ "isReading", "classFileIO.html#acd4cbb0b54a4d450b53294ce24866346", null ], - [ "isWriting", "classFileIO.html#a02526e6d91e126ce105adaf614ab863c", null ], + [ "FileIO", "classFileIO.html#ae5b9773c4e0b625ac5b337385ffcd8ca", null ], + [ "FileIO", "classFileIO.html#a5d92b6dd125c7bb4b759b7ebdd16017b", null ], + [ "FileIO", "classFileIO.html#a9829e66a84404d313fe6164b5ea01c13", null ], + [ "~FileIO", "classFileIO.html#a7a39df44d24cbc7421f9d3ae3a591ea4", null ], + [ "getFileSize", "classFileIO.html#a5bb446289663a585e775a1c1d1bc51a8", null ], + [ "isReading", "classFileIO.html#a57e1f2b4e3e29e0f6658a3063733f81e", null ], + [ "isWriting", "classFileIO.html#a0e4cac985c90d173b391c929081f1146", null ], [ "openForRead", "classFileIO.html#a3a96ca80a7c66c14883007e88679e87e", null ], [ "openForWrite", "classFileIO.html#ae7fcae34c0941ffe183fbe1cdc180f22", null ], - [ "read", "classFileIO.html#a11dcd9d7e8a00db63db74abf437dc4a7", null ], - [ "write", "classFileIO.html#aa2ff5f1db6c224a0fa15f3b039a6009d", null ] + [ "operator=", "classFileIO.html#a0ba6d4d6e30856d91b27f8c485583057", null ], + [ "operator=", "classFileIO.html#ad348bbb4cf6a68491e86a52730935fce", null ], + [ "read", "classFileIO.html#adec9c3ecec15f78ce5b1efb669561ea3", null ], + [ "scanDirectory", "classFileIO.html#afe49f774dfba43e57b8073918d33ad98", null ], + [ "write", "classFileIO.html#a40ddac55cc003132c3d20fd8e8378bbb", null ] ]; \ No newline at end of file diff --git a/classGLCheckerTexture-members.html b/classGLCheckerTexture-members.html index 50736698..2d46eefe 100644 --- a/classGLCheckerTexture-members.html +++ b/classGLCheckerTexture-members.html @@ -100,8 +100,7 @@ $(document).ready(function(){initNavTree('classGLCheckerTexture.html',''); initR

This is the complete list of members for GLCheckerTexture, including all inherited members.

- - +
bind()GLCheckerTextureinline
GLCheckerTexture()GLCheckerTextureinline
~GLCheckerTexture()GLCheckerTextureinline
~GLCheckerTexture()GLCheckerTextureinline
diff --git a/classGLCheckerTexture.html b/classGLCheckerTexture.html index fe2d3d3b..2274e87a 100644 --- a/classGLCheckerTexture.html +++ b/classGLCheckerTexture.html @@ -102,39 +102,12 @@ $(document).ready(function(){initNavTree('classGLCheckerTexture.html',''); initR - -

Public Member Functions

 GLCheckerTexture ()
 
 ~GLCheckerTexture ()
 
void bind ()
 

Constructor & Destructor Documentation

- -

◆ GLCheckerTexture()

- -
-
- - - - - -
- - - - - - - -
GLCheckerTexture::GLCheckerTexture ()
-
-inline
-
- -
-

◆ ~GLCheckerTexture()

diff --git a/classGLCheckerTexture.js b/classGLCheckerTexture.js index 59cc1541..41c2e2ad 100644 --- a/classGLCheckerTexture.js +++ b/classGLCheckerTexture.js @@ -1,6 +1,5 @@ var classGLCheckerTexture = [ - [ "GLCheckerTexture", "classGLCheckerTexture.html#a361178710e61b228d921d38e9c2d54f7", null ], [ "~GLCheckerTexture", "classGLCheckerTexture.html#ac9c4e61e9010f42ba1739e81ee2e7403", null ], [ "bind", "classGLCheckerTexture.html#a6867fb461e1ebdfb5ffaf8572678ef22", null ] ]; \ No newline at end of file diff --git a/classInputGeom-members.html b/classInputGeom-members.html index 15577913..c6d6c11e 100644 --- a/classInputGeom-members.html +++ b/classInputGeom-members.html @@ -99,33 +99,30 @@ $(document).ready(function(){initNavTree('classInputGeom.html',''); initResizabl

This is the complete list of members for InputGeom, including all inherited members.

- - - - - - + + + + + + + + - - - - - - - - - - - - - - - - + + + + + + + + + + + + -
addConvexVolume(const float *verts, const int nverts, const float minh, const float maxh, unsigned char area)InputGeom
addOffMeshConnection(const float *spos, const float *epos, const float rad, unsigned char bidir, unsigned char area, unsigned short flags)InputGeom
deleteConvexVolume(int i)InputGeom
deleteOffMeshConnection(int i)InputGeom
drawConvexVolumes(struct duDebugDraw *dd, bool hilight=false)InputGeom
drawOffMeshConnections(struct duDebugDraw *dd, bool hilight=false)InputGeom
addConvexVolume(const float *verts, int nverts, float minh, float maxh, unsigned char area)InputGeom
addOffMeshConnection(const float *startPos, const float *endPos, float radius, unsigned char bidirectional, unsigned char area, unsigned short flags)InputGeom
convexVolumesInputGeom
deleteConvexVolume(int i)InputGeom
deleteOffMeshConnection(int i)InputGeom
drawConvexVolumes(duDebugDraw *dd)InputGeom
drawOffMeshConnections(duDebugDraw *dd, bool highlight=false)InputGeom
filenameInputGeom
getBuildSettings() constInputGeominline
getChunkyMesh() constInputGeominline
getConvexVolumeCount() constInputGeominline
getConvexVolumes() constInputGeominline
getMesh() constInputGeominline
getMeshBoundsMax() constInputGeominline
getMeshBoundsMin() constInputGeominline
getNavMeshBoundsMax() constInputGeominline
getNavMeshBoundsMin() constInputGeominline
getOffMeshConnectionAreas() constInputGeominline
getOffMeshConnectionCount() constInputGeominline
getOffMeshConnectionDirs() constInputGeominline
getOffMeshConnectionFlags() constInputGeominline
getOffMeshConnectionId() constInputGeominline
getOffMeshConnectionRads() constInputGeominline
getOffMeshConnectionVerts() constInputGeominline
InputGeom()InputGeom
load(class rcContext *ctx, const std::string &filepath)InputGeom
raycastMesh(float *src, float *dst, float &tmin)InputGeom
load(rcContext *ctx, const std::string &filepath)InputGeom
meshInputGeom
meshBoundsMaxInputGeom
meshBoundsMinInputGeom
offmeshConnAreaInputGeom
offmeshConnBidirectionalInputGeom
offmeshConnFlagsInputGeom
offmeshConnIdInputGeom
offmeshConnRadiusInputGeom
offmeshConnVertsInputGeom
partitionedMeshInputGeom
raycastMesh(float *src, float *dst, float &tmin) constInputGeom
saveGeomSet(const BuildSettings *settings)InputGeom
~InputGeom()InputGeom
diff --git a/classInputGeom.html b/classInputGeom.html index 80c516d2..a936ba32 100644 --- a/classInputGeom.html +++ b/classInputGeom.html @@ -95,6 +95,7 @@ $(document).ready(function(){initNavTree('classInputGeom.html',''); initResizabl
Public Member Functions | +Public Attributes | List of all members
InputGeom Class Reference
@@ -104,103 +105,65 @@ $(document).ready(function(){initNavTree('classInputGeom.html',''); initResizabl - - - - - - + + - - - - - - - + - - - - + + - - - - - - + + - - + + +

Public Member Functions

 InputGeom ()
 
 ~InputGeom ()
 
bool load (class rcContext *ctx, const std::string &filepath)
 
bool load (rcContext *ctx, const std::string &filepath)
 
bool saveGeomSet (const BuildSettings *settings)
 
const rcMeshLoaderObjgetMesh () const
 Method to return static mesh data.
 
const float * getMeshBoundsMin () const
 
const float * getMeshBoundsMax () const
 
const float * getNavMeshBoundsMin () const
 Method to return static mesh data.
 
const float * getNavMeshBoundsMax () const
 
const rcChunkyTriMeshgetChunkyMesh () const
 
const BuildSettingsgetBuildSettings () const
 
bool raycastMesh (float *src, float *dst, float &tmin)
 
bool raycastMesh (float *src, float *dst, float &tmin) const
 
Box Volumes.
int getConvexVolumeCount () const
 
const ConvexVolumegetConvexVolumes () const
 
void addConvexVolume (const float *verts, const int nverts, const float minh, const float maxh, unsigned char area)
 
void addConvexVolume (const float *verts, int nverts, float minh, float maxh, unsigned char area)
 
void deleteConvexVolume (int i)
 
void drawConvexVolumes (struct duDebugDraw *dd, bool hilight=false)
 
void drawConvexVolumes (duDebugDraw *dd)
 
+ + + + + + + + + + + + +

+Public Attributes

std::string filename
 
Mesh mesh
 
float meshBoundsMin [3] = {}
 
float meshBoundsMax [3] = {}
 
PartitionedMesh partitionedMesh
 
std::vector< ConvexVolumeconvexVolumes
 
- - - - - - - - - - - - - - - - + + + + + + + + + + + + + + - - + +

Off-Mesh connections.

int getOffMeshConnectionCount () const
 
const float * getOffMeshConnectionVerts () const
 
const float * getOffMeshConnectionRads () const
 
const unsigned char * getOffMeshConnectionDirs () const
 
const unsigned char * getOffMeshConnectionAreas () const
 
const unsigned short * getOffMeshConnectionFlags () const
 
const unsigned int * getOffMeshConnectionId () const
 
void addOffMeshConnection (const float *spos, const float *epos, const float rad, unsigned char bidir, unsigned char area, unsigned short flags)
 
std::vector< float > offmeshConnVerts
 
std::vector< float > offmeshConnRadius
 
std::vector< unsigned char > offmeshConnBidirectional
 
std::vector< unsigned char > offmeshConnArea
 
std::vector< unsigned short > offmeshConnFlags
 
std::vector< unsigned int > offmeshConnId
 
void addOffMeshConnection (const float *startPos, const float *endPos, float radius, unsigned char bidirectional, unsigned char area, unsigned short flags)
 
void deleteOffMeshConnection (int i)
 
void drawOffMeshConnections (struct duDebugDraw *dd, bool hilight=false)
 
void drawOffMeshConnections (duDebugDraw *dd, bool highlight=false)
 
-

Constructor & Destructor Documentation

- -

◆ InputGeom()

- -
-
- - - - - - - -
InputGeom::InputGeom ()
-
- -
-
- -

◆ ~InputGeom()

- -
-
- - - - - - - -
InputGeom::~InputGeom ()
-
- -
-

Member Function Documentation

- -

◆ addConvexVolume()

+ +

◆ addConvexVolume()

@@ -214,19 +177,19 @@ Public Member Functions - const int  + int  nverts, - const float  + float  minh, - const float  + float  maxh, @@ -245,8 +208,8 @@ Public Member Functions
- -

◆ addOffMeshConnection()

+ +

◆ addOffMeshConnection()

@@ -255,25 +218,25 @@ Public Member Functions void InputGeom::addOffMeshConnection ( const float *  - spos, + startPos, const float *  - epos, + endPos, - const float  - rad, + float  + radius, unsigned char  - bidir, + bidirectional, @@ -333,8 +296,8 @@ Public Member Functions
- -

◆ drawConvexVolumes()

+ +

◆ drawConvexVolumes()

@@ -342,27 +305,17 @@ Public Member Functions void InputGeom::drawConvexVolumes ( - struct duDebugDraw *  - dd, - - - + duDebugDraw *  + dd) - bool  - hilight = false  - - - - ) -
- -

◆ drawOffMeshConnections()

+ +

◆ drawOffMeshConnections()

@@ -370,14 +323,14 @@ Public Member Functions void InputGeom::drawOffMeshConnections ( - struct duDebugDraw *  + duDebugDrawdd, bool  - hilight = false  + highlight = false  @@ -412,158 +365,6 @@ Public Member Functions
-
-
- -

◆ getChunkyMesh()

- -
-
- - - - - -
- - - - - - - -
const rcChunkyTriMesh * InputGeom::getChunkyMesh () const
-
-inline
-
- -
-
- -

◆ getConvexVolumeCount()

- -
-
- - - - - -
- - - - - - - -
int InputGeom::getConvexVolumeCount () const
-
-inline
-
- -
-
- -

◆ getConvexVolumes()

- -
-
- - - - - -
- - - - - - - -
const ConvexVolume * InputGeom::getConvexVolumes () const
-
-inline
-
- -
-
- -

◆ getMesh()

- -
-
- - - - - -
- - - - - - - -
const rcMeshLoaderObj * InputGeom::getMesh () const
-
-inline
-
- -

Method to return static mesh data.

- -
-
- -

◆ getMeshBoundsMax()

- -
-
- - - - - -
- - - - - - - -
const float * InputGeom::getMeshBoundsMax () const
-
-inline
-
- -
-
- -

◆ getMeshBoundsMin()

- -
-
- - - - - -
- - - - - - - -
const float * InputGeom::getMeshBoundsMin () const
-
-inline
-
-
@@ -614,185 +415,12 @@ Public Member Functions
-
- - -

◆ getOffMeshConnectionAreas()

- -
-
- - - - - -
- - - - - - - -
const unsigned char * InputGeom::getOffMeshConnectionAreas () const
-
-inline
-
+

Method to return static mesh data.

- -

◆ getOffMeshConnectionCount()

- -
-
- - - - - -
- - - - - - - -
int InputGeom::getOffMeshConnectionCount () const
-
-inline
-
- -
-
- -

◆ getOffMeshConnectionDirs()

- -
-
- - - - - -
- - - - - - - -
const unsigned char * InputGeom::getOffMeshConnectionDirs () const
-
-inline
-
- -
-
- -

◆ getOffMeshConnectionFlags()

- -
-
- - - - - -
- - - - - - - -
const unsigned short * InputGeom::getOffMeshConnectionFlags () const
-
-inline
-
- -
-
- -

◆ getOffMeshConnectionId()

- -
-
- - - - - -
- - - - - - - -
const unsigned int * InputGeom::getOffMeshConnectionId () const
-
-inline
-
- -
-
- -

◆ getOffMeshConnectionRads()

- -
-
- - - - - -
- - - - - - - -
const float * InputGeom::getOffMeshConnectionRads () const
-
-inline
-
- -
-
- -

◆ getOffMeshConnectionVerts()

- -
-
- - - - - -
- - - - - - - -
const float * InputGeom::getOffMeshConnectionVerts () const
-
-inline
-
- -
-
- -

◆ load()

+ +

◆ load()

@@ -800,7 +428,7 @@ Public Member Functions bool InputGeom::load ( - class rcContext *  + rcContextctx, @@ -819,8 +447,8 @@ Public Member Functions
- -

◆ raycastMesh()

+ +

◆ raycastMesh()

@@ -846,7 +474,7 @@ Public Member Functions ) - + const
@@ -869,6 +497,175 @@ Public Member Functions
+
+
+

Member Data Documentation

+ +

◆ convexVolumes

+ +
+
+ + + + +
std::vector<ConvexVolume> InputGeom::convexVolumes
+
+ +
+
+ +

◆ filename

+ +
+
+ + + + +
std::string InputGeom::filename
+
+ +
+
+ +

◆ mesh

+ +
+
+ + + + +
Mesh InputGeom::mesh
+
+ +
+
+ +

◆ meshBoundsMax

+ +
+
+ + + + +
float InputGeom::meshBoundsMax[3] = {}
+
+ +
+
+ +

◆ meshBoundsMin

+ +
+
+ + + + +
float InputGeom::meshBoundsMin[3] = {}
+
+ +
+
+ +

◆ offmeshConnArea

+ +
+
+ + + + +
std::vector<unsigned char> InputGeom::offmeshConnArea
+
+ +
+
+ +

◆ offmeshConnBidirectional

+ +
+
+ + + + +
std::vector<unsigned char> InputGeom::offmeshConnBidirectional
+
+ +
+
+ +

◆ offmeshConnFlags

+ +
+
+ + + + +
std::vector<unsigned short> InputGeom::offmeshConnFlags
+
+ +
+
+ +

◆ offmeshConnId

+ +
+
+ + + + +
std::vector<unsigned int> InputGeom::offmeshConnId
+
+ +
+
+ +

◆ offmeshConnRadius

+ +
+
+ + + + +
std::vector<float> InputGeom::offmeshConnRadius
+
+ +
+
+ +

◆ offmeshConnVerts

+ +
+
+ + + + +
std::vector<float> InputGeom::offmeshConnVerts
+
+ +
+
+ +

◆ partitionedMesh

+ +
+
+ + + + +
PartitionedMesh InputGeom::partitionedMesh
+
+

The documentation for this class was generated from the following files: diff --git a/functions_func_h.html b/functions_func_h.html index 5bf5ca90..5465e0d6 100644 --- a/functions_func_h.html +++ b/functions_func_h.html @@ -96,20 +96,7 @@ $(document).ready(function(){initNavTree('functions_func_h.html',''); initResiza
Here is a list of all functions with links to the classes they belong to:

- h -

diff --git a/functions_func_i.html b/functions_func_i.html index 0caee24c..1dbc3746 100644 --- a/functions_func_i.html +++ b/functions_func_i.html @@ -96,17 +96,16 @@ $(document).ready(function(){initNavTree('functions_func_i.html',''); initResiza
Here is a list of all functions with links to the classes they belong to:

- i -

diff --git a/functions_func_l.html b/functions_func_l.html index 3b88d067..6159e741 100644 --- a/functions_func_l.html +++ b/functions_func_l.html @@ -97,8 +97,8 @@ $(document).ready(function(){initNavTree('functions_func_l.html',''); initResiza

- l -

diff --git a/functions_func_m.html b/functions_func_m.html index 6bea2708..b6b6610c 100644 --- a/functions_func_m.html +++ b/functions_func_m.html @@ -96,8 +96,7 @@ $(document).ready(function(){initNavTree('functions_func_m.html',''); initResiza
Here is a list of all functions with links to the classes they belong to:

- m -