This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ifndef BENGINE_GAME_H | |
#define BENGINE_GAME_H | |
#include <Engine.h> | |
#include <string> | |
#include <qt/QtCore/qmap.h> | |
#include <qt/QtCore/qstring.h> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//A new loading algorithm | |
void ObjFile::loadObj1(istream& stream) | |
{ | |
m_lineNumber = 0; | |
map<uint, uint> hashToIndex; | |
char c; | |
while (stream.good()) | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Matrix2x2 Matrix2x2::adjugate(const Matrix2x2& matrix) | |
{ | |
return Matrix2x2( | |
matrix.c1r1 , -1 * matrix.c1r0, | |
-1 * matrix.c0r1 , matrix.c0r0); | |
} | |
float Matrix2x2::determinant(const Matrix2x2& matrix) | |
{ | |
return matrix.c0r0 * matrix.c1r1 - matrix.c1r0 * matrix.c0r1; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ifndef BENGINE_VECTOR3_H | |
#define BENGINE_VECTOR3_H | |
#include <Engine.h> | |
#include <math/Vector2.h> | |
using Math::Vector2; | |
namespace Math |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <Testing.h> | |
#include <cstdlib> | |
#include <ctime> | |
#include <string> | |
#include <sstream> | |
#include <vector> | |
#include <core/GameObject.h> | |
#include <math/RandomGenerator.h> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Begins the search to find the device's location. When it finishes or times out, | |
* it will invoke onLocationFound(Location) on all OnLocationFoundListeners | |
* in mLocationFoundListeners. If a listener cancels its request for a Location, | |
* but there are still others waiting, the search will continue. | |
* | |
* @param timeoutMillis The amount of time, in milliseconds, | |
* that we should search for a location | |
* @return True if we were able to include listener in a new or existing search, or false | |
* if we were unable to begin searching or if listener was already listening |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def solve(numbers, value): | |
""" | |
Uses arithmetic (*, +, -, /) to arrive at value, using my custom recursive algorithm | |
:param numbers: The list of numbers we're going to use to arrive at value | |
:param value: The value that we want to arrive at using all of the | |
:return: If solvable, returns a Solution instance. If not, returns False. | |
""" | |
# Referring to the global variables we want to modify | |
global num_attempts | |
global current_attempt |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using System.Collections; | |
[System.Serializable] | |
public class Drive | |
{ | |
public MecanumWheel frontRight; | |
public MecanumWheel frontLeft; | |
public MecanumWheel backRight; | |
public MecanumWheel backLeft; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using System.Collections; | |
public class CameraController : MonoBehaviour | |
{ | |
private TargetChaser chaser; | |
private Vector3 initialPosition; | |
private Quaternion initialRotation; | |
XboxInput xInput; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using System.Collections; | |
public class ArmController : MonoBehaviour | |
{ | |
public float armSpeed = 10f; //degrees per second | |
public float leftLimit = 310f; | |
public float rightLimit = 50f; | |
public float arm; |