Пример #1
0
TEST_F(BBoxTest, LerpMidwayWorks) {
    BBox b (Point (0, 0, 0), Point (1, 1, 1));

    Point p = b.Lerp (.5, .5, .5);

    EXPECT_EQ (.5, p.x);
    EXPECT_EQ (.5, p.y);
    EXPECT_EQ (.5, p.z);
}
Пример #2
0
TEST_F(BBoxTest, LerpDegenerateWorks) {
    BBox b (Point (0, 0, 0), Point (0, 0, 0));

    Point p = b.Lerp (1, 1, 1);

    EXPECT_EQ (0, p.x);
    EXPECT_EQ (0, p.y);
    EXPECT_EQ (0, p.z);
}
Пример #3
0
// Lerp Tests
TEST_F(BBoxTest, LerpZeroOneWorks) {
    BBox b (Point (0, 0, 0), Point (1, 1, 1));

    Point p = b.Lerp (1, 1, 1);

    EXPECT_EQ (1, p.x);
    EXPECT_EQ (1, p.y);
    EXPECT_EQ (1, p.z);
}