Skip to content
Snippets Groups Projects
Commit 04f23e41 authored by Sreekanth Arikatla's avatar Sreekanth Arikatla Committed by Ricardo Ortiz
Browse files

Adds script to download resources from Midas3.

parent c97118e0
No related branches found
No related tags found
No related merge requests found
set(APP LaparoscopicCamera) set(APP LapCameraNavigationApp)
add_executable(${APP} main.cpp) add_executable(${APP} main.cpp)
target_link_libraries(${APP} target_link_libraries(${APP}
Core Core
Geometry Geometry
VTKRendering VTKRendering
# Rendering
# RenderDelegates
Simulators Simulators
Mesh Mesh
Collision
ContactHandling
Event Event
# ExamplesCommon
IO IO
Devices Devices
VirtualTools VirtualTools
...@@ -28,20 +23,17 @@ if(NOT EXISTS ${${APP}_DATA}) ...@@ -28,20 +23,17 @@ if(NOT EXISTS ${${APP}_DATA})
file(MAKE_DIRECTORY ${${APP}_DATA}) file(MAKE_DIRECTORY ${${APP}_DATA})
endif() endif()
set(FILE_URL http://midas3.kitware.com/midas/download/item/318708/box.tar) set(FILE_URL http://midas3.kitware.com/midas/download/item/318829/CameraNavAppData.tar)
set(FILE_SHA1 928294a91477bc5d6fa494afb34016ba7f0b40c5) set(FILE_SHA1 da39a3ee5e6b4b0d3255bfef95601890afd80709)
set(LOCAL_FILE ${EXAMPLES_DATA}/box.tar) set(LOCAL_FILE ${EXAMPLES_DATA}/CameraNavAppData.tar)
midas_download(${FILE_URL} ${FILE_SHA1} ${LOCAL_FILE}) midas_download(${FILE_URL} ${FILE_SHA1} ${LOCAL_FILE})
# Extract data # Extract data
set(DATA set(DATA
${${APP}_DATA}/box.bou ${${APP}_DATA}/Target-marker.vtk
${${APP}_DATA}/box.config ${${APP}_DATA}/Target.vtk
${${APP}_DATA}/box.interp
${${APP}_DATA}/box.mass
${${APP}_DATA}/box.vtk
${${APP}_DATA}/box.veg
) )
add_custom_command( add_custom_command(
......
...@@ -55,13 +55,14 @@ bool createCameraNavigationScene( ...@@ -55,13 +55,14 @@ bool createCameraNavigationScene(
auto plane = std::make_shared<PlaneCollisionModel>( auto plane = std::make_shared<PlaneCollisionModel>(
core::Vec3d(0.0, -0.01, 0.0), core::Vec3d(0.0, -0.01, 0.0),
core::Vec3d(0.0, 1.0, 0.0)); core::Vec3d(0.0, 1.0, 0.0));
plane->getPlaneModel()->setWidth(5); plane->getPlaneModel()->setWidth(5);
staticObject->setModel(plane); staticObject->setModel(plane);
auto planeRendDetail = std::make_shared<RenderDetail>(SIMMEDTK_RENDER_NORMALS); auto planeRendDetail = std::make_shared<RenderDetail>(SIMMEDTK_RENDER_NORMALS);
planeRendDetail->setAmbientColor(Color(0.5, 0.5, 0.5, 1.0)); planeRendDetail->setAmbientColor(Color(0.4, 0.4, 0.4, 1.0));
planeRendDetail->setDiffuseColor(Color(0.5, 0.5, 0.5, 1.0)); planeRendDetail->setDiffuseColor(Color(0.4, 0.4, 0.4, 1.0));
planeRendDetail->setSpecularColor(Color(0.4, 0.4, 0.4, 1.0)); planeRendDetail->setSpecularColor(Color(0.4, 0.4, 0.4, 1.0));
planeRendDetail->setShininess(50.0); planeRendDetail->setShininess(50.0);
...@@ -119,8 +120,8 @@ bool createCameraNavigationScene( ...@@ -119,8 +120,8 @@ bool createCameraNavigationScene(
auto targetModel = std::make_shared<MeshCollisionModel>(); auto targetModel = std::make_shared<MeshCollisionModel>();
targetModel->loadTriangleMesh(fileNameTarget); targetModel->loadTriangleMesh(fileNameTarget);
targetModel->getMesh()->scale(Eigen::UniformScaling<double>(0.1));//0.2 targetModel->getMesh()->translate(Eigen::Translation3d(0, 0.02, 0.02));
targetModel->getMesh()->scale(Eigen::UniformScaling<double>(0.15));//0.2 targetModel->getMesh()->scale(Eigen::UniformScaling<double>(0.15));
staticTarget->setModel(targetModel); staticTarget->setModel(targetModel);
targetModel->setRenderDetail(meshRenderDetail2); targetModel->setRenderDetail(meshRenderDetail2);
...@@ -133,7 +134,6 @@ bool createCameraNavigationScene( ...@@ -133,7 +134,6 @@ bool createCameraNavigationScene(
q.normalize(); q.normalize();
targetModel->getMesh()->rotate(q); targetModel->getMesh()->rotate(q);
} }
return true; return true;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment