[DEV] update ray

This commit is contained in:
Edouard DUPIN 2014-12-12 23:53:00 +01:00
parent 74836262c0
commit 673a7fbade
3 changed files with 9 additions and 1 deletions

View File

@ -339,7 +339,7 @@ void ege::Environement::periodicCall(const ewol::event::Time& _event) {
//EGE_DEBUG("stepSimulation (start)");
///step the simulation
if (m_physicEngine.getDynamicWorld() != nullptr) {
EGE_ERROR(" step simulation : " << curentDelta);
EGE_VERBOSE(" step simulation : " << curentDelta);
m_physicEngine.getDynamicWorld()->stepSimulation(curentDelta);
//optional but useful: debug drawing
m_physicEngine.getDynamicWorld()->debugDrawWorld();

View File

@ -84,3 +84,10 @@ std::pair<std::shared_ptr<ege::Element>, std::pair<vec3,vec3>> ege::Ray::testRay
}
return std::pair<std::shared_ptr<ege::Element>, std::pair<vec3,vec3>>(nullptr, std::pair<vec3,vec3>(vec3(0,0,0),vec3(0,0,0)));
}
vec3 ege::Ray::testRayZeroPlane() {
float coef = m_origin.z() / m_direction.z();
EGE_INFO("RAY : " << *this << " coef=" << coef);
return m_origin - coef*m_direction;
}

View File

@ -70,6 +70,7 @@ namespace ege {
public:
std::pair<vec3,vec3> testRay(ege::physics::Engine& _engine);
std::pair<std::shared_ptr<ege::Element>, std::pair<vec3,vec3>> testRayObject(ege::physics::Engine& _engine);
vec3 testRayZeroPlane();
};
std::ostream& operator <<(std::ostream& _os, const ege::Ray& _obj);
};