rename function
This commit is contained in:
parent
c022d0726d
commit
9eb1a5b481
@ -93,7 +93,7 @@ private:
|
|||||||
void AddCluster(const b3Vec3& centroid);
|
void AddCluster(const b3Vec3& centroid);
|
||||||
|
|
||||||
//
|
//
|
||||||
u32 BestCluster(const b3Vec3& point) const;
|
u32 FindCluster(const b3Vec3& point) const;
|
||||||
|
|
||||||
u32 m_iterations;
|
u32 m_iterations;
|
||||||
|
|
||||||
|
@ -344,7 +344,7 @@ void b3ClusterSolver::AddCluster(const b3Vec3& centroid)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
u32 bestIndex = BestCluster(centroid);
|
u32 bestIndex = FindCluster(centroid);
|
||||||
b3Cluster& bestCluster = m_clusters[bestIndex];
|
b3Cluster& bestCluster = m_clusters[bestIndex];
|
||||||
|
|
||||||
// Should we merge the cluster?
|
// Should we merge the cluster?
|
||||||
@ -364,7 +364,7 @@ void b3ClusterSolver::AddCluster(const b3Vec3& centroid)
|
|||||||
m_clusters.PushBack(c);
|
m_clusters.PushBack(c);
|
||||||
}
|
}
|
||||||
|
|
||||||
u32 b3ClusterSolver::BestCluster(const b3Vec3& point) const
|
u32 b3ClusterSolver::FindCluster(const b3Vec3& point) const
|
||||||
{
|
{
|
||||||
u32 bestIndex = 0;
|
u32 bestIndex = 0;
|
||||||
float32 bestValue = B3_MAX_FLOAT;
|
float32 bestValue = B3_MAX_FLOAT;
|
||||||
@ -410,7 +410,7 @@ void b3ClusterSolver::Solve()
|
|||||||
for (u32 i = 0; i < m_observations.Count(); ++i)
|
for (u32 i = 0; i < m_observations.Count(); ++i)
|
||||||
{
|
{
|
||||||
b3Observation& obs = m_observations[i];
|
b3Observation& obs = m_observations[i];
|
||||||
obs.cluster = BestCluster(obs.point);
|
obs.cluster = FindCluster(obs.point);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Compute the new cluster centroids.
|
// Compute the new cluster centroids.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user