Lagrangian Liquid Simulation
Master Thesis project on simulation of liquids using Lagrangian approach and SPH
include/Capsule.h
Go to the documentation of this file.
00001 #ifndef CAPSULE_H
00002 #define CAPSULE_H
00003 
00004 #include "Particle.h"
00005 
00015 
00016 class Capsule : public Particle
00017 {
00018 public:
00020     Capsule();
00021 
00024     Capsule(const Capsule& _capsule);
00025 
00037     Capsule
00038         (
00039             const int _id,
00040             const ngl::Real _mass = 0,
00041             const ngl::Vector _centerPosition = 0,
00042             const ngl::Colour _colour = 0,
00043             const ngl::Real _radius = 0,
00044             const ngl::Real _height = 0,
00045             const ngl::Vector _orientationVector = 0,
00046             const ngl::Real _incrementAngle = 0,
00047             const ngl::Real _initialAngle = 0,
00048             const bool _moveable = true
00049         );
00050 
00052     ~Capsule();
00053 
00055     inline ngl::Vector getOrientationVector() const { return m_orientationVector; }
00056 
00058     void updateRotation();
00059 
00061     inline float getIncrementAngle() const { return m_incrementAngle; }
00062 
00064     inline float getAngle() const { return m_angle; }
00065 
00067     inline float getInitialAngle() const { return m_initialAngle; }
00068 
00070     inline ngl::Real getHeight() const { return m_height; }
00071 
00073     inline ngl::Vector getPoint1() const { return m_position - (m_height * m_orientationVector); }
00074 
00076     inline ngl::Vector getPoint2() const { return m_position + (m_height * m_orientationVector); }
00077 
00080     inline void setIncrementAngle(const ngl::Real _v) { m_incrementAngle = _v; }
00081 
00082 
00083 private:
00085     ngl::Vector m_orientationVector;
00086 
00088     ngl::Real m_height;
00089 
00091     ngl::Real m_angle;
00092 
00094     ngl::Real m_incrementAngle;
00095 
00097     ngl::Real m_initialAngle;
00098 
00099 };
00100 
00101 #endif // CAPSULE_H
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator