3rd year group project. Electronic and Electrical Engineering. Heriot-Watt University. This is the code for the mbed for the Automatic Little Object Organiser (ALOO).

Dependencies:   MCP23017 TCS3472_I2C WattBob_TextLCD mbed

Block.h

Committer:
dreamselec
Date:
2015-11-30
Revision:
26:bbcc25418ffa
Parent:
20:4e0f0944f28f
Child:
29:9c0339e3c593

File content as of revision 26:bbcc25418ffa:

/*
 * Block.h
 *
 *  Created on: 16 Nov 2015
 *      Author: chandansiyag
 */

#ifndef _block_h_
#define _block_h_

class Colour{
	public:
		Colour();
		Colour(float components[4]);
		Colour(const Colour& rhs);
		virtual ~Colour();
 		void printDescription();

		enum Components {Red = 0, Blue = 1, Green = 2, Alpha = 3};

		float components [4];

		float getAlpha() const {
				return components[Alpha];
			}

			void setAlpha(float alpha) {
				this->components[Alpha] = alpha;
			}

			float getBlue() const {
				return components[Blue];
			}

			void setBlue(float blue) {
				this->components[Blue] = blue;
			}

			float getGreen() const {
				return components[Green];
			}

			void setGreen(float green) {
				this->components[Green] = green;
			}

			float getRed() const {
				return components[Red];
			}

			void setRed(float red) {
				this->components[Red] = red;
			}
};

class Block {
public:
// TODO: Switched
	enum Size {Small = 0, Big = 1};
	Block();
	Block(Size size);
	Block(Size size, Colour minColour, Colour maxColour, Colour averageColour);
	Block(const Block& rhs);
	virtual ~Block();

	Size size;
	Colour minColour;
	Colour maxColour;
	Colour averageColour;

 	void printDescription();
 private:
 	
};

#endif /* _block_h_ */