Commit 2cf8da3c authored by Lucile Remigy's avatar Lucile Remigy
Browse files

add something which was deleted

parent 83444dbc
......@@ -926,6 +926,40 @@ public:
const OcTreeSolver* otsolver;
};
/// @brief Traversal node for octree distance
class OcTreeDistanceTraversalNode : public DistanceTraversalNodeBase
{
public:
OcTreeDistanceTraversalNode()
{
model1 = NULL;
model2 = NULL;
otsolver = NULL;
}
FCL_REAL BVDistanceLowerBound(int, int) const
{
return -1;
}
bool BVDistanceLowerBound(int, int, FCL_REAL&) const
{
return false;
}
void leafComputeDistance(int, int) const
{
otsolver->OcTreeDistance(model1, model2, tf1, tf2, request, *result);
}
const OcTree* model1;
const OcTree* model2;
const OcTreeSolver* otsolver;
};
/// @brief Traversal node for shape-octree collision
template<typename S>
class ShapeOcTreeCollisionTraversalNode : public CollisionTraversalNodeBase
......
......@@ -62,7 +62,7 @@ inline bool initialize(OcTreeCollisionTraversalNode& node,
const OcTree& model2, const Transform3f& tf2,
const OcTreeSolver* otsolver,
CollisionResult& result)
{
node.result = &result;
node.model1 = &model1;
......@@ -77,7 +77,7 @@ inline bool initialize(OcTreeCollisionTraversalNode& node,
}
/// @brief Initialize traversal node for distance between two octrees, given current object transform
inline bool initialize(OcTreeDistanceTraversalNode& node,
bool initialize(OcTreeDistanceTraversalNode& node,
const OcTree& model1, const Transform3f& tf1,
const OcTree& model2, const Transform3f& tf2,
const OcTreeSolver* otsolver,
......
......@@ -89,7 +89,6 @@ void collisionRecurse(CollisionTraversalNodeBase* node, int b1, int b2,
collisionRecurse(node, b1, c2, front_list, sqrDistLowerBound2);
sqrDistLowerBound = std::min (sqrDistLowerBound1, sqrDistLowerBound2);
}
return;
}
void collisionNonRecurse(CollisionTraversalNodeBase* node,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment