Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 16, 2008, 6:01:13 PM (17 years ago)
Author:
landauf
Message:

Merged objecthierarchy2 into presentation branch

Couln't merge 2 lines in Gamestate.cc and a whole block of code in GSDedicated.cc (it seems like oli implemented in both branches something like a network-tick-limiter but with different approaches)

Not yet tested in network mode and with bots
The SpaceShips movement is also not yet fully adopted to the new physics (see Engine class)

Location:
code/branches/presentation
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/branches/presentation

  • code/branches/presentation/src/orxonox/objects/worldentities/WorldEntity.h

    r2466 r2485  
    7474            inline void translate(float x, float y, float z, TransformSpace::Space relativeTo = TransformSpace::Parent)
    7575                { this->translate(Vector3(x, y, z), relativeTo); }
     76
     77            virtual inline const Vector3& getVelocity() const
     78                { return Vector3::ZERO; }
    7679
    7780            virtual void setOrientation(const Quaternion& orientation) = 0;
     
    105108                { this->setScale3D(Vector3(x, y, z)); }
    106109            const Vector3& getScale3D(void) const;
    107 
    108             void setScale(float scale)
     110            const Vector3& getWorldScale3D() const;
     111
     112            inline void setScale(float scale)
    109113                { this->setScale3D(scale, scale, scale); }
    110114            inline float getScale() const
    111115                { Vector3 scale = this->getScale3D(); return (scale.x == scale.y && scale.x == scale.z) ? scale.x : 1; }
     116            float getWorldScale() const;
    112117
    113118            inline void scale3D(const Vector3& scale)
     
    118123                { this->scale3D(scale, scale, scale); }
    119124
     125            virtual void changedScale() {}
     126
    120127            void attach(WorldEntity* object);
    121128            void detach(WorldEntity* object);
     
    134141            inline WorldEntity* getParent() const
    135142                { return this->parent_; }
     143
     144            void attachNode(Ogre::SceneNode* node);
     145            void detachNode(Ogre::SceneNode* node);
     146            void attachToNode(Ogre::SceneNode* node);
     147            void detachFromNode(Ogre::SceneNode* node);
    136148
    137149            void notifyChildPropsChanged();
     
    302314        { return this->node_->getScale(); }
    303315#endif
     316
     317    SUPER_FUNCTION(5, WorldEntity, changedScale, false);
    304318}
    305319
Note: See TracChangeset for help on using the changeset viewer.