This file contains 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
/// <summary> | |
/// Given four points in 3D space, solves for a sphere such that all four points | |
/// lie on the sphere's surface. | |
/// </summary> | |
/// <remarks> | |
/// Translated from Javascript on http://www.convertalot.com/sphere_solver.html, originally | |
/// linked to by http://stackoverflow.com/questions/13600739/calculate-centre-of-sphere-whose-surface-contains-4-points-c. | |
/// </remarks> | |
public class CircumcentreSolver |
This file contains 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 System; | |
using UnityEngine; | |
//@see https://github.com/zabaglione/DetectSwipe_SteamVR/blob/master/Assets/DetectSwipe_SteamVR/Scripts/ViveController.cs | |
//@see https://qiita.com/mo4_9/items/ac6d1ef0456d6fa0388d | |
public class GvrControllerSwipeInput : MonoBehaviour | |
{ | |
public enum SwipeDirection |
This file contains 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; | |
/// <summary> | |
/// 4点を通る最小の球の中心と半径を求める C# | |
/// @see http://marupeke296.com/COL_3D_No22_BoundingSphere.html | |
/// </summary> | |
public static class ToolUtil | |
{ | |
public static bool GetBallFrom4Points(Vector3[] pos, out Vector3 outP, out float outR) |
This file contains 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
// related to https://www.youtube.com/watch?v=B7OByAvRCBE&lc=z22qfpiaxt22yzyrs04t1aokgykflkwea0fdhgkvaoxzbk0h00410 | |
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
using HoloToolkit.Unity.InputModule; | |
public class Cube : MonoBehaviour, IInputClickHandler, IInputHandler | |
{ | |
Material material; |
This file contains 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
// Unity 2018.2.b7 | |
// | |
// Create enhanced 3D visuals with Holographic Remoting in UWP: | |
// https://blogs.unity3d.com/jp/2018/05/30/create-enhanced-3d-visuals-with-holographic-emulation-in-uwp/ | |
// | |
// my blog: | |
// http://littlewing.hatenablog.com/entry/2018/06/09/212947 | |
using System.Collections; | |
using System.Collections.Generic; |
This file contains 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
# https://github.com/m5stack/M5Cloud/blob/master/examples/DigitalClock/clock.py | |
# The default timezone on M5stack is CST(+8,China) | |
# change timezone to JST(+9) | |
from m5stack import * | |
import time, _thread, machine | |
def clock(): | |
rtc = machine.RTC() |
This file contains 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 "opencv2/opencv_lib.hpp" | |
#include "opencv2/core/core.hpp" | |
#include "opencv2/imgproc/imgproc.hpp" | |
#include "opencv2/calib3d/calib3d.hpp" | |
#include "opencv2/highgui/highgui.hpp" | |
#include <cctype> | |
#include <stdio.h> | |
#include <string.h> | |
#include <time.h> |
This file contains 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
<?php | |
/** | |
* HoloLens Device Portal のRestAPI接続テスト PHP版 | |
* | |
* @see API Reference https://developer.microsoft.com/en-us/windows/mixed-reality/device_portal_api_reference | |
* | |
*/ | |
//HoloLensIP |
This file contains 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 System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
#if WINDOWS_UWP | |
using Windows.Gaming.Input; | |
#endif | |
public class XboxPadTest : MonoBehaviour { |
This file contains 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; | |
#if UNITY_EDITOR | |
using UnityEditor; | |
#endif | |
public class OpMeshGenerator : MonoBehaviour | |
{ | |
public int divisionX = 200; |