#include <Line.h>
Vector3 direction() const
Definition: Line.cpp:63
Vector3 direction() const
Definition: Vector3.h:756
Vector3 _direction
Definition: Line.h:29
Vector3 _point
Definition: Line.h:28
Vector3 point() const
Definition: Line.cpp:58
Undefined (provided for creating Array<Line> only)
void deserialize(class BinaryInput &b)
Definition: Line.cpp:46
virtual G3D::Line::~Line |
( |
| ) |
|
|
inlinevirtual |
Returns the closest point on the line to point.
float __fastcall dot(const Vector3 &rkVector) const
Definition: Vector3.h:771
Vector3 _direction
Definition: Line.h:29
Vector3 _point
Definition: Line.h:28
Finds the closest point to the two lines.
- Parameters
-
minDist | Returns the minimum distance between the lines. |
[http://objectmix.com/graphics/133793-coordinates-closest-points-pair-skew-lines.html]
69 const Vector3& P1 =
_point;
72 Vector3 P2 = B.point();
75 const Vector3& P21 = P2 - P1;
76 const Vector3& M = U2.
cross(U1);
79 Vector3 R = P21.cross(M) / m2;
83 minDist = (float)
abs(P21.dot(M)) / sqrt(m2);
double abs(double fValue)
Definition: g3dmath.h:617
Vector3 direction() const
Definition: Vector3.h:756
float length() const
Definition: Vector3.h:751
Vector3 _direction
Definition: Line.h:29
Vector3 _point
Definition: Line.h:28
Vector3 __fastcall cross(const Vector3 &rkVector) const
Definition: Vector3.h:776
Vector3 closestPoint(const Vector3 &pt) const
Definition: Line.cpp:52
void deserialize(class BinaryInput &b)
Definition: Vector3.cpp:190
Vector3 _direction
Definition: Line.h:29
Vector3 _point
Definition: Line.h:28
Vector3 G3D::Line::direction |
( |
| ) |
const |
Returns the direction (or negative direction) of the line
Vector3 _direction
Definition: Line.h:29
Returns the distance between point and the line
Vector3 closestPoint(const Vector3 &pt) const
Definition: Line.cpp:52
Vector3 point() const
Definition: Line.cpp:58
Creates a line from a point and a (nonzero) direction.
Line()
Definition: Line.h:39
Vector3 direction() const
Definition: Line.cpp:63
Vector3 point() const
Definition: Line.cpp:58
Constructs a line from two (not equal) points.
53 return Line(point1, point2 - point1);
Line()
Definition: Line.h:39
Returns the point where the line and plane intersect. If there is no intersection, returns a point at infinity.
19 Vector3 normal = plane.normal();
20 plane.getEquation(normal, d);
28 float t = -(d +
_point.
dot(normal)) / rate;
float __fastcall dot(const Vector3 &rkVector) const
Definition: Vector3.h:771
Vector3 _direction
Definition: Line.h:29
Vector3 _point
Definition: Line.h:28
static const Vector3 & inf()
Definition: Vector3.cpp:124
Returns a point on the line
Vector3 _point
Definition: Line.h:28
void serialize(class BinaryOutput &b) const
Definition: Vector3.cpp:219
Vector3 _direction
Definition: Line.h:29
Vector3 _point
Definition: Line.h:28
The documentation for this class was generated from the following files: