Last change
on this file since 4121 was
4121,
checked in by buerlia, 19 years ago
|
orxonox/branches/physics: IPhyics gets a mass..
|
File size:
773 bytes
|
Line | |
---|
1 | /*! |
---|
2 | \file i_physics.h |
---|
3 | \brief a physics interface simulating a body with a mass |
---|
4 | */ |
---|
5 | |
---|
6 | #ifndef _I_PHYSICS_H |
---|
7 | #define _I_PHYSICS_H |
---|
8 | |
---|
9 | #include "p_node.h" |
---|
10 | |
---|
11 | //! A Physics interface |
---|
12 | /** |
---|
13 | here can be some longer description of this class |
---|
14 | */ |
---|
15 | class IPhysics : public PNode { |
---|
16 | |
---|
17 | public: |
---|
18 | IPhysics(); |
---|
19 | virtual ~IPhysics(); |
---|
20 | |
---|
21 | void setMass( float mass ); //!< Set the mass of this node |
---|
22 | float getMass( void ) const; //!< Get the mass of this node |
---|
23 | float getTotalMass( void ) const; //!< Get the sum of the masses of this node and all subnodes |
---|
24 | |
---|
25 | protected: |
---|
26 | void recalcMass(); //!< Recalculate the mass of the children |
---|
27 | float mass; //!< Mass of this node |
---|
28 | float massChildren; //!< Sum of the masses of the children nodes |
---|
29 | |
---|
30 | |
---|
31 | private: |
---|
32 | |
---|
33 | |
---|
34 | }; |
---|
35 | |
---|
36 | #endif /* _I_PHYSICS_H */ |
---|
Note: See
TracBrowser
for help on using the repository browser.