11 using namespace gtsam;
16 TEST(testSimWall2D2D, construction ) {
18 SimWall2D wall1(
a, b), wall2(
a.x(),
a.y(), b.x(), b.y());
35 TEST(testSimWall2D2D, intersection1 ) {
36 SimWall2D w1(2.0, 2.0, 6.0, 2.0), w2(4.0, 4.0, 4.0, 0.0);
40 w1.intersects(w2, pt);
45 TEST(testSimWall2D2D, intersection2 ) {
53 TEST(testSimWall2D2D, reflection1 ) {
54 SimWall2D wall1(1.0, 1.0, 7.0, 1.0), wall2(7.0, 1.0, 1.0, 1.0);
56 Rot2 actual1 = wall1.reflection(
init, intersection);
Provides additional testing facilities for common data structures.
static int runAllTests(TestResult &result)
bool intersects(const SimWall2D &wall, boost::optional< Point2 & > pt=boost::none) const
static const Point3 pt(1.0, 2.0, 3.0)
static Rot2 fromDegrees(double theta)
Named constructor from angle in degrees.
#define EXPECT(condition)
Array< double, 1, 3 > e(1./3., 0.5, 2.)
bool assert_equal(const Matrix &expected, const Matrix &actual, double tol)
detail::initimpl::constructor< Args... > init()
Binds an existing constructor taking arguments Args...
Rot2 reflection(const Point2 &init, const Point2 &intersection) const
TEST(LPInitSolver, InfiniteLoopSingleVar)
bool assert_inequal(const Matrix &A, const Matrix &B, double tol)
Implementation of walls for use with simulators.