gramods
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
gramods::gmGraphics::IntersectionLine Struct Reference

Line for intersection with ray or segment. More...

#include <IntersectionLine.hh>

Collaboration diagram for gramods::gmGraphics::IntersectionLine:
Collaboration graph
[legend]

Public Member Functions

IntersectionLine getInSpace (const Eigen::Affine3f &M) const
 Get this line but transformed into another coordinates base. More...
 
Eigen::Vector3f getPosition (float ratio)
 Returns the position on the line that corresponds to the specified ratio. More...
 

Static Public Member Functions

static IntersectionLine lineSegment (Eigen::Vector3f p0, Eigen::Vector3f p1)
 Creates a IntersectionLine for line segment intersection testing, from p0 to p1. More...
 
static IntersectionLine forwardRay (Eigen::Vector3f p0, Eigen::Vector3f dir)
 Creates a IntersectionLine that has infinite forward extent, for intersection testing, from p0 and in direction dir. More...
 
static IntersectionLine infiniteRay (Eigen::Vector3f p0, Eigen::Vector3f dir)
 Creates a IntersectionLine for two-way infinite ray intersection testing, from p0 and in both direction dir and -dir. More...
 

Public Attributes

const Eigen::Vector3f p0
 
const Eigen::Vector3f dir
 
const Eigen::Vector3f dir_inv
 
const std::optional< float > start
 
const std::optional< float > stop
 

Detailed Description

Line for intersection with ray or segment.

Member Function Documentation

◆ forwardRay()

IntersectionLine gramods::gmGraphics::IntersectionLine::forwardRay ( Eigen::Vector3f  p0,
Eigen::Vector3f  dir 
)
static

Creates a IntersectionLine that has infinite forward extent, for intersection testing, from p0 and in direction dir.

◆ getInSpace()

IntersectionLine gramods::gmGraphics::IntersectionLine::getInSpace ( const Eigen::Affine3f &  M) const

Get this line but transformed into another coordinates base.

◆ getPosition()

Eigen::Vector3f gramods::gmGraphics::IntersectionLine::getPosition ( float  ratio)
inline

Returns the position on the line that corresponds to the specified ratio.

◆ infiniteRay()

IntersectionLine gramods::gmGraphics::IntersectionLine::infiniteRay ( Eigen::Vector3f  p0,
Eigen::Vector3f  dir 
)
static

Creates a IntersectionLine for two-way infinite ray intersection testing, from p0 and in both direction dir and -dir.

◆ lineSegment()

IntersectionLine gramods::gmGraphics::IntersectionLine::lineSegment ( Eigen::Vector3f  p0,
Eigen::Vector3f  p1 
)
static

Creates a IntersectionLine for line segment intersection testing, from p0 to p1.


The documentation for this struct was generated from the following files: