140 inline void Set(
Vector3 *location,
Vector3 *direction,
Vector3 *intersection_normal,
bool interpolate_normal,
float max_distance,
bool convex_test =
false)
168 Set(location, direction, intersection_normal, interpolate_normal, max_distance, convex_test);
238 if(FinalResult->
Beta < 0.0f) {
252 float d = sqrtf(FinalResult->
Beta);
bool Intersect_Screen_Point_RenderObject(float screen_x, float screen_y, const LayerClass &Layer, RenderObjClass *RObj, IntersectionResultClass *FinalResult)
bool Intersect_Plane(IntersectionResultClass *Result, Vector3 &Plane_Normal, Vector3 &Plane_Point)
IntersectionResultClass Result
void Transform_Model_To_World_Coords(IntersectionResultClass *FinalResult)
RenderObjClass * Intersect_Sub_Object(float screenx, float screeny, LayerClass &layer, RenderObjClass *robj, IntersectionResultClass *result)
bool Intersect_Hierarchy_Sphere(RenderObjClass *Hierarchy, IntersectionResultClass *FinalResult)
bool Intersect_Sphere(SphereClass &Sphere, IntersectionResultClass *FinalResult)
void Get_Screen_Ray(float ScreenX, float ScreenY, const LayerClass &Layer)
debug code that will be tossed
@ MAX_POLY_INTERSECTION_COUNT
@ MAX_HIERARCHY_NODE_COUNT
bool Intersect_Screen_Point_Layer(float ScreenX, float ScreenY, const LayerClass &Layer)
bool Intersect_Sphere_Quick(SphereClass &Sphere, IntersectionResultClass *FinalResult)
static Vector3 _IntersectionNormal
void Append_Hierarchy_Objects(int MaxCount, int &CurrentCount, RenderObjClass **ObjectArray, RenderObjClass *Heirarchy, bool Test_Bounding_Spheres, bool Convex)
bool Intersect_Box(Vector3 &Box_Min, Vector3 &Box_Max, IntersectionResultClass *FinalResult)
static float Intersect_Lines(const Vector3 &p0, const Vector3 &p1, const Vector3 &e0, const Vector3 &de)
Vector3 * IntersectionNormal
void Set(Vector3 *location, Vector3 *direction, Vector3 *intersection_normal, bool interpolate_normal, float max_distance, bool convex_test=false)
bool Intersect_RenderObject(RenderObjClass *RObj, IntersectionResultClass *FinalResult=0)
static bool In_Front_Of_Line(const Vector3 &p, const Vector3 &e0, const Vector3 &de)
bool Intersect_Hierarchy_Sphere_Quick(RenderObjClass *Hierarchy, IntersectionResultClass *FinalResult)
IntersectionClass(Vector3 *location, Vector3 *direction, Vector3 *intersection_normal, bool interpolate_normal=false, float max_distance=WWMATH_FLOAT_MAX, bool convex_test=false)
static Vector3 _RayLocation
bool Intersect_Layer(const LayerClass &Layer, bool Test_All=true)
static Vector3 _RayDirection
float Plane_Z_Distance(Vector3 &PlaneNormal, Vector3 &PlanePoint)
void Interpolate_Intersection_Normal(IntersectionResultClass *FinalResult)
static int Clip_Triangle_To_LineXY(int incount, Vector3 *InPoints, Vector2 *InUVs, Vector3 *OutPoints, Vector2 *OutUVs, const Vector3 &edge_point0, const Vector3 &edge_point1)
static void _Find_Polygon_Dominant_Plane(Vector3 &Normal, int &Axis_1, int &Axis_2)
void Copy_Partial_Results(IntersectionResultClass *Destination, IntersectionResultClass *Source)
bool Intersect_Plane_Quick(IntersectionResultClass *Result, Vector3 &Plane_Normal, Vector3 &Plane_Point)
static int _Intersect_Triangles_Z(Vector3 ClipPoints[3], Vector3 TrianglePoints[3], Vector2 UV[3], Vector3 ClippedPoints[6], Vector2 ClippedUV[6])
bool Intersect_Screen_Object(IntersectionResultClass *Final_Result, Vector4 &Area, RenderObjClass *obj=0)
bool Intersect_Screen_Point_Layer_Range(float ScreenX, float ScreenY, const LayerClass &TopLayer, const LayerClass &BackLayer)
static float _Get_Z_Elevation(Vector3 &Point, Vector3 &PlanePoint, Vector3 &PlaneNormal)
void Copy_Results(IntersectionResultClass *Destination, IntersectionResultClass *Source)
void Calculate_Intersection(IntersectionResultClass *Result)
void Append_Object_Array(int MaxCount, int &CurrentCount, RenderObjClass **ObjectArray, RenderObjClass *Object)
static bool _Point_In_Polygon_Z(Vector3 &Point, Vector3 Corners[3])
bool Intersect_Polygon_Z(IntersectionResultClass *Result, Vector3 &PolygonNormal, Vector3 &v1, Vector3 &v2, Vector3 &v3)
IntersectionClass(IntersectionClass *source)
virtual ~IntersectionClass()
bool Intersect_Object_Array(int ObjectCount, RenderObjClass **ObjectArray, IntersectionResultClass *FinalResult, bool Test_Bounding_Sphere, bool Convex)
static bool _Point_In_Polygon(IntersectionResultClass *FinalResult, Vector3 &Normal, Vector3 &loc1, Vector3 &loc2, Vector3 &loc3)
IntersectionClass * operator=(IntersectionClass *source)
bool Intersect_Polygon(IntersectionResultClass *Result, Vector3 &PolygonNormal, Vector3 &v1, Vector3 &v2, Vector3 &v3)
bool Intersect_Hierarchy(RenderObjClass *Hierarchy, IntersectionResultClass *FinalResult, bool Test_Bounding_Sphere=true, bool Convex=false)
static int _Largest_Normal_Index(Vector3 &v)
RenderObjClass * IntersectedRenderObject
POLYGONINDEX IntersectedPolygon
enum IntersectionResultClass::INTERSECTION_TYPE IntersectionType
static WWINLINE float Dot_Product(const Vector3 &a, const Vector3 &b)
unsigned short POLYGONINDEX