Batch
is defined as an interface
, and is implemented by several batch types based on the geometry type.
Properties
batchMaterial
geometryType
id
renderObject
renderViews
subtreeId
Accessors
bounds
drawCalls
groups
materials
minDrawCalls
triCount
vertCount
Methods
buildBatch
- Building the geometry
- Creating appropriate [BatchObjects](if any) and their acceleration structures(if any)
- Setting appropriate batch data to the render views
- Initialising the batch’s renderObject
getCount
getDepth
getMaterial
- renderView: NodeRenderView
getMaterialAtIndex
- index: The primitive index to lookup
getOpaque
getRenderView
- index: The primitive index to lookup
getStencil
getTransparent
getVisibleRange
onRender
- renderer: WebGLRenderer
onUpdate
- deltaTime: number
purge
resetDrawRanges
setBatchBuffers
- range: BatchUpdateRange
setBatchMaterial
- material: Material
setDrawRanges
Materials are assigned to objects inside batches by using this method.
Normally, the viewer offers a higher level of assigning materials through
SpeckleRenderer’s
setMaterial which calls this
method internally.
- ranges: BatchUpdateRange
setVisibleRange
Mesh batches currently only allow for contiguous visibility between draw ranges. i.e no different visibility gaps. Line batches however are not restricted by this.
- ranges: BatchUpdateRange
Typedefs
BatchUpdateRange
DrawGroup
The viewer’s MeshBatch implementation of
Batch uses three.js’s geometry groups as a means to render parts of the batch
with different materials.