|
From: <tf...@us...> - 2008-05-30 21:04:16
|
Revision: 571
http://personalrobots.svn.sourceforge.net/personalrobots/?rev=571&view=rev
Author: tfoote
Date: 2008-05-30 14:04:24 -0700 (Fri, 30 May 2008)
Log Message:
-----------
compiling test program for irrlicht renderer
Modified Paths:
--------------
pkg/trunk/3rdparty/irrlicht/manifest.xml
Added Paths:
-----------
pkg/trunk/visualization/irrlicht_viewer/
pkg/trunk/visualization/irrlicht_viewer/CustomNodes/
pkg/trunk/visualization/irrlicht_viewer/CustomNodes/ILGrid.cc
pkg/trunk/visualization/irrlicht_viewer/CustomNodes/ILGrid.hh
pkg/trunk/visualization/irrlicht_viewer/CustomNodes/ILPointCloud.cc
pkg/trunk/visualization/irrlicht_viewer/CustomNodes/ILPointCloud.hh
pkg/trunk/visualization/irrlicht_viewer/ILClient.cc
pkg/trunk/visualization/irrlicht_viewer/ILClient.hh
pkg/trunk/visualization/irrlicht_viewer/ILRender.cc
pkg/trunk/visualization/irrlicht_viewer/ILRender.hh
pkg/trunk/visualization/irrlicht_viewer/ILRenderServer.hh
pkg/trunk/visualization/irrlicht_viewer/ILRenderTest.cc
pkg/trunk/visualization/irrlicht_viewer/Makefile
pkg/trunk/visualization/irrlicht_viewer/PPILRender.hh
pkg/trunk/visualization/irrlicht_viewer/manifest.xml
pkg/trunk/visualization/irrlicht_viewer/media/
pkg/trunk/visualization/irrlicht_viewer/media/aibo_lo.x3d
pkg/trunk/visualization/irrlicht_viewer/media/board.x3d
pkg/trunk/visualization/irrlicht_viewer/media/circle.x3d
pkg/trunk/visualization/irrlicht_viewer/media/dirt.jpg
pkg/trunk/visualization/irrlicht_viewer/media/grid.jpg
pkg/trunk/visualization/irrlicht_viewer/media/ground.x3d
pkg/trunk/visualization/irrlicht_viewer/media/prius.x3d
pkg/trunk/visualization/irrlicht_viewer/media/priusS.jpg
pkg/trunk/visualization/irrlicht_viewer/media/square.x3d
pkg/trunk/visualization/irrlicht_viewer/media/star.x3d
pkg/trunk/visualization/irrlicht_viewer/media/wedge.x3d
Modified: pkg/trunk/3rdparty/irrlicht/manifest.xml
===================================================================
--- pkg/trunk/3rdparty/irrlicht/manifest.xml 2008-05-30 19:10:34 UTC (rev 570)
+++ pkg/trunk/3rdparty/irrlicht/manifest.xml 2008-05-30 21:04:24 UTC (rev 571)
@@ -11,7 +11,7 @@
<license>zlib</license>
<url>http://irrlicht.sourceforge.net/index.html</url>
<export>
- <cpp lflags="-L${prefix}/irrlicht-1.4/lib/Linux -lIrrlicht -L/usr/X111R6/lib -lGL -lXxf86vm -lXext -lX11" cflags="-I${prefix}/irrlicht-1.4/include /usr/X11R6/include -ffast-math"/>
+ <cpp lflags="-L${prefix}/irrlicht-1.4/lib/Linux -lIrrlicht -L/usr/X111R6/lib -lGL -lXxf86vm -lXext -lX11" cflags="-I${prefix}/irrlicht-1.4/include -ffast-math"/>
<doxymaker external="http://irrlicht.sourceforge.net/docu/index.html" />
</export>
</package>
Added: pkg/trunk/visualization/irrlicht_viewer/CustomNodes/ILGrid.cc
===================================================================
--- pkg/trunk/visualization/irrlicht_viewer/CustomNodes/ILGrid.cc (rev 0)
+++ pkg/trunk/visualization/irrlicht_viewer/CustomNodes/ILGrid.cc 2008-05-30 21:04:24 UTC (rev 571)
@@ -0,0 +1,101 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+// Copyright (C) 2008, Willow Garage Inc.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+// * Redistributions of source code must retain the above copyright notice,
+// this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+// * Neither the name of Stanford University nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+// POSSIBILITY OF SUCH DAMAGE.
+//////////////////////////////////////////////////////////////////////////////
+
+#include "ILGrid.hh"
+
+#define MIN(a,b) (((a)<(b))?(a):(b))
+
+using namespace irr;
+
+ILGrid::ILGrid(irr::scene::ISceneNode* parent,
+ irr::scene::ISceneManager* mgr,
+ irr::s32 id)
+: scene::ISceneNode(parent, mgr, id)
+{
+ m_material.Lighting = false;
+ m_material.Wireframe = true;
+ m_material.BackfaceCulling = false;
+ m_material.Thickness = 1;
+}
+
+ILGrid::~ILGrid() {
+ deallocatePoints();
+}
+
+// Manipulators
+void ILGrid::makegrid(const size_t gridSize, const double cellLength, int r, int g, int b) {
+ m_gridSize = gridSize;
+ m_cellLength = cellLength;
+ m_extent = (cellLength*((double)gridSize))/2;
+ m_r = r;
+ m_g = g;
+ m_b = b;
+}
+
+void ILGrid::deallocatePoints() {
+}
+
+void ILGrid::OnRegisterSceneNode() {
+ if (IsVisible) {
+ SceneManager->registerNodeForRendering(this);
+ }
+
+ ISceneNode::OnRegisterSceneNode();
+}
+
+void ILGrid::render() {
+ video::IVideoDriver* driver = SceneManager->getVideoDriver();
+
+ driver->setMaterial(m_material);
+ driver->setTransform(video::ETS_WORLD, AbsoluteTransformation);
+
+ double inc;
+
+ for(size_t i=0; i<=m_gridSize; i++) {
+ inc = m_extent-i*m_cellLength;
+
+ driver->draw3DLine(core::vector3df(inc,0,-1*m_extent),
+ core::vector3df(inc,0,m_extent),
+ video::SColor(255,m_r,m_g,m_b));
+ driver->draw3DLine(core::vector3df(-1*m_extent,0,inc),
+ core::vector3df(m_extent,0,inc),
+ video::SColor(255,m_r,m_g,m_b));
+ }
+}
+
+const irr::core::aabbox3d<irr::f32>& ILGrid::getBoundingBox() const {
+ return m_box;
+}
+
+irr::u32 ILGrid::getMaterialCount() {
+ return 1;
+}
+
+irr::video::SMaterial& ILGrid::getMaterial(irr::u32 i) {
+ return m_material;
+}
Property changes on: pkg/trunk/visualization/irrlicht_viewer/CustomNodes/ILGrid.cc
___________________________________________________________________
Name: svn:mime-type
+ text/cpp
Added: pkg/trunk/visualization/irrlicht_viewer/CustomNodes/ILGrid.hh
===================================================================
--- pkg/trunk/visualization/irrlicht_viewer/CustomNodes/ILGrid.hh (rev 0)
+++ pkg/trunk/visualization/irrlicht_viewer/CustomNodes/ILGrid.hh 2008-05-30 21:04:24 UTC (rev 571)
@@ -0,0 +1,66 @@
+#ifndef __IL_GRID_HH
+#define __IL_GRID_HH
+///////////////////////////////////////////////////////////////////////////////
+//
+// Copyright (C) 2008, Willow Garage Inc.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+// * Redistributions of source code must retain the above copyright notice,
+// this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+// * Neither the name of Stanford University nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+// POSSIBILITY OF SUCH DAMAGE.
+//////////////////////////////////////////////////////////////////////////////
+
+
+#include <irrlicht.h>
+#include <iostream>
+#include <math.h>
+
+class ILGrid : public irr::scene::ISceneNode {
+public:
+ static const size_t MAX_RENDERABLE = 65535;
+
+ ILGrid(irr::scene::ISceneNode* parent, irr::scene::ISceneManager* mgr, irr::s32 id);
+ ~ILGrid();
+
+ // Manipulators
+ void makegrid(const size_t gidsize, const double cellLength, int r, int g, int b);
+ void deallocatePoints();
+
+ // Methods implemented for engine
+ virtual void OnRegisterSceneNode();
+ virtual void render();
+
+ virtual const irr::core::aabbox3d<irr::f32>& getBoundingBox() const;
+ virtual irr::u32 getMaterialCount();
+ virtual irr::video::SMaterial& getMaterial(irr::u32 i);
+
+private:
+
+ size_t m_gridSize;
+ double m_cellLength;
+ double m_extent;
+ int m_r,m_g,m_b;
+
+ irr::video::SMaterial m_material;
+ irr::core::aabbox3d<irr::f32> m_box;
+};
+
+#endif // ifndef __IL_GRID_HH
Added: pkg/trunk/visualization/irrlicht_viewer/CustomNodes/ILPointCloud.cc
===================================================================
--- pkg/trunk/visualization/irrlicht_viewer/CustomNodes/ILPointCloud.cc (rev 0)
+++ pkg/trunk/visualization/irrlicht_viewer/CustomNodes/ILPointCloud.cc 2008-05-30 21:04:24 UTC (rev 571)
@@ -0,0 +1,137 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+// Copyright (C) 2008, Willow Garage Inc.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+// * Redistributions of source code must retain the above copyright notice,
+// this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+// * Neither the name of Stanford University nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+// POSSIBILITY OF SUCH DAMAGE.
+//////////////////////////////////////////////////////////////////////////////
+
+#include "ILPointCloud.hh"
+
+#define MIN(a,b) (((a)<(b))?(a):(b))
+
+using namespace irr;
+
+ILPointCloud::ILPointCloud(irr::scene::ISceneNode* parent,
+ irr::scene::ISceneManager* mgr,
+ irr::s32 id)
+: scene::ISceneNode(parent, mgr, id),
+ m_numPoints (0),
+ m_numAllocPoints (0),
+ m_points (NULL)
+{
+ m_material.Lighting = false;
+ m_material.Wireframe = false;
+ m_material.PointCloud = true;
+ m_material.BackfaceCulling = false;
+ m_material.Thickness = 2;
+}
+
+ILPointCloud::~ILPointCloud() {
+ deallocatePoints();
+}
+
+// Memory management
+void ILPointCloud::preallocatePoints(const size_t numPoints) {
+ if(m_numAllocPoints == 0) {
+ m_points = (video::S3DVertex*)malloc(numPoints*sizeof(video::S3DVertex));
+ m_numAllocPoints = numPoints;
+ }
+}
+
+void ILPointCloud::deallocatePoints() {
+ if(m_numAllocPoints > 0) {
+ free(m_points);
+ m_points = NULL;
+ m_numAllocPoints = 0;
+ m_numPoints = 0;
+ }
+}
+
+// Manipulators
+void ILPointCloud::addPoint(const double x, const double y, const double z,
+ const int r, const int g, const int b)
+{
+ if(m_numPoints == m_numAllocPoints) {
+ m_points = (video::S3DVertex*)realloc(m_points,2*m_numAllocPoints*sizeof(video::S3DVertex));
+ }
+
+ m_points[m_numPoints].Pos.set(x,y,z);
+ m_points[m_numPoints].Color.set(255,r,g,b);
+
+ m_numPoints++;
+}
+
+void ILPointCloud::addPoints(double *rgX, double *rgY, double *rgZ,
+ int *rgR, int *rgG, int *rgB,
+ const size_t numPoints)
+{
+ if(m_numPoints+numPoints >= m_numAllocPoints) {
+ m_points = (video::S3DVertex*)realloc(m_points,numPoints*sizeof(video::S3DVertex));
+ }
+
+ for(int i=0; i<numPoints; i++) {
+ m_points[m_numPoints].Pos.set(rgX[i],rgY[i],rgZ[i]);
+ m_points[m_numPoints].Color.set(255,rgR[i],rgG[i],rgB[i]);
+ }
+
+ m_numPoints = numPoints;
+}
+
+void ILPointCloud::resetCount() {
+ m_numPoints = 0;
+}
+
+void ILPointCloud::OnRegisterSceneNode() {
+ if (IsVisible) {
+ SceneManager->registerNodeForRendering(this);
+ }
+
+ ISceneNode::OnRegisterSceneNode();
+}
+
+void ILPointCloud::render() {
+ video::IVideoDriver* driver = SceneManager->getVideoDriver();
+
+ driver->setMaterial(m_material);
+ driver->setTransform(video::ETS_WORLD, AbsoluteTransformation);
+
+ for(size_t i=0; i<m_numPoints; i+=MAX_RENDERABLE) {
+ driver->drawVertexPrimitiveList(m_points,MIN(m_numPoints-i, MAX_RENDERABLE),
+ NULL, MIN(m_numPoints-i,MAX_RENDERABLE),
+ video::EVT_STANDARD,
+ scene::EPT_POINTS);
+ }
+}
+
+const irr::core::aabbox3d<irr::f32>& ILPointCloud::getBoundingBox() const {
+ return m_box;
+}
+
+irr::u32 ILPointCloud::getMaterialCount() {
+ return 1;
+}
+
+irr::video::SMaterial& ILPointCloud::getMaterial(irr::u32 i) {
+ return m_material;
+}
Property changes on: pkg/trunk/visualization/irrlicht_viewer/CustomNodes/ILPointCloud.cc
___________________________________________________________________
Name: svn:mime-type
+ text/cpp
Added: pkg/trunk/visualization/irrlicht_viewer/CustomNodes/ILPointCloud.hh
===================================================================
--- pkg/trunk/visualization/irrlicht_viewer/CustomNodes/ILPointCloud.hh (rev 0)
+++ pkg/trunk/visualization/irrlicht_viewer/CustomNodes/ILPointCloud.hh 2008-05-30 21:04:24 UTC (rev 571)
@@ -0,0 +1,69 @@
+#ifndef __IL_POINT_CLOUD_HH
+#define __IL_POINT_CLOUD_HH
+///////////////////////////////////////////////////////////////////////////////
+//
+// Copyright (C) 2008, Willow Garage Inc.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+// * Redistributions of source code must retain the above copyright notice,
+// this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+// * Neither the name of Stanford University nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+// POSSIBILITY OF SUCH DAMAGE.
+//////////////////////////////////////////////////////////////////////////////
+
+#include <irrlicht.h>
+#include <iostream>
+#include <math.h>
+
+class ILPointCloud : public irr::scene::ISceneNode {
+public:
+ static const size_t MAX_RENDERABLE = 65535;
+
+ ILPointCloud(irr::scene::ISceneNode* parent, irr::scene::ISceneManager* mgr, irr::s32 id);
+ ~ILPointCloud();
+
+ // Memory management
+ void preallocatePoints(const size_t numPoints);
+ void deallocatePoints();
+
+ // Manipulators
+ void addPoint(const double x, const double y, const double z, const int r, const int g, const int b);
+ void addPoints(double *rgX, double *rgY, double *rgZ,
+ int *rgR, int *rgG, int *rgB,
+ const size_t numPoints);
+ void resetCount();
+
+ // Methods implemented for engine
+ virtual void OnRegisterSceneNode();
+ virtual void render();
+
+ virtual const irr::core::aabbox3d<irr::f32>& getBoundingBox() const;
+ virtual irr::u32 getMaterialCount();
+ virtual irr::video::SMaterial& getMaterial(irr::u32 i);
+
+private:
+ size_t m_numPoints, m_numAllocPoints;
+ irr::video::S3DVertex *m_points;
+
+ irr::video::SMaterial m_material;
+ irr::core::aabbox3d<irr::f32> m_box;
+};
+
+#endif // #ifndef __IL_POINT_CLOUD_HH
Added: pkg/trunk/visualization/irrlicht_viewer/ILClient.cc
===================================================================
--- pkg/trunk/visualization/irrlicht_viewer/ILClient.cc (rev 0)
+++ pkg/trunk/visualization/irrlicht_viewer/ILClient.cc 2008-05-30 21:04:24 UTC (rev 571)
@@ -0,0 +1,87 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+// Copyright (C) 2008, Willow Garage Inc.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+// * Redistributions of source code must retain the above copyright notice,
+// this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+// * Neither the name of Stanford University nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+// POSSIBILITY OF SUCH DAMAGE.
+//////////////////////////////////////////////////////////////////////////////
+
+#include "ILClient.hh"
+
+// Initialize singletona members
+ILRender *ILClient::s_pRenderer = NULL;
+uint32_t ILClient::s_numClients = 0;
+pthread_mutex_t *ILClient::s_pSingletonMutex = NULL;
+
+ILClient::ILClient() {
+ // If it is uninialized, initialize mutex for singleton access
+ if(s_pSingletonMutex == NULL) {
+ s_pSingletonMutex = new pthread_mutex_t;
+ pthread_mutex_init(s_pSingletonMutex,0L);
+ }
+
+ pthread_mutex_lock(s_pSingletonMutex);
+
+ // Increment client counter
+ s_numClients++;
+
+ pthread_mutex_unlock(s_pSingletonMutex);
+}
+
+ILClient::~ILClient() {
+ // Acquire singleton lock
+ pthread_mutex_lock(s_pSingletonMutex);
+
+ // Decrement client counter
+ s_numClients--;
+
+ // If this is the last client
+ if(s_numClients == 0) {
+ // Destruct the singleton members
+ delete s_pRenderer;
+ s_pRenderer = NULL;
+ pthread_mutex_destroy(s_pSingletonMutex);
+ delete s_pSingletonMutex;
+ } else {
+ // Release the lock
+ pthread_mutex_unlock(s_pSingletonMutex);
+ }
+}
+
+ILRender* ILClient::getSingleton() {
+ pthread_mutex_lock(s_pSingletonMutex);
+
+ // Check for renderer instantiation
+ if(s_pRenderer == NULL) {
+ // Create a default ILRender
+ s_pRenderer = new ILRender();
+
+ while(s_pRenderer->uninitialized()) {
+ usleep(10);
+ }
+ }
+
+ pthread_mutex_unlock(s_pSingletonMutex);
+
+ return s_pRenderer;
+}
Property changes on: pkg/trunk/visualization/irrlicht_viewer/ILClient.cc
___________________________________________________________________
Name: svn:mime-type
+ text/cpp
Added: pkg/trunk/visualization/irrlicht_viewer/ILClient.hh
===================================================================
--- pkg/trunk/visualization/irrlicht_viewer/ILClient.hh (rev 0)
+++ pkg/trunk/visualization/irrlicht_viewer/ILClient.hh 2008-05-30 21:04:24 UTC (rev 571)
@@ -0,0 +1,52 @@
+#ifndef __IL_CLIENT_HH
+#define __IL_CLIENT_HH
+
+///////////////////////////////////////////////////////////////////////////////
+//
+// Copyright (C) 2008, Willow Garage Inc.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+// * Redistributions of source code must retain the above copyright notice,
+// this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+// * Neither the name of Stanford University nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+// POSSIBILITY OF SUCH DAMAGE.
+//////////////////////////////////////////////////////////////////////////////
+
+
+#include <pthread.h>
+#include <irrlicht.h>
+
+#include "ILRender.hh"
+
+class ILClient {
+public:
+ // Constructor
+ ILClient();
+ ~ILClient();
+
+ static ILRender* getSingleton();
+
+private:
+ static uint32_t s_numClients;
+ static ILRender *s_pRenderer;
+ static pthread_mutex_t *s_pSingletonMutex;
+};
+
+#endif // ifndef __IL_CLIENT_HH
Added: pkg/trunk/visualization/irrlicht_viewer/ILRender.cc
===================================================================
--- pkg/trunk/visualization/irrlicht_viewer/ILRender.cc (rev 0)
+++ pkg/trunk/visualization/irrlicht_viewer/ILRender.cc 2008-05-30 21:04:24 UTC (rev 571)
@@ -0,0 +1,237 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+// Copyright (C) 2008, Willow Garage Inc.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+// * Redistributions of source code must retain the above copyright notice,
+// this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+// * Neither the name of Stanford University nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+// POSSIBILITY OF SUCH DAMAGE.
+//////////////////////////////////////////////////////////////////////////////
+
+#include "ILRender.hh"
+
+using namespace irr;
+
+// Construction / Destruction
+ILRender::ILRender(core::dimension2d<s32> resolution, video::E_DRIVER_TYPE driverType)
+: m_enabled (false),
+ m_initialized (false),
+ m_pRenderThread (NULL)
+{
+ pthread_mutex_init(&m_renderMutex,0L);
+ init(resolution,driverType);
+}
+
+ILRender::~ILRender() {
+ cleanup();
+ pthread_mutex_destroy(&m_renderMutex);
+}
+
+bool ILRender::uninitialized() {
+ return !m_initialized;
+}
+
+void ILRender::init(core::dimension2d<s32> resolution, video::E_DRIVER_TYPE driverTyped) {
+ using namespace ros::thread::member_thread;
+ lock();
+ if(!m_enabled) {
+ // Start render thread
+ m_enabled = true;
+ m_pRenderThread = startMemberFunctionThread(this, &ILRender::renderLoop);
+ }
+ unlock();
+}
+
+void ILRender::cleanup() {
+ lock();
+ if(m_enabled && m_pRenderThread != NULL) {
+ m_enabled = false;
+ pthread_join(*m_pRenderThread, 0L);
+ m_pRenderThread = NULL;
+ m_pDevice->drop();
+ }
+ unlock();
+}
+
+// Renderer Management
+void ILRender::lock() {
+ if(pthread_mutex_lock(&m_renderMutex) == -1) {
+ //TODO: throw exception here
+ }
+}
+
+void ILRender::unlock() {
+ if(pthread_mutex_unlock(&m_renderMutex) == -1) {
+ //TODO: throw exception here
+ }
+}
+
+// Node Management
+void ILRender::addNode(scene::ISceneNode *pNode) {
+ lock();
+
+ // Check for node first, to ensure only one copy
+ if(m_nodes.find(pNode) == m_nodes.end()) {
+ // Initialize nodeInfo structure
+ NodeInfo *tempinfo = new NodeInfo();
+
+ // Lock mutex before insertion
+ int ret = pthread_mutex_lock(&(tempinfo->lock));
+ if(ret != 0) {
+ //TODO: throw exception here
+ }
+ // Insert
+ m_nodes.insert(std::make_pair(pNode,tempinfo));
+ // Unlock mutex
+ unlock(pNode);
+ }
+
+ unlock();
+}
+
+void ILRender::remNode(scene::ISceneNode *pNode) {
+ lock();
+
+ lock(pNode);
+ delete m_nodes[pNode];
+ m_nodes.erase(pNode);
+
+ unlock();
+}
+
+void ILRender::pushToDraw(scene::ISceneNode *pNode) {
+ m_drawPipe.push(pNode);
+}
+
+void ILRender::enable(scene::ISceneNode *pNode) {
+ lock(pNode);
+ m_nodes[pNode]->enabled = true;
+ unlock(pNode);
+}
+
+void ILRender::disable(scene::ISceneNode *pNode) {
+ lock(pNode);
+ m_nodes[pNode]->enabled = false;
+ unlock(pNode);
+}
+
+// Functions for locking individual nodes
+bool ILRender::trylock(scene::ISceneNode *pNode) {
+ int ret = pthread_mutex_trylock(&(m_nodes[pNode]->lock));
+ if(ret != 0 && errno == EBUSY) {
+ return false;
+ }
+ return true;
+}
+
+void ILRender::lock(scene::ISceneNode *pNode) {
+ int ret = pthread_mutex_lock(&(m_nodes[pNode]->lock));
+ if(ret != 0) {
+ //TODO: throw exception here
+ }
+}
+
+void ILRender::unlock(scene::ISceneNode *pNode) {
+ int ret = pthread_mutex_unlock(&(m_nodes[pNode]->lock));
+ if(ret != 0) {
+ //TODO: throw exception here
+ }
+}
+
+// Render Loop
+void ILRender::renderLoop() {
+
+ std::cerr<<"RENDERLOOP!"<<std::endl;
+
+ lock();
+ m_pDevice = createDevice(video::EDT_OPENGL, core::dimension2d<s32>(640, 480));
+
+ if (m_pDevice == 0) {
+ // TODO: REPLACE THIS WITH AN EXCEPTION
+ exit(-1);
+ }
+
+ m_pDriver = m_pDevice->getVideoDriver();
+ m_pManager = m_pDevice->getSceneManager();
+#if 1
+ m_pManager->addCameraSceneNodeMaya(NULL,-1500.0f,200.0f,1500.0f);
+#else
+ SKeyMap keyMap[8];
+ keyMap[0].Action = EKA_MOVE_FORWARD;
+ keyMap[0].KeyCode = KEY_UP;
+ keyMap[1].Action = EKA_MOVE_FORWARD;
+ keyMap[1].KeyCode = KEY_KEY_W;
+
+ keyMap[2].Action = EKA_MOVE_BACKWARD;
+ keyMap[2].KeyCode = KEY_DOWN;
+ keyMap[3].Action = EKA_MOVE_BACKWARD;
+ keyMap[3].KeyCode = KEY_KEY_S;
+
+ keyMap[4].Action = EKA_STRAFE_LEFT;
+ keyMap[4].KeyCode = KEY_LEFT;
+ keyMap[5].Action = EKA_STRAFE_LEFT;
+ keyMap[5].KeyCode = KEY_KEY_A;
+
+ keyMap[6].Action = EKA_STRAFE_RIGHT;
+ keyMap[6].KeyCode = KEY_RIGHT;
+ keyMap[7].Action = EKA_STRAFE_RIGHT;
+ keyMap[7].KeyCode = KEY_KEY_D;
+
+ m_pManager->addCameraSceneNodeFPS(0, 1000, 100, -1, keyMap, 8);
+#endif
+ m_pDevice->getCursorControl()->setVisible(true);
+
+ m_initialized = true;
+ unlock();
+
+ std::cerr<<"ILRENDER INITIALIZED!"<<std::endl;
+
+ while(m_enabled) {
+ if(m_pDevice->run()) {
+ lock();
+
+ // Draw Scene
+ m_pDriver->beginScene(true, true, video::SColor(255,0,0,0));
+ m_pManager->drawAll();
+ m_pDriver->endScene();
+
+ unlock();
+ } else {
+ m_enabled = false;
+ }
+ usleep(10000);
+ }
+
+ pthread_exit(NULL);
+}
+
+// Accessors
+IrrlichtDevice* ILRender::device() {
+ return m_pDevice;
+}
+
+video::IVideoDriver* ILRender::driver() {
+ return m_pDriver;
+}
+
+scene::ISceneManager* ILRender::manager() {
+ return m_pManager;
+}
Property changes on: pkg/trunk/visualization/irrlicht_viewer/ILRender.cc
___________________________________________________________________
Name: svn:mime-type
+ text/cpp
Added: pkg/trunk/visualization/irrlicht_viewer/ILRender.hh
===================================================================
--- pkg/trunk/visualization/irrlicht_viewer/ILRender.hh (rev 0)
+++ pkg/trunk/visualization/irrlicht_viewer/ILRender.hh 2008-05-30 21:04:24 UTC (rev 571)
@@ -0,0 +1,148 @@
+#ifndef __IL_RENDER_HH
+#define __IL_RENDER_HH
+
+///////////////////////////////////////////////////////////////////////////////
+//
+// Copyright (C) 2008, Willow Garage Inc.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+// * Redistributions of source code must retain the above copyright notice,
+// this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+// * Neither the name of Stanford University nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+// POSSIBILITY OF SUCH DAMAGE.
+//////////////////////////////////////////////////////////////////////////////
+
+
+// System Includes
+#include <stdint.h>
+#include <pthread.h>
+#include <errno.h>
+
+#include <iostream>
+#include <queue>
+#include <map>
+
+// IrrLicht
+#include <irrlicht.h>
+
+#include <rosthread/member_thread.h>
+
+class ILRender {
+public:
+ // Constructors
+ ILRender(irr::core::dimension2d<irr::s32> resolution = irr::core::dimension2d<irr::s32>(640, 480),
+ irr::video::E_DRIVER_TYPE driverType = irr::video::EDT_OPENGL);
+ ~ILRender();
+
+ // Scene Management
+ // ILRender::init creates the underlying IrrLicht renderer, and spawns a thread
+ // executing ILRender::renderLoop
+ void init(irr::core::dimension2d<irr::s32> resolution,irr::video::E_DRIVER_TYPE driverType);
+ bool uninitialized();
+
+ // ILRender::cleanup halts rendering and destroys the underlying IrrLicht
+ // renderer.
+ void cleanup();
+
+ // Renderer Management
+ void lock();
+ void unlock();
+
+ // Node Management
+ void addNode(irr::scene::ISceneNode *pNode);
+ void remNode(irr::scene::ISceneNode *pNode);
+
+ // If you do not wish to remove a node, but do want to disable/hide it, you
+ // can use these methods. They simply manipulate a boolean value associated
+ // with each registered node.
+ void enable(irr::scene::ISceneNode *pNode);
+ void disable(irr::scene::ISceneNode *pNode);
+
+ void pushToDraw(irr::scene::ISceneNode *pNode);
+
+ // If a client in another thread wishes to modify one of the scene nodes,
+ // they must lock the specific node by calling the following methods. These
+ // each manipulate a pthread_mutex_t which is associated with the given node
+ //
+ // When rendering, the ILRender class calls trylock, attempting to get a lock
+ // on the node. If it is being maniplated by another thread at that point,
+ // pthread_mutex_trylock will report EBUSY and ILRender will not try to draw
+ // the node.
+ void lock(irr::scene::ISceneNode *pNode);
+ bool trylock(irr::scene::ISceneNode *pNode);
+ void unlock(irr::scene::ISceneNode *pNode);
+
+ // Accessors
+ irr::IrrlichtDevice* device();
+ irr::video::IVideoDriver* driver();
+ irr::scene::ISceneManager* manager();
+
+private:
+ // Flags
+ bool m_enabled;
+ bool m_initialized;
+
+ // IrrLicht objects
+ irr::IrrlichtDevice *m_pDevice;
+ irr::video::IVideoDriver *m_pDriver;
+ irr::scene::ISceneManager *m_pManager;
+
+ // Loop for drawing
+ // This function is executed in its own thread when ILRender::init is called.
+ // It iterates through the list of registered nodes, drawing each of them if
+ // the node meets both conditions:
+ // 1. the node is enabled
+ // 2. the ILRender can acquire the lock in the node's nodeInfo structure
+ void renderLoop();
+
+ // Thread objects
+ pthread_t *m_pRenderThread;
+ pthread_mutex_t m_renderMutex;
+
+ std::queue<irr::scene::ISceneNode*> m_drawPipe;
+
+ // Map of nodes in this renderer and their respective draw states
+ // Each node pointer is associated with a nodeInfo struct
+ // This struct holds an enabled flag as well as a mutex for multithreaded
+ // access. It's constructor and destructor properly handle the
+ // initialization and the destruction of the mutex.
+ // If a client in another thread wishes to modify one of the scene nodes,
+ // they must lock the specific node by calling ILRender::lock,unlock
+
+ class NodeInfo {
+ public:
+ bool enabled;
+ bool needs_update;
+ pthread_mutex_t lock;
+ NodeInfo() {
+ enabled = false;
+ needs_update = false;
+ if(pthread_mutex_init(&lock,0L) != 0) { throw -1; }
+ }
+ ~NodeInfo() {
+ pthread_mutex_destroy(&lock);
+ }
+ };
+
+ std::map<irr::scene::ISceneNode*,NodeInfo*> m_nodes;
+ std::map<irr::scene::ISceneNode*,NodeInfo*>::iterator m_nodeIter;
+};
+
+#endif // ifndef __IL_RENDER_HH
Added: pkg/trunk/visualization/irrlicht_viewer/ILRenderServer.hh
===================================================================
--- pkg/trunk/visualization/irrlicht_viewer/ILRenderServer.hh (rev 0)
+++ pkg/trunk/visualization/irrlicht_viewer/ILRenderServer.hh 2008-05-30 21:04:24 UTC (rev 571)
@@ -0,0 +1,44 @@
+#ifndef __ILRENDER_SERVER_HH
+#define __ILRENDER_SERVER_HH
+///////////////////////////////////////////////////////////////////////////////
+//
+// Copyright (C) 2008, Willow Garage Inc.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+// * Redistributions of source code must retain the above copyright notice,
+// this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+// * Neither the name of Stanford University nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+// POSSIBILITY OF SUCH DAMAGE.
+//////////////////////////////////////////////////////////////////////////////
+
+#include "ILRender.hh"
+
+class ILRenderServer {
+public:
+ ILRenderServer();
+ ~ILRenderServer();
+
+
+private:
+ pack
+};
+
+
+#endif // ifndef __ILRENDER_SERVER_HH
Added: pkg/trunk/visualization/irrlicht_viewer/ILRenderTest.cc
===================================================================
--- pkg/trunk/visualization/irrlicht_viewer/ILRenderTest.cc (rev 0)
+++ pkg/trunk/visualization/irrlicht_viewer/ILRenderTest.cc 2008-05-30 21:04:24 UTC (rev 571)
@@ -0,0 +1,118 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+// Copyright (C) 2008, Willow Garage Inc.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+// * Redistributions of source code must retain the above copyright notice,
+// this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+// * Neither the name of Stanford University nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+// POSSIBILITY OF SUCH DAMAGE.
+//////////////////////////////////////////////////////////////////////////////
+
+#include <iostream>
+#include <math.h>
+
+#include <irrlicht.h>
+
+#include "ILRender.hh"
+#include "ILClient.hh"
+#include "CustomNodes/ILPointCloud.hh"
+
+// Global enabled flag
+bool g_enabled = true;
+
+// Function to test async node manipulation
+void* asyncClient(void *args) {
+ using namespace irr;
+
+ // Load args
+ int index = ((int*)args)[0];
+ double direction = ((double*)args)[1];
+ double radius = ((double*)args)[2];
+ double speed = ((double*)args)[3];
+
+ // Create client, and grab a local pointer to the renderer and lock it
+ ILClient localClient;
+ ILRender *pLocalRenderer = ILClient::getSingleton();
+
+ // Create node (a sphere)
+ // NOTE: When accessing these functions we need to surround the calls with a
+ // lock/unlock pair
+ pLocalRenderer->lock();
+ scene::ISceneNode *sphere = pLocalRenderer->manager()->addSphereSceneNode(1, 100, pLocalRenderer->manager()->getRootSceneNode(), index);
+ //ILPointCloud *sphere = new ILPointCloud(pLocalRenderer->manager()->getRootSceneNode(), pLocalRenderer->manager(), 666);
+ pLocalRenderer->unlock();
+
+ // Register scene node
+ // NOTE: these functions are atomic and provide their own thread protection
+ pLocalRenderer->addNode(sphere);
+ pLocalRenderer->enable(sphere);
+
+ // Working variables in loop
+ core::vector3df pos;
+ double angle = 0;
+
+ // Continuously manipulate node
+ while(g_enabled) {
+ // Acquire lock on the node
+ pLocalRenderer->lock(sphere);
+
+ // Move it a little around a circle
+ angle += speed;
+ if(angle >= 2*M_PI) { angle = 0; }
+ pos = core::vector3df((direction)*(radius)*(-1)*sin(angle),0,(direction)*(radius)*cos(angle));
+ sphere->setPosition(pos);
+
+ // Relinquish the lock on the node
+ pLocalRenderer->unlock(sphere);
+
+ // Wait a little
+ usleep(10000);
+ }
+
+ // Cleanup resources
+ pLocalRenderer->remNode(sphere);
+
+ pthread_exit(NULL);
+}
+
+int main(int argc, char** argv) {
+
+ // Spawn 3 clients
+ pthread_t pClient1, pClient2, pClient3;
+ double rgClientArg1[4] = {1,1,5,0.01};
+ double rgClientArg2[4] = {2,-1,10,0.005};
+ double rgClientArg3[4] = {3,1,15,0.1};
+
+ pthread_create(&pClient1, 0L, asyncClient, rgClientArg1);
+ pthread_create(&pClient2, 0L, asyncClient, rgClientArg2);
+ pthread_create(&pClient3, 0L, asyncClient, rgClientArg3);
+
+ // Wait 15 seconds, then disable rendering
+ sleep(20);
+ g_enabled = false;
+
+ // Join threads
+ pthread_join(pClient1,0L);
+ pthread_join(pClient2,0L);
+ pthread_join(pClient3,0L);
+
+ return 0;
+}
Property changes on: pkg/trunk/visualization/irrlicht_viewer/ILRenderTest.cc
___________________________________________________________________
Name: svn:mime-type
+ text/cpp
Added: pkg/trunk/visualization/irrlicht_viewer/Makefile
===================================================================
--- pkg/trunk/visualization/irrlicht_viewer/Makefile (rev 0)
+++ pkg/trunk/visualization/irrlicht_viewer/Makefile 2008-05-30 21:04:24 UTC (rev 571)
@@ -0,0 +1,47 @@
+.PHONY: install_lib all clean
+
+CPP = g++
+
+# Default Target
+all: build_lib
+
+headers = $(filter %.hh %.h, $(1))
+noheaders = $(filter-out %.hh %.h, $(1))
+nosources = $(filter-out %.cc %.c, $(1))
+objects = $(filter %.o, $(1:%.c=%.o) $(1:%.cc=%.o)) $(call noheaders,$(call nosources,$(1)))
+
+
+
+CPPFLAGS = $(shell rospack export/cpp/cflags irrlicht_viewer)
+LDFLAGS = $(shell rospack export/cpp/lflags irrlicht_viewer)
+
+CUSTOM_NODES = $(shell ls CustomNodes/*.cc)
+
+ILRENDER_LIB = libilrender.a
+
+# Generic Targets
+%.o: %.cc
+ $(CPP) $(CPPFLAGS) -O2 -c $< -o $@
+
+# Library Targets
+
+
+$(ILRENDER_LIB): $(call objects,$(CUSTOM_NODES))
+ ar -rcs $(ILRENDER_LIB) $(call objects,$(CUSTOM_NODES))
+
+#g++ $(CPPFLAGS) -o $@ $(call objects,$(CUSTOM_NODES))
+
+# Executable Targets
+test: ILRenderTest.cc ILRender.o ILClient.o $(ILRENDER_LIB)
+ $(CPP) $(CPPFLAGS) -o $@ $^ $(LDFLAGS)
+
+build_lib: $(ILRENDER_LIB)
+
+# Special Targets
+
+clean:
+ $(CLEANCOMMAND)
+ rm -rf test
+ cd $(ILRENDER_PATH)/CustomNodes && $(CLEANCOMMAND)
+
+
Added: pkg/trunk/visualization/irrlicht_viewer/PPILRender.hh
===================================================================
--- pkg/trunk/visualization/irrlicht_viewer/PPILRender.hh (rev 0)
+++ pkg/trunk/visualization/irrlicht_viewer/PPILRender.hh 2008-05-30 21:04:24 UTC (rev 571)
@@ -0,0 +1,99 @@
+#ifndef __PP_IL_RENDER_HH
+#define __PP_IL_RENDER_HH
+///////////////////////////////////////////////////////////////////////////////
+//
+// Copyright (C) 2008, Willow Garage Inc.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+// * Redistributions of source code must retain the above copyright notice,
+// this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+// * Neither the name of Stanford University nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+// POSSIBILITY OF SUCH DAMAGE.
+//////////////////////////////////////////////////////////////////////////////
+
+// Feeder includes
+#include <feeder/UCData.hh>
+#include <feeder/PostProcessor.hh>
+#include "UCDPointCloud.hh"
+
+// Renderer includes
+#include <irrlicht.h>
+#include "ILClient.hh"
+#include "ILRender.hh"
+#include "CustomNodes/ILPointCloud.hh"
+#include "CustomNodes/ILGrid.hh"
+
+class PPILRender :
+ public PostProcessor<UCDPointCloud, UCData>
+{
+public:
+ typedef UCDPointCloud input_t;
+ typedef UCData output_t;
+
+ // Constructor
+ PPILRender(PPInfo<input_t> p_info, int scans_to_plot) : PostProcessor<input_t, output_t>(p_info) {
+ m_name = "PPILRender";
+ m_pOutputBuffer = new UCRingBuffer<output_t>(8);
+ };
+
+ ~PPILRender() {
+ disable();
+ };
+
+ void activeLoop() {
+ input_t* p_ibuff;
+
+ ILClient localClient;
+ ILRender *pLocalRenderer = ILClient::getSingleton();
+
+ pLocalRenderer->lock();
+ ILPointCloud *ilCloud = new ILPointCloud(pLocalRenderer->manager()->getRootSceneNode(), pLocalRenderer->manager(), 666);
+ ILGrid *ilGrid = new ILGrid(pLocalRenderer->manager()->getRootSceneNode(), pLocalRenderer->manager(), 667);
+ pLocalRenderer->unlock();
+
+ ilCloud->preallocatePoints(100000);
+ pLocalRenderer->addNode(ilCloud);
+ pLocalRenderer->enable(ilCloud);
+
+ ilGrid->makegrid(100,1.0f,50,50,50);
+ pLocalRenderer->addNode(ilGrid);
+ pLocalRenderer->enable(ilGrid);
+
+ while (m_enabled) {
+ p_ibuff = m_rInputBuffer.getLatestAndRetain(); // Block for new data
+
+ // Process data (this takes about 2500 usec for a 10Hz velodyne cycle)
+ pLocalRenderer->lock();
+ ilCloud->resetCount();
+ for(size_t i=0; i<p_ibuff->num_points; i++) {
+ ilCloud->addPoint(p_ibuff->rgX[i],
+ p_ibuff->rgZ[i],
+ p_ibuff->rgY[i],
+ (int)(50+205*(p_ibuff->rgZ[i]/3)),0,0);
+ }
+ pLocalRenderer->unlock();
+
+ m_rInputBuffer.release(p_ibuff);
+ incrementMonitor();
+ }
+ }
+};
+
+#endif // ifndef __PP_IL_RENDER_HH
Added: pkg/trunk/visualization/irrlicht_viewer/manifest.xml
===================================================================
--- pkg/trunk/visualization/irrlicht_viewer/manifest.xml (rev 0)
+++ pkg/trunk/visualization/irrlicht_viewer/manifest.xml 2008-05-30 21:04:24 UTC (rev 571)
@@ -0,0 +1,15 @@
+<package>
+<description brief="Irrlicht Data Visualization">
+
+This is a rendering engine for data visulization which uses the Irrlicht Rendering Engine.
+
+</description>
+<author>Tully Foote and Jon Bohren </author>
+<license>bsd</license>
+<url>http://pr.willowgarage.com/wiki/ROS</url>
+<depend package="irrlicht"/>
+<depend package="rosthread"/>
+<export>
+</export>
+</package>
+
Added: pkg/trunk/visualization/irrlicht_viewer/media/aibo_lo.x3d
===================================================================
--- pkg/trunk/visualization/irrlicht_viewer/media/aibo_lo.x3d (rev 0)
+++ pkg/trunk/visualization/irrlicht_viewer/media/aibo_lo.x3d 2008-05-30 21:04:24 UTC (rev 571)
@@ -0,0 +1,463 @@
+<?xml version="1.0" ?>
+<!--This file was authored with Blender (http://www.blender.org/)-->
+<!--Exported using the X3DExporter, written by Adrian Cheater (http://www.bitbucket.ca/~acheater/blender)-->
+<!DOCTYPE X3D>
+<X3D Profile="Interchange">
+ <Scene>
+ <Transform DEF="body_bcover" rotation="0.000 0.000 0.000 0.000" scale="1.000 1.000 1.000" translation="-0.318 0.202 -0.458">
+ <Shape>
+ <IndexedFaceSet coordIndex="3 0 1 2 -1 1 0 7 5 -1 9 6 4 8 -1 7 9 8 5 -1 14 12 11 15 -1 24 23 10 16 -1 30 31 17 18 -1 32 11 19 20 -1 18 17 26 -1 28 29 23 24 -1 25 21 22 -1 26 17 21 25 -1 13 27 16 10 -1 22 21 29 28 -1 20 19 31 30 -1 15 11 32 -1 34 33 36 35 -1 34 38 40 33 -1 42 41 37 39 -1 40 38 41 42 -1 47 48 44 45 -1 57 49 43 56 -1 63 51 50 64 -1 65 53 52 44 -1 51 59 50 -1 61 57 56 62 -1 58 55 54 -1 59 58 54 50 -1 46 43 49 60 -1 55 61 62 54 -1 53 63 64 52 -1 48 65 44 -1 109 68 71 -1 80 81 76 75 -1 72 111 110 73 -1 111 72 112 -1 79 77 81 -1 87 85 84 -1 84 85 86 83 -1 70 83 86 82 -1 75 76 87 -1 87 76 85 -1 98 99 106 105 -1 96 97 95 94 -1 94 95 108 107 -1 101 102 91 100 -1 92 93 102 101 -1 104 88 67 69 -1 67 88 89 103 -1 103 90 66 67 -1 68 66 90 74 -1 90 135 120 74 -1 74 71 68 -1 79 81 80 -1 141 142 97 96 -1 134 148 103 89 -1 118 157 112 72 -1 100 91 88 104 -1 105 106 93 92 -1 107 108 99 98 -1 72 73 109 71 -1 111 77 79 110 -1 77 111 112 78 -1 112 157 124 78 -1 154 117 115 -1 126 121 122 127 -1 118 119 155 156 -1 156 157 118 -1 125 127 123 -1 132 129 130 -1 129 128 131 130 -1 70 82 131 128 -1 121 132 122 -1 132 130 122 -1 143 150 151 144 -1 141 139 140 142 -1 139 152 153 140 -1 146 145 136 147 -1 137 146 147 138 -1 149 116 114 133 -1 114 148 134 133 -1 148 114 113 135 -1 115 120 135 113 -1 120 115 117 -1 125 126 127 -1 71 74 120 117 -1 90 103 148 135 -1 145 149 133 136 -1 150 137 138 151 -1 152 143 144 153 -1 118 117 154 119 -1 156 155 125 123 -1 123 124 157 156 -1 " normalIndex="0 1 2 3 -1 4 5 6 7 -1 8 9 10 11 -1 12 13 14 15 -1 16 17 18 19 -1 20 21 22 23 -1 24 25 26 27 -1 28 29 30 31 -1 32 33 34 -1 35 36 37 38 -1 39 40 41 -1 42 43 44 45 -1 46 47 48 49 -1 50 51 52 53 -1 54 55 56 57 -1 58 59 60 -1 61 62 63 64 -1 65 66 67 68 -1 69 70 71 72 -1 73 74 75 76 -1 77 78 79 80 -1 81 82 83 84 -1 85 86 87 88 -1 89 90 91 92 -1 93 94 95 -1 96 97 98 99 -1 100 101 102 -1 103 104 105 106 -1 107 108 109 110 -1 111 112 113 114 -1 115 116 117 118 -1 119 120 121 -1 122 123 124 -1 125 126 127 128 -1 129 130 131 132 -1 133 134 135 -1 136 137 138 -1 139 140 141 -1 142 143 144 145 -1 146 147 148 149 -1 150 151 152 -1 153 154 155 -1 156 157 158 159 -1 160 161 162 163 -1 164 165 166 167 -1 168 169 170 171 -1 172 173 174 175 -1 176 177 178 179 -1 180 181 182 183 -1 184 185 186 187 -1 188 189 190 191 -1 192 193 194 195 -1 196 197 198 -1 199 200 201 -1 202 203 204 205 -1 206 207 208 209 -1 210 211 212 213 -1 214 215 216 217 -1 218 219 220 221 -1 222 223 224 225 -1 226 227 228 229 -1 230 231 232 233 -1 234 235 236 237 -1 238 239 240 241 -1 242 243 244 -1 245 246 247 248 -1 249 250 251 252 -1 253 254 255 -1 256 257 258 -1 259 260 261 -1 262 263 264 265 -1 266 267 268 269 -1 270 271 272 -1 273 274 275 -1 276 277 278 279 -1 280 281 282 283 -1 284 285 286 287 -1 288 289 290 291 -1 292 293 294 295 -1 296 297 298 299 -1 300 301 302 303 -1 304 305 306 307 -1 308 309 310 311 -1 312 313 314 -1 315 316 317 -1 318 319 320 321 -1 322 323 324 325 -1 326 327 328 329 -1 330 331 332 333 -1 334 335 336 337 -1 338 339 340 341 -1 342 343 344 345 -1 346 347 348 349 -1 " solid="false">
+ <Coordinate point="-0.230 0.296 -0.416, 0.236 0.294 -0.420, 0.325 0.207 -0.475, -0.294 0.212 -0.473, 0.094 0.391 -0.094, 0.180 0.352 -0.323, -0.086 0.393 -0.085, -0.176 0.359 -0.307, 0.137 0.371 -0.208, -0.131 0.376 -0.196, -0.230 0.296 -0.416, 0.236 0.294 -0.420, 0.325 0.207 -0.475, -0.294 0.212 -0.473, 0.410 0.279 -0.474, 0.328 0.312 -0.428, -0.326 0.315 -0.425, 0.094 0.391 -0.094, 0.151 0.425 -0.072, 0.180 0.352 -0.323, 0.244 0.373 -0.325, -0.086 0.393 -0.085, -0.145 0.422 -0.066, -0.176 0.359 -0.307, -0.242 0.383 -0.308, -0.088 0.413 -0.030, 0.095 0.396 -0.018, -0.452 0.269 -0.483, -0.182 0.404 -0.174, -0.131 0.376 -0.196, 0.183 0.403 -0.187, 0.137 0.371 -0.208, 0.284 0.343 -0.385, -0.230 -0.296 -0.416, 0.236 -0.294 -0.420, 0.325 -0.207 -0.475, -0.294 -0.212 -0.473, 0.094 -0.391 -0.094, 0.180 -0.352 -0.323, -0.086 -0.393 -0.085, -0.176 -0.359 -0.307, 0.137 -0.371 -0.208, -0.131 -0.376 -0.196, -0.230 -0.296 -0.416, 0.236 -0.294 -0.420, 0.325 -0.207 -0.475, -0.294 -0.212 -0.473, 0.410 -0.279 -0.474, 0.328 -0.312 -0.428, -0.326 -0.315 -0.425, 0.094 -0.391 -0.094, 0.151 -0.425 -0.072, 0.180 -0.352 -0.323, 0.244 -0.373 -0.325, -0.086 -0.393 -0.085, -0.145 -0.422 -0.066, -0.176 -0.359 -0.307, -0.242 -0.383 -0.308, -0.088 -0.413 -0.030, 0.095 -0.396 -0.018, -0.452 -0.269 -0.483, -0.182 -0.404 -0.174, -0.131 -0.376 -0.196, 0.183 -0.403 -0.187, 0.137 -0.371 -0.208, 0.284 -0.343 -0.385, 0.325 -0.207 -0.475, -0.294 -0.212 -0.473, 0.410 -0.279 -0.474, -0.452 -0.269 -0.483, 1.069 0.000 -0.214, 0.524 -0.128 -0.515, 0.657 -0.131 -0.516, 0.647 -0.260 -0.502, 0.405 -0.103 -0.498, 0.973 -0.247 -0.343, 0.976 -0.194 -0.346, 0.858 -0.136 -0.447, 0.829 -0.043 -0.467, 0.857 -0.260 -0.435, 0.932 -0.259 -0.382, 0.936 -0.196 -0.386, 1.051 0.000 -0.248, 1.065 -0.062 -0.220, 1.047 -0.148 -0.248, 1.026 -0.148 -0.285, 1.051 -0.049 -0.248, 1.017 -0.209 -0.292, -0.474 -0.225 -0.493, -0.471 -0.087 -0.506, 0.287 -0.103 -0.481, -0.642 -0.225 -0.509, -0.896 -0.262 -0.428, -0.898 -0.225 -0.436, -1.148 -0.179 -0.073, -1.144 -0.155 -0.095, -1.171 -0.053 -0.006, -1.164 -0.053 -0.041, -1.073 -0.261 -0.240, -1.080 -0.225 -0.237, -0.643 -0.261 -0.501, -0.752 -0.260 -0.488, -0.776 -0.225 -0.489, -0.296 -0.087 -0.488, -0.524 -0.266 -0.495, -0.989 -0.262 -0.341, -0.989 -0.225 -0.336, -1.122 -0.217 -0.152, -1.114 -0.188 -0.161, 0.529 -0.269 -0.496, 0.781 -0.260 -0.469, 0.788 -0.134 -0.471, 0.793 -0.061 -0.477, 0.325 0.207 -0.475, -0.294 0.212 -0.473, 0.410 0.279 -0.474, -0.452 0.269 -0.483, 0.524 0.128 -0.515, 0.657 0.131 -0.516, 0.647 0.260 -0.502, 0.405 0.103 -0.498, 0.973 0.247 -0.343, 0.976 0.194 -0.346, 0.858 0.136 -0.447, 0.829 0.043 -0.467, 0.857 0.260 -0.435, 0.932 0.259 -0.382, 0.936 0.196 -0.386, 1.065 0.062 -0.220, 1.047 0.148 -0.248, 1.026 0.148 -0.285, 1.051 0.049 -0.248, 1.017 0.209 -0.292, -0.474 0.225 -0.493, -0.471 0.087 -0.506, 0.287 0.103 -0.481, -0.642 0.225 -0.509, -0.896 0.262 -0.428, -0.898 0.225 -0.436, -1.148 0.179 -0.073, -1.144 0.155 -0.095, -1.171 0.053 -0.006, -1.164 0.053 -0.041, -1.073 0.261 -0.240, -1.080 0.225 -0.237, -0.643 0.261 -0.501, -0.752 0.260 -0.488, -0.776 0.225 -0.489, -0.296 0.087 -0.488, -0.524 0.266 -0.495, -0.989 0.262 -0.341, -0.989 0.225 -0.336, -1.122 0.217 -0.152, -1.114 0.188 -0.161, 0.529 0.269 -0.496, 0.781 0.260 -0.469, 0.788 0.134 -0.471, 0.793 0.061 -0.477, "/>
+ <Normal vector="-0.000 0.545 -0.838, -0.001 0.724 -0.690, -0.001 0.724 -0.690, -0.000 0.545 -0.838, -0.001 0.724 -0.690, -0.001 0.724 -0.690, 0.005 0.941 -0.339, 0.005 0.941 -0.339, 0.009 0.987 -0.161, 0.006 0.987 -0.161, 0.006 0.987 -0.161, 0.009 0.987 -0.161, 0.005 0.941 -0.339, 0.009 0.987 -0.161, 0.009 0.987 -0.161, 0.005 0.941 -0.339, -0.243 0.395 -0.886, -0.243 0.395 -0.886, -0.251 0.626 -0.739, -0.227 0.555 -0.800, 0.294 0.846 -0.445, 0.294 0.846 -0.445, 0.224 0.632 -0.742, 0.224 0.632 -0.742, -0.393 0.866 -0.309, -0.393 0.866 -0.309, -0.300 0.936 -0.183, -0.463 0.869 -0.173, -0.248 0.724 -0.644, -0.251 0.626 -0.739, -0.332 0.820 -0.465, -0.332 0.820 -0.465, -0.463 0.869 -0.173, -0.300 0.936 -0.183, -0.233 0.965 -0.122, 0.350 0.894 -0.280, 0.350 0.894 -0.280, 0.294 0.846 -0.445, 0.294 0.846 -0.445, 0.192 0.949 -0.250, 0.249 0.933 -0.259, 0.343 0.893 -0.291, -0.233 0.965 -0.122, -0.300 0.936 -0.183, 0.249 0.933 -0.259, 0.192 0.949 -0.250, 0.203 0.465 -0.862, 0.203 0.465 -0.862, 0.224 0.632 -0.742, 0.224 0.632 -0.742, 0.343 0.893 -0.291, 0.249 0.933 -0.259, 0.350 0.894 -0.280, 0.350 0.894 -0.280, -0.332 0.820 -0.465, -0.332 0.820 -0.465, -0.393 0.866 -0.309, -0.393 0.866 -0.309, -0.227 0.555 -0.800, -0.251 0.626 -0.739, -0.248 0.724 -0.644, -0.001 -0.724 -0.690, -0.001 -0.724 -0.690, -0.000 -0.545 -0.838, -0.000 -0.545 -0.838, -0.001 -0.724 -0.690, 0.005 -0.941 -0.339, 0.005 -0.941 -0.339, -0.001 -0.724 -0.690, 0.009 -0.987 -0.161, 0.009 -0.987 -0.161, 0.006 -0.987 -0.161, 0.006 -0.987 -0.161, 0.005 -0.941 -0.339, 0.005 -0.941 -0.339, 0.009 -0.987 -0.161, 0.009 -0.987 -0.161, -0.243 -0.395 -0.886, -0.227 -0.555 -0.800, -0.251 -0.626 -0.739, -0.243 -0.395 -0.886, 0.294 -0.846 -0.445, 0.224 -0.632 -0.742, 0.224 -0.632 -0.742, 0.294 -0.846 -0.445, -0.393 -0.866 -0.309, -0.463 -0.869 -0.173, -0.300 -0.936 -0.183, -0.393 -0.866 -0.309, -0.248 -0.724 -0.644, -0.332 -0.820 -0.465, -0.332 -0.820 -0.465, -0.251 -0.626 -0.739, -0.463 -0.869 -0.173, -0.233 -0.965 -0.122, -0.300 -0.936 -0.183, 0.350 -0.894 -0.280, 0.294 -0.846 -0.445, 0.294 -0.846 -0.445, 0.350 -0.894 -0.280, 0.192 -0.949 -0.250, 0.343 -0.893 -0.291, 0.249 -0.933 -0.259, -0.233 -0.965 -0.122, 0.192 -0.949 -0.250, 0.249 -0.933 -0.259, -0.300 -0.936 -0.183, 0.203 -0.465 -0.862, 0.224 -0.632 -...
[truncated message content] |