hololens开发之空间扫描代码注解

本文详细解析了用于Hololens开发的空间扫描代码,重点介绍了PlaySpaceManager.cs脚本,该脚本被应用于SpatialProcessing预制件,用于实现增强现实环境中的空间理解与交互功能。
摘要由CSDN通过智能技术生成

 PlaySpaceManager.cs 脚本,在 SpatialProcessing预制件上面绑定着:

using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Windows.Speech;
using HoloToolkit.Unity;

/// <summary>
/// The SurfaceManager class allows applications to scan the environment for a specified amount of time  SurfaceManager类允许应用程序扫描环境指定的时间
/// and then process the Spatial Mapping Mesh (find planes, remove vertices) after that time has expired. 然后时间过后开始处理空间映射网格(找到平面,删除顶点)
/// </summary>
public class PlaySpaceManager : Singleton<PlaySpaceManager>
{
    [Tooltip("When checked, the SurfaceObserver will stop running after a specified amount of time.")]
//检查时,SurfaceObserver将在指定的时间后停止运行
    public bool limitScanningByTime = true;

    [Tooltip("How much time (in seconds) that the SurfaceObserver will run after being started; used when 'Limit Scanning By Time' is checked.")]
//多少时间(以秒为单位),开始后多少秒之后SurfaceObserver将运行,初始设置为30秒
    public float scanTime = 30.0f;

    [Tooltip("Material to use when rendering Spatial Mapping meshes while the  is running.")]
//当observer正在运行时呈现空间映射网格使用的材料
    public Material defaultMaterial;

    [Tooltip("Optional Material to use when rendering Spatial Mapping meshes after the observer has been stopped.")]
//在observer已经停止后的使用渲染空间映射网格的可选材料
    public Material secondaryMaterial;

    [Tooltip("Minimum number of floor planes required in order to exit scanning/processing mode.")]
//为了退出扫描/处理模式所需要地板面的最小数量

    public uint minimumFloors = 1;

    [Tooltip("Minimum number of wall planes required in order to exit scanning/processing mode.")]
//为了退出扫描/处理模式所需要墙面的最小数量
    public uint minimumWalls = 1;

    /// <summary>
    /// Indicates if processing of the surface meshes is complete.
    /// </summary>
//用来判断如果表面网格的处理完成。
 
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值