GTSAM  4.0.2
C++ library for smoothing and mapping (SAM)
Public Member Functions | Protected Attributes | List of all members
gtsam::SimWall2D Class Reference

#include <SimWall2D.h>

Public Member Functions

 SimWall2D ()
 
 SimWall2D (const Point2 &a, const Point2 &b)
 
 SimWall2D (double ax, double ay, double bx, double by)
 
void print (const std::string &s="") const
 
bool equals (const SimWall2D &other, double tol=1e-9) const
 
Point2 a () const
 
Point2 b () const
 
SimWall2D scale (double s) const
 
double length () const
 
Point2 midpoint () const
 
bool intersects (const SimWall2D &wall, Point2 *pt=nullptr) const
 
bool intersects (const SimWall2D &wall, Point2 &pt) const
 
Point2 norm () const
 
Rot2 reflection (const Point2 &init, const Point2 &intersection) const
 

Protected Attributes

Point2 a_
 
Point2 b_
 

Detailed Description

General Wall class for walls defined around unordered endpoints Primarily to handle ray intersections

Constructor & Destructor Documentation

◆ SimWall2D() [1/2]

gtsam::SimWall2D::SimWall2D ( )
inline

default constructor makes canonical wall

◆ SimWall2D() [2/2]

gtsam::SimWall2D::SimWall2D ( const Point2 a,
const Point2 b 
)
inline

constructors using endpoints

Member Function Documentation

◆ a()

Point2 gtsam::SimWall2D::a ( ) const
inline

access

◆ intersects() [1/2]

bool gtsam::SimWall2D::intersects ( const SimWall2D wall,
Point2 pt = nullptr 
) const

intersection check between two segments returns true if they intersect, with the intersection point in the optional second argument

◆ intersects() [2/2]

bool gtsam::SimWall2D::intersects ( const SimWall2D wall,
Point2 pt 
) const
inline

An overload of intersects that takes an l-value reference to a Point2 instead of a pointer.

◆ length()

double gtsam::SimWall2D::length ( ) const
inline

geometry

◆ norm()

Point2 gtsam::SimWall2D::norm ( ) const

norm is a 2D point representing the norm of the wall

◆ print()

void gtsam::SimWall2D::print ( const std::string &  s = "") const

required by testable

◆ reflection()

Rot2 gtsam::SimWall2D::reflection ( const Point2 init,
const Point2 intersection 
) const

reflection around a point of impact with a wall from a starting (init) point at a given impact point (intersection), returning the angle away from the impact

◆ scale()

SimWall2D gtsam::SimWall2D::scale ( double  s) const
inline

scales a wall to produce a new wall


The documentation for this class was generated from the following file: