HOG2
Functions | Variables
RC.cpp File Reference
#include "RC.h"
#include <cassert>
#include <cstdio>
#include <algorithm>
#include <string>
#include <iostream>
Include dependency graph for RC.cpp:

Go to the source code of this file.

Functions

void EditPointMult (float(&vec)[3][3], Graphics::point &p)
 
void MakeMatrixRotX (float(&a)[3][3], float angle)
 
void MakeMatrixRotY (float(&a)[3][3], float angle)
 
void MakeMatrixRotZ (float(&a)[3][3], float angle)
 
int findInArray (int arr[], int elem, int lower, int upper)
 
std::vector< int > furthestZ (0)
 

Variables

float array3 [3] = {0,0,0}
 
float rotation [3][3] = { {0,0,0}, {0,0,0}, {0,0,0} }
 
const int edgesOnFace [6][4]
 
const int cornersOnFace [6][4]
 

Function Documentation

◆ EditPointMult()

void EditPointMult ( float(&)  vec[3][3],
Graphics::point p 
)

Definition at line 1432 of file RC.cpp.

References array3, Graphics::point::x, Graphics::point::y, and Graphics::point::z.

Referenced by Cubie::RotateBase(), and Cubie::RotateRelative().

◆ findInArray()

int findInArray ( int  arr[],
int  elem,
int  lower,
int  upper 
)

Definition at line 1519 of file RC.cpp.

Referenced by Cubie::Initialize().

◆ furthestZ()

std::vector<int> furthestZ ( )

Referenced by Cubie::Draw().

◆ MakeMatrixRotX()

void MakeMatrixRotX ( float(&)  a[3][3],
float  angle 
)

Definition at line 1466 of file RC.cpp.

Referenced by Cubie::RotateBase(), and Cubie::RotateRelative().

◆ MakeMatrixRotY()

void MakeMatrixRotY ( float(&)  a[3][3],
float  angle 
)

Definition at line 1484 of file RC.cpp.

Referenced by Cubie::RotateBase(), and Cubie::RotateRelative().

◆ MakeMatrixRotZ()

void MakeMatrixRotZ ( float(&)  a[3][3],
float  angle 
)

Definition at line 1502 of file RC.cpp.

Referenced by Cubie::RotateBase(), and Cubie::RotateRelative().

Variable Documentation

◆ array3

float array3[3] = {0,0,0}

Definition at line 20 of file RC.cpp.

Referenced by EditPointMult().

◆ cornersOnFace

const int cornersOnFace[6][4]
Initial value:
=
{
{15, 14, 13, 12},
{16, 12, 13, 17},
{15, 12, 16, 19},
{15, 19, 18, 14},
{13, 14, 18, 17},
{16, 17, 18, 19}
}

Definition at line 42 of file RC.cpp.

Referenced by RCState::RotateCorners(), and RCState::RotateFace().

◆ edgesOnFace

const int edgesOnFace[6][4]
Initial value:
=
{
{0, 6, 4, 2},
{2, 3, 9, 1},
{0, 1, 8, 7},
{6, 7, 11, 5},
{4, 5, 10, 3},
{9, 10, 11, 8}
}

Definition at line 24 of file RC.cpp.

Referenced by RCState::RotateEdges(), and RCState::RotateFace().

◆ rotation

float rotation[3][3] = { {0,0,0}, {0,0,0}, {0,0,0} }