void OBBMeshQuery::MouseCallback(int button, int state, int x, int y) { mValidHit = false; if(!button && !state) { Point Dir = ComputeWorldRay(x, y); float d; Point hit; if(RayOBB(GetCameraPos(), Dir, mBox, d, hit)) { mValidHit = true; mDist = d; mLocalHit = hit - mBox.mCenter; } } }
bool IntersectionTest::OBBRay( const Volume* obbVolume, const Volume* rayVolume, glm::vec3* outIntersectionPoint ) { return RayOBB( rayVolume, obbVolume, outIntersectionPoint ); }