![]() |
AR Design
UBC EML collab with UBC SALA - visualizing IoT data in AR
|
Encapsulates the shape detection queries of the understanding DLL. Shapes are defined by the user with AddShape and the analysis is initiated with ActivateShapeAnalysis. These queries will not be valid until after scanning is finalized. More...
Classes | |
| struct | ShapeComponent |
| A shape component definition. Contains a list of component constraints. More... | |
| struct | ShapeComponentConstraint |
| A shape component constraint. This includes its type enum and its type specific parameters. More... | |
| struct | ShapeConstraint |
| A shape constraint definition. Composed of a type and type specific parameters More... | |
| struct | ShapeResult |
| Result structure returned by shape queries More... | |
Public Member Functions | |
| static int | QueryShape_FindPositionsOnShape ([In, MarshalAs(UnmanagedType.LPStr)] string shapeName, [In] float minRadius, [In] int shapeCount, [In, Out] IntPtr shapeData) |
| Finds the set of available positions on the set of found shapes of the type specified by shapeName. More... | |
| static int | QueryShape_FindShapeHalfDims ([In, MarshalAs(UnmanagedType.LPStr)] string shapeName, [In] int shapeCount, [In, Out] IntPtr shapeData) |
| Finds the set of found shapes of the type specified by shapeName. Returns the bounding rectangle's half dimensions. More... | |
| static int | AddShape ([In, MarshalAs(UnmanagedType.LPStr)] string shapeName, [In] int componentCount, [In] IntPtr components, [In] int shapeConstraints, [In] IntPtr constraints) |
| Add a shape definition. A shape is defined by a list of components and a set of component constraints. Each component is of type ShapeComponent and is defined by a set of component constraint. More... | |
| static void | ActivateShapeAnalysis () |
| Runs the shape analysis. This should be called after scanning has been finalized and shapes have been defined with AddShape. More... | |
| static void | RemoveAllShapes () |
| Removes all shapes defined by AddShape. More... | |
Encapsulates the shape detection queries of the understanding DLL. Shapes are defined by the user with AddShape and the analysis is initiated with ActivateShapeAnalysis. These queries will not be valid until after scanning is finalized.
Shape definitions are composed of a list of components and a list of shape constraints which defining requirements between the components. Each component is defined by a list of its own shape component constraints.
Definition at line 23 of file SpatialUnderstandingDllShapes.cs.
Types of shape component constraints
Definition at line 38 of file SpatialUnderstandingDllShapes.cs.
Lists the types of shape constraints. Each defines a requirement between shape components.
| Enumerator | |
|---|---|
| NoOtherSurface | |
| AwayFromWalls | |
| RectanglesParallel | |
| RectanglesPerpendicular | |
| RectanglesAligned | |
| RectanglesSameLength | |
| AtFrontOf | |
| AtBackOf | |
| AtLeftOf | |
| AtRightOf | |
Definition at line 648 of file SpatialUnderstandingDllShapes.cs.
| static void HoloToolkit.Unity.SpatialUnderstandingDllShapes.ActivateShapeAnalysis | ( | ) |
Runs the shape analysis. This should be called after scanning has been finalized and shapes have been defined with AddShape.
| static int HoloToolkit.Unity.SpatialUnderstandingDllShapes.AddShape | ( | [In, MarshalAs(UnmanagedType.LPStr)] string | shapeName, |
| [In] int | componentCount, | ||
| [In] IntPtr | components, | ||
| [In] int | shapeConstraints, | ||
| [In] IntPtr | constraints | ||
| ) |
Add a shape definition. A shape is defined by a list of components and a set of component constraints. Each component is of type ShapeComponent and is defined by a set of component constraint.
| shapeName | Name of the shaped |
| componentCount | Length of the component array pass in the components parameter |
| components | Array of ShapeComponent structures |
| shapeConstraints | Length of the shape constraint array passed in the constraints parameter |
| constraints | Array of ShapeConstraint structures |
| static int HoloToolkit.Unity.SpatialUnderstandingDllShapes.QueryShape_FindPositionsOnShape | ( | [In, MarshalAs(UnmanagedType.LPStr)] string | shapeName, |
| [In] float | minRadius, | ||
| [In] int | shapeCount, | ||
| [In, Out] IntPtr | shapeData | ||
| ) |
Finds the set of available positions on the set of found shapes of the type specified by shapeName.
| shapeName | Name of the shape |
| minRadius | Defines the minimum space requirement for a returned position |
| shapeCount | Length of the array passed in shapeData, the return value will never exceed this value |
| shapeData | An array of ShapeResult structures to receive the results of the query |
| static int HoloToolkit.Unity.SpatialUnderstandingDllShapes.QueryShape_FindShapeHalfDims | ( | [In, MarshalAs(UnmanagedType.LPStr)] string | shapeName, |
| [In] int | shapeCount, | ||
| [In, Out] IntPtr | shapeData | ||
| ) |
Finds the set of found shapes of the type specified by shapeName. Returns the bounding rectangle's half dimensions.
| shapeName | Name of the shape |
| shapeCount | Length of the array passed in shapeData, the return value will never exceed this value |
| shapeData | An array of ShapeResult structures to receive the results of the query |
| static void HoloToolkit.Unity.SpatialUnderstandingDllShapes.RemoveAllShapes | ( | ) |
Removes all shapes defined by AddShape.