HOG2
|
#include <RC.h>
Public Member Functions | |
void | Initialize (int ind) |
void | Initialize (int RCpos, int RCind, int RCrot) |
void | Draw (Graphics::Display &display) const |
void | DrawFace (Graphics::Display &display, int index) const |
void | RotateRelative (const float angle[3]) |
void | RotateBase (float angle[3]) |
void | RotateFacePos (bool clockwise, int axis) |
void | ResetToBase () |
void | ResetVisibleFace () |
void | SetFacePositionVisible (bool toggle, int position) |
void | PrintData () |
Public Attributes | |
std::vector< Graphics::point > | basePoints |
std::vector< std::vector< Graphics::point > > | baseFacePoints |
std::vector< Graphics::point > | points |
std::vector< std::vector< Graphics::point > > | facePoints |
rgbColor | faceCols [6] |
int | index |
int | RCindex = -1 |
bool | facesShown [6] |
int | blackFaceToReset = -1 |
int | faceInPos [6] = {0,1,2,3,4,5} |
const float | sideLen = 0.2f |
const float | faceSize = 0.85f |
const rgbColor | outCol = rgbColor(0.f, 0.f, 0.f) |
const rgbColor | inCol = rgbColor(0.04f, 0.04f, 0.06f) |
const std::vector< std::vector< float > > | projection |
const int | pointsOnFace [6][4] |
const rgbColor | faceColors [6] |
const int | faceOrderByAxis [3][4] |
const int | facesShowing [20][3] |
void Cubie::Draw | ( | Graphics::Display & | display | ) | const |
Definition at line 350 of file RC.cpp.
References DrawFace(), facesShown, furthestZ(), points, and pointsOnFace.
Referenced by RC::DrawCubies().
void Cubie::DrawFace | ( | Graphics::Display & | display, |
int | index | ||
) | const |
void Cubie::Initialize | ( | int | ind | ) |
Definition at line 224 of file RC.cpp.
References baseFacePoints, basePoints, faceColors, faceCols, facePoints, faceSize, facesShown, inCol, index, points, pointsOnFace, sideLen, Graphics::point::x, Graphics::point::y, and Graphics::point::z.
Referenced by RC::Draw(), and RC::RC().
void Cubie::Initialize | ( | int | RCpos, |
int | RCind, | ||
int | RCrot | ||
) |
Definition at line 60 of file RC.cpp.
References baseFacePoints, basePoints, faceColors, faceCols, facePoints, faceSize, facesShowing, facesShown, findInArray(), inCol, points, pointsOnFace, RCindex, sideLen, Graphics::point::x, Graphics::point::y, and Graphics::point::z.
void Cubie::PrintData | ( | ) |
Definition at line 557 of file RC.cpp.
References baseFacePoints, blackFaceToReset, faceInPos, facePoints, facesShown, index, and points.
void Cubie::ResetToBase | ( | ) |
Definition at line 514 of file RC.cpp.
References baseFacePoints, basePoints, facePoints, and points.
Referenced by RC::Draw(), RC::InterpFaceRot(), and RC::RotateCubies().
void Cubie::ResetVisibleFace | ( | ) |
Definition at line 536 of file RC.cpp.
References blackFaceToReset, faceInPos, and facesShown.
Referenced by RC::TestUpdate().
void Cubie::RotateBase | ( | float | angle[3] | ) |
Definition at line 461 of file RC.cpp.
References baseFacePoints, basePoints, EditPointMult(), MakeMatrixRotX(), MakeMatrixRotY(), MakeMatrixRotZ(), and rotation.
Referenced by RC::RotateFace().
void Cubie::RotateFacePos | ( | bool | clockwise, |
int | axis | ||
) |
Definition at line 489 of file RC.cpp.
References faceInPos, and faceOrderByAxis.
Referenced by RC::RotateFace().
void Cubie::RotateRelative | ( | const float | angle[3] | ) |
!!!
!!!
Definition at line 433 of file RC.cpp.
References EditPointMult(), facePoints, MakeMatrixRotX(), MakeMatrixRotY(), MakeMatrixRotZ(), points, and rotation.
Referenced by RC::Draw(), RC::InterpFaceRot(), and RC::RotateCubies().
void Cubie::SetFacePositionVisible | ( | bool | toggle, |
int | position | ||
) |
Definition at line 548 of file RC.cpp.
References blackFaceToReset, faceInPos, and facesShown.
Referenced by RC::RotateFace().
std::vector<std::vector<Graphics::point> > Cubie::baseFacePoints |
Definition at line 31 of file RC.h.
Referenced by Initialize(), PrintData(), ResetToBase(), and RotateBase().
std::vector<Graphics::point> Cubie::basePoints |
Definition at line 30 of file RC.h.
Referenced by Initialize(), ResetToBase(), and RotateBase().
int Cubie::blackFaceToReset = -1 |
Definition at line 38 of file RC.h.
Referenced by PrintData(), ResetVisibleFace(), and SetFacePositionVisible().
const rgbColor Cubie::faceColors[6] |
rgbColor Cubie::faceCols[6] |
Definition at line 34 of file RC.h.
Referenced by Initialize().
int Cubie::faceInPos[6] = {0,1,2,3,4,5} |
Definition at line 39 of file RC.h.
Referenced by PrintData(), ResetVisibleFace(), RotateFacePos(), and SetFacePositionVisible().
const int Cubie::faceOrderByAxis[3][4] |
Definition at line 69 of file RC.h.
Referenced by RotateFacePos().
std::vector<std::vector<Graphics::point> > Cubie::facePoints |
Definition at line 33 of file RC.h.
Referenced by Initialize(), PrintData(), ResetToBase(), and RotateRelative().
const float Cubie::faceSize = 0.85f |
Definition at line 43 of file RC.h.
Referenced by Initialize().
const int Cubie::facesShowing[20][3] |
Definition at line 75 of file RC.h.
Referenced by Initialize().
bool Cubie::facesShown[6] |
Definition at line 37 of file RC.h.
Referenced by Draw(), Initialize(), PrintData(), ResetVisibleFace(), and SetFacePositionVisible().
Definition at line 45 of file RC.h.
Referenced by Initialize().
int Cubie::index |
Definition at line 35 of file RC.h.
Referenced by Initialize(), and PrintData().
std::vector<Graphics::point> Cubie::points |
Definition at line 32 of file RC.h.
Referenced by Draw(), Initialize(), RC::InterpFaceRot(), PrintData(), ResetToBase(), and RotateRelative().
const int Cubie::pointsOnFace[6][4] |
Definition at line 51 of file RC.h.
Referenced by Draw(), and Initialize().
const std::vector<std::vector<float> > Cubie::projection |
int Cubie::RCindex = -1 |
Definition at line 36 of file RC.h.
Referenced by Initialize().
const float Cubie::sideLen = 0.2f |
Definition at line 42 of file RC.h.
Referenced by Initialize().