Skip to content

Instantly share code, notes, and snippets.

IEnumerator SaveMesh()
{
if (!isSaveMesh)
{
yield break;
}
isSaveMesh = false;
string modelData = "";
private IEnumerator UpdateMesh()
{
while (true)
{
Vector3 min = Vector3.zero;
Vector3 max = Vector3.zero;
var filters = mapping.GetMeshFilters();
text.text = "";
using UnityEngine;
using System.Collections;
using OpenCvSharp.CPlusPlus;
using OpenCvSharp;
using System;
public class FaceDetect : MonoBehaviour {
public int Width = 640;
public int Height = 480;
public int FPS = 30;
  • HoloLensの日本での展開は未定
  • HMDではなく、Windows 10が動くPCである
  • HoloLensの機能
    • 現実世界を彩るホログラム
    • コネクションや創造、探索の新しい方法
    • より自然な対話の手段
    • マイクロソフトの最先端テクノロジー
  • ハードウェア
  • ケーブルレスのコンピューター
  • 周辺デバイスではない
using UnityEngine;
using UnityEngine.VR.WSA.Input;
using UnityEngine.UI;
public class DrawMeshChanger : MonoBehaviour
{
GestureRecognizer recognizer;
public SpatialMapping mapping;
using UnityEngine;
using System.Collections;
public class CubeCreator : MonoBehaviour
{
public GameObject cubePrefab;
// Use this for initialization
void Start()
{
public void SetMaterial(Material mat)
{
DrawMaterial = mat;
foreach (var surface in surfaces)
{
surface.Value.GetComponent<MeshRenderer>().sharedMaterial = mat;
}
}
public bool IsMeshCreated
{
get{
return surfaces.Count != 0;
}
}
Eigen::Vector3f floor(floorClip.x, floorClip.y, floorClip.z);
Eigen::Quaternionf rotate = Eigen::Quaternionf::FromTwoVectors(floor, Eigen::Vector3f::UnitY());
Eigen::Translation<float, 3> translation(0, floorClip.w, 0);
Eigen::DiagonalMatrix<float, 3> scaling = Eigen::Scaling(1.0f, 1.0f, 1.0f);;
floorMatrix = translation * scaling * rotate;
// 点群の表示
{
gl.Begin( OpenGL.GL_POINTS );
foreach ( var point in kinect.PointCloud ) {
if ( (point.X == 0) && (point.Y == 0) && (point.Z == 0) ) {
continue;
}
Vector3 v = new Vector3( point.X, point.Y, point.Z );