25 #ifndef WMPOINTCONNECTOR_TEST_H
26 #define WMPOINTCONNECTOR_TEST_H
28 #include <cxxtest/TestSuite.h>
30 #include "../WMPointConnector.h"
60 osg::Vec3 rayStart( 0.0, 0.0, 0.0 );
61 osg::Vec3 rayDir( 0.0, 0.0, 1.0 );
62 osg::Vec3 targetVertex( 0.0, 0.0, 40.4 );
63 float targetVertexRadius = 1.0;
65 TS_ASSERT_LESS_THAN( 0.0,
66 WMPointConnector().hitVertex( rayStart, rayDir, targetVertex, targetVertexRadius )
75 osg::Vec3 rayStart( 0.0, 0.0, 0.0 );
76 osg::Vec3 rayDir( 0.0, 0.0, 1.0 );
77 osg::Vec3 targetVertex( 1.0, 0.0, 2.0 );
78 float targetVertexRadius = 1.0;
80 TS_ASSERT_EQUALS( 0.0,
81 WMPointConnector().hitVertex( rayStart, rayDir, targetVertex, targetVertexRadius )
90 osg::Vec3 rayStart( 0.0, 0.0, 0.0 );
91 osg::Vec3 rayDir( 0.0, 0.0, 1.0 );
92 osg::Vec3 targetVertex( 3.0, 2.0, 12.0 );
93 float targetVertexRadius = 1.0;
95 TS_ASSERT_LESS_THAN(
WMPointConnector().hitVertex( rayStart, rayDir, targetVertex, targetVertexRadius ),
105 osg::Vec3 rayStart( 0.0, 0.0, 0.0 );
106 osg::Vec3 rayDir( 0.0, 0.0, 1.0 );
107 osg::Vec3 targetVertex( 3.0, 2.0, -12.0 );
108 float targetVertexRadius = 1.0;
110 TS_ASSERT_LESS_THAN(
WMPointConnector().hitVertex( rayStart, rayDir, targetVertex, targetVertexRadius ),
static void startup(std::ostream &output=std::cout, LogLevel level=LL_DEBUG)
Create the first and only instance of the logger as it is a singleton.
Test functionality of WMPointConnector class.
void testHitVertex_MissAhead()
Test if ray trace algorithm does not hit vertex in front of starting position.
void setUp()
Setup logger and other stuff for each test.
void testInstantiation()
Instatiation should throw nothing.
void testHitVertex_MissBehind()
Test if ray trace algorithm does not hit vertex behind starting position.
void testHitVertex_Hit()
Test if ray trace algorithm hits vertex at least twice.
void testHitVertex_Tangent()
Test if ray trace algorithm hits vertex at one point.
This module connects the points in a point dataset.