From: <a-...@us...> - 2009-12-18 07:27:42
|
Revision: 125 http://simspark.svn.sourceforge.net/simspark/?rev=125&view=rev Author: a-held Date: 2009-12-18 06:24:13 +0000 (Fri, 18 Dec 2009) Log Message: ----------- integrated changes made in R121 and R124 into the branch Modified Paths: -------------- branches/multiphys/rcssserver3d/data/rsg/agent/nao/goal.rsg branches/multiphys/rcssserver3d/data/rsg/agent/nao/nao.rsg branches/multiphys/spark/lib/kerosin/renderserver/rendernode.cpp branches/multiphys/spark/lib/kerosin/renderserver/rendernode.h branches/multiphys/spark/lib/kerosin/renderserver/rendernode_c.cpp branches/multiphys/spark/lib/kerosin/renderserver/renderserver.cpp branches/multiphys/spark/lib/kerosin/renderserver/renderserver.h branches/multiphys/spark/lib/kerosin/sceneserver/staticmesh_c.cpp branches/multiphys/spark/lib/oxygen/physicsserver/int/rigidbodyint.h branches/multiphys/spark/lib/oxygen/physicsserver/ode/oderigidbody.cpp branches/multiphys/spark/lib/oxygen/physicsserver/ode/oderigidbody.h branches/multiphys/spark/lib/oxygen/physicsserver/physicsobject.cpp branches/multiphys/spark/lib/oxygen/physicsserver/physicsobject.h branches/multiphys/spark/lib/oxygen/physicsserver/rigidbody.cpp branches/multiphys/spark/lib/oxygen/physicsserver/rigidbody.h branches/multiphys/spark/lib/oxygen/sceneserver/basenode.cpp branches/multiphys/spark/lib/oxygen/sceneserver/basenode.h branches/multiphys/spark/plugin/CMakeLists.txt branches/multiphys/spark/plugin/sparkmonitor/sparkmonitor.cpp Added Paths: ----------- branches/multiphys/spark/plugin/accelerometer/ branches/multiphys/spark/plugin/accelerometer/CMakeLists.txt branches/multiphys/spark/plugin/accelerometer/accelerometer.cpp branches/multiphys/spark/plugin/accelerometer/accelerometer.h branches/multiphys/spark/plugin/accelerometer/accelerometer_c.cpp branches/multiphys/spark/plugin/accelerometer/export.cpp Modified: branches/multiphys/rcssserver3d/data/rsg/agent/nao/goal.rsg =================================================================== --- branches/multiphys/rcssserver3d/data/rsg/agent/nao/goal.rsg 2009-12-17 22:21:49 UTC (rev 124) +++ branches/multiphys/rcssserver3d/data/rsg/agent/nao/goal.rsg 2009-12-18 06:24:13 UTC (rev 125) @@ -46,8 +46,9 @@ (setLocalPos $GoalHalfDepth 0.0 (eval -1 * $GoalHalfHeight)) (setLocalRotation 90 90 0) (nd StaticMesh - (load $GoalObj) - (setScale $ObjWidth $ObjWidth $ObjWidth) + (load $GoalObj) + (setScale $ObjWidth $ObjWidth $ObjWidth) + (setTransparent) ) ) Modified: branches/multiphys/rcssserver3d/data/rsg/agent/nao/nao.rsg =================================================================== --- branches/multiphys/rcssserver3d/data/rsg/agent/nao/nao.rsg 2009-12-17 22:21:49 UTC (rev 124) +++ branches/multiphys/rcssserver3d/data/rsg/agent/nao/nao.rsg 2009-12-18 06:24:13 UTC (rev 125) @@ -71,6 +71,7 @@ ) (nd GyroRatePerceptor (setName torso)) + ;(nd Accelerometer (setName torso)) ;(nd HMDPPerceptor) ;(nd HMDPEffector) Modified: branches/multiphys/spark/lib/kerosin/renderserver/rendernode.cpp =================================================================== --- branches/multiphys/spark/lib/kerosin/renderserver/rendernode.cpp 2009-12-17 22:21:49 UTC (rev 124) +++ branches/multiphys/spark/lib/kerosin/renderserver/rendernode.cpp 2009-12-18 06:24:13 UTC (rev 125) @@ -26,10 +26,16 @@ using namespace kerosin; RenderNode::RenderNode() - : BaseNode() + : BaseNode(), + mTransparent(false) { } RenderNode::~RenderNode() { } + +void RenderNode::SetTransparent() +{ + mTransparent = true; +} Modified: branches/multiphys/spark/lib/kerosin/renderserver/rendernode.h =================================================================== --- branches/multiphys/spark/lib/kerosin/renderserver/rendernode.h 2009-12-17 22:21:49 UTC (rev 124) +++ branches/multiphys/spark/lib/kerosin/renderserver/rendernode.h 2009-12-18 06:24:13 UTC (rev 125) @@ -42,6 +42,11 @@ /** renders the node */ virtual void RenderInternal() = 0; + + bool IsTransparent() { return mTransparent; } + void SetTransparent(); +private: + bool mTransparent; }; DECLARE_ABSTRACTCLASS(RenderNode); Modified: branches/multiphys/spark/lib/kerosin/renderserver/rendernode_c.cpp =================================================================== --- branches/multiphys/spark/lib/kerosin/renderserver/rendernode_c.cpp 2009-12-17 22:21:49 UTC (rev 124) +++ branches/multiphys/spark/lib/kerosin/renderserver/rendernode_c.cpp 2009-12-18 06:24:13 UTC (rev 125) @@ -23,7 +23,14 @@ using namespace kerosin; +FUNCTION(RenderNode,setTransparent) +{ + obj->SetTransparent(); + return true; +} + void CLASS(RenderNode)::DefineClass() { DEFINE_BASECLASS(oxygen/BaseNode); + DEFINE_FUNCTION(setTransparent); } Modified: branches/multiphys/spark/lib/kerosin/renderserver/renderserver.cpp =================================================================== --- branches/multiphys/spark/lib/kerosin/renderserver/renderserver.cpp 2009-12-17 22:21:49 UTC (rev 124) +++ branches/multiphys/spark/lib/kerosin/renderserver/renderserver.cpp 2009-12-18 06:24:13 UTC (rev 125) @@ -123,7 +123,8 @@ } // standard rendering - RenderScene(mActiveScene); + RenderScene(mActiveScene, 0); + RenderScene(mActiveScene, 1); // reset GL lights glDisable(GL_LIGHTING); @@ -244,7 +245,7 @@ } void -RenderServer::RenderScene(boost::shared_ptr<BaseNode> node) +RenderServer::RenderScene(boost::shared_ptr<BaseNode> node, unsigned pass) { #if 0 shared_ptr<SphereCollider> collider = shared_dynamic_cast<SphereCollider>(node); @@ -254,7 +255,9 @@ } #endif shared_ptr<RenderNode> renderNode = shared_dynamic_cast<RenderNode>(node); - if (renderNode.get() != 0) + if (renderNode.get() != 0 && + ((pass == 0 && !renderNode->IsTransparent()) || (pass == 1 && renderNode->IsTransparent())) + ) { glPushMatrix(); @@ -268,7 +271,7 @@ glMultMatrixf(node->GetWorldTransform().m); - renderNode->RenderInternal(); + renderNode->RenderInternal(); if (mEnablePicking) { @@ -294,7 +297,7 @@ continue; } - RenderScene(node); + RenderScene(node, pass); } } Modified: branches/multiphys/spark/lib/kerosin/renderserver/renderserver.h =================================================================== --- branches/multiphys/spark/lib/kerosin/renderserver/renderserver.h 2009-12-17 22:21:49 UTC (rev 124) +++ branches/multiphys/spark/lib/kerosin/renderserver/renderserver.h 2009-12-18 06:24:13 UTC (rev 125) @@ -105,7 +105,7 @@ /** render a scene recursively. \param node the scene base node */ - void RenderScene(boost::shared_ptr<oxygen::BaseNode> node); + void RenderScene(boost::shared_ptr<oxygen::BaseNode> node, unsigned pass); /** sets the OpenGl view parameters for a camera */ Modified: branches/multiphys/spark/lib/kerosin/sceneserver/staticmesh_c.cpp =================================================================== --- branches/multiphys/spark/lib/kerosin/sceneserver/staticmesh_c.cpp 2009-12-17 22:21:49 UTC (rev 124) +++ branches/multiphys/spark/lib/kerosin/sceneserver/staticmesh_c.cpp 2009-12-18 06:24:13 UTC (rev 125) @@ -144,6 +144,12 @@ return true; } +FUNCTION(RenderNode,setTransparent) +{ + obj->SetTransparent(); + return true; +} + void CLASS(StaticMesh)::DefineClass() { DEFINE_BASECLASS(oxygen/BaseNode); @@ -154,4 +160,5 @@ DEFINE_FUNCTION(setExternalMeshName) DEFINE_FUNCTION(setExternalMeshScale) DEFINE_FUNCTION(resetMaterials) + DEFINE_FUNCTION(setTransparent); } Modified: branches/multiphys/spark/lib/oxygen/physicsserver/int/rigidbodyint.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/int/rigidbodyint.h 2009-12-17 22:21:49 UTC (rev 124) +++ branches/multiphys/spark/lib/oxygen/physicsserver/int/rigidbodyint.h 2009-12-18 06:24:13 UTC (rev 125) @@ -62,9 +62,11 @@ virtual void SetVelocity(const salt::Vector3f& vel) = 0; virtual void SetRotation(const salt::Matrix& rot) = 0; virtual salt::Matrix GetRotation() const = 0; + virtual salt::Vector3f GetLocalAngularVelocity() const = 0; virtual salt::Vector3f GetAngularVelocity() const = 0; virtual void SetAngularVelocity(const salt::Vector3f& vel) = 0; virtual void AddForce(const salt::Vector3f& force) = 0; + virtual salt::Vector3f GetForce() const = 0; virtual void AddTorque(const salt::Vector3f& torque) = 0; virtual void SetPosition(const salt::Vector3f& pos) = 0; virtual salt::Vector3f GetPosition() const = 0; Modified: branches/multiphys/spark/lib/oxygen/physicsserver/ode/oderigidbody.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/ode/oderigidbody.cpp 2009-12-17 22:21:49 UTC (rev 124) +++ branches/multiphys/spark/lib/oxygen/physicsserver/ode/oderigidbody.cpp 2009-12-18 06:24:13 UTC (rev 125) @@ -362,6 +362,15 @@ return rot; } +Vector3f ODERigidBody::GetLocalAngularVelocity() const +{ + const dReal* vel = dBodyGetAngularVel(mODEBody); + Vector3f w; + dReal* wData = (dReal*) w.GetData(); + dBodyVectorFromWorld(mODEBody, vel[0], vel[1], vel[2], wData); + return w; +} + Vector3f ODERigidBody::GetAngularVelocity() const { const dReal* vel = dBodyGetAngularVel(mODEBody); @@ -413,6 +422,12 @@ dBodyAddForce(mODEBody, force.x(), force.y(), force.z()); } +Vector3f ODERigidBody::GetForce() const +{ + const dReal* f = dBodyGetForce(mODEBody); + return Vector3f(f[0], f[1], f[2]); +} + void ODERigidBody::AddTorque(const Vector3f& torque) { dBodyAddTorque(mODEBody, torque.x(), torque.y(), torque.z()); Modified: branches/multiphys/spark/lib/oxygen/physicsserver/ode/oderigidbody.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/ode/oderigidbody.h 2009-12-17 22:21:49 UTC (rev 124) +++ branches/multiphys/spark/lib/oxygen/physicsserver/ode/oderigidbody.h 2009-12-18 06:24:13 UTC (rev 125) @@ -63,9 +63,11 @@ void SetVelocity(const salt::Vector3f& vel); void SetRotation(const salt::Matrix& rot); salt::Matrix GetRotation() const; + salt::Vector3f GetLocalAngularVelocity() const; salt::Vector3f GetAngularVelocity() const; void SetAngularVelocity(const salt::Vector3f& vel); void AddForce(const salt::Vector3f& force); + salt::Vector3f GetForce() const; void AddTorque(const salt::Vector3f& torque); void SetPosition(const salt::Vector3f& pos); salt::Vector3f GetPosition() const; Modified: branches/multiphys/spark/lib/oxygen/physicsserver/physicsobject.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/physicsobject.cpp 2009-12-17 22:21:49 UTC (rev 124) +++ branches/multiphys/spark/lib/oxygen/physicsserver/physicsobject.cpp 2009-12-18 06:24:13 UTC (rev 125) @@ -46,7 +46,7 @@ } /** returns the world node */ -shared_ptr<World> PhysicsObject::GetWorld() +shared_ptr<World> PhysicsObject::GetWorld() const { shared_ptr<Scene> scene = GetScene(); if (scene.get() == 0) Modified: branches/multiphys/spark/lib/oxygen/physicsserver/physicsobject.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/physicsobject.h 2009-12-17 22:21:49 UTC (rev 124) +++ branches/multiphys/spark/lib/oxygen/physicsserver/physicsobject.h 2009-12-18 06:24:13 UTC (rev 125) @@ -66,10 +66,10 @@ colliders and joints have to be treated in one go).*/ virtual void DestroyPhysicsObject(){}; -protected: /** returns the world node */ - boost::shared_ptr<World> GetWorld(); + boost::shared_ptr<World> GetWorld() const; +protected: /** finds the nearest parent space node */ boost::shared_ptr<Space> GetSpace(); Modified: branches/multiphys/spark/lib/oxygen/physicsserver/rigidbody.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/rigidbody.cpp 2009-12-17 22:21:49 UTC (rev 124) +++ branches/multiphys/spark/lib/oxygen/physicsserver/rigidbody.cpp 2009-12-18 06:24:13 UTC (rev 125) @@ -235,6 +235,11 @@ return mRigidBodyImp->GetRotation(); } +Vector3f RigidBody::GetLocalAngularVelocity() const +{ + return mRigidBodyImp->GetLocalAngularVelocity(); +} + Vector3f RigidBody::GetAngularVelocity() const { return mRigidBodyImp->GetAngularVelocity(); @@ -337,6 +342,11 @@ mRigidBodyImp->AddForce(force); } +Vector3f RigidBody::GetForce() const +{ + return mRigidBodyImp->GetForce(); +} + void RigidBody::AddTorque(const Vector3f& torque) { mRigidBodyImp->AddTorque(torque); Modified: branches/multiphys/spark/lib/oxygen/physicsserver/rigidbody.h =================================================================== --- branches/multiphys/spark/lib/oxygen/physicsserver/rigidbody.h 2009-12-17 22:21:49 UTC (rev 124) +++ branches/multiphys/spark/lib/oxygen/physicsserver/rigidbody.h 2009-12-18 06:24:13 UTC (rev 125) @@ -202,6 +202,9 @@ /** gets the rotation of this body */ salt::Matrix GetRotation() const; + + /** returns the current angular velocity of this body in local coordinates */ + salt::Vector3f GetLocalAngularVelocity() const; /** returns the current angular velocity of this body */ salt::Vector3f GetAngularVelocity() const; @@ -214,6 +217,9 @@ /** applies a force to the managed body */ void AddForce(const salt::Vector3f& force); + + /** returns the total force applied to this body */ + salt::Vector3f GetForce() const; /** aplies a force to the managed body */ void AddTorque(const salt::Vector3f& torque); Modified: branches/multiphys/spark/lib/oxygen/sceneserver/basenode.cpp =================================================================== --- branches/multiphys/spark/lib/oxygen/sceneserver/basenode.cpp 2009-12-17 22:21:49 UTC (rev 124) +++ branches/multiphys/spark/lib/oxygen/sceneserver/basenode.cpp 2009-12-18 06:24:13 UTC (rev 125) @@ -141,7 +141,7 @@ } } -shared_ptr<Scene> BaseNode::GetScene() +shared_ptr<Scene> BaseNode::GetScene() const { // is this node the scene node ? shared_ptr<Scene> self = Modified: branches/multiphys/spark/lib/oxygen/sceneserver/basenode.h =================================================================== --- branches/multiphys/spark/lib/oxygen/sceneserver/basenode.h 2009-12-17 22:21:49 UTC (rev 124) +++ branches/multiphys/spark/lib/oxygen/sceneserver/basenode.h 2009-12-18 06:24:13 UTC (rev 125) @@ -96,7 +96,7 @@ void UpdateHierarchy(); /** moves up the hierarchy, until it finds a scene */ - boost::shared_ptr<Scene> GetScene(); + boost::shared_ptr<Scene> GetScene() const; /** enables debug mode controls */ void EnableDebugMode(); Modified: branches/multiphys/spark/plugin/CMakeLists.txt =================================================================== --- branches/multiphys/spark/plugin/CMakeLists.txt 2009-12-17 22:21:49 UTC (rev 124) +++ branches/multiphys/spark/plugin/CMakeLists.txt 2009-12-18 06:24:13 UTC (rev 125) @@ -9,6 +9,7 @@ set(spark_libs ${spark_libs} /System/Library/Frameworks/CoreFoundation.framework) endif (APPLE AND USE_COREFOUNDATION) +add_subdirectory(accelerometer) add_subdirectory(filesystemstd) add_subdirectory(filesystemzip) add_subdirectory(forceeffector) Added: branches/multiphys/spark/plugin/accelerometer/CMakeLists.txt =================================================================== --- branches/multiphys/spark/plugin/accelerometer/CMakeLists.txt (rev 0) +++ branches/multiphys/spark/plugin/accelerometer/CMakeLists.txt 2009-12-18 06:24:13 UTC (rev 125) @@ -0,0 +1,16 @@ + +set(accelerometer_LIB_SRCS + export.cpp + accelerometer.h + accelerometer.cpp + accelerometer_c.cpp +) + +add_library(accelerometer MODULE ${accelerometer_LIB_SRCS}) + +target_link_libraries(accelerometer ${spark_libs} ${Boost_LIBRARIES}) + +set_target_properties(accelerometer PROPERTIES VERSION 0.0.0 SOVERSION 0) +if (NOT APPLE) + install(TARGETS accelerometer DESTINATION ${LIBDIR}/${CMAKE_PROJECT_NAME}) +endif (NOT APPLE) Added: branches/multiphys/spark/plugin/accelerometer/accelerometer.cpp =================================================================== --- branches/multiphys/spark/plugin/accelerometer/accelerometer.cpp (rev 0) +++ branches/multiphys/spark/plugin/accelerometer/accelerometer.cpp 2009-12-18 06:24:13 UTC (rev 125) @@ -0,0 +1,89 @@ +/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- + + this file is part of rcssserver3D + Copyright (C) 2008 RoboCup Soccer Server 3D Maintenance Group + $Id$ + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program 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 Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ + +#include "oxygen/physicsserver/world.h" +#include "oxygen/physicsserver/rigidbody.h" +#include "accelerometer.h" +#include <oxygen/sceneserver/transform.h> + +// using namespace kerosin; +using namespace oxygen; +using namespace boost; +using namespace zeitgeist; +using namespace salt; +using namespace std; + +Accelerometer::Accelerometer() : oxygen::Perceptor() +{ +} + +Accelerometer::~Accelerometer() +{ +} + +void Accelerometer::OnLink() +{ + shared_ptr<Transform> transformParent = shared_static_cast<Transform> + (FindParentSupportingClass<Transform>().lock()); + + mBody = shared_static_cast<const RigidBody> + (transformParent->GetChildOfClass("RigidBody")); + + mGravity = mBody->GetWorld()->GetGravity(); + mLastVel = mBody->GetVelocity(); +} + +bool Accelerometer::Percept(boost::shared_ptr<PredicateList> predList) +{ + Predicate &predicate = predList->AddPredicate(); + predicate.name = "ACC"; + predicate.parameter.Clear(); + + ParameterList &nameElement = predicate.parameter.AddList(); + nameElement.AddValue(std::string("n")); + nameElement.AddValue(GetName()); + + ParameterList &ratesElement = predicate.parameter.AddList(); + ratesElement.AddValue(std::string("a")); + ratesElement.AddValue(mAcc.x()); + ratesElement.AddValue(mAcc.y()); + ratesElement.AddValue(mAcc.z()); + + return true; +} + +void Accelerometer::PrePhysicsUpdateInternal(float deltaTime) +{ +// Vector3f F = mBody->GetForce(); +// float mass = mBody->GetMass(); +// mAcc = F / mass - mGravity; + + Vector3f vel = mBody->GetVelocity(); + Vector3f acc = (vel - mLastVel) / deltaTime; + acc -= mGravity; + + Matrix invRot = mBody->GetRotation(); + invRot.InvertRotationMatrix(); + acc = invRot * acc; + + float k = 0.9; + mAcc = k*mAcc + (1-k)*acc; + mLastVel = vel; +} Added: branches/multiphys/spark/plugin/accelerometer/accelerometer.h =================================================================== --- branches/multiphys/spark/plugin/accelerometer/accelerometer.h (rev 0) +++ branches/multiphys/spark/plugin/accelerometer/accelerometer.h 2009-12-18 06:24:13 UTC (rev 125) @@ -0,0 +1,49 @@ +/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- + + this file is part of rcssserver3D + Copyright (C) 2008 RoboCup Soccer Server 3D Maintenance Group + $Id:$ + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program 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 Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +#ifndef ACCELEROMETER_H +#define ACCELEROMETER_H + +#include <oxygen/agentaspect/perceptor.h> +#include <oxygen/physicsserver/rigidbody.h> + +class Accelerometer : public oxygen::Perceptor { +public: + Accelerometer(); + virtual ~Accelerometer(); + + //! \return true, if valid data is available and false otherwise. + bool Percept(boost::shared_ptr<oxygen::PredicateList> predList); + + virtual void OnLink(); + +protected: + virtual void PrePhysicsUpdateInternal(float deltaTime); + +private: + boost::shared_ptr<const oxygen::RigidBody> mBody; + salt::Vector3f mAcc; + salt::Vector3f mGravity; + salt::Vector3f mLastVel; +}; + +DECLARE_CLASS(Accelerometer); + +#endif //ACCELEROMETER_H Added: branches/multiphys/spark/plugin/accelerometer/accelerometer_c.cpp =================================================================== --- branches/multiphys/spark/plugin/accelerometer/accelerometer_c.cpp (rev 0) +++ branches/multiphys/spark/plugin/accelerometer/accelerometer_c.cpp 2009-12-18 06:24:13 UTC (rev 125) @@ -0,0 +1,29 @@ +/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- + + this file is part of rcssserver3D + Copyright (C) 2008 RoboCup Soccer Server 3D Maintenance Group + $Id:$ + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program 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 Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ + +#include "accelerometer.h" + +using namespace boost; +using namespace oxygen; + +void CLASS(Accelerometer)::DefineClass() +{ + DEFINE_BASECLASS(oxygen/Perceptor); +} Added: branches/multiphys/spark/plugin/accelerometer/export.cpp =================================================================== --- branches/multiphys/spark/plugin/accelerometer/export.cpp (rev 0) +++ branches/multiphys/spark/plugin/accelerometer/export.cpp 2009-12-18 06:24:13 UTC (rev 125) @@ -0,0 +1,26 @@ +/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- + + this file is part of rcssserver3D + Copyright (C) 2008 RoboCup Soccer Server 3D Maintenance Group + $Id:$ + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program 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 Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ + +#include "accelerometer.h" +#include <zeitgeist/zeitgeist.h> + +ZEITGEIST_EXPORT_BEGIN() + ZEITGEIST_EXPORT(Accelerometer); +ZEITGEIST_EXPORT_END() Modified: branches/multiphys/spark/plugin/sparkmonitor/sparkmonitor.cpp =================================================================== --- branches/multiphys/spark/plugin/sparkmonitor/sparkmonitor.cpp 2009-12-17 22:21:49 UTC (rev 124) +++ branches/multiphys/spark/plugin/sparkmonitor/sparkmonitor.cpp 2009-12-18 06:24:13 UTC (rev 125) @@ -249,6 +249,11 @@ ss << "(nd StaticMesh"; } + if (mesh->IsTransparent()) + { + ss << " (setTransparent)"; + } + ss << " (load " << mesh->GetMeshName(); const ParameterList& params = mesh->GetMeshParameter(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |