Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #ifndef PHYS_PROP_H
- #define PHYS_PROP_H
- template<typename Type>
- class PhysProp
- {
- protected:
- Type mass = 0, friction = 0, bouncy = 0;
- public:
- PhysProp() {};
- PhysProp(const Type &, const Type &, const Type &);
- ~PhysProp() {};
- void setFriction(const Type &);
- Type & getFriction() const;
- void setMass(const Type &);
- Type & getMass() const;
- void setBouncy(const Type &);
- Type & getBouncy() const;
- };
- template<typename Type>
- inline PhysProp<Type>::PhysProp(const Type &m, const Type &f, const Type &b)
- {
- this->mass = m;
- this->friction = f;
- this->bouncy = b;
- }
- template<typename Type>
- inline void PhysProp<Type>::setMass(const Type &m)
- {
- this->mass = m;
- }
- template<typename Type>
- inline Type & PhysProp<Type>::getMass() const
- {
- return this->mass;
- }
- template<typename Type>
- inline void PhysProp<Type>::setFriction(const Type &f)
- {
- this->friction = f;
- }
- template<typename Type>
- inline Type & PhysProp<Type>::getFriction() const
- {
- return this->friction;
- }
- template<typename Type>
- inline void PhysProp<Type>::setBouncy(const Type &b)
- {
- this->bouncy = b;
- }
- template<typename Type>
- inline Type & PhysProp<Type>::getBouncy() const
- {
- return this->bouncy;
- }
- #endif //PHYS_PROP_H
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement