mirror of
https://github.com/recastnavigation/recastnavigation.git
synced 2026-10-16 13:55:49 +00:00
Removed unnecessary accessor for offMeshConCount
This commit is contained in:
@@ -91,6 +91,7 @@ private:
|
||||
BuildSettings buildSettings;
|
||||
bool hasBuildSettings = false;
|
||||
|
||||
public:
|
||||
/// @name Off-Mesh connections.
|
||||
///@{
|
||||
static constexpr int MAX_OFFMESH_CONNECTIONS = 256;
|
||||
@@ -103,6 +104,7 @@ private:
|
||||
int offMeshConCount = 0;
|
||||
///@}
|
||||
|
||||
private:
|
||||
/// @name Convex Volumes.
|
||||
///@{
|
||||
static const int MAX_VOLUMES = 256;
|
||||
@@ -136,7 +138,6 @@ public:
|
||||
|
||||
/// @name Off-Mesh connections.
|
||||
///@{
|
||||
[[nodiscard]] int getOffMeshConnectionCount() const { return offMeshConCount; }
|
||||
[[nodiscard]] const float* getOffMeshConnectionVerts() const { return offMeshConVerts; }
|
||||
[[nodiscard]] const float* getOffMeshConnectionRads() const { return offMeshConRads; }
|
||||
[[nodiscard]] const unsigned char* getOffMeshConnectionDirs() const { return offMeshConDirs; }
|
||||
|
||||
@@ -86,7 +86,7 @@ void OffMeshConnectionTool::handleClick(const float* /*rayStartPos*/, const floa
|
||||
float nearestDist = FLT_MAX;
|
||||
int nearestIndex = -1;
|
||||
const float* verts = geom->getOffMeshConnectionVerts();
|
||||
for (int i = 0; i < geom->getOffMeshConnectionCount() * 2; ++i)
|
||||
for (int i = 0; i < geom->offMeshConCount * 2; ++i)
|
||||
{
|
||||
float dist = rcVdistSqr(rayHitPos, &verts[i * 3]);
|
||||
if (dist < nearestDist)
|
||||
|
||||
@@ -713,7 +713,7 @@ bool Sample_SoloMesh::build()
|
||||
params.offMeshConAreas = inputGeometry->getOffMeshConnectionAreas();
|
||||
params.offMeshConFlags = inputGeometry->getOffMeshConnectionFlags();
|
||||
params.offMeshConUserID = inputGeometry->getOffMeshConnectionId();
|
||||
params.offMeshConCount = inputGeometry->getOffMeshConnectionCount();
|
||||
params.offMeshConCount = inputGeometry->offMeshConCount;
|
||||
params.walkableHeight = agentHeight;
|
||||
params.walkableRadius = agentRadius;
|
||||
params.walkableClimb = agentMaxClimb;
|
||||
|
||||
@@ -490,7 +490,7 @@ struct MeshProcess : dtTileCacheMeshProcess
|
||||
params->offMeshConAreas = inputGeometry->getOffMeshConnectionAreas();
|
||||
params->offMeshConFlags = inputGeometry->getOffMeshConnectionFlags();
|
||||
params->offMeshConUserID = inputGeometry->getOffMeshConnectionId();
|
||||
params->offMeshConCount = inputGeometry->getOffMeshConnectionCount();
|
||||
params->offMeshConCount = inputGeometry->offMeshConCount;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -1213,7 +1213,7 @@ unsigned char* Sample_TileMesh::buildTileMesh(
|
||||
params.offMeshConAreas = inputGeometry->getOffMeshConnectionAreas();
|
||||
params.offMeshConFlags = inputGeometry->getOffMeshConnectionFlags();
|
||||
params.offMeshConUserID = inputGeometry->getOffMeshConnectionId();
|
||||
params.offMeshConCount = inputGeometry->getOffMeshConnectionCount();
|
||||
params.offMeshConCount = inputGeometry->offMeshConCount;
|
||||
params.walkableHeight = agentHeight;
|
||||
params.walkableRadius = agentRadius;
|
||||
params.walkableClimb = agentMaxClimb;
|
||||
|
||||
Reference in New Issue
Block a user