ARPlaneAnchor¶
Inherits: RefCounted < Object
An anchor describing a detected planar surface.
Description¶
Represents a detected horizontal, vertical, or slanted plane. Plane anchors expose center, extent, polygon boundary vertices, triangulated geometry, and optional surface classification. Use them to place content on floors, walls, tables, and similar surfaces.
Properties¶
int |
|
|
PackedVector3Array |
|
|
Vector3 |
|
|
int |
|
|
int |
|
|
Vector3 |
|
|
PackedVector3Array |
|
|
String |
|
|
float |
|
|
float |
|
|
float |
|
|
PackedVector2Array |
|
|
Transform3D |
|
|
PackedInt32Array |
|
Methods¶
Vector3 |
get_boundary_vertex(index: int) |
Vector3 |
get_geometry_vertex(index: int) |
Vector2 |
get_texture_coordinate(index: int) |
int |
get_triangle_index(index: int) |
bool |
is_classification_supported() static |
Enumerations¶
enum Alignment: 🔗
Alignment HORIZONTAL = 0
The plane is horizontally aligned.
Alignment VERTICAL = 1
The plane is vertically aligned.
Alignment SLANTED = 2
The plane is aligned to a slanted surface.
enum ClassificationStatus: 🔗
ClassificationStatus NOT_AVAILABLE = 0
Plane classification is not available on this device.
ClassificationStatus UNDETERMINED = 1
Plane classification support is present but no classification has been produced yet.
ClassificationStatus UNKNOWN = 2
The plane could not be classified.
ClassificationStatus KNOWN = 3
The plane has a valid semantic classification.
enum Classification: 🔗
Classification NONE = 0
No semantic classification is available for this plane.
Classification WALL = 1
The plane is classified as a wall.
Classification FLOOR = 2
The plane is classified as a floor.
Classification CEILING = 3
The plane is classified as a ceiling.
Classification TABLE = 4
The plane is classified as a table.
Classification SEAT = 5
The plane is classified as a seat.
Classification WINDOW = 6
The plane is classified as a window.
Classification DOOR = 7
The plane is classified as a door.
Classification STAIRS = 8
The plane is classified as stairs.
Classification BED = 9
The plane is classified as a bed.
Classification CABINET = 10
The plane is classified as a cabinet.
Classification HOME_APPLIANCE = 11
The plane is classified as a home appliance.
Classification TV = 12
The plane is classified as a television.
Classification PLANT = 13
The plane is classified as a plant.
Property Descriptions¶
int alignment = 0 🔗
void set_alignment(value: int)
int get_alignment()
The detected orientation of the plane. See Alignment.
PackedVector3Array boundary_vertices = PackedVector3Array() 🔗
void set_boundary_vertices(value: PackedVector3Array)
PackedVector3Array get_boundary_vertices()
Vertices describing the polygon boundary of the detected plane.
Note: The returned array is copied and any changes to it will not update the original property value. See PackedVector3Array for more details.
Vector3 center = Vector3(0, 0, 0) 🔗
void set_center(value: Vector3)
Vector3 get_center()
The center of the plane in anchor-local space.
int classification = 0 🔗
void set_classification(value: int)
int get_classification()
Semantic classification for the plane surface. See Classification.
int classification_status = 0 🔗
void set_classification_status(value: int)
int get_classification_status()
Whether plane classification is currently available and valid. See ClassificationStatus.
Vector3 extent = Vector3(0, 0, 0) 🔗
void set_extent(value: Vector3)
Vector3 get_extent()
The approximate plane size in anchor-local space.
PackedVector3Array geometry_vertices = PackedVector3Array() 🔗
void set_geometry_vertices(value: PackedVector3Array)
PackedVector3Array get_geometry_vertices()
Vertices for the triangulated plane geometry.
Note: The returned array is copied and any changes to it will not update the original property value. See PackedVector3Array for more details.
String identifier = "" 🔗
void set_identifier(value: String)
String get_identifier()
A unique identifier for this plane anchor.
float plane_extent_height = 0.0 🔗
void set_plane_extent_height(value: float)
float get_plane_extent_height()
Height of the rectangular plane extent in meters.
float plane_extent_rotation_on_y_axis = 0.0 🔗
void set_plane_extent_rotation_on_y_axis(value: float)
float get_plane_extent_rotation_on_y_axis()
Rotation of the rectangular plane extent around the Y axis in radians.
float plane_extent_width = 0.0 🔗
void set_plane_extent_width(value: float)
float get_plane_extent_width()
Width of the rectangular plane extent in meters.
PackedVector2Array texture_coordinates = PackedVector2Array() 🔗
void set_texture_coordinates(value: PackedVector2Array)
PackedVector2Array get_texture_coordinates()
Texture coordinates for the triangulated plane geometry.
Note: The returned array is copied and any changes to it will not update the original property value. See PackedVector2Array for more details.
Transform3D transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0) 🔗
void set_transform(value: Transform3D)
Transform3D get_transform()
The plane anchor transform in world space.
PackedInt32Array triangle_indices = PackedInt32Array() 🔗
void set_triangle_indices(value: PackedInt32Array)
PackedInt32Array get_triangle_indices()
Triangle index data for the triangulated plane geometry.
Note: The returned array is copied and any changes to it will not update the original property value. See PackedInt32Array for more details.
Method Descriptions¶
Vector3 get_boundary_vertex(index: int) 🔗
Returns the polygon boundary vertex at index.
Vector3 get_geometry_vertex(index: int) 🔗
Returns the triangulated plane-geometry vertex at index.
Vector2 get_texture_coordinate(index: int) 🔗
Returns the texture coordinate at index for the triangulated plane geometry.
int get_triangle_index(index: int) 🔗
Returns the triangle index value at index from triangle_indices.
bool is_classification_supported() static 🔗
Returns true when the current device can classify detected planes.