ObjectUtils Class

Module: Utils

ObjectUtils is a collection of methods to apply operations to Object3D objects

Methods

calculateBoudingBox

(
  • object
)
Box3

Calculates a bouding box for an object considering all its children.

Parameters:

Returns:

Box3:

Bouding box calculated.

getRoot

(
  • obj
)
Object3D

Get object tree root.

For a object placed inside a running scene the root is always the program.

Parameters:

Returns:

Object3D:

root

recalculateGeometryOrigin

(
  • object
)

Recalculate all children origins, to be centered with their geometry.

Parameters:

  • object Object3D

    Object to recalculate origin of.

scaleAndCenterObject

(
  • object
)

Scale and center object into a unitary box, using its geometry.

Parameters:

  • object Object3D

    Object to be positioned and scaled.