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

isChildOf

(
  • parent
  • child
)
Boolean

Check if object is child of another object

Parameters:

Returns:

Boolean:

True if parent is parent of child

recalculateGeometryOrigin

(
  • object
)

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

Parameters:

  • object Object3D

    Object to recalculate origin of.

setMatrixAutoUpdate

(
  • obj
  • value
)

Set object and all its children matrixAutoUpdate value

Parameters:

setShadowCasting

(
  • obj
  • value
)

Set object and all children to cast shadows

Parameters:

setShadowReceiving

(
  • obj
  • value
)

Set object and all children to receive shadows

Parameters: