CanadianMachines / MachineLib / Pipe.h
Pipe.h
Raw
/**
 * @file Pipe.h
 * @author sriram
 *
 *
 */

#ifndef CANADIANEXPERIENCE_MACHINELIB_PIPE_H
#define CANADIANEXPERIENCE_MACHINELIB_PIPE_H

#include "Instrument.h"
#include "Polygon.h"
#include "AirSink.h"

/**
 * pipe instrument
 */
class Pipe: public Instrument
{
private:
	///length
	double mLength;

	///top polygon of pipe
	cse335::Polygon mTop;

	///body polygon of pipe
	cse335::Polygon mBody;

	///base polygon of pipe
	cse335::Polygon mBase;

	///polygon of puff from pipe
	cse335::Polygon mPuff;

	///pressure sent
	double mPressure = 0;

	///air sink for pipe
	AirSink mSink;

public:

	Pipe(std::wstring resourcesDir, ma_engine* audioEngine,std::wstring sound, int length);

	/// Default constructor (disabled)
	Pipe() = delete;

	/// Copy constructor (disabled)
	Pipe(const Pipe &) = delete;

	/// Assignment operator
	void operator=(const Pipe &) = delete;


	void SendPressure(double pressure) override;

	virtual void Draw(std::shared_ptr<wxGraphicsContext> graphics,double x, double y) override;

	/**
	 * getter for air sink
	 * @return
	 */
	AirSink *GetSink(){return &mSink;}

};

#endif //CANADIANEXPERIENCE_MACHINELIB_PIPE_H