Loading [MathJax]/extensions/TeX/AMSmath.js
Radium Engine  1.5.28
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
obb.cpp
1
2#include <Core/Geometry/Obb.hpp>
3#include <Core/Math/Math.hpp>
4#include <Core/Types.hpp>
5#include <catch2/catch_test_macros.hpp>
6
7TEST_CASE( "Core/Geometry/Obb", "[unittests][Core][Core/Geometry][Obb]" ) {
8
9 using namespace Ra::Core;
10 SECTION( "Simple tests" ) {
11 // Check Obb and empty aabb
12 Aabb aabb;
13 Geometry::Obb obb( aabb, Transform::Identity() );
14 REQUIRE( obb.toAabb().isEmpty() );
15 REQUIRE( obb.toAabb().isApprox( aabb ) );
16 obb.transform().rotate( AngleAxis( Math::Pi, Vector3::UnitX() ) );
17 REQUIRE( obb.toAabb().isEmpty() );
18 REQUIRE( obb.toAabb().isApprox( aabb ) );
19 }
20}
An oriented bounding box.
Definition Obb.hpp:12
This namespace contains everything "low level", related to data, datastuctures, and computation.
Definition Cage.cpp:5