[DEV] update ray
This commit is contained in:
parent
74836262c0
commit
673a7fbade
@ -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();
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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);
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user