Page MenuHomec4science

matpoint.h
No OneTemporary

File Metadata

Created
Thu, Dec 12, 19:57

matpoint.h

#ifndef __MATPOINT_H__
#define __MATPOINT_H__
#include "shape.h"
#include "particle.h"
class MaterialPoint : public Shape
{
public:
MaterialPoint( double mass,
const SVector<3>& loc = SVector<3>(true),
const QString& label = "",
flags_t flags = S_UPDATE | S_RENDER | S_FILL_MODE | S_TRANSLATE | S_SCALE);
MaterialPoint( const Particle& particle,
const QString& label = "",
flags_t flags = S_UPDATE | S_RENDER | S_FILL_MODE | S_TRANSLATE | S_SCALE);
virtual ~MaterialPoint();
/* Get fields */
double mass() const;
const SVector<3>& speed() const;
const Particle& getParticle() const;
/* Set fields */
void setSpeed(const SVector<3>& speed);
void setMass(double mass);
virtual SVector<3> position() const override;
virtual SVector<3> orientation() const override;
virtual void setPosition(const SVector<3>& centre) override;
virtual void setOrientation(const SVector<3>& angles) override;
virtual void move(const SVector<3>& delta) override;
virtual void rotate(const SVector<3>& delta) override;
virtual void post_update(const float &dt) override;
protected:
Particle particle;
};
#endif

Event Timeline