-
Connect your phone over USB.
-
Set the TCP port
$ adb tcpip 5555
. -
Run
$ adb kill-server
$ adb connect 192.168.2.5
/// <summary> | |
/// Returns a random vector3 between min and max. (Inclusive) | |
/// </summary> | |
/// <returns>The <see cref="UnityEngine.Vector3"/>.</returns> | |
/// <param name="min">Minimum.</param> | |
/// <param name="max">Max.</param> | |
/// https://gist.github.com/Ashwinning/269f79bef5b1d6ee1f83 | |
public Vector3 GetRandomVector3Between (Vector3 min, Vector3 max) | |
{ | |
return min + Random.Range (0, 1) * (max - min); |
/// <summary> | |
/// Rotates the point around a pivot. | |
/// </summary> | |
/// <returns>The rotated point.</returns> | |
/// <param name="point">Point.</param> | |
/// <param name="pivot">Pivot.</param> | |
/// <param name="rotation">Rotation.</param> | |
public Vector3 RotatePointAroundPivot (Vector3 point, Vector3 pivot, Quaternion rotation) | |
{ | |
Vector3 direction = point - pivot; //Get point's direction relative to the pivot |
Also check out how to get files of a specific type, and sorted results here!
#include <boost/filesystem.hpp>
#include <boost/range/iterator_range.hpp>
//returns a list of all the files in a given folder.
std::vector<boost::filesystem::directory_entry> GetAllFilesInFolder(boost::filesystem::path folderPath)
std::cout << " COLOR INTRINSICS \n "; | |
std::cout << "width : " + color_intrin.width << std::endl; | |
std::cout << "height : " + color_intrin.height << std::endl; | |
std::cout << "fx : " + std::to_string(color_intrin.fx) << std::endl; | |
std::cout << "fy : " + std::to_string(color_intrin.fy) << std::endl; | |
std::cout << "ppx : " + std::to_string(color_intrin.ppx) << std::endl; | |
std::cout << "ppy : " + std::to_string(color_intrin.ppy) << std::endl; | |
std::cout << "distortion coefficients : " << std::endl; | |
int loop = 1; | |
for (int coefficient : color_intrin.coeffs) |
using UnityEngine; | |
using System; | |
using System.Linq; | |
using System.Collections; | |
using System.Collections.Generic; | |
using System.Runtime.InteropServices; | |
/// <summary> | |
/// The following example saves a Vector 3 List to a '.cloud' file. | |
/// </summary> |
//Accepts a path to a directory
//a file extension
//and a list
//Puts all files matching that extension in the directory into the given list.
//Sorts and returns the results
void GetFilesOfTypeInDirectory(const boost::filesystem::path &directoryPath, const string &fileExtension, std::vector<boost::filesystem::path> &list)
{
The following code was found at http://www.alecjacobson.com/weblog/?p=1875
The page suffered from bad formatting so the contents have been pasted here for easier readibility.
// Modified from "Video Texture" code
// Copyright (C) 2009 Arsalan Malik (arsalank2@hotmail.com)
//