27 #include "NodeValueAccess.h"
37 template<
class TValue>
45 entity->intersect(ray, distance, pStopAtFirstHit, hitLocation, hitNormal);
67 #define IR(x) (reinterpret_cast<G3D::uint32 const&>(x))
75 for (
int i = 0; i < 3; ++i)
77 if (origin[i] < MinB[i])
79 location[i] = MinB[i];
85 MaxT[i] = (MinB[i] - origin[i]) / dir[i];
88 else if (origin[i] > MaxB[i])
90 location[i] = MaxB[i];
96 MaxT[i] = (MaxB[i] - origin[i]) / dir[i];
110 if (MaxT[1] > MaxT[WhichPlane])
115 if (MaxT[2] > MaxT[WhichPlane])
121 if (
IR(MaxT[WhichPlane]) & 0x80000000)
127 for (
int i = 0; i < 3; ++i)
131 location[i] = origin[i] + MaxT[WhichPlane] * dir[i];
132 if ((location[i] < MinB[i]) ||
133 (location[i] > MaxB[i]))
Definition: VMapTools.h:53
static bool collisionLocationForMovingPointFixedAABox(const G3D::Vector3 &origin, const G3D::Vector3 &dir, const G3D::AABox &box, G3D::Vector3 &location, bool &Inside)
Definition: VMapTools.h:58
const Point3 & low() const
Definition: AABox.h:136
Definition: VMapTools.h:38
Definition: IVMapManager.h:31
double distance(double x, double y)
Definition: g3dmath.h:731
G3D::Vector3 hitNormal
Definition: VMapTools.h:42
G3D::Vector3 hitLocation
Definition: VMapTools.h:41
#define TC_COMMON_API
Definition: Define.h:116
void operator()(const G3D::Ray &ray, const TValue *entity, bool pStopAtFirstHit, float &distance)
Definition: VMapTools.h:44
const Point3 & high() const
Definition: AABox.h:141
TValue * closestEntity
Definition: VMapTools.h:40