Public Member Functions | Protected Attributes | List of all members
gtsam::SimWall2D Class Reference

#include <SimWall2D.h>

Public Member Functions

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

Protected Attributes

Point2 a_
 
Point2 b_
 

Detailed Description

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

Definition at line 19 of file SimWall2D.h.

Constructor & Destructor Documentation

gtsam::SimWall2D::SimWall2D ( )
inline

default constructor makes canonical wall

Definition at line 25 of file SimWall2D.h.

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

constructors using endpoints

Definition at line 28 of file SimWall2D.h.

gtsam::SimWall2D::SimWall2D ( double  ax,
double  ay,
double  bx,
double  by 
)
inline

Definition at line 31 of file SimWall2D.h.

Member Function Documentation

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

access

Definition at line 39 of file SimWall2D.h.

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

Definition at line 40 of file SimWall2D.h.

bool gtsam::SimWall2D::equals ( const SimWall2D other,
double  tol = 1e-9 
) const

Definition at line 22 of file SimWall2D.cpp.

bool gtsam::SimWall2D::intersects ( const SimWall2D wall,
boost::optional< Point2 & >  pt = boost::none 
) const

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

Definition at line 28 of file SimWall2D.cpp.

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

geometry

Definition at line 46 of file SimWall2D.h.

Point2 gtsam::SimWall2D::midpoint ( ) const

Definition at line 103 of file SimWall2D.cpp.

Point2 gtsam::SimWall2D::norm ( ) const

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

Definition at line 109 of file SimWall2D.cpp.

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

required by testable

Definition at line 15 of file SimWall2D.cpp.

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

Definition at line 115 of file SimWall2D.cpp.

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

scales a wall to produce a new wall

Definition at line 43 of file SimWall2D.h.

Member Data Documentation

Point2 gtsam::SimWall2D::a_
protected

Definition at line 21 of file SimWall2D.h.

Point2 gtsam::SimWall2D::b_
protected

Definition at line 21 of file SimWall2D.h.


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


gtsam
Author(s):
autogenerated on Sat May 8 2021 02:58:29