vtkGeantEvent
This commit is contained in:
@@ -122,7 +122,7 @@ int main()
|
||||
|
||||
{
|
||||
ContainerBox Box;
|
||||
Box.SetPosition(Vector3f(1,1,1));
|
||||
Box.SetOrigin(Vector3f(1,1,1));
|
||||
Box.SetSize(Vector3f(2,2,2));
|
||||
Box.EulerYZYRotate(Vector3f(0,0,0));
|
||||
HPoint3f pt = Box.GetLocalPoint(HPoint3f(2,3,2));
|
||||
@@ -130,6 +130,39 @@ int main()
|
||||
TEST0( Vector4f0(wp - HPoint3f(2,3,2)) );
|
||||
}
|
||||
|
||||
{
|
||||
ContainerBox Box;
|
||||
Box.SetPosition(Vector3f(-0.5,-0.5,-0.5));
|
||||
Box.SetSize(Vector3f(1,1,1));
|
||||
HPoint3f pt = Box.GetLocalPoint(HPoint3f(0,0,0));
|
||||
HPoint3f wp = Box.GetWorldPoint(pt);
|
||||
TEST0( Vector4f0(wp - HPoint3f(0,0,0)) );
|
||||
}
|
||||
|
||||
{
|
||||
ContainerBox Box;
|
||||
Box.SetOrigin(Vector3f(-1.5,-1.5,-1.5));
|
||||
Box.SetSize(Vector3f(3,3,3));
|
||||
HPoint3f pt = Box.GetLocalPoint(HPoint3f(0,0,0));
|
||||
HPoint3f wp = Box.GetWorldPoint(pt);
|
||||
TEST0( Vector4f0(wp - HPoint3f(0,0,0)) );
|
||||
|
||||
pt = HPoint3f(1,1,1);
|
||||
wp = Box.GetWorldPoint(pt);
|
||||
TEST0( Vector4f0(wp - HPoint3f(1.5, 1.5, 1.5)) );
|
||||
|
||||
Box.EulerYZYRotate(Vector3f(M_PI,0,0));
|
||||
pt = HPoint3f(1,1,1);
|
||||
wp = Box.GetWorldPoint(pt);
|
||||
TEST0( Vector4f0(wp - HPoint3f(-1.5, 1.5, -1.5)) );
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
END_TESTING;
|
||||
}
|
||||
|
||||
|
||||
@@ -31,8 +31,8 @@
|
||||
static int _fail = 0; \
|
||||
printf("..:: Testing " #name " ::..\n");
|
||||
|
||||
#define TEST1(val) _fail += (val)==0
|
||||
#define TEST0(val) _fail += (val)!=0
|
||||
#define TEST1(val) if ((val)==0) { printf("Assertion failed: %s != 0\n", #val); _fail++; }
|
||||
#define TEST0(val) if ((val)!=0) { printf("Assertion failed: %s != 0\n", #val); _fail++; }
|
||||
#define END_TESTING return _fail;
|
||||
|
||||
#define ASSERT_EQ(a, b) if ((a) != (b)) { printf("Assertion failed: %s != %s\n", #a, #b); _fail++; }
|
||||
Reference in New Issue
Block a user