2#ifndef GRAMODS_GRAPHICS_INTERSECTIONLINE
3#define GRAMODS_GRAPHICS_INTERSECTIONLINE
5#include <gmGraphics/config.hh>
10BEGIN_NAMESPACE_GMGRAPHICS;
43 inline Eigen::Vector3f
getPosition(
float ratio) {
return p0 + dir * ratio; }
45 const Eigen::Vector3f p0;
46 const Eigen::Vector3f dir;
47 const Eigen::Vector3f dir_inv;
48 const std::optional<float> start;
49 const std::optional<float> stop;
52END_NAMESPACE_GMGRAPHICS;
Line for intersection with ray or segment.
Definition IntersectionLine.hh:15
static IntersectionLine forwardRay(Eigen::Vector3f p0, Eigen::Vector3f dir)
Creates a IntersectionLine that has infinite forward extent, for intersection testing,...
Definition IntersectionLine.cpp:14
static IntersectionLine infiniteRay(Eigen::Vector3f p0, Eigen::Vector3f dir)
Creates a IntersectionLine for two-way infinite ray intersection testing, from p0 and in both directi...
Definition IntersectionLine.cpp:21
IntersectionLine getInSpace(const Eigen::Affine3f &M) const
Get this line but transformed into another coordinates base.
Definition IntersectionLine.cpp:28
static IntersectionLine lineSegment(Eigen::Vector3f p0, Eigen::Vector3f p1)
Creates a IntersectionLine for line segment intersection testing, from p0 to p1.
Definition IntersectionLine.cpp:6
Eigen::Vector3f getPosition(float ratio)
Returns the position on the line that corresponds to the specified ratio.
Definition IntersectionLine.hh:43