Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 2491


Ignore:
Timestamp:
Dec 17, 2008, 12:10:23 AM (15 years ago)
Author:
rgrieder
Message:
  • "gravity" xml parameter got missed in Scene
  • fixed issue with rotationrate and rotationaxis in MobileEntity
  • updated msvc files
Location:
code/branches/presentation
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • code/branches/presentation/src/orxonox/objects/Scene.cc

    r2485 r2491  
    117117        XMLPortParam(Scene, "shadow", setShadow, getShadow, xmlelement, mode).defaultValues(true);
    118118
     119        XMLPortParam(Scene, "gravity", setGravity, getGravity, xmlelement, mode);
    119120        XMLPortParam(Scene, "negativeWorldRange", setNegativeWorldRange, getNegativeWorldRange, xmlelement, mode);
    120121        XMLPortParam(Scene, "positiveWorldRange", setPositiveWorldRange, getPositiveWorldRange, xmlelement, mode);
     
    191192            this->collisionConfig_ = new btDefaultCollisionConfiguration();
    192193            this->dispatcher_      = new btCollisionDispatcher(this->collisionConfig_);
    193             this->solver_          = new btSequentialImpulseConstraintSolver;
     194            this->solver_          = new btSequentialImpulseConstraintSolver();
    194195
    195196            this->physicalWorld_   = new btDiscreteDynamicsWorld(this->dispatcher_, this->broadphase_, this->solver_, this->collisionConfig_);
  • code/branches/presentation/src/orxonox/objects/worldentities/MobileEntity.cc

    r2485 r2491  
    6464
    6565        XMLPortParamTemplate(MobileEntity, "velocity",     setVelocity,     getVelocity,     xmlelement, mode, const Vector3&);
    66         XMLPortParamTemplate(MobileEntity, "rotationaxis", setRotationAxis, getRotationAxis, xmlelement, mode, const Vector3&);
    67         XMLPortParam(MobileEntity, "rotationrate", setRotationRate, getRotationRate, xmlelement, mode);
     66
     67        Vector3 rotationAxis(this->getRotationAxis());
     68        Degree rotationRate = this->getRotationRate();
     69        XMLPortParamVariable(MobileEntity, "rotationaxis", rotationAxis, xmlelement, mode);
     70        XMLPortParamVariable(MobileEntity, "rotationrate", rotationRate, xmlelement, mode);
     71        if (mode == XMLPort::LoadObject)
     72        {
     73            if (rotationAxis == Vector3::ZERO)
     74                this->setAngularVelocity(Vector3::ZERO);
     75            else
     76                this->setAngularVelocity(rotationAxis.normalisedCopy() * rotationRate.valueRadians());
     77        }
    6878    }
    6979
  • code/branches/presentation/visual_studio/vc8/orxonox.vcproj

    r2485 r2491  
    649649                                        >
    650650                                        <File
     651                                                RelativePath="..\..\src\orxonox\objects\collisionshapes\BoxCollisionShape.cc"
     652                                                >
     653                                        </File>
     654                                        <File
    651655                                                RelativePath="..\..\src\orxonox\objects\collisionshapes\CollisionShape.cc"
    652656                                                >
     
    654658                                        <File
    655659                                                RelativePath="..\..\src\orxonox\objects\collisionshapes\CompoundCollisionShape.cc"
     660                                                >
     661                                        </File>
     662                                        <File
     663                                                RelativePath="..\..\src\orxonox\objects\collisionshapes\ConeCollisionShape.cc"
    656664                                                >
    657665                                        </File>
     
    13011309                                        >
    13021310                                        <File
     1311                                                RelativePath="..\..\src\orxonox\objects\collisionshapes\BoxCollisionShape.h"
     1312                                                >
     1313                                        </File>
     1314                                        <File
    13031315                                                RelativePath="..\..\src\orxonox\objects\collisionshapes\CollisionShape.h"
    13041316                                                >
     
    13061318                                        <File
    13071319                                                RelativePath="..\..\src\orxonox\objects\collisionshapes\CompoundCollisionShape.h"
     1320                                                >
     1321                                        </File>
     1322                                        <File
     1323                                                RelativePath="..\..\src\orxonox\objects\collisionshapes\ConeCollisionShape.h"
    13081324                                                >
    13091325                                        </File>
Note: See TracChangeset for help on using the changeset viewer.