Fix some TODOs in the code

This commit is contained in:
Daniel Chappuis 2018-04-21 22:15:49 +02:00
parent 1e70f0ee6e
commit 32e663a3ff
2 changed files with 0 additions and 16 deletions

View File

@ -1587,7 +1587,6 @@ class TestRaycast : public Test {
test(mCallback.isHit);
// Raycast hit agains the capsule shape
// TODO : Previous it was a cylinder, now it is a capsule shape, maybe those tests are wrong now
Ray ray11(mLocalShapeToWorld * Vector3(4, 1, 1.5), mLocalShapeToWorld * Vector3(-30, 1.5, 2));
Ray ray12(mLocalShapeToWorld * Vector3(1.5, 9, -1), mLocalShapeToWorld * Vector3(1.5, -30, -1));
Ray ray13(mLocalShapeToWorld * Vector3(-1, 2, 3), mLocalShapeToWorld * Vector3(-1, 2, -30));

View File

@ -67,9 +67,6 @@ class RaycastManager : public rp3d::RaycastCallback {
/// All the visual contact points
std::vector<ContactPoint> mHitPoints;
/// All the normals at hit points
std::vector<Line*> mNormals;
/// Contact point mesh folder path
std::string mMeshFolderPath;
@ -90,24 +87,12 @@ class RaycastManager : public rp3d::RaycastCallback {
openglframework::Vector3 position(hitPos.x, hitPos.y, hitPos.z);
mHitPoints.push_back(ContactPoint(position, normal, openglframework::Color::red()));
// Create a line to display the normal at hit point
// TODO : Remove the mNormals because the VisualContactPoint is now able to display the contact normal on its own
Line* normalLine = new Line(position, position + normal);
mNormals.push_back(normalLine);
return raycastInfo.hitFraction;
}
void resetPoints() {
mHitPoints.clear();
// Destroy all the normals
for (std::vector<Line*>::iterator it = mNormals.begin();
it != mNormals.end(); ++it) {
delete (*it);
}
mNormals.clear();
}
std::vector<ContactPoint> getHitPoints() const {