From 35d51692d6210215752716065eefa0fba17ec981 Mon Sep 17 00:00:00 2001 From: Sreekanth Arikatla <sreekanth.arikatla@kitware.com> Date: Mon, 4 Apr 2016 09:17:30 -0400 Subject: [PATCH] STYLE: Use imstk constants Uses imstk defined math constants --- Examples/Sandbox/main.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/Examples/Sandbox/main.cpp b/Examples/Sandbox/main.cpp index 49f538ef5..51a1382ff 100644 --- a/Examples/Sandbox/main.cpp +++ b/Examples/Sandbox/main.cpp @@ -8,6 +8,7 @@ #include "imstkPlane.h" #include "imstkSphere.h" #include "imstkCube.h" +#include "imstkMath.h" #include "imstkSimulationManager.h" #include "g3log/g3log.hpp" @@ -31,9 +32,9 @@ int main() auto cubeGeom = std::make_shared<imstk::Cube>(); cubeGeom->scale(0.5); - cubeGeom->rotate(imstk::UP_VECTOR, M_PI/4); - cubeGeom->rotate(imstk::RIGHT_VECTOR, M_PI / 4); - cubeGeom->translate(2, 1, 0.5); + cubeGeom->rotate(imstk::UP_VECTOR, imstk::iMSTK_PI_4); + cubeGeom->rotate(imstk::RIGHT_VECTOR, imstk::iMSTK_PI_4); + cubeGeom->translate(2.0, 1.0, 0.5); auto cubeObj = std::make_shared<imstk::VisualObject>("VisualCube"); cubeObj->setVisualGeometry(cubeGeom); @@ -81,11 +82,11 @@ int main() std::cout << "p = " << plane->getPosition() << std::endl; std::cout << "-- Plane : Set Normal" << std::endl; - plane->setNormal(imstk::FORWARD); + plane->setNormal(imstk::FORWARD_VECTOR); std::cout << "n = " << plane->getNormal() << std::endl; std::cout << "-- Plane : Rotate" << std::endl; - plane->rotate(imstk::UP, M_PI / 2); + plane->rotate(imstk::UP_VECTOR, imstk::iMSTK_PI_2); std::cout << "n = " << plane->getNormal() << std::endl; */ -- GitLab