Torque 3D 3.8
ContentsIndexHome
PreviousUpNext
MathUtils::mLineTriangleCollide Function
Syntax
C++
bool mLineTriangleCollide(const Point3F & p1, const Point3F & p2, const Point3F & t1, const Point3F & t2, const Point3F & t3, Point3F * outUVW = NULL, F32 * outT = NULL);

Returns the barycentric coordinates and time of intersection between a line segment and a triangle. 

@param p1 The first point of the line segment. @param p2 The second point of the line segment. @param t1 The first point of the triangle. @param t2 The second point of the triangle. @param t2 The third point of the triangle. @param outUVW The optional output barycentric coords. @param outT The optional output time of intersection. 

@return Returns true if a collision occurs. 

 

Copyright (c) 2015. All rights reserved.
What do you think about this topic? Send feedback!