Home Reference Source
import {WorldOctantWrapper} from 'rabbit-hole'
public class | source

WorldOctantWrapper

A world octant wrapper that stores positional information.

Constructor Summary

Public Constructor
public

Constructs a new octant wrapper.

Member Summary

Public Members
public

A world octant identifier.

public

max: Vector3

The upper bounds.

public

min: Vector3

The lower bounds.

public

A world octant.

Method Summary

Public Methods
public

Clones this octant wrapper.

public

containsPoint(point: Vector3): Boolean

Checks if the given point lies inside the boundaries of this wrapper.

public

Copies the given octant wrapper.

public

getCenter(target: Vector3): Vector3

Computes the center of the wrapped octant.

public

getDimensions(target: Vector3): Vector3

Computes the size of the wrapped octant.

Public Constructors

public constructor(octant: WorldOctant, id: WorldOctantId) source

Constructs a new octant wrapper.

Params:

NameTypeAttributeDescription
octant WorldOctant
  • optional
  • default: null

An octant.

id WorldOctantId
  • optional

The identifier of the octant.

Public Members

public id: WorldOctantId source

A world octant identifier.

public max: Vector3 source

The upper bounds.

public min: Vector3 source

The lower bounds.

public octant: WorldOctant source

A world octant.

Public Methods

public clone(): WorldOctantWrapper source

Clones this octant wrapper.

Return:

WorldOctantWrapper

The cloned octant wrapper.

public containsPoint(point: Vector3): Boolean source

Checks if the given point lies inside the boundaries of this wrapper.

Params:

NameTypeAttributeDescription
point Vector3

A point.

Return:

Boolean

Whether the given point lies inside the boundaries.

public copy(octantWrapper: WorldOctantWrapper): WorldOctantWrapper source

Copies the given octant wrapper.

Params:

NameTypeAttributeDescription
octantWrapper WorldOctantWrapper

An octant wrapper.

Return:

WorldOctantWrapper

This octant wrapper.

public getCenter(target: Vector3): Vector3 source

Computes the center of the wrapped octant.

Params:

NameTypeAttributeDescription
target Vector3
  • optional

A target vector. If none is provided, a new one will be created.

Return:

Vector3

A vector that describes the center of the octant.

public getDimensions(target: Vector3): Vector3 source

Computes the size of the wrapped octant.

Params:

NameTypeAttributeDescription
target Vector3
  • optional

A target vector. If none is provided, a new one will be created.

Return:

Vector3

A vector that describes the size of the octant.