Skip to main content

Constructors

constructor

Populates/constructs this batch object. Parameters:
  • renderView: NodeRenderView
  • batchIndex: The object’s index within its batch. Objects are placed in order inside the batch as they get processed

Properties

transform

The batch object’s immediate transformation Returns: Matrix4

transformInv

The batch object’s immediate inverse transformation Returns: Matrix4

Accessors

aabb

Gets the axis aligned bounding box of this object.
If you want to work with object dimensions and positioning, this is the bounds to use. This is the transformed aabb, unlike NodeRenderView’s aabb which does not take any transformation into account.
Returns: Box3

accelerationStructure

Gets the object’s bottom level BVH. Returns: AccelerationStructure

batchIndex

Gets the object’s index inside its batch. Returns: number

localOrigin

Gets local origin of the object. i.e the render view’s aabb center. Returns: Vector3

renderView

Gets the start index inside the batch’s index buffer. Returns: NodeRenderView

Methods

buildAccelerationStructure

Build this object’s AccelerationStructure either from scratch, using the render view’s geometry, either by using the optional bvh argument. BVH’s can be shared between objects as long as it makes sense like for example for instances.
The speckle viewer uses the three-mesh-bvh library as the backbone for any BVH related operations.
Parameters: Returns: void

transformTRS

Used for transforming the object by using translation, rotation, scale and rotation pivot values. Parameters:
  • translation: The translation component of the transformation
  • optional euler: Rotation component as euler angles in XYZ order
  • optional scale: Scale component of the transformation
  • optional pivot: The rotation pivot
Returns: void

Typedefs

VectorLike

Archtype for Vector2, Vector3 and Vector4.

InstancedBatchObject

Child class used for instanced objects. No additional functionality, just some additional required logic wrapped.
Last modified on July 18, 2026