opensurgsim
Classes | Namespaces | Typedefs | Functions
GeometryTests.cpp File Reference

Tests for the Geometry.cpp functions. More...

#include <gtest/gtest.h>
#include <array>
#include <numeric>
#include <cmath>
#include "SurgSim/Math/Geometry.h"
#include "SurgSim/Math/RigidTransform.h"
#include "SurgSim/Math/UnitTests/MockTriangle.h"
#include <boost/math/special_functions/fpclassify.hpp>

Classes

class  SurgSim::Math::Segment
 
class  SurgSim::Math::GeometryTest
 
struct  SurgSim::Math::SegmentData
 
class  SurgSim::Math::GeometryVectorTestBase< T >
 
class  SurgSim::Math::GeometryVector3Tests< T >
 

Namespaces

 SurgSim
 Wraps glewInit() to separate the glew opengl definitions from the osg opengl definitions only imgui needs glew but we need to call glewInit() from a osg callback, using this call we avoid getting warnings about redefinitions.
 

Typedefs

typedef double SurgSim::Math::SizeType
 
typedef Eigen::Matrix< SizeType, 3, 1 > SurgSim::Math::VectorType
 
typedef std::tuple< Segment, Segment, VectorType, VectorType > SurgSim::Math::LineLineCheckData
 
typedef std::tuple< Segment, MockTriangle, VectorType, bool > SurgSim::Math::SegTriIntersectionData
 
typedef std::tuple< Segment, VectorType, double, VectorType, VectorType, int > SurgSim::Math::SegmentPlaneData
 
typedef ::testing::Types< SurgSim::Math::Vector3d, SurgSim::Math::Vector3fSurgSim::Math::GeometryVector3Variants
 
typedef std::tuple< MockTriangle, VectorType, double, VectorType, VectorType, int > SurgSim::Math::TriPlaneData
 
typedef std::tuple< Segment, MockTriangle, VectorType, VectorType > SurgSim::Math::SegTriDistanceData
 
typedef std::tuple< MockTriangle, MockTriangle, VectorType, VectorType > SurgSim::Math::TriTriDistanceData
 

Functions

::std::ostream & SurgSim::Math::operator<< (std::ostream &stream, const VectorType &vector)
 
bool SurgSim::Math::near (double val1, double val2, double abs_error)
 
::testing::AssertionResult SurgSim::Math::eigenEqual (const VectorType &expected, const VectorType &actual)
 
::testing::AssertionResult SurgSim::Math::eigenAllNan (const VectorType &actual)
 
 SurgSim::Math::TEST_F (GeometryTest, IntersectSegmentSegment2D)
 
 SurgSim::Math::TEST_F (GeometryTest, BaryCentricOfSegment)
 
 SurgSim::Math::TEST_F (GeometryTest, BaryCentricWithNormal)
 
 SurgSim::Math::TEST_F (GeometryTest, BaryCentricWithoutNormal)
 
 SurgSim::Math::TEST_F (GeometryTest, DistancePointLine)
 
 SurgSim::Math::TEST_F (GeometryTest, DistancePointSegment)
 
void SurgSim::Math::checkLineLineDistance (const LineLineCheckData &data)
 
 SurgSim::Math::TEST_F (GeometryTest, DistanceLineLine)
 
void SurgSim::Math::testSegmentDistance (const SegmentData &segmentData, const std::string &info, size_t i)
 
 SurgSim::Math::TEST_F (GeometryTest, DistanceSegmentSegment)
 
 SurgSim::Math::TEST_F (GeometryTest, DistancePointTriangle)
 
 SurgSim::Math::TEST_F (GeometryTest, PointInsideTriangleWithNormal)
 
 SurgSim::Math::TEST_F (GeometryTest, PointInsideTriangleWithoutNormal)
 
 SurgSim::Math::TEST_F (GeometryTest, PointOnTriangleEdgeWithoutNormal)
 
 SurgSim::Math::TEST_F (GeometryTest, Coplanarity)
 
::testing::AssertionResult SurgSim::Math::checkSegTriIntersection (const SegTriIntersectionData &data)
 
 SurgSim::Math::TEST_F (GeometryTest, SegmentTriangleIntersection)
 
 SurgSim::Math::TEST_F (GeometryTest, distancePointPlane)
 
void SurgSim::Math::checkSegmentPlanDistance (const SegmentPlaneData &data)
 
 SurgSim::Math::TEST_F (GeometryTest, SegmentPlaneDistance)
 
 SurgSim::Math::TYPED_TEST_CASE (GeometryVector3Tests, GeometryVector3Variants)
 
 SurgSim::Math::TYPED_TEST (GeometryVector3Tests, nearestPointOnLine)
 
void SurgSim::Math::checkTriPlaneDistance (const TriPlaneData &data)
 
 SurgSim::Math::TEST_F (GeometryTest, TrianglePlaneTest)
 
 SurgSim::Math::TEST_F (GeometryTest, PlanePlaneDistance)
 
void SurgSim::Math::checkSegTriDistance (const SegTriDistanceData &data)
 
 SurgSim::Math::TEST_F (GeometryTest, SegmentTriangleDistance)
 
void SurgSim::Math::checkTriTriDistance (const TriTriDistanceData &data)
 
 SurgSim::Math::TEST_F (GeometryTest, distanceTriangleTriangle)
 
 SurgSim::Math::TEST_F (GeometryTest, IntersectionsSegmentBox)
 
 SurgSim::Math::TEST_F (GeometryTest, DoesIntersectBoxCapsule)
 
 SurgSim::Math::TEST_F (GeometryTest, TimesOfCoplanarity)
 
 SurgSim::Math::TEST_F (GeometryTest, CcdIntersectionsSegmentSegment)
 
 SurgSim::Math::TEST_F (GeometryTest, CcdIntersectionsPointTriangle)
 

Detailed Description

Tests for the Geometry.cpp functions.