From 140edc472544086687e83281661b538cdd44483e Mon Sep 17 00:00:00 2001 From: Mathieu Geisert <mgeisert@laas.fr> Date: Fri, 5 Dec 2014 15:11:24 +0100 Subject: [PATCH] Delete ~ files. --- idl/sceneViewer.idl~ | 47 -- include/Graphics/corbaserver/client-cpp.hh~ | 83 ---- src/CMakeLists.txt~ | 118 ----- src/GraphicalInterface.cpp~ | 327 ------------- src/GraphicalInterface.hh~ | 96 ---- src/GraphicalInterface.impl.cpp~ | 510 -------------------- src/GraphicalInterface.impl.hh~ | 125 ----- src/client-cpp.cc~ | 185 ------- src/client-cpp.hh~ | 86 ---- src/erreur.txt~ | 253 ---------- src/fwd.hh~ | 38 -- src/hpp-corbaserver.cc~ | 24 - src/sceneViewer.idl~ | 47 -- src/server-private.cc~ | 123 ----- src/server-private.hh~ | 63 --- src/server.cc~ | 159 ------ src/server.hh~ | 100 ---- test/test-client-cpp.cc~ | 42 -- 18 files changed, 2426 deletions(-) delete mode 100644 idl/sceneViewer.idl~ delete mode 100644 include/Graphics/corbaserver/client-cpp.hh~ delete mode 100644 src/CMakeLists.txt~ delete mode 100644 src/GraphicalInterface.cpp~ delete mode 100644 src/GraphicalInterface.hh~ delete mode 100644 src/GraphicalInterface.impl.cpp~ delete mode 100644 src/GraphicalInterface.impl.hh~ delete mode 100644 src/client-cpp.cc~ delete mode 100644 src/client-cpp.hh~ delete mode 100644 src/erreur.txt~ delete mode 100644 src/fwd.hh~ delete mode 100644 src/hpp-corbaserver.cc~ delete mode 100644 src/sceneViewer.idl~ delete mode 100644 src/server-private.cc~ delete mode 100644 src/server-private.hh~ delete mode 100644 src/server.cc~ delete mode 100644 src/server.hh~ delete mode 100644 test/test-client-cpp.cc~ diff --git a/idl/sceneViewer.idl~ b/idl/sceneViewer.idl~ deleted file mode 100644 index fcb1e30..0000000 --- a/idl/sceneViewer.idl~ +++ /dev/null @@ -1,47 +0,0 @@ -// file sceneViewer.idl -module Graphics { -module corbaserver { - - /// Corba exception travelling through the Corba channel - exception Error - { - string msg; - }; - - interface sceneViewer { - // Compute the sum of two real numbers. - void createWindow(in string name) raises (Error); - //void createWindow(in string name, in unsigned long x, in unsigned long y, in unsigned long width, in unsigned long height) raises (Error); - - void createScene(in string sceneName) raises (Error); - void createSceneWithFloor(in string sceneName) raises (Error); - void addSceneToWindow(in string sceneName, in string windowName) raises (Error); - - //void addBox(in string boxName, in float boxSize1, in float boxSize2, in float boxSize3, in string colorName) raises (Error); - void addBox(in string boxName, in float boxSize1, in float boxSize2, in float boxSize3) raises (Error); - - void addCapsule(in string capsuleName, in float radius, in float height) raises (Error); - //void addCapsule(in string capsuleName, in float radius, in float height, in string colorName) raises (Error); - - void addMesh(in string meshName, in string meshPath) raises (Error); - - void addCone(in string coneName, in float radius, in float height) raises (Error); - //void addCone(in string coneName, in float radius, in float height, in string colorName) raises (Error); - - void addCylinder(in string cylinderName, in float radius, in float height) raises (Error); - //void addCylinder(in string cylinderName, in float radius, in float height, in string colorName) raises (Error); - - void addSphere(in string sphereName, in float radius) raises (Error); - //void addSphere(in string sphereName, in float radius, in string colorName) raises (Error); - - void createGroup(in string groupName) raises (Error); - boolean addToGroup(in string nodeName, in string groupName) raises (Error); - - boolean applyConfiguration(in string nodeName, in float configuration) raises (Error); - - boolean setVisibility(in string nodeName, in string visibilityMode) raises (Error); - boolean setWireFrameMode(in string nodeName, in string wireFrameMode) raises (Error); - boolean setLightingMode(in string nodeName, in string lightingMode) raises (Error); - }; -}; -}; diff --git a/include/Graphics/corbaserver/client-cpp.hh~ b/include/Graphics/corbaserver/client-cpp.hh~ deleted file mode 100644 index aab7dbd..0000000 --- a/include/Graphics/corbaserver/client-cpp.hh~ +++ /dev/null @@ -1,83 +0,0 @@ -// -// client-cpp.h -// DynAndGraphics -// -// Created by Mathieu Geisert on 02/12/2014. -// Copyright (c) 2014 Mathieu Geisert. All rights reserved. -// - -#ifndef __DynAndGraphics__clientCpp__ -#define __DynAndGraphics__clientCpp__ - -#include <iostream> -#include <omniORB4/CORBA.h> - -#include "../../../src/graphicalinterface.hh" - - -namespace Graphics { -namespace corbaServer { - -class ClientCpp -{ -private: - CORBA_ORB_var orb_; - GraphicalInterface_var manager_; - -protected: - -public: - // Default constructor - ClientCpp(); - // Default destructor - ~ClientCpp(); - - /*void getNodeList(); - - void setRate(CORBA::Long rate); - void refresh(); - - void createWindow(const char* windowNameCorba); - - - //void createWindow(const char* name, CORBA::ULong x, CORBA::ULong y, CORBA::ULong width, CORBA::ULong height) ; - - void createScene(const char* sceneNameCorba) ; - void createSceneWithFloor(const char* sceneNameCorba) ; - void addSceneToWindow(const char* sceneNameCorba, const char* windowNameCorba) ; - - - //void addBox(const char* boxName, float boxSize1, float boxSize2, float boxSize3, const char* colorName); - void addBox(const char* boxNameCorba, float boxSize1, float boxSize2, float boxSize3) ; - - void addCapsule(const char* capsuleNameCorba, float radius, float height) ; - //void addCapsule(const char* capsuleName, float radius, float height, const char* colorName); - - void addMesh(const char* meshNameCorba, const char* meshPathCorba) ; - - void addCone(const char* coneNameCorba, float radius, float height) ; - //void addCone(const char* coneName, float radius, float height, const char* colorName); - - void addCylinder(const char* cylinderNameCorba, float radius, float height) ; - //void addCylinder(const char* cylinderName, float radius, float height, const char* colorName); - - void addSphere(const char* sphereNameCorba, float radius) ; - //void addSphere(const char* sphereName, float radius, const char* colorName); - - void addURDF(const char* urdfNameCorba, const char* urdfPathCorba, const char* urdfPackagePathCorba); - - void createGroup(const char* groupNameCorba) ; - bool addToGroup(const char* nodeNameCorba, const char* groupNameCorba) ; - - bool applyConfiguration(const char* nodeNameCorba, const double* configuration) ; - - bool setVisibility(const char* nodeNameCorba, const char* visibilityModeCorba) ; - bool setWireFrameMode(const char* nodeNameCorba, const char* wireFrameModeCorba) ; - bool setLightingMode(const char* nodeNameCorba, const char* lightingModeCorba) ;*/ - -}; //end of class ClientCpp - -} //end of namespace corbaserver -} //end of namespace Graphics - -#endif // __DynAndGraphics__clientCpp__ diff --git a/src/CMakeLists.txt~ b/src/CMakeLists.txt~ deleted file mode 100644 index f900213..0000000 --- a/src/CMakeLists.txt~ +++ /dev/null @@ -1,118 +0,0 @@ -# Copyright (c) 2014 LAAS-CNRS -# Author: Mathieu Geisert -# -# This file is part of SceneViewer-corba. -# SceneViewer-corba is free software: you can redistribute it -# and/or modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation, either version -# 3 of the License, or (at your option) any later version. -# -# SceneViewer-corba is distributed in the hope that it will be -# useful, but WITHOUT ANY WARRANTY; without even the implied warranty -# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Lesser Public License for more details. You should have -# received a copy of the GNU Lesser General Public License along with -# hpp-corbaserver. If not, see -# <http://www.gnu.org/licenses/>. - -SET(LIBRARY_NAME ${PROJECT_NAME}) -SET(IDL_SOURCES - graphicalinterface - ) - -OMNIIDL_INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/idl) -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/src) -FOREACH(IDL ${IDL_SOURCES}) - GENERATE_IDL_FILE (${IDL} - ${CMAKE_SOURCE_DIR}/idl/Graphics/corbaserver) -ENDFOREACH() - -ADD_LIBRARY(${LIBRARY_NAME} - SHARED - graphicalinterface.hh - graphicalinterfaceSK.cc - GraphicalInterface.impl.cpp - GraphicalInterface.impl.hh - server.hh - server.cc - server-private.cc - server-private.hh - client-cpp.cc - client-cpp.hh - se3.hpp - ${CMAKE_CURRENT_BINARY_DIR}/Graphics/corbaserver/graphicalinterface_idl.py -) - -PKG_CONFIG_USE_DEPENDENCY(${LIBRARY_NAME} omniORB4) -PKG_CONFIG_USE_DEPENDENCY(${LIBRARY_NAME} openscenegraph) -PKG_CONFIG_USE_DEPENDENCY(${LIBRARY_NAME} openthreads) -PKG_CONFIG_USE_DEPENDENCY(${LIBRARY_NAME} SceneViewer) -PKG_CONFIG_USE_DEPENDENCY(${LIBRARY_NAME} urdfdom) -#PKG_CONFIG_USE_DEPENDENCY(${LIBRARY_NAME} eigen3) -#PKG_CONFIG_USE_DEPENDENCY(${LIBRARY_NAME} boost) - -INSTALL(TARGETS ${LIBRARY_NAME} DESTINATION lib) - -# search for python -FINDPYTHON() - -FOREACH (IDL ${IDL_SOURCES}) - ADD_CUSTOM_COMMAND( - OUTPUT - ${CMAKE_CURRENT_BINARY_DIR}/Graphics/corbaserver/${IDL}_idl.py - COMMAND ${OMNIIDL} - ARGS -bpython -Wbpackage="" -I${CMAKE_SOURCE_DIR}/idl - ${CMAKE_SOURCE_DIR}/idl/Graphics/corbaserver/${IDL}.idl - MAIN_DEPENDENCY - ${CMAKE_SOURCE_DIR}/idl/Graphics/corbaserver/${IDL}.idl - ) - SET_SOURCE_FILES_PROPERTIES( - ${CMAKE_CURRENT_BINARY_DIR}/${IDL}_idl.py - GENERATED=ON - ) - INSTALL( - FILES - ${CMAKE_CURRENT_BINARY_DIR}/${IDL}_idl.py - DESTINATION ${PYTHON_SITELIB}/Graphics/corbaserver - ) -ENDFOREACH() - -INSTALL( - FILES - ${CMAKE_CURRENT_SOURCE_DIR}/Graphics/__init__.py - ${CMAKE_CURRENT_SOURCE_DIR}/Graphics/quaternion.py - DESTINATION ${PYTHON_SITELIB}/Graphics - ) -INSTALL( - FILES - ${CMAKE_CURRENT_SOURCE_DIR}/Graphics/corbaserver/__init__.py - DESTINATION ${PYTHON_SITELIB}/Graphics/corbaserver - ) -INSTALL( - FILES - ${CMAKE_CURRENT_SOURCE_DIR}/Graphics/corbaserver/client.py - DESTINATION ${PYTHON_SITELIB}/Graphics/corbaserver - ) -INSTALL( - FILES - ${CMAKE_SOURCE_DIR}/idl/Graphics/corbaserver/graphicalinterface.idl - DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/idl/Graphics/corbaserver -) - -# Standalone corba server -ADD_EXECUTABLE (SceneViewercorbaserver SceneViewer-corbaserver.cc) -TARGET_LINK_LIBRARIES(SceneViewercorbaserver ${LIBRARY_NAME}) -TARGET_LINK_LIBRARIES(SceneViewercorbaserver SceneViewer) -TARGET_LINK_LIBRARIES(SceneViewercorbaserver urdfdom_model) -TARGET_LINK_LIBRARIES(SceneViewercorbaserver ${Boost_LIBRARIES}) - - -ADD_EXECUTABLE (clientTest ../test/test-client-cpp.cc) -TARGET_LINK_LIBRARIES(clientTest ${LIBRARY_NAME}) -TARGET_LINK_LIBRARIES(clientTest SceneViewer) -TARGET_LINK_LIBRARIES(clientTest urdfdom_model) -TARGET_LINK_LIBRARIES(clientTest ${Boost_LIBRARIES}) -#TARGET_LINK_LIBRARIES(clientTest eigen3) - -INSTALL (TARGETS hppcorbaserver DESTINATION bin) -INSTALL (TARGETS clientTest DESTINATION bin) diff --git a/src/GraphicalInterface.cpp~ b/src/GraphicalInterface.cpp~ deleted file mode 100644 index 4fbe588..0000000 --- a/src/GraphicalInterface.cpp~ +++ /dev/null @@ -1,327 +0,0 @@ -// -// GraphicalGroupOSG.h -// DynAndGraphics -// -// Created by Justin Carpentier on 07/02/2014. -// Copyright (c) 2014 Justin Carpentier. All rights reserved. -// - -#include <iostream> -#include "GraphicalInterface.hh" - -namespace Graphics { - - GraphicalInterface::GraphicalInterface() : - windowManagers_(), nodes_(), groupNodes_() - { - return; - } - - GraphicalInterfacePtr_t GraphicalInterface::create() - { - GraphicalInterfacePtr_t shared_ptr(new GraphicalInterface()); - return shared_ptr; - } - - osgVector4 GraphicalInterface::getColor(CORBA::char* colorName) - { - if (colorName == "blue") - return osgVector4(0.f, 0.f, 1.f, 1.f); - else if (colorName == "green") - return osgVector4(0.f, 1.f, 0.f, 1.f); - else if (colorName == "red") - return osgVector4(1.f, 0.f, 0.f, 1.f); - else if (colorName == "white") - return osgVector4(1.f, 1.f, 1.f, 1.f); - else - return osgVector4(0.f, 0.f, 0.f, 1.f); - } - - VisibilityMode GraphicalInterface::getVisibility(CORBA::char* visibilityName) - { - if (visibilityName == "OFF") - return VISIBILITY_OFF; - else if (visibilityName == "ALWAYS_ON_TOP") - return ALWAYS_ON_TOP; - else - return VISIBILITY_ON; - } - - WireFrameMode GraphicalInterface::getWire(CORBA::char* wireName) - { - if (wireName == "WIREFRAME") - return WIREFRAME; - else if (wireName == "FILL_AND_WIREFRAME") - return FILL_AND_WIREFRAME; - else - return FILL; - } - - LightingMode GraphicalInterface::getLight(CORBA::char* lightName) - { - if (lightName == "OFF") - return LIGHT_INFLUENCE_OFF; - else - return LIGHT_INFLUENCE_ON; - } - - std::string GraphicalInterface::parentName(CORBA::char* name) - { - std::string Name(name); - std::string::iterator parentNameIt; - for (std::string::iterator i = Name.end() ; (*i) != char('/') && i != Name.begin() ; i--) { - parentNameIt = i; - } - parentNameIt--; - - std::string parentName; - for (std::string::iterator i = Name.begin(); i != parentNameIt; i++ ) { - parentName.push_back(*i); - } - - return parentName; - } - - void GraphicalInterface::initParent(CORBA::char* nodeName, NodePtr_t node) - { - GroupNodePtr_t groupNode = groupNodes_[GraphicalInterface::parentName(nodeName)]; - if ( groupNode ) { - groupNode->addChild(node); - } - } - - void GraphicalInterface::addNode(const std::string &nodeName, NodePtr_t node) - { - nodes_[nodeName] = node; - } - - void GraphicalInterface::addGroup(const std::string &groupName, GroupNodePtr_t group) - { - groupNodes_[groupName] = group; - nodes_[groupName] = group; - } - - -//Public functions - - void GraphicalInterface::createWindow(CORBA::char* windowNameCorba) - throw (Error) - { - std::string windowName(windowNameCorba); - WindowManagerPtr_t newWindow = WindowManager::create(); - windowManagers_[name] = newWindow; - } - - /*void GraphicalInterface::createWindow(CORBA::char* name, const unsigned int& x, const unsigned int& y, const unsigned int& width, const unsigned int& height) - throw (Error) - { - WindowManagerPtr_t newWindow = WindowManager::create(x, y, width, height); - windowManagers_[name] = newWindow; - }*/ - - void GraphicalInterface::createScene(CORBA::char* sceneNameCorba) - throw (Error) - { - std::string sceneName(sceneNameCorba); - GroupNodePtr_t mainNode = GroupNode::create(sceneName); - addGroup(sceneName, mainNode); - } - - void GraphicalInterface::createSceneWithFloor(CORBA::char* sceneNameCorba) - throw (Error) - { - std::string sceneName(sceneNameCorba); - GroupNodePtr_t mainNode = GroupNode::create(sceneName); - addGroup(sceneName, mainNode); - std::string floorName = sceneName + "/floor"; - LeafNodeGroundPtr_t floor = LeafNodeGround::create(floorName); - addNode(floorName, floor); - mainNode->addChild(floor); - } - - void GraphicalInterface::addSceneToWindow(CORBA::char* sceneNameCorba,CORBA::char* windowNameCorba) - throw (Error) - { - std::string sceneName(sceneNameCorba); - std::string windowName(windowNameCorba); - windowManagers_[windowName]->addNode(groupNodes_[sceneName]); - } - - /*void GraphicalInterface::addBox(CORBA::char* boxName, CORBA::Float boxSize1, CORBA::Float boxSize2, CORBA::Float boxSize3, CORBA::char* colorName) - throw (Error) - { - osgVector4 color = getColor(colorName); - LeafNodeBoxPtr_t box = LeafNodeBox::create(boxName, osgVector3(boxSize1, boxSize2, boxSize3), color); - GraphicalInterface::initParent(boxName, box); - addNode(boxName, box); - }*/ - - void GraphicalInterface::addBox(CORBA::char* boxNameCorba, CORBA::Float boxSize1, CORBA::Float boxSize2, CORBA::Float boxSize3) - throw (Error) - { - std::string boxName(boxNameCorba); - LeafNodeBoxPtr_t box = LeafNodeBox::create(boxName, osgVector3(boxSize1, boxSize2, boxSize3)); - GraphicalInterface::initParent(boxName, box); - addNode(boxName, box); - } - - void GraphicalInterface::addCapsule(CORBA::char* capsuleNameCorba, CORBA::Float radius, CORBA::Float height) - throw (Error) - { - std::string capsuleName(capsuleNameCorba); - LeafNodeCapsulePtr_t capsule = LeafNodeCapsule::create(capsuleName, radius, height); - GraphicalInterface::initParent(capsuleName, capsule); - addNode(capsuleName, capsule); - } - - /*void GraphicalInterface::addCapsule(CORBA::char* capsuleName, CORBA::Float radius, CORBA::Float height, CORBA::char* colorName) - throw (Error) - { - osgVector4 color = getColor(colorName); - LeafNodeCapsulePtr_t capsule = LeafNodeCapsule::create(capsuleName, radius, height, color); - GraphicalInterface::initParent(capsuleName, capsule); - addNode(capsuleName, capsule); - }*/ - - void GraphicalInterface::addMesh(CORBA::char* meshNameCorba, CORBA::char* meshPathCorba) - throw (Error) - { - std::string meshName(meshNameCorba); - std::string meshPath(meshPathCorba); - LeafNodeColladaPtr_t mesh = LeafNodeCollada::create(meshName, meshPath); - GraphicalInterface::initParent(meshName, mesh); - addNode(meshName, mesh); - } - - void GraphicalInterface::addCone(CORBA::char* coneNameCorba, CORBA::Float radius, CORBA::Float height) - throw (Error) - { - std::string coneName(coneNameCorba); - LeafNodeConePtr_t cone = LeafNodeCone::create(coneName, radius, height); - GraphicalInterface::initParent(coneName, cone); - addNode(coneName, cone); - } - - /*void GraphicalInterface::addCone(CORBA::char* coneName, CORBA::Float radius, CORBA::Float height, CORBA::char* colorName) - throw (Error) - { - osgVector4 color = getColor(colorName); - LeafNodeConePtr_t cone = LeafNodeCone::create(coneName, radius, height, color); - GraphicalInterface::initParent(coneName, cone); - addNode(coneName, cone); - }*/ - - void GraphicalInterface::addCylinder(CORBA::char* cylinderNameCorba, CORBA::Float radius, CORBA::Float height) - throw (Error) - { - std::string cylinderName(cylinderNameCorba); - LeafNodeCylinderPtr_t cylinder = LeafNodeCylinder::create(cylinderName, radius, height); - GraphicalInterface::initParent(cylinderName, cylinder); - addNode(cylinderName, cylinder); - } - - /*void GraphicalInterface::addCylinder(CORBA::char* cylinderName, CORBA::Float radius, CORBA::Float height, CORBA::char* colorName) - throw (Error) - { - osgVector4 color = getColor(colorName); - LeafNodeCylinderPtr_t cylinder = LeafNodeCylinder::create(cylinderName, radius, height); - GraphicalInterface::initParent(cylinderName, cylinder); - addNode(cylinderName, cylinder); - - }*/ - - void GraphicalInterface::addSphere(CORBA::char* sphereNameCorba, CORBA::Float radius) - throw (Error) - { - std::string sphereName(sphereNameCorba); - LeafNodeSpherePtr_t sphere = LeafNodeSphere::create(sphereName, radius); - GraphicalInterface::initParent(sphereName, sphere); - addNode(sphereName, sphere); - } - - /*void GraphicalInterface::addSphere(CORBA::char* sphereName, CORBA::Float radius, CORBA::char* colorName) - throw (Error) - { - osgVector4 color = getColor(colorName); - LeafNodeSpherePtr_t sphere = LeafNodeSphere::create(sphereName, radius); - GraphicalInterface::initParent(sphereName, sphere); - addNode(sphereName, sphere); - }*/ - - void GraphicalInterface::createGroup(CORBA::char* groupNameCorba) - throw (Error) - { - std::string groupName(groupNameCorba); - GroupNodePtr_t groupNode = GroupNode::create(groupName); - GraphicalInterface::initParent(groupName, groupNode); - addGroup(groupName, groupNode); - } - - CORBA::boolean GraphicalInterface::addToGroup(CORBA::char* nodeNameCorba, CORBA::char* groupNameCorba) - throw (Error) - { - std::string nodeName(nodeNameCorba); - std::stirng groupName(groupNameCorba); - NodePtr_t node = nodes_[nodeName]; - GroupNodePtr_t group = groupNodes_[groupName]; - if (!node || !group) { - return false; - } - else { - group->addChild(node); - return true; - } - } - - CORBA::boolean GraphicalInterface::applyConfiguration(CORBA::char* nodeNameCorba, CORBA::Float configuration) - throw (Error) - { - std::string nodeName(nodeNameCorba); - NodePtr_t node = nodes_[nodeName]; - if (!node) - return false; - //node->applyConfiguration(configuration); - return true; - } - - CORBA::boolean GraphicalInterface::setVisibility(CORBA::char* nodeNameCorba, CORBA::char* visibilityModeCorba) - throw (Error) - { - std::string nodeName(nodeNameCorba); - std::string visibilityMode(visibilityModeCorba); - VisibilityMode visibility = getVisibility(visibilityMode); - NodePtr_t node = nodes_[nodeName]; - if (!node) - return false; - node->setVisibilityMode(visibility); - return true; - } - - CORBA::boolean GraphicalInterface::setWireFrameMode(CORBA::char* nodeNameCorba, CORBA::char* wireFrameModeCorba) - throw (Error) - { - std::string nodeName(nodeNameCorba); - std::string wireFrameMode(wireFrameModeCorba); - WireFrameMode wire = getWire(wireFrameMode); - NodePtr_t node = nodes_[nodeName]; - if (!node) - return false; - node->setWireFrameMode(wire); - return true; - } - - CORBA::boolean GraphicalInterface::setLightingMode(CORBA::char* nodeNameCorba, CORBA::char* lightingModeCorba) - throw (Error) - { - std::string nodeName(nodeNameCorba); - std::string lightingMode(lightingModeCorba); - LightingMode light = getLight(lightingMode); - NodePtr_t node = nodes_[nodeName]; - if (!node) - return false; - node->setLightingMode(light); - return true; - } - - -} diff --git a/src/GraphicalInterface.hh~ b/src/GraphicalInterface.hh~ deleted file mode 100644 index 431722a..0000000 --- a/src/GraphicalInterface.hh~ +++ /dev/null @@ -1,96 +0,0 @@ -// -// GraphicalObjectOSG.h -// DynAndGraphics -// -// Created by Justin Carpentier on 06/02/2014. -// Copyright (c) 2014 Justin Carpentier. All rights reserved. -// - -#ifndef __DynAndGraphics__GraphicalInterface__ -#define __DynAndGraphics__GraphicalInterface__ - -#include "../../SceneViewer/WindowManager.h" -#include "../../SceneViewer/Node.h" -#include "../../SceneViewer/GroupNode.h" -#include "../../SceneViewer/LeafNodeBox.h" -#include "../../SceneViewer/LeafNodeCapsule.h" -#include "../../SceneViewer/LeafNodeCone.h" -#include "../../SceneViewer/LeafNodeCylinder.h" -#include "../../SceneViewer/LeafNodeLine.h" -#include "../../SceneViewer/LeafNodeSphere.h" -#include "../../SceneViewer/macros.h" -#include "../../SceneViewer/configOSG.h" -#include "../../SceneViewer/LeafNodeGround.h" -#include "../../SceneViewer/LeafNodeCollada.h" -#include "../idl/sceneViewer.hh" - -namespace Graphics { - - DEF_CLASS_SMART_PTR(GraphicalInterface) - - - class GraphicalInterface : public virtual POA_Graphics::sceneViewer - { - private: - std::map<std::string, WindowManagerPtr_t> windowManagers_; - std::map<std::string, NodePtr_t> nodes_; - std::map<std::string, GroupNodePtr_t> groupNodes_; - - static osgVector4 getColor(const std::string& colorName); - static std::string parentName(const std::string& name); - static VisibilityMode getVisibility(const std::string& visibilityName); - static WireFrameMode getWire(const std::string& wireName); - static LightingMode getLight(const std::string& lightName); - void initParent(const std::string& nodeName, NodePtr_t node); - void addNode(const std::string& nodeName, NodePtr_t node); - void addGroup(const std::string& groupName, GroupNodePtr_t group); - - protected: - /** - \brief Default constructor - */ - GraphicalInterface (); - - public: - /** Static method which create a new box defined by the half_axis vector - */ - static GraphicalInterfacePtr_t create(); - - virtual void createWindow(CORBA::char* windowNameCorba) throw (Error); - //virtual void createWindow(CORBA::char* name, CORBA::ULong x, CORBA::ULong y, CORBA::ULong width, CORBA::ULong height) throw (Error); - - virtual void createScene(CORBA::char* sceneNameCorba) throw (Error); - virtual void createSceneWithFloor(CORBA::char* sceneNameCorba) throw (Error); - virtual void addSceneToWindow(CORBA::char* sceneNameCorba, CORBA::char* windowNameCorba) throw (Error); - - //virtual void addBox(CORBA::char* boxName, CORBA::Float boxSize1, CORBA::Float boxSize2, CORBA::Float boxSize3, CORBA::char* colorName); - virtual void addBox(CORBA::char* boxNameCorba, CORBA::Float boxSize1, CORBA::Float boxSize2, CORBA::Float boxSize3) throw (Error); - - virtual void addCapsule(CORBA::char* capsuleNameCorba, CORBA::Float radius, CORBA::Float height) throw (Error); - //virtual void addCapsule(CORBA::char* capsuleName, CORBA::Float radius, CORBA::Float height, CORBA::char* colorName); - - virtual void addMesh(CORBA::char* meshNameCorba, CORBA::char* meshPathCorba) throw (Error); - - virtual void addCone(CORBA::char* coneNameCorba, CORBA::Float radius, CORBA::Float height) throw (Error); - //virtual void addCone(CORBA::char* coneName, CORBA::Float radius, CORBA::Float height, CORBA::char* colorName); - - virtual void addCylinder(CORBA::char* cylinderNameCorba, CORBA::Float radius, CORBA::Float height) throw (Error); - //virtual void addCylinder(CORBA::char* cylinderName, CORBA::Float radius, CORBA::Float height, CORBA::char* colorName); - - virtual void addSphere(CORBA::char* sphereNameCorba, CORBA::Float radius) throw (Error); - //virtual void addSphere(CORBA::char* sphereName, CORBA::Float radius, CORBA::char* colorName); - - virtual void createGroup(CORBA::char* groupNameCorba) throw (Error); - virtual CORBA::boolean addToGroup(CORBA::char* nodeNameCorba, CORBA::char* groupNameCorba) throw (Error); - - virtual CORBA::boolean applyConfiguration(CORBA::char* nodeNameCorba, CORBA::Float configuration) throw (Error); - - virtual CORBA::boolean setVisibility(CORBA::char* nodeNameCorba, CORBA::char* visibilityModeCorba) throw (Error); - virtual CORBA::boolean setWireFrameMode(CORBA::char* nodeNameCorba, CORBA::char* wireFrameModeCorba) throw (Error); - virtual CORBA::boolean setLightingMode(CORBA::char* nodeNameCorba, CORBA::char* lightingModeCorba) throw (Error); - - }; - -} /* namespace Graphics */ - -#endif /* defined(__DynAndGraphics__GraphicalInterface__) */ diff --git a/src/GraphicalInterface.impl.cpp~ b/src/GraphicalInterface.impl.cpp~ deleted file mode 100644 index fd44b2d..0000000 --- a/src/GraphicalInterface.impl.cpp~ +++ /dev/null @@ -1,510 +0,0 @@ -// -// GraphicalInterface.impl.cc -// Corbaserver for SceneViewer -// -// Created by Mathieu Geisert on November 2014. -// Copyright (c) 2014 Mathieu Geisert. All rights reserved. -// - -#include "GraphicalInterface.impl.hh" - -namespace Graphics { -namespace corbaServer { -namespace impl { - -GraphicalInterface::GraphicalInterface(corbaServer::Server* server) : - windowManagers_(), nodes_(), groupNodes_(), server_(server), mtx_(), rate_(20), newNodeConfigurations_() -{ -} - -osgVector4 GraphicalInterface::getColor(const std::string& colorName) -{ - if (colorName == "blue") - return osgVector4(0.f, 0.f, 1.f, 1.f); - else if (colorName == "green") - return osgVector4(0.f, 1.f, 0.f, 1.f); - else if (colorName == "red") - return osgVector4(1.f, 0.f, 0.f, 1.f); - else if (colorName == "white") - return osgVector4(1.f, 1.f, 1.f, 1.f); - else - return osgVector4(0.f, 0.f, 0.f, 1.f); -} - -VisibilityMode GraphicalInterface::getVisibility(const std::string& visibilityName) -{ - if (visibilityName == "OFF") - return VISIBILITY_OFF; - else if (visibilityName == "ALWAYS_ON_TOP") - return ALWAYS_ON_TOP; - else if (visibilityName == "ON") - return VISIBILITY_ON; - else { - std::cout << "Visibility mode not known, visibility mode can be \"ON\",\"OFF\" or \"ALWAYS_ON_TOP\"." << std::endl; - std::cout << "Visibility mode set to default = \"ON\"." << std::endl; - return VISIBILITY_ON; - } -} - -WireFrameMode GraphicalInterface::getWire(const std::string& wireName) -{ - if (wireName == "WIREFRAME") - return WIREFRAME; - else if (wireName == "FILL_AND_WIREFRAME") - return FILL_AND_WIREFRAME; - else if (wireName == "FILL") - return FILL; - else { - std::cout << "Wire mode not known, wire mode can be \"FILL\",\"WIREFRAME\" or \"FILL_AND_WIREFRAME\"." << std::endl; - std::cout << "Wire mode set to default = \"FILL\"." << std::endl; - return FILL; - } -} - -LightingMode GraphicalInterface::getLight(const std::string& lightName) -{ - if (lightName == "OFF") - return LIGHT_INFLUENCE_OFF; - else if (lightName == "ON") - return LIGHT_INFLUENCE_ON; - else { - std::cout << "Lighting mode not known, lighting mode can be \"ON\" or \"OFF\"." << std::endl; - std::cout << "Lighting mode set to default = \"ON\"." << std::endl; - return LIGHT_INFLUENCE_ON; - } -} - -std::string GraphicalInterface::parentName(const std::string& name) -{ - std::string Name(name); - std::string::iterator parentNameIt; - for (std::string::iterator i = Name.end() ; (*i) != char('/') && i != Name.begin() ; i--) { - parentNameIt = i; - } - parentNameIt--; - - std::string parentName; - for (std::string::iterator i = Name.begin(); i != parentNameIt; i++ ) { - parentName.push_back(*i); - } - - return parentName; -} - -void GraphicalInterface::initParent(const std::string& nodeName, NodePtr_t node) -{ - GroupNodePtr_t groupNode = groupNodes_[GraphicalInterface::parentName(nodeName)]; - if ( groupNode ) { - groupNode->addChild(node); - } -} - -void GraphicalInterface::addNode(const std::string& nodeName, NodePtr_t node) -{ - nodes_[nodeName] = node; -} - -void GraphicalInterface::addGroup(const std::string& groupName, GroupNodePtr_t group) -{ - groupNodes_[groupName] = group; - nodes_[groupName] = group; -} - -void GraphicalInterface::threadRefreshing(WindowManagerPtr_t window) -{ - while (1) - { - mtx_.lock(); - window->frame(); - mtx_.unlock(); - boost::this_thread::sleep(boost::posix_time::milliseconds(rate_)); - } -} - -osgQuat GraphicalInterface::corbaConfToOsgQuat(const double* configurationCorba) -{ - // configurationCorba = trans (x, y, z), quat(w, x, y, z) - // osgQuat = quat(x, y, z, w) - return osgQuat(configurationCorba[4], configurationCorba[5], configurationCorba[6], configurationCorba[3]); -} - -osgVector3 GraphicalInterface::corbaConfToOsgVec3(const double* configurationCorba) -{ - return osgVector3(configurationCorba[0], configurationCorba[1], configurationCorba[2]); -} - - -//Public functions - -bool GraphicalInterface::setRate(CORBA::Long rate) -{ - if ( rate <= 0 ) { - std::cout << "You should specify a positive rate" << std::endl; - return false; - } - else { - rate_ = rate; - return true; - } -} - -bool GraphicalInterface::createWindow(const char* windowNameCorba) -{ - std::string windowName(windowNameCorba); - if ( windowManagers_.find(windowName) != windowManagers_.end()) { - std::cout << "You need to chose an other name, \"" << windowName << "\" already exist." << std::endl; - return false; - } - else { - WindowManagerPtr_t newWindow = WindowManager::create(); - windowManagers_[windowName] = newWindow; - boost::thread refreshThread(boost::bind(&GraphicalInterface::threadRefreshing, this, newWindow)); - return true; - } -} - -void GraphicalInterface::refresh() -{ - mtx_.lock(); - //refresh scene with the new configuration - for (std::list<NodeConfiguration>::iterator it = newNodeConfigurations_.begin() ; it != newNodeConfigurations_.end() ; it++ ) { - (*it).node->applyConfiguration((*it).position, (*it).quat); - } - mtx_.unlock(); - newNodeConfigurations_.clear(); -} - -/*void GraphicalInterface::createWindow(const char* name, const unsigned int& x, const unsigned int& y, const unsigned int& width, const unsigned int& height) - - { - WindowManagerPtr_t newWindow = WindowManager::create(x, y, width, height); - windowManagers_[name] = newWindow; - }*/ - -bool GraphicalInterface::createScene(const char* sceneNameCorba) -{ - std::string sceneName(sceneNameCorba); - if (nodes_.find(sceneName) != nodes_.end()) { - std::cout << "You need to chose an other name, \"" << sceneName << "\" already exist." << std::endl; - return false; - } - else { - GroupNodePtr_t mainNode = GroupNode::create(sceneName); - addGroup(sceneName, mainNode); - return true; - } -} - -bool GraphicalInterface::createSceneWithFloor(const char* sceneNameCorba) - -{ - std::string sceneName(sceneNameCorba); - if (nodes_.find(sceneName) != nodes_.end()) { - std::cout << "You need to chose an other name, \"" << sceneName << "\" already exist." << std::endl; - return false; - } - else { - GroupNodePtr_t mainNode = GroupNode::create(sceneName); - addGroup(sceneName, mainNode); - std::string floorName = sceneName + "/floor"; - LeafNodeGroundPtr_t floor = LeafNodeGround::create(floorName); - addNode(floorName, floor); - mainNode->addChild(floor); - return true; - } -} - -bool GraphicalInterface::addSceneToWindow(const char* sceneNameCorba,const char* windowNameCorba) - -{ - std::string sceneName(sceneNameCorba); - std::string windowName(windowNameCorba); - if (windowManagers_.find(windowName) != windowManagers_.end() && groupNodes_.find(sceneName) != groupNodes_.end() ) { - windowManagers_[windowName]->addNode(groupNodes_[sceneName]); - return true; - } - else { - std::cout << "Window name \"" << windowName << "\" and/or scene name \"" << sceneName << "\" doesn't exist." << std::endl; - return false; - } -} - -/*void GraphicalInterface::addBox(const char* boxName, const float boxSize1, const float boxSize2, const float boxSize3, const char* colorName) - - { - osgVector4 color = getColor(colorName); - LeafNodeBoxPtr_t box = LeafNodeBox::create(boxName, osgVector3(boxSize1, boxSize2, boxSize3), color); - GraphicalInterface::initParent(boxName, box); - addNode(boxName, box); - }*/ - -bool GraphicalInterface::addBox(const char* boxNameCorba, const float boxSize1, const float boxSize2, const float boxSize3) - -{ - std::string boxName(boxNameCorba); - if (nodes_.find(boxName) != nodes_.end()) { - std::cout << "You need to chose an other name, \"" << boxName << "\" already exist." << std::endl; - return false; - } - else { - LeafNodeBoxPtr_t box = LeafNodeBox::create(boxName, osgVector3(boxSize1, boxSize2, boxSize3)); - GraphicalInterface::initParent(boxName, box); - addNode(boxName, box); - return true; - } -} - -bool GraphicalInterface::addCapsule(const char* capsuleNameCorba, const float radius, const float height) - -{ - const std::string capsuleName(capsuleNameCorba); - if (nodes_.find(capsuleName) != nodes_.end()) { - std::cout << "You need to chose an other name, \"" << capsuleName << "\" already exist." << std::endl; - return false; - } - else { - LeafNodeCapsulePtr_t capsule = LeafNodeCapsule::create(capsuleName, radius, height); - GraphicalInterface::initParent(capsuleName, capsule); - addNode(capsuleName, capsule); - return true; - } -} - -/*void GraphicalInterface::addCapsule(const char* capsuleName, const float radius, const float height, const char* colorName) - - { - osgVector4 color = getColor(colorName); - LeafNodeCapsulePtr_t capsule = LeafNodeCapsule::create(capsuleName, radius, height, color); - GraphicalInterface::initParent(capsuleName, capsule); - addNode(capsuleName, capsule); - }*/ - -bool GraphicalInterface::addMesh(const char* meshNameCorba, const char* meshPathCorba) - -{ - std::string meshName(meshNameCorba); - std::string meshPath(meshPathCorba); - if (nodes_.find(meshName) != nodes_.end()) { - std::cout << "You need to chose an other name, \"" << meshName << "\" already exist." << std::endl; - return false; - } - else { - try { - LeafNodeColladaPtr_t mesh = LeafNodeCollada::create(meshName, meshPath); - GraphicalInterface::initParent(meshName, mesh); - addNode(meshName, mesh); - return true; - } catch (const std::exception& exc) { - std::cout << "Mesh \"" << meshPath << "\" not found." << std::endl; - return false; - } - } -} - -bool GraphicalInterface::addCone(const char* coneNameCorba, const float radius, const float height) - -{ - std::string coneName(coneNameCorba); - if (nodes_.find(coneName) != nodes_.end()) { - std::cout << "You need to chose an other name, \"" << coneName << "\" already exist." << std::endl; - return false; - } - else { - LeafNodeConePtr_t cone = LeafNodeCone::create(coneName, radius, height); - GraphicalInterface::initParent(coneName, cone); - addNode(coneName, cone); - return true; - } -} - -/*void GraphicalInterface::addCone(const char* coneName, const float radius, const float height, const char* colorName) - - { - osgVector4 color = getColor(colorName); - LeafNodeConePtr_t cone = LeafNodeCone::create(coneName, radius, height, color); - GraphicalInterface::initParent(coneName, cone); - addNode(coneName, cone); - }*/ - -bool GraphicalInterface::addCylinder(const char* cylinderNameCorba, const float radius, const float height) - -{ - std::string cylinderName(cylinderNameCorba); - if (nodes_.find(cylinderName) != nodes_.end()) { - std::cout << "You need to chose an other name, \"" << cylinderName << "\" already exist." << std::endl; - return false; - } - else { - LeafNodeCylinderPtr_t cylinder = LeafNodeCylinder::create(cylinderName, radius, height); - GraphicalInterface::initParent(cylinderName, cylinder); - addNode(cylinderName, cylinder); - return true; - } -} - -/*void GraphicalInterface::addCylinder(const char* cylinderName, const float radius, const float height, const char* colorName) - - { - osgVector4 color = getColor(colorName); - LeafNodeCylinderPtr_t cylinder = LeafNodeCylinder::create(cylinderName, radius, height); - GraphicalInterface::initParent(cylinderName, cylinder); - addNode(cylinderName, cylinder); - - }*/ - -bool GraphicalInterface::addSphere(const char* sphereNameCorba, const float radius) - -{ - std::string sphereName(sphereNameCorba); - if (nodes_.find(sphereName) != nodes_.end()) { - std::cout << "You need to chose an other name, \"" << sphereName << "\" already exist." << std::endl; - return false; - } - else { - LeafNodeSpherePtr_t sphere = LeafNodeSphere::create(sphereName, radius); - GraphicalInterface::initParent(sphereName, sphere); - addNode(sphereName, sphere); - return true; - } -} - -void GraphicalInterface::getNodeList() -{ - std::cout << "List of Nodes :" << std::endl; - for (std::map<std::string, NodePtr_t>::iterator it=nodes_.begin(); it!=nodes_.end(); ++it) - std::cout << " " << it->first << std::endl; - std::cout << "List of GroupNodes :" << std::endl; - for (std::map<std::string, GroupNodePtr_t>::iterator it=groupNodes_.begin(); it!=groupNodes_.end(); ++it) - std::cout << " " << it->first << std::endl; -} - -void GraphicalInterface::getWindowList() -{ - std::cout << "List of Windows :" << std::endl; - for (std::map<std::string, WindowManagerPtr_t>::iterator it=windowManagers_.begin(); it!=windowManagers_.end(); ++it) - std::cout << " " << it->first << std::endl; -} -/*void GraphicalInterface::addSphere(const char* sphereName, const float radius, const char* colorName) - - { - osgVector4 color = getColor(colorName); - LeafNodeSpherePtr_t sphere = LeafNodeSphere::create(sphereName, radius); - GraphicalInterface::initParent(sphereName, sphere); - addNode(sphereName, sphere); - }*/ - -bool GraphicalInterface::createGroup(const char* groupNameCorba) -{ - const std::string groupName(groupNameCorba); - if (nodes_.find(groupName) != nodes_.end()) { - std::cout << "You need to chose an other name, \"" << groupName << "\" already exist." << std::endl; - return false; - } - else { - GroupNodePtr_t groupNode = GroupNode::create(groupName); - GraphicalInterface::initParent(groupName, groupNode); - addGroup(groupName, groupNode); - return true; - } -} - -bool GraphicalInterface::addURDF(const char* urdfNameCorba, const char* urdfPathCorba, const char* urdfPackagePathCorba) -{ - const std::string urdfName(urdfNameCorba); - const std::string urdfPath(urdfPathCorba); - const std::string urdfPackagePath(urdfPackagePathCorba); - if (nodes_.find(urdfName) != nodes_.end()) { - std::cout << "You need to chose an other name, \"" << urdfName << "\" already exist." << std::endl; - return false; - } - else { - GroupNodePtr_t urdf = URDFparser::parse(urdfName, urdfPath, urdfPackagePath); - NodePtr_t link; - for (int i=0 ; i< urdf->getNumOfChildren() ; i++) { - link = urdf->getChild(i); - nodes_[link->getID()] = link; - } - GraphicalInterface::initParent(urdfName, urdf); - addGroup(urdfName, urdf); - return true; - } -} - -bool GraphicalInterface::addToGroup(const char* nodeNameCorba, const char* groupNameCorba) -{ - const std::string nodeName(nodeNameCorba); - const std::string groupName(groupNameCorba); - if (nodes_.find(nodeName) == nodes_.end() || groupNodes_.find(groupName) == groupNodes_.end()) { - std::cout << "Node name \"" << nodeName << "\" and/or groupNode \"" << groupName << "\" doesn't exist." << std::endl; - return false; - } - else { - groupNodes_[groupName]->addChild(nodes_[nodeName]); - return true; - } -} - -bool GraphicalInterface::applyConfiguration(const char* nodeNameCorba, const double* configurationCorba) -{ - const std::string nodeName(nodeNameCorba); - if (nodes_.find(nodeName) == nodes_.end()) { - //no node named nodeName - std::cout << "No Node named \"" << nodeName << "\"" << std::endl; - return false; - } - else { - NodeConfiguration newNodeConfiguration; - newNodeConfiguration.node = nodes_[nodeName]; - try { - newNodeConfiguration.position = GraphicalInterface::corbaConfToOsgVec3(configurationCorba); - newNodeConfiguration.quat = GraphicalInterface::corbaConfToOsgQuat(configurationCorba); - } catch (const std::exception& exc) { - std::cout << "Error when converting configuration, configuration should be DOUBLE[7] = [transX, transY, transZ, quatW, quatX, quatY, quatZ]" <<std::endl; - return false; - } - newNodeConfigurations_.push_back(newNodeConfiguration); - return true; - } -} - -bool GraphicalInterface::setVisibility(const char* nodeNameCorba, const char* visibilityModeCorba) -{ - const std::string nodeName(nodeNameCorba); - const std::string visibilityMode(visibilityModeCorba); - VisibilityMode visibility = getVisibility(visibilityMode); - if (nodes_.find(nodeName) == nodes_.end()) { - std::cout << "Node \"" << nodeName << "\" doesn't exist." << std::endl; - return false; - } - nodes_[nodeName]->setVisibilityMode(visibility); - return true; -} - -bool GraphicalInterface::setWireFrameMode(const char* nodeNameCorba, const char* wireFrameModeCorba) -{ - const std::string nodeName(nodeNameCorba); - const std::string wireFrameMode(wireFrameModeCorba); - WireFrameMode wire = getWire(wireFrameMode); - if (nodes_.find(nodeName) == nodes_.end()) { - std::cout << "Node \"" << nodeName << "\" doesn't exist." << std::endl; - return false; - } - nodes_[nodeName]->setWireFrameMode(wire); - return true; -} - -bool GraphicalInterface::setLightingMode(const char* nodeNameCorba, const char* lightingModeCorba) -{ - const std::string nodeName(nodeNameCorba); - const std::string lightingMode(lightingModeCorba); - LightingMode light = getLight(lightingMode); - if (nodes_.find(nodeName) == nodes_.end()) { - std::cout << "Node \"" << nodeName << "\" doesn't exist." << std::endl; - return false; - } - nodes_[nodeName]->setLightingMode(light); - return true; -} -} //end namespace impl -} //end namespace corbaServer -} //end namespace Graphics diff --git a/src/GraphicalInterface.impl.hh~ b/src/GraphicalInterface.impl.hh~ deleted file mode 100644 index cc08cc4..0000000 --- a/src/GraphicalInterface.impl.hh~ +++ /dev/null @@ -1,125 +0,0 @@ -// -// GraphicalInterface.impl.hh -// Corbaserver for SceneViewer -// -// Created by Mathieu Geisert on November 2014. -// Copyright (c) 2014 LAAS-CNRS. All rights reserved. -// - -#ifndef SCENEVIEWER_CORBASERVER_GRAPHICALINTERFACE_HH -#define SCENEVIEWER_CORBASERVER_GRAPHICALINTERFACE_HH - -#include <omniORB4/CORBA.h> -#include <boost/thread.hpp> -#include <boost/thread/mutex.hpp> - -#include <Graphics/WindowManager.h> -#include <Graphics/Node.h> -#include <Graphics/GroupNode.h> -#include <Graphics/LeafNodeBox.h> -#include <Graphics/LeafNodeCapsule.h> -#include <Graphics/LeafNodeCone.h> -#include <Graphics/LeafNodeCylinder.h> -#include <Graphics/LeafNodeLine.h> -#include <Graphics/LeafNodeSphere.h> -#include <Graphics/macros.h> -#include <Graphics/config.h> -#include <Graphics/LeafNodeGround.h> -#include <Graphics/LeafNodeCollada.h> -#include <Graphics/URDFparser.h> - -#include "server.hh" -#include "graphicalinterface.hh" - -namespace Graphics { -namespace corbaServer { -namespace impl { - -struct NodeConfiguration { - NodePtr_t node; - osgVector3 position; - osgQuat quat; -}; - -class GraphicalInterface : public virtual POA_Graphics::corbaserver::Graphicalinterface -{ -private: - std::map<std::string, WindowManagerPtr_t> windowManagers_; - std::map<std::string, NodePtr_t> nodes_; - std::map<std::string, GroupNodePtr_t> groupNodes_; - corbaServer::Server* server_; - boost::mutex mtx_; - int rate_; - std::list<NodeConfiguration> newNodeConfigurations_; - - static osgVector4 getColor(const std::string& colorName); - static std::string parentName(const std::string& name); - static VisibilityMode getVisibility(const std::string& visibilityName); - static WireFrameMode getWire(const std::string& wireName); - static LightingMode getLight(const std::string& lightName); - void initParent(const std::string& nodeName, NodePtr_t node); - void addNode(const std::string& nodeName, NodePtr_t node); - void addGroup(const std::string& groupName, GroupNodePtr_t group); - void threadRefreshing(WindowManagerPtr_t window); - static osgQuat corbaConfToOsgQuat(const double* configurationCorba); - static osgVector3 corbaConfToOsgVec3(const double* configurationCorba); - -protected: - -public: - /** - \brief Default constructor - */ - GraphicalInterface (corbaServer::Server* server); - - virtual void getNodeList(); - virtual void getWindowList(); - - virtual bool setRate(CORBA::Long rate); - virtual void refresh(); - - virtual bool createWindow(const char* windowNameCorba); - - - //virtual void createWindow(const char* name, CORBA::ULong x, CORBA::ULong y, CORBA::ULong width, CORBA::ULong height) ; - - virtual bool createScene(const char* sceneNameCorba) ; - virtual bool createSceneWithFloor(const char* sceneNameCorba) ; - virtual bool addSceneToWindow(const char* sceneNameCorba, const char* windowNameCorba) ; - - - //virtual void addBox(const char* boxName, float boxSize1, float boxSize2, float boxSize3, const char* colorName); - virtual bool addBox(const char* boxNameCorba, float boxSize1, float boxSize2, float boxSize3) ; - - virtual bool addCapsule(const char* capsuleNameCorba, float radius, float height) ; - //virtual void addCapsule(const char* capsuleName, float radius, float height, const char* colorName); - - virtual bool addMesh(const char* meshNameCorba, const char* meshPathCorba) ; - - virtual bool addCone(const char* coneNameCorba, float radius, float height) ; - //virtual void addCone(const char* coneName, float radius, float height, const char* colorName); - - virtual bool addCylinder(const char* cylinderNameCorba, float radius, float height) ; - //virtual void addCylinder(const char* cylinderName, float radius, float height, const char* colorName); - - virtual bool addSphere(const char* sphereNameCorba, float radius) ; - //virtual void addSphere(const char* sphereName, float radius, const char* colorName); - - virtual bool addURDF(const char* urdfNameCorba, const char* urdfPathCorba, const char* urdfPackagePathCorba); - - virtual bool createGroup(const char* groupNameCorba) ; - virtual bool addToGroup(const char* nodeNameCorba, const char* groupNameCorba) ; - - virtual bool applyConfiguration(const char* nodeNameCorba, const double* configuration) ; - - virtual bool setVisibility(const char* nodeNameCorba, const char* visibilityModeCorba) ; - virtual bool setWireFrameMode(const char* nodeNameCorba, const char* wireFrameModeCorba) ; - virtual bool setLightingMode(const char* nodeNameCorba, const char* lightingModeCorba) ; - -}; // end of class - -} /* namespace impl */ -} /* namespace corbaServer */ -} /* namespace Graphics */ - -#endif /* defined(__DynAndGraphics__GraphicalInterface__) */ diff --git a/src/client-cpp.cc~ b/src/client-cpp.cc~ deleted file mode 100644 index 3a1cc24..0000000 --- a/src/client-cpp.cc~ +++ /dev/null @@ -1,185 +0,0 @@ -// -// client-cpp.cc -// C++ CORBA client interface for SceneViewer -// -// Created by Mathieu Geisert in December 2014. -// Copyright (c) 2014 LAAS-CNRS. All rights reserved. -// - -#include "client-cpp.hh" - -namespace Graphics { -namespace corbaServer { - -void ClientCpp::se3ToCorba(CORBA::Double* corbaPosition, const se3::SE3& se3position) -{ - Eigen::Quaternion<double> q(se3position.rotation()); - corbaPosition[0] = se3position.translation()(0); - corbaPosition[1] = se3position.translation()(1); - corbaPosition[2] = se3position.translation()(2); - corbaPosition[3] = q.w(); - corbaPosition[4] = q.x(); - corbaPosition[5] = q.y(); - corbaPosition[5] = q.z(); -} - - -ClientCpp::ClientCpp() -{ - int argc=0; // Dummy variables to support following call. - char** argv=0; - orb_ = CORBA::ORB_init(argc, argv); - - // Get a reference to the Naming Service - CORBA::Object_var rootContextObj = - orb_->resolve_initial_references("NameService"); - CosNaming::NamingContext_var nc = - CosNaming::NamingContext::_narrow(rootContextObj.in()); - - CosNaming::Name name; - name.length(2); - name[0].id = (const char *) "Graphics"; - name[0].kind = (const char *) "corbaserver"; - name[1].id = (const char *) "basic"; - name[1].kind = (const char *) "graphicalinterface"; - // Invoke the root context to retrieve the object reference - CORBA::Object_var managerObj = nc->resolve(name); - // Narrow the previous object to obtain the correct type - manager_ = Graphics::corbaserver::Graphicalinterface::_narrow(managerObj.in()); -} - -ClientCpp::~ClientCpp() -{ - //manager_->shutdown(); - if (!CORBA::is_nil(orb_)) { - try { - orb_->destroy(); - std::cout << "Ending CORBA..." << std::endl; - } catch(const CORBA::Exception& e) { - std::cout << "orb->destroy failed" << std::endl; - } - } -} - -void ClientCpp::getNodeList() -{ - manager_->getNodeList(); -} - - -void ClientCpp::getWindowList() -{ - manager_->getWindowList(); -} - -bool ClientCpp::setRate(int rate) -{ - return manager_->setRate(rate); -} - -void ClientCpp::refresh() -{ - manager_->refresh(); -} - -bool ClientCpp::createWindow(const char* windowName) -{ - return manager_->createWindow(windowName); -} - - - //void ClientCpp::createWindow(const char* name, CORBA::ULong x, CORBA::ULong y, CORBA::ULong width, CORBA::ULong height) ; - -bool ClientCpp::createScene(const char* sceneName) -{ - return manager_->createScene(sceneName); -} - -bool ClientCpp::createSceneWithFloor(const char* sceneName) -{ - return manager_->createSceneWithFloor(sceneName); -} - -bool ClientCpp::addSceneToWindow(const char* sceneName, const char* windowName) -{ - return manager_->addSceneToWindow(sceneName, windowName); -} - - //void ClientCpp::addBox(const char* boxName, float boxSize1, float boxSize2, float boxSize3, const char* colorName); - -bool ClientCpp::addBox(const char* boxName, float boxSize1, float boxSize2, float boxSize3) -{ - return manager_->addBox(boxName, boxSize1, boxSize2, boxSize3); -} - -bool ClientCpp::addCapsule(const char* capsuleName, float radius, float height) -{ - return manager_->addCapsule(capsuleName, radius, height); -} - - //void ClientCpp::addCapsule(const char* capsuleName, float radius, float height, const char* colorName); - -bool ClientCpp::addMesh(const char* meshName, const char* meshPath) -{ - return manager_->addMesh(meshName, meshPath); -} - -bool ClientCpp::addCone(const char* coneName, float radius, float height) -{ - return manager_->addCone(coneName, radius, height); -} - - //void ClientCpp::addCone(const char* coneName, float radius, float height, const char* colorName); - -bool ClientCpp::addCylinder(const char* cylinderName, float radius, float height) -{ - return manager_->addCylinder(cylinderName, radius, height); -} - - //void ClientCpp::addCylinder(const char* cylinderName, float radius, float height, const char* colorName); - -bool ClientCpp::addSphere(const char* sphereName, float radius) -{ - return manager_->addSphere(sphereName, radius); -} - - //void ClientCpp::addSphere(const char* sphereName, float radius, const char* colorName); - -bool ClientCpp::addURDF(const char* urdfName, const char* urdfPath, const char* urdfPackagePath) -{ - return manager_->addURDF(urdfName, urdfPath, urdfPackagePath); -} - -bool ClientCpp::createGroup(const char* groupName) -{ - return manager_->createGroup(groupName); -} - -bool ClientCpp::addToGroup(const char* nodeName, const char* groupName) -{ - return manager_->addToGroup(nodeName, groupName); -} - -bool ClientCpp::applyConfiguration(const char* nodeName, const se3::SE3& se3position) -{ - CORBA::Double corbaPosition[7]; - ClientCpp::se3ToCorba(corbaPosition, se3position); - return manager_->applyConfiguration(nodeName, corbaPosition); -} - -bool ClientCpp::setVisibility(const char* nodeName, const char* visibilityMode) -{ - return manager_->setVisibility(nodeName, visibilityMode); -} - -bool ClientCpp::setWireFrameMode(const char* nodeName, const char* wireFrameMode) -{ - return manager_->setWireFrameMode(nodeName, wireFrameMode); -} -bool ClientCpp::setLightingMode(const char* nodeName, const char* lightingMode) -{ - return manager_->setLightingMode(nodeName, lightingMode); -} - -} // end of namespace corbaserver -} // end of namespace Graphics diff --git a/src/client-cpp.hh~ b/src/client-cpp.hh~ deleted file mode 100644 index 87e883e..0000000 --- a/src/client-cpp.hh~ +++ /dev/null @@ -1,86 +0,0 @@ -// -// client-cpp.hh -// C++ CORBA client interface for SceneViewer. -// -// Created by Mathieu Geisert in December 2014. -// Copyright (c) 2014 LAAS-CNRS. All rights reserved. -// - -#ifndef SCENEVIEWER_CORBASERVER_CLIENTCPP_HH -#define SCENEVIEWER_CORBASERVER_CLIENTCPP_HH - -#include <iostream> -#include <omniORB4/CORBA.h> -#include "se3.hpp" -#include "graphicalinterface.hh" - - -namespace Graphics { -namespace corbaServer { - -class ClientCpp -{ -private: - CORBA::ORB_var orb_; - Graphics::corbaserver::Graphicalinterface_var manager_; - - static void se3ToCorba(CORBA::Double* corbaPosition, const se3::SE3& se3position); - -protected: - -public: - // Default constructor - ClientCpp(); - // Default destructor - ~ClientCpp(); - - void getNodeList(); - void getWindowList(); - - bool setRate(int rate); - void refresh(); - - bool createWindow(const char* windowName); - - - //void createWindow(const char* name, CORBA::ULong x, CORBA::ULong y, CORBA::ULong width, CORBA::ULong height) ; - - bool createScene(const char* sceneName) ; - bool createSceneWithFloor(const char* sceneName) ; - bool addSceneToWindow(const char* sceneName, const char* windowName) ; - - - //void addBox(const char* boxName, float boxSize1, float boxSize2, float boxSize3, const char* colorName); - bool addBox(const char* boxName, float boxSize1, float boxSize2, float boxSize3) ; - - bool addCapsule(const char* capsuleName, float radius, float height) ; - //void addCapsule(const char* capsuleName, float radius, float height, const char* colorName); - - bool addMesh(const char* meshName, const char* meshPath) ; - - bool addCone(const char* coneName, float radius, float height) ; - //void addCone(const char* coneName, float radius, float height, const char* colorName); - - bool addCylinder(const char* cylinderName, float radius, float height) ; - //void addCylinder(const char* cylinderName, float radius, float height, const char* colorName); - - bool addSphere(const char* sphereName, float radius) ; - //void addSphere(const char* sphereName, float radius, const char* colorName); - - bool addURDF(const char* urdfName, const char* urdfPath, const char* urdfPackagePath); - - bool createGroup(const char* groupName) ; - bool addToGroup(const char* nodeName, const char* groupName) ; - - bool applyConfiguration(const char* nodeName, const se3::SE3& se3position) ; - - bool setVisibility(const char* nodeName, const char* visibilityMode) ; - bool setWireFrameMode(const char* nodeName, const char* wireFrameMode) ; - bool setLightingMode(const char* nodeName, const char* lightingMode) ; - -}; //end of class ClientCpp - -} //end of namespace corbaserver -} //end of namespace Graphics - -#endif // __DynAndGraphics__clientCpp__ diff --git a/src/erreur.txt~ b/src/erreur.txt~ deleted file mode 100644 index 6c4dc0e..0000000 --- a/src/erreur.txt~ +++ /dev/null @@ -1,253 +0,0 @@ -/tmp/cc7FAfgc.o: In function `Graphics::corbaserver::sceneViewer_Helper::duplicate(Graphics::corbaserver::_objref_sceneViewer*)': -sceneViewerSK.cc:(.text+0xe6): undefined reference to `omni::duplicateObjRef(omniObjRef*)' -/tmp/cc7FAfgc.o: In function `Graphics::corbaserver::sceneViewer::_duplicate(Graphics::corbaserver::_objref_sceneViewer*)': -sceneViewerSK.cc:(.text+0x142): undefined reference to `omni::duplicateObjRef(omniObjRef*)' -/tmp/cc7FAfgc.o: In function `Graphics::corbaserver::sceneViewer::_narrow(CORBA::Object*)': -sceneViewerSK.cc:(.text+0x1a7): undefined reference to `omniObjRef::_realNarrow(char const*)' -/tmp/cc7FAfgc.o: In function `Graphics::corbaserver::sceneViewer::_unchecked_narrow(CORBA::Object*)': -sceneViewerSK.cc:(.text+0x21f): undefined reference to `omniObjRef::_uncheckedNarrow(char const*)' -/tmp/cc7FAfgc.o: In function `Graphics::corbaserver::sceneViewer::_nil()': -sceneViewerSK.cc:(.text+0x24e): undefined reference to `omni::nilRefLock()' -sceneViewerSK.cc:(.text+0x2a7): undefined reference to `omni::registerNilCorbaObject(CORBA::Object*)' -sceneViewerSK.cc:(.text+0x2ac): undefined reference to `omni::nilRefLock()' -/tmp/cc7FAfgc.o: In function `Graphics::corbaserver::_objref_sceneViewer::~_objref_sceneViewer()': -sceneViewerSK.cc:(.text+0x329): undefined reference to `omniObjRef::~omniObjRef()' -sceneViewerSK.cc:(.text+0x343): undefined reference to `CORBA::Object::~Object()' -sceneViewerSK.cc:(.text+0x378): undefined reference to `CORBA::Object::~Object()' -/tmp/cc7FAfgc.o: In function `Graphics::corbaserver::_objref_sceneViewer::~_objref_sceneViewer()': -sceneViewerSK.cc:(.text+0x3ef): undefined reference to `omniObjRef::~omniObjRef()' -sceneViewerSK.cc:(.text+0x409): undefined reference to `CORBA::Object::~Object()' -sceneViewerSK.cc:(.text+0x43e): undefined reference to `CORBA::Object::~Object()' -/tmp/cc7FAfgc.o: In function `Graphics::corbaserver::_objref_sceneViewer::_objref_sceneViewer(omniIOR*, omniIdentity*)': -sceneViewerSK.cc:(.text+0x530): undefined reference to `omniObjRef::omniObjRef(char const*, omniIOR*, omniIdentity*, bool)' -sceneViewerSK.cc:(.text+0x58c): undefined reference to `CORBA::Object::~Object()' -/tmp/cc7FAfgc.o: In function `Graphics::corbaserver::_objref_sceneViewer::_ptrToObjRef(char const*)': -sceneViewerSK.cc:(.text+0x5ce): undefined reference to `CORBA::Object::_PD_repoId' -sceneViewerSK.cc:(.text+0x604): undefined reference to `CORBA::Object::_PD_repoId' -/tmp/cc7FAfgc.o: In function `Graphics::corbaserver::_objref_sceneViewer::createWindow(char const*)': -sceneViewerSK.cc:(.text+0x73a): undefined reference to `omniObjRef::_invoke(omniCallDescriptor&, bool)' -/tmp/cc7FAfgc.o: In function `Graphics::corbaserver::_objref_sceneViewer::createScene(char const*)': -sceneViewerSK.cc:(.text+0x806): undefined reference to `omniObjRef::_invoke(omniCallDescriptor&, bool)' -/tmp/cc7FAfgc.o: In function `Graphics::corbaserver::_objref_sceneViewer::createSceneWithFloor(char const*)': -sceneViewerSK.cc:(.text+0x8d2): undefined reference to `omniObjRef::_invoke(omniCallDescriptor&, bool)' -/tmp/cc7FAfgc.o: In function `Graphics::corbaserver::_objref_sceneViewer::addSceneToWindow(char const*, char const*)': -sceneViewerSK.cc:(.text+0xa6a): undefined reference to `omniObjRef::_invoke(omniCallDescriptor&, bool)' -/tmp/cc7FAfgc.o: In function `Graphics::corbaserver::_objref_sceneViewer::addBox(char const*, float, float, float)': -sceneViewerSK.cc:(.text+0xc55): undefined reference to `omniObjRef::_invoke(omniCallDescriptor&, bool)' -/tmp/cc7FAfgc.o:sceneViewerSK.cc:(.text+0xe04): more undefined references to `omniObjRef::_invoke(omniCallDescriptor&, bool)' follow -/tmp/cc7FAfgc.o: In function `Graphics::corbaserver::_pof_sceneViewer::~_pof_sceneViewer()': -sceneViewerSK.cc:(.text+0x19b0): undefined reference to `omni::proxyObjectFactory::~proxyObjectFactory()' -/tmp/cc7FAfgc.o: In function `Graphics::corbaserver::_impl_sceneViewer::~_impl_sceneViewer()': -sceneViewerSK.cc:(.text+0x1ab1): undefined reference to `omniServant::~omniServant()' -/tmp/cc7FAfgc.o: In function `Graphics::corbaserver::_impl_sceneViewer::~_impl_sceneViewer()': -sceneViewerSK.cc:(.text+0x1b13): undefined reference to `omniServant::~omniServant()' -/tmp/cc7FAfgc.o: In function `Graphics::corbaserver::_impl_sceneViewer::_dispatch(omniCallHandle&)': -sceneViewerSK.cc:(.text+0x1be7): undefined reference to `omniCallHandle::upcall(omniServant*, omniCallDescriptor&)' -sceneViewerSK.cc:(.text+0x1c61): undefined reference to `omniCallHandle::upcall(omniServant*, omniCallDescriptor&)' -sceneViewerSK.cc:(.text+0x1cdb): undefined reference to `omniCallHandle::upcall(omniServant*, omniCallDescriptor&)' -sceneViewerSK.cc:(.text+0x1d55): undefined reference to `omniCallHandle::upcall(omniServant*, omniCallDescriptor&)' -sceneViewerSK.cc:(.text+0x1dcf): undefined reference to `omniCallHandle::upcall(omniServant*, omniCallDescriptor&)' -/tmp/cc7FAfgc.o:sceneViewerSK.cc:(.text+0x1e49): more undefined references to `omniCallHandle::upcall(omniServant*, omniCallDescriptor&)' follow -/tmp/cc7FAfgc.o: In function `Graphics::corbaserver::_impl_sceneViewer::_ptrToInterface(char const*)': -sceneViewerSK.cc:(.text+0x24c6): undefined reference to `CORBA::Object::_PD_repoId' -sceneViewerSK.cc:(.text+0x24f4): undefined reference to `CORBA::Object::_PD_repoId' -/tmp/cc7FAfgc.o: In function `POA_Graphics::corbaserver::sceneViewer::~sceneViewer()': -sceneViewerSK.cc:(.text+0x25a2): undefined reference to `PortableServer::ServantBase::~ServantBase()' -sceneViewerSK.cc:(.text+0x25dd): undefined reference to `omniServant::~omniServant()' -sceneViewerSK.cc:(.text+0x2637): undefined reference to `omniServant::~omniServant()' -/tmp/cc7FAfgc.o: In function `POA_Graphics::corbaserver::sceneViewer::~sceneViewer()': -sceneViewerSK.cc:(.text+0x26ca): undefined reference to `PortableServer::ServantBase::~ServantBase()' -sceneViewerSK.cc:(.text+0x2707): undefined reference to `omniServant::~omniServant()' -sceneViewerSK.cc:(.text+0x2763): undefined reference to `omniServant::~omniServant()' -/tmp/cc7FAfgc.o: In function `__static_initialization_and_destruction_0(int, int)': -sceneViewerSK.cc:(.text+0x27d9): undefined reference to `omni_thread::init_t::init_t()' -sceneViewerSK.cc:(.text+0x27de): undefined reference to `omni_thread::init_t::~init_t()' -sceneViewerSK.cc:(.text+0x2802): undefined reference to `_omniFinalCleanup::_omniFinalCleanup()' -sceneViewerSK.cc:(.text+0x2807): undefined reference to `_omniFinalCleanup::~_omniFinalCleanup()' -sceneViewerSK.cc:(.text+0x2824): undefined reference to `omni::omniORB_4_1' -/tmp/cc7FAfgc.o: In function `_CORBA_String_helper::free(char*)': -sceneViewerSK.cc:(.text._ZN20_CORBA_String_helper4freeEPc[_CORBA_String_helper::free(char*)]+0xd): undefined reference to `_CORBA_String_helper::empty_string' -/tmp/cc7FAfgc.o: In function `cdrStream::marshalString(char const*, int)': -sceneViewerSK.cc:(.text._ZN9cdrStream13marshalStringEPKci[cdrStream::marshalString(char const*, int)]+0x26): undefined reference to `omni::ucheckFail(char const*, int, char const*)' -/tmp/cc7FAfgc.o: In function `CORBA::Object::Object()': -sceneViewerSK.cc:(.text._ZN5CORBA6ObjectC2Ev[_ZN5CORBA6ObjectC5Ev]+0x8): undefined reference to `vtable for CORBA::Object' -sceneViewerSK.cc:(.text._ZN5CORBA6ObjectC2Ev[_ZN5CORBA6ObjectC5Ev]+0x18): undefined reference to `CORBA::Object::_PR_magic' -/tmp/cc7FAfgc.o: In function `CORBA::Object::_PR_is_valid(CORBA::Object*)': -sceneViewerSK.cc:(.text._ZN5CORBA6Object12_PR_is_validEPS0_[CORBA::Object::_PR_is_valid(CORBA::Object*)]+0x10): undefined reference to `CORBA::Object::_PR_magic' -/tmp/cc7FAfgc.o: In function `CORBA::is_nil(CORBA::Object*)': -sceneViewerSK.cc:(.text._ZN5CORBA6is_nilEPNS_6ObjectE[CORBA::is_nil(CORBA::Object*)]+0x33): undefined reference to `_CORBA_use_nil_ptr_as_nil_objref()' -/tmp/cc7FAfgc.o: In function `CORBA::release(CORBA::Object*)': -sceneViewerSK.cc:(.text._ZN5CORBA7releaseEPNS_6ObjectE[CORBA::release(CORBA::Object*)]+0x60): undefined reference to `omni::releaseObjRef(omniObjRef*)' -/tmp/cc7FAfgc.o: In function `Graphics::corbaserver::sceneViewer::_unmarshalObjRef(cdrStream&)': -sceneViewerSK.cc:(.text._ZN8Graphics11corbaserver11sceneViewer16_unmarshalObjRefER9cdrStream[Graphics::corbaserver::sceneViewer::_unmarshalObjRef(cdrStream&)]+0x16): undefined reference to `omniObjRef::_unMarshal(char const*, cdrStream&)' -/tmp/cc7FAfgc.o: In function `Graphics::corbaserver::_objref_sceneViewer::_objref_sceneViewer()': -sceneViewerSK.cc:(.text._ZN8Graphics11corbaserver19_objref_sceneViewerC1Ev[Graphics::corbaserver::_objref_sceneViewer::_objref_sceneViewer()]+0x1f): undefined reference to `omniObjRef::omniObjRef()' -sceneViewerSK.cc:(.text._ZN8Graphics11corbaserver19_objref_sceneViewerC1Ev[Graphics::corbaserver::_objref_sceneViewer::_objref_sceneViewer()]+0x75): undefined reference to `CORBA::Object::~Object()' -/tmp/cc7FAfgc.o: In function `Graphics::corbaserver::_pof_sceneViewer::_pof_sceneViewer()': -sceneViewerSK.cc:(.text._ZN8Graphics11corbaserver16_pof_sceneViewerC2Ev[_ZN8Graphics11corbaserver16_pof_sceneViewerC5Ev]+0x17): undefined reference to `omni::proxyObjectFactory::proxyObjectFactory(char const*)' -/tmp/cc7FAfgc.o: In function `Graphics::corbaserver::sceneViewer::_marshalObjRef(Graphics::corbaserver::_objref_sceneViewer*, cdrStream&)': -sceneViewerSK.cc:(.text._ZN8Graphics11corbaserver11sceneViewer14_marshalObjRefEPNS0_19_objref_sceneViewerER9cdrStream[Graphics::corbaserver::sceneViewer::_marshalObjRef(Graphics::corbaserver::_objref_sceneViewer*, cdrStream&)]+0x26): undefined reference to `omniObjRef::_marshal(omniObjRef*, cdrStream&)' -/tmp/cc7FAfgc.o: In function `omniCallDescriptor::omniCallDescriptor(void (*)(omniCallDescriptor*, omniServant*), char const*, int, bool, char const* const*, int, bool)': -sceneViewerSK.cc:(.text._ZN18omniCallDescriptorC2EPFvPS_P11omniServantEPKcibPKS6_ib[_ZN18omniCallDescriptorC5EPFvPS_P11omniServantEPKcibPKS6_ib]+0x17): undefined reference to `vtable for omniCallDescriptor' -/tmp/cc7FAfgc.o: In function `omniCallDescriptor::~omniCallDescriptor()': -sceneViewerSK.cc:(.text._ZN18omniCallDescriptorD2Ev[_ZN18omniCallDescriptorD5Ev]+0xb): undefined reference to `vtable for omniCallDescriptor' -/tmp/cc7FAfgc.o:(.rodata._ZTVN12POA_Graphics11corbaserver11sceneViewerE[vtable for POA_Graphics::corbaserver::sceneViewer]+0xf4): undefined reference to `virtual thunk to PortableServer::ServantBase::_downcast()' -/tmp/cc7FAfgc.o:(.rodata._ZTVN12POA_Graphics11corbaserver11sceneViewerE[vtable for POA_Graphics::corbaserver::sceneViewer]+0xfc): undefined reference to `omniServant::_is_a(char const*)' -/tmp/cc7FAfgc.o:(.rodata._ZTVN12POA_Graphics11corbaserver11sceneViewerE[vtable for POA_Graphics::corbaserver::sceneViewer]+0x100): undefined reference to `omniServant::_non_existent()' -/tmp/cc7FAfgc.o:(.rodata._ZTVN12POA_Graphics11corbaserver11sceneViewerE[vtable for POA_Graphics::corbaserver::sceneViewer]+0x104): undefined reference to `virtual thunk to PortableServer::ServantBase::_do_get_interface()' -/tmp/cc7FAfgc.o:(.rodata._ZTVN12POA_Graphics11corbaserver11sceneViewerE[vtable for POA_Graphics::corbaserver::sceneViewer]+0x10c): undefined reference to `virtual thunk to PortableServer::ServantBase::_add_ref()' -/tmp/cc7FAfgc.o:(.rodata._ZTVN12POA_Graphics11corbaserver11sceneViewerE[vtable for POA_Graphics::corbaserver::sceneViewer]+0x110): undefined reference to `virtual thunk to PortableServer::ServantBase::_remove_ref()' -/tmp/cc7FAfgc.o:(.rodata._ZTVN12POA_Graphics11corbaserver11sceneViewerE[vtable for POA_Graphics::corbaserver::sceneViewer]+0x148): undefined reference to `PortableServer::ServantBase::_default_POA()' -/tmp/cc7FAfgc.o:(.rodata._ZTVN12POA_Graphics11corbaserver11sceneViewerE[vtable for POA_Graphics::corbaserver::sceneViewer]+0x14c): undefined reference to `PortableServer::ServantBase::_get_interface()' -/tmp/cc7FAfgc.o:(.rodata._ZTVN12POA_Graphics11corbaserver11sceneViewerE[vtable for POA_Graphics::corbaserver::sceneViewer]+0x150): undefined reference to `PortableServer::ServantBase::_add_ref()' -/tmp/cc7FAfgc.o:(.rodata._ZTVN12POA_Graphics11corbaserver11sceneViewerE[vtable for POA_Graphics::corbaserver::sceneViewer]+0x154): undefined reference to `PortableServer::ServantBase::_remove_ref()' -/tmp/cc7FAfgc.o:(.rodata._ZTVN12POA_Graphics11corbaserver11sceneViewerE[vtable for POA_Graphics::corbaserver::sceneViewer]+0x158): undefined reference to `PortableServer::ServantBase::_refcount_value()' -/tmp/cc7FAfgc.o:(.rodata._ZTVN12POA_Graphics11corbaserver11sceneViewerE[vtable for POA_Graphics::corbaserver::sceneViewer]+0x15c): undefined reference to `PortableServer::ServantBase::_do_get_interface()' -/tmp/cc7FAfgc.o:(.rodata._ZTVN12POA_Graphics11corbaserver11sceneViewerE[vtable for POA_Graphics::corbaserver::sceneViewer]+0x160): undefined reference to `PortableServer::ServantBase::_downcast()' -/tmp/cc7FAfgc.o:(.rodata._ZTCN12POA_Graphics11corbaserver11sceneViewerE0_N8Graphics11corbaserver17_impl_sceneViewerE[vtable for POA_Graphics::corbaserver::sceneViewer]+0x9c): undefined reference to `omniServant::_downcast()' -/tmp/cc7FAfgc.o:(.rodata._ZTCN12POA_Graphics11corbaserver11sceneViewerE0_N8Graphics11corbaserver17_impl_sceneViewerE[vtable for POA_Graphics::corbaserver::sceneViewer]+0xa4): undefined reference to `omniServant::_is_a(char const*)' -/tmp/cc7FAfgc.o:(.rodata._ZTCN12POA_Graphics11corbaserver11sceneViewerE0_N8Graphics11corbaserver17_impl_sceneViewerE[vtable for POA_Graphics::corbaserver::sceneViewer]+0xa8): undefined reference to `omniServant::_non_existent()' -/tmp/cc7FAfgc.o:(.rodata._ZTCN12POA_Graphics11corbaserver11sceneViewerE0_N8Graphics11corbaserver17_impl_sceneViewerE[vtable for POA_Graphics::corbaserver::sceneViewer]+0xb4): undefined reference to `omniServant::_add_ref()' -/tmp/cc7FAfgc.o:(.rodata._ZTCN12POA_Graphics11corbaserver11sceneViewerE0_N8Graphics11corbaserver17_impl_sceneViewerE[vtable for POA_Graphics::corbaserver::sceneViewer]+0xb8): undefined reference to `omniServant::_remove_ref()' -/tmp/cc7FAfgc.o:(.rodata._ZTCN12POA_Graphics11corbaserver11sceneViewerE20_N14PortableServer11ServantBaseE[vtable for POA_Graphics::corbaserver::sceneViewer]+0x8): undefined reference to `typeinfo for PortableServer::ServantBase' -/tmp/cc7FAfgc.o:(.rodata._ZTCN12POA_Graphics11corbaserver11sceneViewerE20_N14PortableServer11ServantBaseE[vtable for POA_Graphics::corbaserver::sceneViewer]+0xc): undefined reference to `PortableServer::ServantBase::~ServantBase()' -/tmp/cc7FAfgc.o:(.rodata._ZTCN12POA_Graphics11corbaserver11sceneViewerE20_N14PortableServer11ServantBaseE[vtable for POA_Graphics::corbaserver::sceneViewer]+0x10): undefined reference to `PortableServer::ServantBase::~ServantBase()' -/tmp/cc7FAfgc.o:(.rodata._ZTCN12POA_Graphics11corbaserver11sceneViewerE20_N14PortableServer11ServantBaseE[vtable for POA_Graphics::corbaserver::sceneViewer]+0x14): undefined reference to `PortableServer::ServantBase::_default_POA()' -/tmp/cc7FAfgc.o:(.rodata._ZTCN12POA_Graphics11corbaserver11sceneViewerE20_N14PortableServer11ServantBaseE[vtable for POA_Graphics::corbaserver::sceneViewer]+0x18): undefined reference to `PortableServer::ServantBase::_get_interface()' -/tmp/cc7FAfgc.o:(.rodata._ZTCN12POA_Graphics11corbaserver11sceneViewerE20_N14PortableServer11ServantBaseE[vtable for POA_Graphics::corbaserver::sceneViewer]+0x1c): undefined reference to `PortableServer::ServantBase::_add_ref()' -/tmp/cc7FAfgc.o:(.rodata._ZTCN12POA_Graphics11corbaserver11sceneViewerE20_N14PortableServer11ServantBaseE[vtable for POA_Graphics::corbaserver::sceneViewer]+0x20): undefined reference to `PortableServer::ServantBase::_remove_ref()' -/tmp/cc7FAfgc.o:(.rodata._ZTCN12POA_Graphics11corbaserver11sceneViewerE20_N14PortableServer11ServantBaseE[vtable for POA_Graphics::corbaserver::sceneViewer]+0x24): undefined reference to `PortableServer::ServantBase::_refcount_value()' -/tmp/cc7FAfgc.o:(.rodata._ZTCN12POA_Graphics11corbaserver11sceneViewerE20_N14PortableServer11ServantBaseE[vtable for POA_Graphics::corbaserver::sceneViewer]+0x28): undefined reference to `PortableServer::ServantBase::_do_get_interface()' -/tmp/cc7FAfgc.o:(.rodata._ZTCN12POA_Graphics11corbaserver11sceneViewerE20_N14PortableServer11ServantBaseE[vtable for POA_Graphics::corbaserver::sceneViewer]+0x2c): undefined reference to `PortableServer::ServantBase::_downcast()' -/tmp/cc7FAfgc.o:(.rodata._ZTCN12POA_Graphics11corbaserver11sceneViewerE20_N14PortableServer11ServantBaseE[vtable for POA_Graphics::corbaserver::sceneViewer]+0x5c): undefined reference to `typeinfo for PortableServer::ServantBase' -/tmp/cc7FAfgc.o:(.rodata._ZTCN12POA_Graphics11corbaserver11sceneViewerE20_N14PortableServer11ServantBaseE[vtable for POA_Graphics::corbaserver::sceneViewer]+0x60): undefined reference to `virtual thunk to PortableServer::ServantBase::~ServantBase()' -/tmp/cc7FAfgc.o:(.rodata._ZTCN12POA_Graphics11corbaserver11sceneViewerE20_N14PortableServer11ServantBaseE[vtable for POA_Graphics::corbaserver::sceneViewer]+0x64): undefined reference to `virtual thunk to PortableServer::ServantBase::~ServantBase()' -/tmp/cc7FAfgc.o:(.rodata._ZTCN12POA_Graphics11corbaserver11sceneViewerE20_N14PortableServer11ServantBaseE[vtable for POA_Graphics::corbaserver::sceneViewer]+0x68): undefined reference to `omniServant::_ptrToInterface(char const*)' -/tmp/cc7FAfgc.o:(.rodata._ZTCN12POA_Graphics11corbaserver11sceneViewerE20_N14PortableServer11ServantBaseE[vtable for POA_Graphics::corbaserver::sceneViewer]+0x6c): undefined reference to `virtual thunk to PortableServer::ServantBase::_downcast()' -/tmp/cc7FAfgc.o:(.rodata._ZTCN12POA_Graphics11corbaserver11sceneViewerE20_N14PortableServer11ServantBaseE[vtable for POA_Graphics::corbaserver::sceneViewer]+0x70): undefined reference to `omniServant::_mostDerivedRepoId()' -/tmp/cc7FAfgc.o:(.rodata._ZTCN12POA_Graphics11corbaserver11sceneViewerE20_N14PortableServer11ServantBaseE[vtable for POA_Graphics::corbaserver::sceneViewer]+0x74): undefined reference to `omniServant::_is_a(char const*)' -/tmp/cc7FAfgc.o:(.rodata._ZTCN12POA_Graphics11corbaserver11sceneViewerE20_N14PortableServer11ServantBaseE[vtable for POA_Graphics::corbaserver::sceneViewer]+0x78): undefined reference to `omniServant::_non_existent()' -/tmp/cc7FAfgc.o:(.rodata._ZTCN12POA_Graphics11corbaserver11sceneViewerE20_N14PortableServer11ServantBaseE[vtable for POA_Graphics::corbaserver::sceneViewer]+0x7c): undefined reference to `virtual thunk to PortableServer::ServantBase::_do_get_interface()' -/tmp/cc7FAfgc.o:(.rodata._ZTCN12POA_Graphics11corbaserver11sceneViewerE20_N14PortableServer11ServantBaseE[vtable for POA_Graphics::corbaserver::sceneViewer]+0x80): undefined reference to `omniServant::_dispatch(omniCallHandle&)' -/tmp/cc7FAfgc.o:(.rodata._ZTCN12POA_Graphics11corbaserver11sceneViewerE20_N14PortableServer11ServantBaseE[vtable for POA_Graphics::corbaserver::sceneViewer]+0x84): undefined reference to `virtual thunk to PortableServer::ServantBase::_add_ref()' -/tmp/cc7FAfgc.o:(.rodata._ZTCN12POA_Graphics11corbaserver11sceneViewerE20_N14PortableServer11ServantBaseE[vtable for POA_Graphics::corbaserver::sceneViewer]+0x88): undefined reference to `virtual thunk to PortableServer::ServantBase::_remove_ref()' -/tmp/cc7FAfgc.o:(.rodata._ZTVN8Graphics11corbaserver17_impl_sceneViewerE[vtable for Graphics::corbaserver::_impl_sceneViewer]+0x9c): undefined reference to `omniServant::_downcast()' -/tmp/cc7FAfgc.o:(.rodata._ZTVN8Graphics11corbaserver17_impl_sceneViewerE[vtable for Graphics::corbaserver::_impl_sceneViewer]+0xa4): undefined reference to `omniServant::_is_a(char const*)' -/tmp/cc7FAfgc.o:(.rodata._ZTVN8Graphics11corbaserver17_impl_sceneViewerE[vtable for Graphics::corbaserver::_impl_sceneViewer]+0xa8): undefined reference to `omniServant::_non_existent()' -/tmp/cc7FAfgc.o:(.rodata._ZTVN8Graphics11corbaserver17_impl_sceneViewerE[vtable for Graphics::corbaserver::_impl_sceneViewer]+0xb4): undefined reference to `omniServant::_add_ref()' -/tmp/cc7FAfgc.o:(.rodata._ZTVN8Graphics11corbaserver17_impl_sceneViewerE[vtable for Graphics::corbaserver::_impl_sceneViewer]+0xb8): undefined reference to `omniServant::_remove_ref()' -/tmp/cc7FAfgc.o:(.rodata._ZTV33_0RL_cd_1340db5341f970cc_21000000[vtable for _0RL_cd_1340db5341f970cc_21000000]+0x10): undefined reference to `omniCallDescriptor::initialiseCall(cdrStream&)' -/tmp/cc7FAfgc.o:(.rodata._ZTV33_0RL_cd_1340db5341f970cc_21000000[vtable for _0RL_cd_1340db5341f970cc_21000000]+0x1c): undefined reference to `omniCallDescriptor::userException(cdrStream&, omni::IOP_C*, char const*)' -/tmp/cc7FAfgc.o:(.rodata._ZTV33_0RL_cd_1340db5341f970cc_01000000[vtable for _0RL_cd_1340db5341f970cc_01000000]+0x10): undefined reference to `omniCallDescriptor::initialiseCall(cdrStream&)' -/tmp/cc7FAfgc.o:(.rodata._ZTV33_0RL_cd_1340db5341f970cc_01000000[vtable for _0RL_cd_1340db5341f970cc_01000000]+0x1c): undefined reference to `omniCallDescriptor::userException(cdrStream&, omni::IOP_C*, char const*)' -/tmp/cc7FAfgc.o:(.rodata._ZTV33_0RL_cd_1340db5341f970cc_d0000000[vtable for _0RL_cd_1340db5341f970cc_d0000000]+0x10): undefined reference to `omniCallDescriptor::initialiseCall(cdrStream&)' -/tmp/cc7FAfgc.o:(.rodata._ZTV33_0RL_cd_1340db5341f970cc_d0000000[vtable for _0RL_cd_1340db5341f970cc_d0000000]+0x18): undefined reference to `omniCallDescriptor::unmarshalReturnedValues(cdrStream&)' -/tmp/cc7FAfgc.o:(.rodata._ZTV33_0RL_cd_1340db5341f970cc_d0000000[vtable for _0RL_cd_1340db5341f970cc_d0000000]+0x1c): undefined reference to `omniCallDescriptor::userException(cdrStream&, omni::IOP_C*, char const*)' -/tmp/cc7FAfgc.o:(.rodata._ZTV33_0RL_cd_1340db5341f970cc_d0000000[vtable for _0RL_cd_1340db5341f970cc_d0000000]+0x24): undefined reference to `omniCallDescriptor::marshalReturnedValues(cdrStream&)' -/tmp/cc7FAfgc.o:(.rodata._ZTV33_0RL_cd_1340db5341f970cc_80000000[vtable for _0RL_cd_1340db5341f970cc_80000000]+0x10): undefined reference to `omniCallDescriptor::initialiseCall(cdrStream&)' -/tmp/cc7FAfgc.o:(.rodata._ZTV33_0RL_cd_1340db5341f970cc_80000000[vtable for _0RL_cd_1340db5341f970cc_80000000]+0x18): undefined reference to `omniCallDescriptor::unmarshalReturnedValues(cdrStream&)' -/tmp/cc7FAfgc.o:(.rodata._ZTV33_0RL_cd_1340db5341f970cc_80000000[vtable for _0RL_cd_1340db5341f970cc_80000000]+0x1c): undefined reference to `omniCallDescriptor::userException(cdrStream&, omni::IOP_C*, char const*)' -/tmp/cc7FAfgc.o:(.rodata._ZTV33_0RL_cd_1340db5341f970cc_80000000[vtable for _0RL_cd_1340db5341f970cc_80000000]+0x24): undefined reference to `omniCallDescriptor::marshalReturnedValues(cdrStream&)' -/tmp/cc7FAfgc.o:(.rodata._ZTV33_0RL_cd_1340db5341f970cc_60000000[vtable for _0RL_cd_1340db5341f970cc_60000000]+0x10): undefined reference to `omniCallDescriptor::initialiseCall(cdrStream&)' -/tmp/cc7FAfgc.o:(.rodata._ZTV33_0RL_cd_1340db5341f970cc_60000000[vtable for _0RL_cd_1340db5341f970cc_60000000]+0x18): undefined reference to `omniCallDescriptor::unmarshalReturnedValues(cdrStream&)' -/tmp/cc7FAfgc.o:(.rodata._ZTV33_0RL_cd_1340db5341f970cc_60000000[vtable for _0RL_cd_1340db5341f970cc_60000000]+0x1c): undefined reference to `omniCallDescriptor::userException(cdrStream&, omni::IOP_C*, char const*)' -/tmp/cc7FAfgc.o:(.rodata._ZTV33_0RL_cd_1340db5341f970cc_60000000[vtable for _0RL_cd_1340db5341f970cc_60000000]+0x24): undefined reference to `omniCallDescriptor::marshalReturnedValues(cdrStream&)' -/tmp/cc7FAfgc.o:(.rodata._ZTV33_0RL_cd_1340db5341f970cc_40000000[vtable for _0RL_cd_1340db5341f970cc_40000000]+0x10): undefined reference to `omniCallDescriptor::initialiseCall(cdrStream&)' -/tmp/cc7FAfgc.o:(.rodata._ZTV33_0RL_cd_1340db5341f970cc_40000000[vtable for _0RL_cd_1340db5341f970cc_40000000]+0x18): undefined reference to `omniCallDescriptor::unmarshalReturnedValues(cdrStream&)' -/tmp/cc7FAfgc.o:(.rodata._ZTV33_0RL_cd_1340db5341f970cc_40000000[vtable for _0RL_cd_1340db5341f970cc_40000000]+0x1c): undefined reference to `omniCallDescriptor::userException(cdrStream&, omni::IOP_C*, char const*)' -/tmp/cc7FAfgc.o:(.rodata._ZTV33_0RL_cd_1340db5341f970cc_40000000[vtable for _0RL_cd_1340db5341f970cc_40000000]+0x24): undefined reference to `omniCallDescriptor::marshalReturnedValues(cdrStream&)' -/tmp/cc7FAfgc.o:(.rodata._ZTV33_0RL_cd_1340db5341f970cc_00000000[vtable for _0RL_cd_1340db5341f970cc_00000000]+0x10): undefined reference to `omniCallDescriptor::initialiseCall(cdrStream&)' -/tmp/cc7FAfgc.o:(.rodata._ZTV33_0RL_cd_1340db5341f970cc_00000000[vtable for _0RL_cd_1340db5341f970cc_00000000]+0x18): undefined reference to `omniCallDescriptor::unmarshalReturnedValues(cdrStream&)' -/tmp/cc7FAfgc.o:(.rodata._ZTV33_0RL_cd_1340db5341f970cc_00000000[vtable for _0RL_cd_1340db5341f970cc_00000000]+0x1c): undefined reference to `omniCallDescriptor::userException(cdrStream&, omni::IOP_C*, char const*)' -/tmp/cc7FAfgc.o:(.rodata._ZTV33_0RL_cd_1340db5341f970cc_00000000[vtable for _0RL_cd_1340db5341f970cc_00000000]+0x24): undefined reference to `omniCallDescriptor::marshalReturnedValues(cdrStream&)' -/tmp/cc7FAfgc.o:(.rodata._ZTVN8Graphics11corbaserver19_objref_sceneViewerE[vtable for Graphics::corbaserver::_objref_sceneViewer]+0x40): undefined reference to `CORBA::Object::_non_existent()' -/tmp/cc7FAfgc.o:(.rodata._ZTVN8Graphics11corbaserver19_objref_sceneViewerE[vtable for Graphics::corbaserver::_objref_sceneViewer]+0x44): undefined reference to `CORBA::Object::_NP_incrRefCount()' -/tmp/cc7FAfgc.o:(.rodata._ZTVN8Graphics11corbaserver19_objref_sceneViewerE[vtable for Graphics::corbaserver::_objref_sceneViewer]+0x48): undefined reference to `CORBA::Object::_NP_decrRefCount()' -/tmp/cc7FAfgc.o:(.rodata._ZTVN8Graphics11corbaserver19_objref_sceneViewerE[vtable for Graphics::corbaserver::_objref_sceneViewer]+0x6c): undefined reference to `omniObjRef::_localServantTarget()' -/tmp/cc7FAfgc.o:(.rodata._ZTVN8Graphics11corbaserver19_objref_sceneViewerE[vtable for Graphics::corbaserver::_objref_sceneViewer]+0x70): undefined reference to `omniObjRef::_enableShortcut(omniServant*, bool const*)' -/tmp/cc7FAfgc.o:(.rodata._ZTI33_0RL_cd_1340db5341f970cc_21000000[typeinfo for _0RL_cd_1340db5341f970cc_21000000]+0x8): undefined reference to `typeinfo for omniCallDescriptor' -/tmp/cc7FAfgc.o:(.rodata._ZTI33_0RL_cd_1340db5341f970cc_01000000[typeinfo for _0RL_cd_1340db5341f970cc_01000000]+0x8): undefined reference to `typeinfo for omniCallDescriptor' -/tmp/cc7FAfgc.o:(.rodata._ZTI33_0RL_cd_1340db5341f970cc_d0000000[typeinfo for _0RL_cd_1340db5341f970cc_d0000000]+0x8): undefined reference to `typeinfo for omniCallDescriptor' -/tmp/cc7FAfgc.o:(.rodata._ZTI33_0RL_cd_1340db5341f970cc_80000000[typeinfo for _0RL_cd_1340db5341f970cc_80000000]+0x8): undefined reference to `typeinfo for omniCallDescriptor' -/tmp/cc7FAfgc.o:(.rodata._ZTI33_0RL_cd_1340db5341f970cc_60000000[typeinfo for _0RL_cd_1340db5341f970cc_60000000]+0x8): undefined reference to `typeinfo for omniCallDescriptor' -/tmp/cc7FAfgc.o:(.rodata._ZTI33_0RL_cd_1340db5341f970cc_40000000[typeinfo for _0RL_cd_1340db5341f970cc_40000000]+0x8): more undefined references to `typeinfo for omniCallDescriptor' follow -/tmp/cc7FAfgc.o:(.rodata._ZTIN12POA_Graphics11corbaserver11sceneViewerE[typeinfo for POA_Graphics::corbaserver::sceneViewer]+0x18): undefined reference to `typeinfo for PortableServer::ServantBase' -/tmp/cc7FAfgc.o:(.rodata._ZTIN8Graphics11corbaserver17_impl_sceneViewerE[typeinfo for Graphics::corbaserver::_impl_sceneViewer]+0x10): undefined reference to `typeinfo for omniServant' -/tmp/cc7FAfgc.o:(.rodata._ZTIN8Graphics11corbaserver16_pof_sceneViewerE[typeinfo for Graphics::corbaserver::_pof_sceneViewer]+0x8): undefined reference to `typeinfo for omni::proxyObjectFactory' -/tmp/cc7FAfgc.o:(.rodata._ZTIN8Graphics11corbaserver19_objref_sceneViewerE[typeinfo for Graphics::corbaserver::_objref_sceneViewer]+0x10): undefined reference to `typeinfo for CORBA::Object' -/tmp/cc7FAfgc.o:(.rodata._ZTIN8Graphics11corbaserver19_objref_sceneViewerE[typeinfo for Graphics::corbaserver::_objref_sceneViewer]+0x18): undefined reference to `typeinfo for omniObjRef' -/tmp/cckfoQVU.o: In function `__static_initialization_and_destruction_0(int, int)': -server.cc:(.text+0x31f): undefined reference to `omni_thread::init_t::init_t()' -server.cc:(.text+0x324): undefined reference to `omni_thread::init_t::~init_t()' -server.cc:(.text+0x348): undefined reference to `_omniFinalCleanup::_omniFinalCleanup()' -server.cc:(.text+0x34d): undefined reference to `_omniFinalCleanup::~_omniFinalCleanup()' -/tmp/cckfoQVU.o: In function `_CORBA_String_member::_CORBA_String_member()': -server.cc:(.text._ZN20_CORBA_String_memberC2Ev[_ZN20_CORBA_String_memberC5Ev]+0x5): undefined reference to `_CORBA_String_helper::empty_string' -/tmp/cckfoQVU.o: In function `_CORBA_String_member::operator=(_CORBA_String_member const&)': -server.cc:(.text._ZN20_CORBA_String_memberaSERKS_[_CORBA_String_member::operator=(_CORBA_String_member const&)]+0x2a): undefined reference to `_CORBA_String_helper::empty_string' -/tmp/cckfoQVU.o: In function `CORBA::Object_var::Object_var()': -server.cc:(.text._ZN5CORBA10Object_varC2Ev[_ZN5CORBA10Object_varC5Ev]+0x7): undefined reference to `CORBA::Object::_nil()' -/tmp/cckfoQVU.o: In function `CORBA::ORB_var::ORB_var()': -server.cc:(.text._ZN5CORBA7ORB_varC2Ev[_ZN5CORBA7ORB_varC5Ev]+0x7): undefined reference to `CORBA::ORB::_nil()' -/tmp/cckfoQVU.o: In function `POA_Graphics::corbaserver::sceneViewer::_this()': -server.cc:(.text._ZN12POA_Graphics11corbaserver11sceneViewer5_thisEv[POA_Graphics::corbaserver::sceneViewer::_this()]+0x21): undefined reference to `PortableServer::ServantBase::_do_this(char const*)' -/tmp/cckfoQVU.o:(.gcc_except_table+0x130): undefined reference to `typeinfo for CORBA::Exception' -/tmp/cckfoQVU.o:(.gcc_except_table+0x134): undefined reference to `typeinfo for CORBA::SystemException' -/tmp/cckfoQVU.o:(.gcc_except_table+0x138): undefined reference to `typeinfo for CORBA::UserException' -/tmp/cckfoQVU.o:(.gcc_except_table+0x304): undefined reference to `typeinfo for CORBA::Exception' -/tmp/cckfoQVU.o:(.gcc_except_table+0x308): undefined reference to `typeinfo for CORBA::SystemException' -/tmp/cckfoQVU.o:(.gcc_except_table+0x30c): undefined reference to `typeinfo for CORBA::UserException' -/tmp/cckfoQVU.o:(.gcc_except_table+0x410): undefined reference to `typeinfo for CosNaming::NamingContext::AlreadyBound' -/tmp/cckfoQVU.o:(.gcc_except_table+0x414): undefined reference to `typeinfo for CORBA::COMM_FAILURE' -/tmp/cckfoQVU.o:(.gcc_except_table+0x418): undefined reference to `typeinfo for CORBA::ORB::InvalidName' -/tmp/cckfoQVU.o:(.gcc_except_table+0x424): undefined reference to `typeinfo for CORBA::Exception' -/tmp/cckfoQVU.o:(.gcc_except_table+0x428): undefined reference to `typeinfo for CORBA::SystemException' -/tmp/cckfoQVU.o:(.gcc_except_table+0x42c): undefined reference to `typeinfo for CORBA::UserException' -/tmp/cckfoQVU.o:(.gcc_except_table+0x46c): undefined reference to `typeinfo for CosNaming::NamingContext::AlreadyBound' -/tmp/cckfoQVU.o:(.gcc_except_table+0x470): undefined reference to `typeinfo for CORBA::SystemException' -/tmp/cckfoQVU.o:(.gcc_except_table+0x474): undefined reference to `typeinfo for CORBA::COMM_FAILURE' -/tmp/cckfoQVU.o:(.gcc_except_table+0x548): undefined reference to `typeinfo for CORBA::Exception' -/tmp/cckfoQVU.o:(.gcc_except_table+0x54c): undefined reference to `typeinfo for CORBA::SystemException' -/tmp/cckfoQVU.o:(.gcc_except_table+0x550): undefined reference to `typeinfo for CORBA::UserException' -/tmp/cckfoQVU.o: In function `_CORBA_Pseudo_Unbounded_Sequence<CORBA::Policy, _CORBA_PseudoObj_Member<CORBA::Policy, _CORBA_PseudoObj_Var<CORBA::Policy> > >::operator[](unsigned long)': -server.cc:(.text._ZN32_CORBA_Pseudo_Unbounded_SequenceIN5CORBA6PolicyE23_CORBA_PseudoObj_MemberIS1_20_CORBA_PseudoObj_VarIS1_EEEixEm[_CORBA_Pseudo_Unbounded_Sequence<CORBA::Policy, _CORBA_PseudoObj_Member<CORBA::Policy, _CORBA_PseudoObj_Var<CORBA::Policy> > >::operator[](unsigned long)]+0x12): undefined reference to `_CORBA_bound_check_error()' -/tmp/cckfoQVU.o: In function `_CORBA_Sequence<CosNaming::NameComponent>::operator[](unsigned long)': -server.cc:(.text._ZN15_CORBA_SequenceIN9CosNaming13NameComponentEEixEm[_CORBA_Sequence<CosNaming::NameComponent>::operator[](unsigned long)]+0x12): undefined reference to `_CORBA_bound_check_error()' -/tmp/cckfoQVU.o: In function `hpp::corba::Server<Graphics::corbaServer::GraphicalInterface>::Server(int, char**, bool, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)': -server.cc:(.text._ZN3hpp5corba6ServerIN8Graphics11corbaServer18GraphicalInterfaceEEC2EiPPcbRKSs[_ZN3hpp5corba6ServerIN8Graphics11corbaServer18GraphicalInterfaceEEC5EiPPcbRKSs]+0x3c): undefined reference to `omniORB::setLogFunction(void (*)(char const*))' -/tmp/cckfoQVU.o: In function `_CORBA_PseudoObj_Member<CORBA::Policy, _CORBA_PseudoObj_Var<CORBA::Policy> >::_CORBA_PseudoObj_Member()': -server.cc:(.text._ZN23_CORBA_PseudoObj_MemberIN5CORBA6PolicyE20_CORBA_PseudoObj_VarIS1_EEC2Ev[_ZN23_CORBA_PseudoObj_MemberIN5CORBA6PolicyE20_CORBA_PseudoObj_VarIS1_EEC5Ev]+0x7): undefined reference to `CORBA::Policy::_nil()' -/tmp/cckfoQVU.o: In function `_CORBA_PseudoObj_Member<CORBA::Policy, _CORBA_PseudoObj_Var<CORBA::Policy> >::operator=(_CORBA_PseudoObj_Member<CORBA::Policy, _CORBA_PseudoObj_Var<CORBA::Policy> > const&)': -server.cc:(.text._ZN23_CORBA_PseudoObj_MemberIN5CORBA6PolicyE20_CORBA_PseudoObj_VarIS1_EEaSERKS4_[_CORBA_PseudoObj_Member<CORBA::Policy, _CORBA_PseudoObj_Var<CORBA::Policy> >::operator=(_CORBA_PseudoObj_Member<CORBA::Policy, _CORBA_PseudoObj_Var<CORBA::Policy> > const&)]+0x48): undefined reference to `CORBA::Policy::_duplicate(CORBA::Policy*)' -/tmp/cckfoQVU.o: In function `_CORBA_PseudoObj_Var<PortableServer::POA>::_CORBA_PseudoObj_Var()': -server.cc:(.text._ZN20_CORBA_PseudoObj_VarIN14PortableServer3POAEEC2Ev[_ZN20_CORBA_PseudoObj_VarIN14PortableServer3POAEEC5Ev]+0x12): undefined reference to `PortableServer::POA::_nil()' -/tmp/cckfoQVU.o: In function `_CORBA_ObjRef_Var<CosNaming::_objref_NamingContext, CosNaming::NamingContext_Helper>::_CORBA_ObjRef_Var()': -server.cc:(.text._ZN17_CORBA_ObjRef_VarIN9CosNaming21_objref_NamingContextENS0_20NamingContext_HelperEEC2Ev[_ZN17_CORBA_ObjRef_VarIN9CosNaming21_objref_NamingContextENS0_20NamingContext_HelperEEC5Ev]+0x12): undefined reference to `CosNaming::NamingContext_Helper::_nil()' -/tmp/cckfoQVU.o: In function `_CORBA_ObjRef_Var<CosNaming::_objref_NamingContext, CosNaming::NamingContext_Helper>::~_CORBA_ObjRef_Var()': -server.cc:(.text._ZN17_CORBA_ObjRef_VarIN9CosNaming21_objref_NamingContextENS0_20NamingContext_HelperEED2Ev[_ZN17_CORBA_ObjRef_VarIN9CosNaming21_objref_NamingContextENS0_20NamingContext_HelperEED5Ev]+0xf): undefined reference to `CosNaming::NamingContext_Helper::release(CosNaming::_objref_NamingContext*)' -/tmp/cckfoQVU.o: In function `hpp::corba::Server<Graphics::corbaServer::GraphicalInterface>::initORBandServers(int, char**, bool, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)': -server.cc:(.text._ZN3hpp5corba6ServerIN8Graphics11corbaServer18GraphicalInterfaceEE17initORBandServersEiPPcbRKSs[hpp::corba::Server<Graphics::corbaServer::GraphicalInterface>::initORBandServers(int, char**, bool, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)]+0x5a): undefined reference to `CORBA::ORB_init(int&, char**, char const*, char const* (*) [2])' -server.cc:(.text._ZN3hpp5corba6ServerIN8Graphics11corbaServer18GraphicalInterfaceEE17initORBandServersEiPPcbRKSs[hpp::corba::Server<Graphics::corbaServer::GraphicalInterface>::initORBandServers(int, char**, bool, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)]+0x107): undefined reference to `PortableServer::POA::_narrow(CORBA::Object*)' -server.cc:(.text._ZN3hpp5corba6ServerIN8Graphics11corbaServer18GraphicalInterfaceEE17initORBandServersEiPPcbRKSs[hpp::corba::Server<Graphics::corbaServer::GraphicalInterface>::initORBandServers(int, char**, bool, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)]+0x1bd): undefined reference to `PortableServer::ThreadPolicy::_duplicate(PortableServer::ThreadPolicy*)' -server.cc:(.text._ZN3hpp5corba6ServerIN8Graphics11corbaServer18GraphicalInterfaceEE17initORBandServersEiPPcbRKSs[hpp::corba::Server<Graphics::corbaServer::GraphicalInterface>::initORBandServers(int, char**, bool, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)]+0xcd9): undefined reference to `PortableServer::POAManager::_nil()' -/tmp/cckfoQVU.o: In function `hpp::corba::Server<Graphics::corbaServer::GraphicalInterface>::createHppContext(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> >)': -server.cc:(.text._ZN3hpp5corba6ServerIN8Graphics11corbaServer18GraphicalInterfaceEE16createHppContextERKSsSs[hpp::corba::Server<Graphics::corbaServer::GraphicalInterface>::createHppContext(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> >)]+0x66): undefined reference to `CosNaming::NamingContext::_narrow(CORBA::Object*)' -server.cc:(.text._ZN3hpp5corba6ServerIN8Graphics11corbaServer18GraphicalInterfaceEE16createHppContextERKSsSs[hpp::corba::Server<Graphics::corbaServer::GraphicalInterface>::createHppContext(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> >)]+0x166): undefined reference to `CosNaming::_objref_NamingContext::bind_new_context(CosNaming::Name const&)' -server.cc:(.text._ZN3hpp5corba6ServerIN8Graphics11corbaServer18GraphicalInterfaceEE16createHppContextERKSsSs[hpp::corba::Server<Graphics::corbaServer::GraphicalInterface>::createHppContext(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> >)]+0x71f): undefined reference to `CosNaming::_objref_NamingContext::resolve(CosNaming::Name const&)' -server.cc:(.text._ZN3hpp5corba6ServerIN8Graphics11corbaServer18GraphicalInterfaceEE16createHppContextERKSsSs[hpp::corba::Server<Graphics::corbaServer::GraphicalInterface>::createHppContext(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> >)]+0x741): undefined reference to `CosNaming::NamingContext::_narrow(CORBA::Object*)' -/tmp/cckfoQVU.o: In function `_CORBA_Sequence<CosNaming::NameComponent>::length(unsigned long)': -server.cc:(.text._ZN15_CORBA_SequenceIN9CosNaming13NameComponentEE6lengthEm[_CORBA_Sequence<CosNaming::NameComponent>::length(unsigned long)]+0x1c): undefined reference to `_CORBA_bound_check_error()' -/tmp/cckfoQVU.o: In function `hpp::corba::Server<Graphics::corbaServer::GraphicalInterface>::bindObjectToName(CORBA::Object*, CosNaming::Name)': -server.cc:(.text._ZN3hpp5corba6ServerIN8Graphics11corbaServer18GraphicalInterfaceEE16bindObjectToNameEPN5CORBA6ObjectEN9CosNaming4NameE[hpp::corba::Server<Graphics::corbaServer::GraphicalInterface>::bindObjectToName(CORBA::Object*, CosNaming::Name)]+0x28): undefined reference to `CosNaming::_objref_NamingContext::bind(CosNaming::Name const&, CORBA::Object*)' -server.cc:(.text._ZN3hpp5corba6ServerIN8Graphics11corbaServer18GraphicalInterfaceEE16bindObjectToNameEPN5CORBA6ObjectEN9CosNaming4NameE[hpp::corba::Server<Graphics::corbaServer::GraphicalInterface>::bindObjectToName(CORBA::Object*, CosNaming::Name)]+0x7d): undefined reference to `CosNaming::_objref_NamingContext::rebind(CosNaming::Name const&, CORBA::Object*)' -/tmp/cckfoQVU.o: In function `_CORBA_PseudoObj_Var<PortableServer::ThreadPolicy>::_CORBA_PseudoObj_Var()': -server.cc:(.text._ZN20_CORBA_PseudoObj_VarIN14PortableServer12ThreadPolicyEEC2Ev[_ZN20_CORBA_PseudoObj_VarIN14PortableServer12ThreadPolicyEEC5Ev]+0x12): undefined reference to `PortableServer::ThreadPolicy::_nil()' -/tmp/cckfoQVU.o: In function `_CORBA_Pseudo_Unbounded_Sequence<CORBA::Policy, _CORBA_PseudoObj_Member<CORBA::Policy, _CORBA_PseudoObj_Var<CORBA::Policy> > >::length(unsigned long)': -server.cc:(.text._ZN32_CORBA_Pseudo_Unbounded_SequenceIN5CORBA6PolicyE23_CORBA_PseudoObj_MemberIS1_20_CORBA_PseudoObj_VarIS1_EEE6lengthEm[_CORBA_Pseudo_Unbounded_Sequence<CORBA::Policy, _CORBA_PseudoObj_Member<CORBA::Policy, _CORBA_PseudoObj_Var<CORBA::Policy> > >::length(unsigned long)]+0x65): undefined reference to `_CORBA_new_operator_return_null()' -/tmp/cckfoQVU.o: In function `hpp::corba::Server<Graphics::corbaServer::GraphicalInterface>::createAndActivateServers()': -server.cc:(.text._ZN3hpp5corba6ServerIN8Graphics11corbaServer18GraphicalInterfaceEE24createAndActivateServersEv[hpp::corba::Server<Graphics::corbaServer::GraphicalInterface>::createAndActivateServers()]+0x1b): undefined reference to `Graphics::corbaServer::GraphicalInterface::GraphicalInterface()' -/tmp/cckfoQVU.o: In function `_CORBA_ObjRef_Var<CosNaming::_objref_NamingContext, CosNaming::NamingContext_Helper>::operator=(CosNaming::_objref_NamingContext*)': -server.cc:(.text._ZN17_CORBA_ObjRef_VarIN9CosNaming21_objref_NamingContextENS0_20NamingContext_HelperEEaSEPS1_[_CORBA_ObjRef_Var<CosNaming::_objref_NamingContext, CosNaming::NamingContext_Helper>::operator=(CosNaming::_objref_NamingContext*)]+0xf): undefined reference to `CosNaming::NamingContext_Helper::release(CosNaming::_objref_NamingContext*)' -/tmp/cckfoQVU.o: In function `_CORBA_Sequence<CosNaming::NameComponent>::copybuffer(unsigned long)': -server.cc:(.text._ZN15_CORBA_SequenceIN9CosNaming13NameComponentEE10copybufferEm[_CORBA_Sequence<CosNaming::NameComponent>::copybuffer(unsigned long)]+0x1b): undefined reference to `_CORBA_new_operator_return_null()' -collect2: ld returned 1 exit status diff --git a/src/fwd.hh~ b/src/fwd.hh~ deleted file mode 100644 index a04b44d..0000000 --- a/src/fwd.hh~ +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (C) 2014 LAAS-CNRS. -// -// This file is part of the SceneViewer-corba. -// -// This software is provided "as is" without warranty of any kind, -// either expressed or implied, including but not limited to the -// implied warranties of fitness for a particular purpose. -// -// See the COPYING file for more information. - -#ifndef SCENEVIEWER_CORBASERVER_FWD_HH -# define SCENEVIEWER_CORBASERVER_FWD_HH - -//FIXME: should be replaced by CORBA base types forward declarations. -# include <omniORB4/CORBA.h> - -namespace Graphics -{ - namespace corbaServer - { - class Server; - - namespace impl - { - using CORBA::Boolean; - using CORBA::Double; - using CORBA::Short; - using CORBA::SystemException; - using CORBA::ULong; - using CORBA::UShort; - - class GraphicalInterface; - class Server; - } // end of namespace impl - } // end of namespace corbaServer. -} // end of namespace hpp. - -#endif //! SCENEVIEWER_CORBASERVER_FWD_HH diff --git a/src/hpp-corbaserver.cc~ b/src/hpp-corbaserver.cc~ deleted file mode 100644 index bae8cbf..0000000 --- a/src/hpp-corbaserver.cc~ +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (C) 14 by Mathieu Geisert LAAS-CNRS. -// -// This file is part of the SceneViewer-corba. -// -// This software is provided "as is" without warranty of any kind, -// either expressed or implied, including but not limited to the -// implied warranties of fitness for a particular purpose. -// -// See the COPYING file for more information. - -#include <iostream> -#include "server.hh" - -using Graphics::corbaServer::Server; - -int -main (int argc, const char* argv[]) -{ - //hpp::core::ProblemSolverPtr_t problemSolver = new hpp::core::ProblemSolver; - Server server (argc, argv, true); - - server.startCorbaServer (); - server.processRequest(true); -} diff --git a/src/sceneViewer.idl~ b/src/sceneViewer.idl~ deleted file mode 100644 index 1bc6fc5..0000000 --- a/src/sceneViewer.idl~ +++ /dev/null @@ -1,47 +0,0 @@ -// file sceneViewer.idl -module Graphics { -module corbaserver { - - /// Corba exception travelling through the Corba channel - exception Error - { - string msg; - }; - - interface sceneViewer { - // Compute the sum of two real numbers. - void createWindow(in string name) ; - //void createWindow(in string name, in unsigned long x, in unsigned long y, in unsigned long width, in unsigned long height) ; - - void createScene(in string sceneName) ; - void createSceneWithFloor(in string sceneName) ; - void addSceneToWindow(in string sceneName, in string windowName) ; - - //void addBox(in string boxName, in float boxSize1, in float boxSize2, in float boxSize3, in string colorName) ; - void addBox(in string boxName, in float boxSize1, in float boxSize2, in float boxSize3) ; - - void addCapsule(in string capsuleName, in float radius, in float height) ; - //void addCapsule(in string capsuleName, in float radius, in float height, in string colorName) ; - - void addMesh(in string meshName, in string meshPath) ; - - void addCone(in string coneName, in float radius, in float height) ; - //void addCone(in string coneName, in float radius, in float height, in string colorName) ; - - void addCylinder(in string cylinderName, in float radius, in float height) ; - //void addCylinder(in string cylinderName, in float radius, in float height, in string colorName) ; - - void addSphere(in string sphereName, in float radius) ; - //void addSphere(in string sphereName, in float radius, in string colorName) ; - - void createGroup(in string groupName) ; - boolean addToGroup(in string nodeName, in string groupName) ; - - boolean applyConfiguration(in string nodeName, in float configuration) ; - - boolean setVisibility(in string nodeName, in string visibilityMode) ; - boolean setWireFrameMode(in string nodeName, in string wireFrameMode) ; - boolean setLightingMode(in string nodeName, in string lightingMode) ; - }; -}; -}; diff --git a/src/server-private.cc~ b/src/server-private.cc~ deleted file mode 100644 index a4119c9..0000000 --- a/src/server-private.cc~ +++ /dev/null @@ -1,123 +0,0 @@ -// Copyright (C) 2014 by Mathieu Geisert, LAAS-CNRS. -// -// This file is part of the SceneViewer-corba. -// -// This software is provided "as is" without warranty of any kind, -// either expressed or implied, including but not limited to the -// implied warranties of fitness for a particular purpose. -// -// See the COPYING file for more information. - -#include <iostream> -#include <stdexcept> - -#include "GraphicalInterface.impl.hh" -#include "server-private.hh" -#include "fwd.hh" - -namespace Graphics -{ - namespace corbaServer - { - namespace impl - { - using CORBA::Exception; - using CORBA::ORB_init; - using CORBA::Object_ptr; - using CORBA::Object_var; - using CORBA::PolicyList; - using CORBA::SystemException; - using CORBA::COMM_FAILURE; - using omniORB::fatalException; - - typedef CORBA::ORB::InvalidName InvalidName; - - Server::~Server () - { - delete graphicalInterfaceServantid_; - } - - void - Server::createAndActivateServers (corbaServer::Server* inServer) - { - graphicalInterfaceServant_ = new GraphicalInterface (inServer); - graphicalInterfaceServantid_ = poa_->activate_object(graphicalInterfaceServant_); - } - - void Server::deactivateAndDestroyServers() - { - poa_->deactivate_object(*graphicalInterfaceServantid_); - delete graphicalInterfaceServant_; - } - - - void Server::createContext () - { - CosNaming::NamingContext_var rootContext; - Object_var localObj; - CosNaming::Name contextName; - - // Obtain a reference to the root context of the Name service: - localObj = orb_->resolve_initial_references("NameService"); - try { - // Narrow the reference returned. - rootContext = CosNaming::NamingContext::_narrow(localObj); - if( is_nil(rootContext) ) { - std::string msg ("Failed to narrow the root naming context."); - throw std::runtime_error (msg.c_str ()); - } - } - catch(InvalidName& ex) { - // This should not happen! - std::string msg ("Service required is invalid [does not exist]."); - throw std::runtime_error (msg.c_str ()); - } - // Bind a context called "Graphics" to the root context: - contextName.length(1); - contextName[0].id = (const char*) "Graphics"; // string copied - contextName[0].kind = (const char*) "corbaserver"; // string copied - // Note on kind: The kind field is used to indicate the type - // of the object. This is to avoid conventions such as that used - // by files (name.type -- e.g. Graphics.ps = postscript etc.) - - try { - // Bind the context to root. - Context_ = rootContext->bind_new_context(contextName); - } - catch(CosNaming::NamingContext::AlreadyBound& ex) { - // If the context already exists, this exception will be raised. - // In this case, just resolve the name and assign Context - // to the object returned: - Object_var localObj; - localObj = rootContext->resolve(contextName); - Context_ = CosNaming::NamingContext::_narrow(localObj); - if( is_nil(Context_) ) { - std::string msg ("Failed to narrow naming context."); - throw std::runtime_error (msg.c_str ()); - } - } - } - - void Server::bindObjectToName(Object_ptr objref, - CosNaming::Name objectName) - { - try { - Context_->bind(objectName, objref); - } - catch(CosNaming::NamingContext::AlreadyBound& ex) { - Context_->rebind(objectName, objref); - } - // Note: Using rebind() will overwrite any Object previously bound - // to /hpp/RobotConfig with localObj. - // Alternatively, bind() can be used, which will raise a - // CosNaming::NamingContext::AlreadyBound exception if the name - // supplied is already bound to an object. - - // Amendment: When using OrbixNames, it is necessary to first - // try bind and then rebind, as rebind on it's own will throw - // a NotFoundexception if the Name has not already been - // bound. [This is incorrect behaviour - it should just bind]. - } - } // end of namespace impl. - } // end of namespace corbaServer. -} // end of namespace Graphics. diff --git a/src/server-private.hh~ b/src/server-private.hh~ deleted file mode 100644 index af5c7d4..0000000 --- a/src/server-private.hh~ +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (C) 2014 Mathieu Geisert, LAAS-CNRS. -// -// This file is part of the SceneViewer-corba. -// -// This software is provided "as is" without warranty of any kind, -// either expressed or implied, including but not limited to the -// implied warranties of fitness for a particular purpose. -// -// See the COPYING file for more information. - -#ifndef SCENEVIEWER_CORBASERVER_SERVER_PRIVATE_HH -# define SCENVIEWER_CORBASERVER_SERVER_PRIVATE_HH - -#include "GraphicalInterface.impl.hh" -#include "fwd.hh" - -namespace Graphics -{ - namespace corbaServer - { - namespace impl - { - class Server - { - public: - ~Server (); - - /// \brief Create and activate the Corba servers. - void createAndActivateServers (Graphics::corbaServer::Server* server); - - private: - CORBA::ORB_var orb_; - PortableServer::POA_var poa_; - GraphicalInterface* graphicalInterfaceServant_; - - /// \brief It seems that we need to store this object to - /// deactivate the server. - PortableServer::ObjectId* graphicalInterfaceServantid_; - - /// \brief Corba context. - CosNaming::NamingContext_var Context_; - - /// \brief Create context. - void createContext (); - - /// \brief Store objects in Corba name service. - void bindObjectToName - (CORBA::Object_ptr objref, CosNaming::Name objectName); - - - /// \brief Deactivate and destroy servers - /// - /// Destroying active servers raises a Corba exception. - void deactivateAndDestroyServers (); - - friend class corbaServer::Server; - }; - - } // end of namespace impl. - } // end of namespace corbaServer. -} // end of namespace hpp. - -#endif // SCENEVIEWER_CORBASERVER_SERVER_PRIVATE_HH diff --git a/src/server.cc~ b/src/server.cc~ deleted file mode 100644 index 988cf64..0000000 --- a/src/server.cc~ +++ /dev/null @@ -1,159 +0,0 @@ -// Copyright (C) 2014, 2010 by Mathieu Geisert, LAAS-CNRS. -// -// This file is part of the SceneViewer-corba. -// -// This software is provided "as is" without warranty of any kind, -// either expressed or implied, including but not limited to the -// implied warranties of fitness for a particular purpose. -// -// See the COPYING file for more information. - -#include <errno.h> -#include <pthread.h> -#include <iostream> -#include <stdexcept> -#include "server.hh" - -#include "server-private.hh" - - -namespace Graphics -{ - namespace corbaServer - { - using CORBA::Exception; - using CORBA::Object_var; - using CORBA::SystemException; - using CORBA::ORB_init; - using CORBA::PolicyList; - using omniORB::fatalException; - - //namespace - //{ - /// \brief Forward logging messages to hpp logging mechanism. - /// If debug is disabled, CORBA logging will be disabled too. - /// - /// Tracing has to be enabled in your ``omniORB.cfg'' to use this - /// feature. - /// See ``omniORB configuration and API'' > ``Tracing options'' - /// section of omniORB manual for more information. - //void logFunction (const char* msg); - - //} // end of anonymous namespace. - - - Server::Server(int argc, const char *argv[], bool inMultiThread) - { - private_ = new impl::Server; - - initORBandServers (argc, argv, inMultiThread); - } - - /// \brief Shutdown CORBA server - Server::~Server() - { - private_->deactivateAndDestroyServers(); - private_->orb_->shutdown(0); - delete private_; - private_ = NULL; - } - - /// CORBA SERVER INITIALIZATION - - void Server::initORBandServers(int argc, const char* argv[], - bool inMultiThread) - { - Object_var obj; - PortableServer::ThreadPolicy_var threadPolicy; - PortableServer::POA_var rootPoa; - - /// ORB init - private_->orb_ = ORB_init (argc, const_cast<char **> (argv)); - if (is_nil(private_->orb_)) { - std::string msg ("failed to initialize ORB"); - throw std::runtime_error (msg.c_str ()); - } - /// ORB init - obj = private_->orb_->resolve_initial_references("RootPOA"); - - /// Create thread policy - - // - // Make the CORBA object single-threaded to avoid GUI krash - // - // Create a sigle threaded policy object - rootPoa = PortableServer::POA::_narrow(obj); - - if (inMultiThread) { - threadPolicy = rootPoa->create_thread_policy - (PortableServer::ORB_CTRL_MODEL); - } - else { - threadPolicy = rootPoa->create_thread_policy - (PortableServer::MAIN_THREAD_MODEL); - } - /// Duplicate thread policy - PolicyList policyList; - policyList.length(1); - policyList[0] = PortableServer::ThreadPolicy::_duplicate(threadPolicy); - - private_->poa_ = rootPoa->create_POA - ("child", PortableServer::POAManager::_nil(), policyList); - // Destroy policy object - threadPolicy->destroy(); - private_->createAndActivateServers(this); - } - - void Server::startCorbaServer() - { - // Obtain a reference to objects, and register them in - // the naming service. - Object_var graphicalInterfaceObj = private_->graphicalInterfaceServant_->_this(); - - private_->createContext (); - // Bind graphicalInterfaceObj with name graphicalinterface to the Context: - CosNaming::Name objectName; - objectName.length(1); - objectName[0].id = (const char*) "basic"; // string copied - objectName[0].kind = (const char*) "graphicalinterface"; // string copied - - private_->bindObjectToName(graphicalInterfaceObj, objectName); - private_->graphicalInterfaceServant_->_remove_ref(); - - // Bind obstacleObj with name Obstacle to the hppContext: - //objectName.length(1); - //objectName[0].id = (const char*) "basic"; // string copied - //objectName[0].kind = (const char*) "obstacle"; // string copied - - //private_->bindObjectToName(obstacleObj, objectName); - //private_->obstacleServant_->_remove_ref(); - - // Bind problemObj with name Problem to the hppContext: - //objectName.length(1); - //objectName[0].id = (const char*) "basic"; // string copied - //objectName[0].kind = (const char*) "problem"; // string copied - - //private_->bindObjectToName(problemObj, objectName); - //private_->problemServant_->_remove_ref(); - - PortableServer::POAManager_var pman = private_->poa_->the_POAManager(); - pman->activate(); - } - - /// \brief If CORBA requests are pending, process them - int Server::processRequest (bool loop) - { - if (loop) - { - private_->orb_->run(); - } - else - { - if (private_->orb_->work_pending()) - private_->orb_->perform_work(); - } - return 0; - } - - } // end of namespace corbaServer. -} // end of namespace Graphics. diff --git a/src/server.hh~ b/src/server.hh~ deleted file mode 100644 index 36de3c8..0000000 --- a/src/server.hh~ +++ /dev/null @@ -1,100 +0,0 @@ -// Copyright (C) 2014 by Mathieu Geisert, LAAS-CNRS. -// -// This file is part of the SceneViewer-corba. -// -// This software is provided "as is" without warranty of any kind, -// either expressed or implied, including but not limited to the -// implied warranties of fitness for a particular purpose. -// -// See the COPYING file for more information. - -#ifndef SCENEVIEWER_CORBASERVER_SERVER_HH -# define SCENEVIEWER_CORBASERVER_SERVER_HH - - -#include "fwd.hh" - -namespace Graphics -{ - namespace corbaServer - { - /// Implementation of Hpp module Corba server. - - /// This class initializes the Corba server and starts the following Corba interface implementations. - /// \li hpp::Robot: to build a model::Device and to insert it in a core::ProblemSolver object, - /// \li hpp::Obstacle: to build obstacles and insert them in a core::ProblemSolver object, - /// \li hpp::Problem: to define a path planning problem and solve it. - - /// To use this object, call the constructor - - /// \code - /// int argc=1; - /// char *argv[1] = {"program"}; - /// core::ProblemSolverPtr_t problemSolver = new core::ProblemSolver; - /// Server server(problemSolver, argc, argv, isMultiThread); - /// \endcode - /// where \c isMultiThread specifies whether the server should process - /// requests using multi-thread policy of not. - - /// After starting a name server and configuring your Corba implementation, - /// start the servers. - /// \code - /// server.startCorbaServer(); - /// \endcode - /// Then, enter in the loop that handle the Corba requests - /// \code - /// server.processRequest(true); - /// \endcode - /// You can then send request to the servers. - class /*SCENEVIEWER_CORBASERVER_DLLAPI*/ Server - { - public: - /// Constructor - /// \param problemSolver the object that will handle Corba requests. - /// \param argc, argv parameter to feed ORB initialization. - /// \param multiThread whether the server may process request using - /// multithred policy. - /// \note It is recommended to configure your Corba implementation - /// through environment variables and to set argc to 1 and argv to - /// any string. - /// \note It is highly recommended not to enable multi-thread policy in - /// CORBA request processing if this library is run from an openGL - /// based GUI, since OpenGL does not support multithreading. - Server (int argc, const char* argv[], bool multiThread = false); - - /// \brief Shutdown CORBA server - ~Server (); - - /// \brief Initialize CORBA server to process requests from clients - /// \return 0 if success, -1 if failure. - void startCorbaServer (); - - /// \brief If ORB work is pending, process it - /// \param loop if true, the function never returns, - /// if false, the function processes pending requests and - /// returns. - int processRequest (bool loop); - - //core::ProblemSolverPtr_t problemSolver () const; - //core::ProblemSolverPtr_t problemSolver (); - - private: - - ///\name CORBA server initialization - /// \{ - /// Initialize ORB and CORBA servers. - - /// \param argc, argv parameter to feed ORB initialization. - /// \param multiThread whether the server may process request using - /// multithred policy. - void initORBandServers (int argc, const char* argv[], bool multiThread); - - /// \} - - impl::Server* private_; - - }; - - } // end of namespace corbaServer. -} // end of namespace sceneViewer. -#endif diff --git a/test/test-client-cpp.cc~ b/test/test-client-cpp.cc~ deleted file mode 100644 index d70e321..0000000 --- a/test/test-client-cpp.cc~ +++ /dev/null @@ -1,42 +0,0 @@ -// -// test-client-cpp.cc -// Test SceneViewer for C++ CORBA client -// -// Created by Mathieu Geisert in December 2014. -// Copyright (c) 2014 LAAS-CNRS. All rights reserved. -// - -#include "../src/client-cpp.hh" - -int main(int argc, const char * argv[]) -{ - using namespace Graphics; - using namespace corbaServer; - using namespace std; - - ClientCpp client; - - se3::SE3 position1 = se3::SE3::Random(); - se3::SE3 position2 = se3::SE3::Random(); - se3::SE3 position3 = se3::SE3::Random(); - se3::SE3 position4 = se3::SE3::Random(); - se3::SE3 position5 = se3::SE3::Random(); - - client.createWindow("window1"); - client.createScene("scene1"); - client.addSceneToWindow("scene1","window1"); - client.addURDF("scene1/hrp2", "/local/mgeisert/devel/src/hrp2/hrp2_14_description/urdf/hrp2_14_capsule.urdf", "/local/mgeisert/devel/src/hrp2/"); - - sleep(15); - - - client.applyConfiguration("scene1/hrp2/RLEG_LINK0", position1); - client.applyConfiguration("scene1/hrp2/RLEG_LINK1", position2); - client.applyConfiguration("scene1/hrp2/LLEG_LINK1", position3); - client.applyConfiguration("scene1/hrp2/LLEG_LINK2", position4); - client.applyConfiguration("scene1/hrp2/BODY", position5); - - client.refresh(); - - return 0; -} -- GitLab