CanadianMachines / MachineLib / Cymbal.h
Cymbal.h
Raw
/**
 * @file Cymbal.h
 * @author srira
 *
 *
 */

#ifndef CANADIANEXPERIENCE_MACHINELIB_CYMBAL_H
#define CANADIANEXPERIENCE_MACHINELIB_CYMBAL_H

#include "StruckInstrument.h"
#include "Polygon.h"

/**
 * cymbal instrument class
 */
class Cymbal: public StruckInstrument
{
private:
	///stand
	cse335::Polygon mStand;

	///cymbal plate
	cse335::Polygon mCymbal;

	///Current angle of cymbal
	double mRockAngle = 0.0;

	///cymbal rocking start time
	double mRockStartTime=0;

public:

	Cymbal(std::wstring resourcesDir, ma_engine* audioEngine,std::wstring sound);

	/// Default constructor
	Cymbal()=delete;

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

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

	void Hit() override;

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

	void SetTime(double time) override;
};

#endif //CANADIANEXPERIENCE_MACHINELIB_CYMBAL_H