Skip to content

Instantly share code, notes, and snippets.

@CameronVetter
Last active January 26, 2017 03:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save CameronVetter/2731e634f6ae01ac827b707efa36b175 to your computer and use it in GitHub Desktop.
Save CameronVetter/2731e634f6ae01ac827b707efa36b175 to your computer and use it in GitHub Desktop.
Defines a query to get solved by Spatial Understanding
using System.Collections.Generic;
using HoloToolkit.Unity;
using UnityEngine;
public enum ObjectType
{
SquareBuilding,
WideBuilding,
TallBuilding,
Tree,
Tumbleweed,
Mine
}
public struct PlacementQuery
{
public PlacementQuery(
SpatialUnderstandingDllObjectPlacement.ObjectPlacementDefinition placementDefinition,
Vector3 dimensions,
ObjectType objType,
List<SpatialUnderstandingDllObjectPlacement.ObjectPlacementRule> placementRules = null,
List<SpatialUnderstandingDllObjectPlacement.ObjectPlacementConstraint> placementConstraints = null)
{
PlacementDefinition = placementDefinition;
PlacementRules = placementRules;
PlacementConstraints = placementConstraints;
Dimensions = dimensions;
ObjType = objType;
}
public readonly SpatialUnderstandingDllObjectPlacement.ObjectPlacementDefinition PlacementDefinition;
public readonly Vector3 Dimensions;
public readonly ObjectType ObjType;
public readonly List<SpatialUnderstandingDllObjectPlacement.ObjectPlacementRule> PlacementRules;
public readonly List<SpatialUnderstandingDllObjectPlacement.ObjectPlacementConstraint> PlacementConstraints;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment