context in core
This commit is contained in:
@@ -162,6 +162,35 @@ int main()
|
||||
|
||||
|
||||
|
||||
{ // test parent-child relationship
|
||||
ContainerBox Parent;
|
||||
Parent.SetOrigin(Vector3f(1,1,1));
|
||||
Parent.SetSize(Vector3f(2,2,2));
|
||||
|
||||
ContainerBox Child;
|
||||
Child.SetParent(&Parent);
|
||||
Child.SetOrigin(Vector3f(1,1,1));
|
||||
Child.SetSize(Vector3f(2,2,2));
|
||||
|
||||
HPoint3f pt = Child.GetLocalPoint(HPoint3f(0,0,0));
|
||||
HPoint3f wp = Child.GetWorldPoint(pt);
|
||||
TEST0( Vector4f0(wp - HPoint3f(0,0,0)) );
|
||||
|
||||
pt = HPoint3f(1,1,1);
|
||||
wp = Child.GetWorldPoint(pt);
|
||||
TEST0( Vector4f0(wp - HPoint3f(2,2,2)) );
|
||||
|
||||
pt = HPoint3f(1,2,3);
|
||||
wp = Child.GetWorldPoint(pt);
|
||||
std::cout << "Child.GetWorldPoint(HPoint3f(1,2,3)): " << wp << std::endl;
|
||||
TEST0( Vector4f0(wp - HPoint3f(2,3,4)) );
|
||||
|
||||
pt = HPoint3f(1,2,3);
|
||||
wp = Child.GetWorldPoint(pt);
|
||||
TEST0( Vector4f0(wp - HPoint3f(2,3,4)) );
|
||||
}
|
||||
|
||||
|
||||
|
||||
END_TESTING;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user