ELEC2645 (2018/19) / Mbed 2 deprecated el17cd

Dependencies:   mbed

Cube/Cube.h

Committer:
el17cd
Date:
2019-04-03
Revision:
22:236319885874
Parent:
20:3ca430241df0
Child:
23:eb50ab95bb53

File content as of revision 22:236319885874:

#include "mbed.h"
#ifndef FACE_H
#define FACE_H
#include "Face.h"
#endif

class Cube {
  private:
    float verticies[8][3];
    Face faces[6];
    float xPos, yPos, zPos;
  public:
    Cube();
    Face getFace(int index);
    void setVisible();
    void updateFacesVerticies(float (&vert)[8][3]);
    void assignFacesVerticies(float (&face0Points)[4][3],
    float (&face1Points)[4][3], float (&face2Points)[4][3],
    float (&face3Points)[4][3], float (&face4Points)[4][3],
    float (&face5Points)[4][3]);
    bool tooClose();
    void rotateX(float angle);
    void rotateY(float angle);
    void rotateZ(float angle);
    void translate(float x, float y, float z);
    void resetPos();
    bool despawn();
};