Options
All
  • Public
  • Public/Protected
  • All
Menu

An OrientedBox is a 3D shape consisting of 8 corner points that form a straight-edged volume that can be oriented in any arbitrary direction. It is similar to a 3D bounds, with the biggest difference is that it is not limited to the orientation of the axes of the reference it is defined in.

Due to the cartesian nature of this shape, it is not available for geodetic references.

Hierarchy

Implements

Overview

Constructors

Private constructor

  • This class should not be instantiated by users of LuciadRIA.

    Returns OrientedBox

Accessors

bounds

coordinateType

focusPoint

  • get focusPoint(): Point
  • The center point point of this box. This will return the center of the box. This property is read only. An error will be thrown when trying to assign to this property. This property contains an object but should be treated with value semantics: changes to the shape will not be reflected in the focusPoint that was retrieved from this Polygon before the modification.

    Returns Point

reference

  • The spatial reference of this shape. This property is read only. An Error will be thrown when trying to assign to this property.

    Returns CoordinateReference | null

type

Methods

contains2D

  • Determines whether a given point is inside this shape. This method checks containment only in two dimensions: on the (x,y)-axis or the (lon,lat)-axis (depending on the spatial reference of the shape).

    throws

    InvalidReferenceError when passing a Point with another spatial reference

    deprecated

    Please use contains2DPoint instead.

    Parameters

    • x: Point | number | Bounds

      The point for which containment must be checked. If a 3D point is passed to this function, it will be treated as a 2D point: the z coordinate (height) will be ignored. The reference of this point must be the same reference as this Shape

    • Optional y: number

    Returns boolean

    true when the given point is contained in this shape

contains2DCoordinates

  • (x: number, y: number): boolean
  • Determines whether the given point is inside this oriented box. This method checks containment only in two dimensions: on the (x,y)-axis

    Note that since oriented box is a 3D shape, this function will perform its calculation on a projected version of the box.

    throws

    InvalidReferenceError when passing a Point with another spatial reference

    Parameters

    • x: number

      The x coordinate of the point for which containment must be checked

    • y: number

      The y coordinate of the point for which containment must be checked

    Returns boolean

    true when the given point is contained in this shape

contains2DPoint

  • (point: Point): boolean
  • Determines whether the given point is inside this oriented box. This method checks containment only in two dimensions: on the (x,y)-axis.

    Note that since oriented box is a 3D shape, this function will perform its calculation on a projected version of the box.

    throws

    InvalidReferenceError when passing a Point with another spatial reference

    Parameters

    • point: Point

      The point for which containment must be checked.

    Returns boolean

    true when the given point is contained in this shape

copy

equals

  • (otherShape: Shape): boolean

getCornerPoints

  • Gets the 8 corners of this OrientedBox, in the form of an array of Point objects.

    Note that this is a convenience method that will create copies of the corner points as Point objects.

    Returns Point[]

    an array of Point objects that are copies corner points of this oriented box.

getCorners

  • Gets the 8 corners of this OrientedBox, in the form of an array of Vector3 objects.

    Returns Vector3[]

    an array of coordinates.

invalidate

  • (): void
  • Invalidate cache of this oriented box.

    Returns void

toString

  • (): string
  • Converts the oriented box to a string. This functionality is for debugging purposes only. Results of toString cannot be used to uniquely identify a shape instance.

    Returns string

    a string version of this oriented box

transform

  • Applies a transformation to this oriented box.

    Note that currently only cartesian transformations are allowed. Geodetic transformations are not supported.

    see

    Affine3DTransformation

    Parameters

    • transformation: Affine3DTransformation

      A transformation to apply to this oriented box. Must be a cartesian transformation.

    Returns void

translate2D

  • (x: number, y: number): void
  • Translates the shape over the given vector in 2D space. The z-coordinate is not touched

    Parameters

    • x: number

      The x coordinate of the translation vector

    • y: number

      The y coordinate of the translation vector

    Returns void

translate3D

  • (x: number, y: number, z: number): void
  • Translates the shape over the given vector in 3D space.

    Parameters

    • x: number

      The x coordinate of the translation vector

    • y: number

      The y coordinate of the translation vector

    • z: number

      The z coordinate of the translation vector

    Returns void

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Type alias with type parameter
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method