Skip to main content
Version: 14 Oct 2024

MLPlanesQuery

Module: Planes

Type used to represent a plane query. More...

#include <ml_planes.h>

Public Attributes

TypeName
uint32_tflags
MLVec3fbounds_center
MLQuaternionfbounds_rotation
MLVec3fbounds_extents
The size of the bounding box where planes extraction will occur. Only planes within 10 meters of the device will be extracted. The maximum value is 20 meters in each direction. A value of (0, 0, 0) will be treated as (20, 20, 20).
uint32_tmax_results
The maximum number of results that should be returned. This is also the minimum expected size of the array of results passed to the MLPlanesGetResult function. In the case where the number of rectangular planes exceed this value, only the largest max_results planes will be returned. This can cause the number of polygons returned to be smaller than max_results, as there can be multiple inner planes per planar surface but only one polygon, and if the rectangular plane of a planar surface is not being returned because max_results have been reached, the corresponding polygon won't be returned.
floatmin_plane_area
The minimum area (in squared meters) of planes to be returned. This value cannot be lower than 0.04 (lower values will be capped to this minimum). A good default value is 0.25.

Detailed Description

struct MLPlanesQuery;

Type used to represent a plane query.

Deprecated

Deprecated since 1.6.0. Scheduled for removal.

API Level:

  • 20

Public Attributes Documentation

flags

uint32_t flags;

The flags to apply to this query.


bounds_center

MLVec3f bounds_center;

The center of the bounding box which defines where planes extraction should occur.


bounds_rotation

MLQuaternionf bounds_rotation;

The rotation of the bounding box where planes extraction will occur.


bounds_extents

MLVec3f bounds_extents;

The size of the bounding box where planes extraction will occur. Only planes within 10 meters of the device will be extracted. The maximum value is 20 meters in each direction. A value of (0, 0, 0) will be treated as (20, 20, 20).


max_results

uint32_t max_results;

The maximum number of results that should be returned. This is also the minimum expected size of the array of results passed to the MLPlanesGetResult function. In the case where the number of rectangular planes exceed this value, only the largest max_results planes will be returned. This can cause the number of polygons returned to be smaller than max_results, as there can be multiple inner planes per planar surface but only one polygon, and if the rectangular plane of a planar surface is not being returned because max_results have been reached, the corresponding polygon won't be returned.


min_plane_area

float min_plane_area;

The minimum area (in squared meters) of planes to be returned. This value cannot be lower than 0.04 (lower values will be capped to this minimum). A good default value is 0.25.