Skip to content

CellArrayBufferObject ​

Methods ​

createVBO ​

Pack the given cells into an interleaved vertex buffer and upload it.

When the options allow it the cells are uploaded indexed, sharing the input points; otherwise every cell vertex is expanded.

ArgumentTypeRequiredDescription
cellArrayYesThe cells to pack.
inRepYesThe primitive kind the cell array holds.
outRepYesThe representation to draw the cells with.
optionsICreateVBOOptionsYesThe attributes to pack.
selectionMapsISelectionMapsNo(default: null) Filled with the point and cell id of every packed vertex.

Returns ​

TypeDescription
numberThe number of cells packed.

extend ​

Method used to decorate a given object (publicAPI+model) with vtkOpenGLCellArrayBufferObject characteristics.

ArgumentTypeRequiredDescription
publicAPIYesobject on which methods will be bounds (public)
modelYesobject on which data structure will be bounds (protected)
initialValuesICellArrayBufferObjectInitialValuesNo(default: {})

getColorBO ​

Get the buffer holding the packed colors, when the colors are uploaded separately.

getColorBOStride ​

Get the size in bytes of one block of the color buffer.

getColorComponents ​

Get the number of components of the color.

getColorOffset ​

Get the offset in bytes of the color inside a color buffer block.

getCoordScale ​

Get the scale applied to the points before packing them.

getCoordShift ​

Get the shift applied to the points before packing them.

getCoordShiftAndScaleEnabled ​

Whether the packed positions are shifted and scaled.

getCustomData ​

Get the description of the extra attributes packed into the VBO.

getElementCount ​

Get the number of vertices, or of indices when indexed, to draw.

getIndexBO ​

Get the index buffer, when the VBO is indexed.

getIndexElementType ​

Get the GL type of the indices, UNSIGNED_SHORT or UNSIGNED_INT.

getIndexed ​

Whether the VBO shares its points and is drawn through an index buffer.

getInverseShiftAndScaleMatrix ​

Get the matrix undoing the shift and the scale, as 16 values.

getNormalOffset ​

Get the offset in bytes of the normal inside a block.

getStride ​

Get the size in bytes of one interleaved vertex block.

getTCoordComponents ​

Get the number of components of the texture coordinate.

getTCoordOffset ​

Get the offset in bytes of the texture coordinate inside a block.

getVertexOffset ​

Get the offset in bytes of the position inside a block.

newInstance ​

Method used to create a new instance of vtkOpenGLCellArrayBufferObject.

ArgumentTypeRequiredDescription
initialValuesICellArrayBufferObjectInitialValuesNofor pre-setting some of its content

setColorBO ​

Set the buffer holding the packed colors.

ArgumentTypeRequiredDescription
colorBOYesThe buffer.

setColorBOStride ​

Set the size in bytes of one block of the color buffer.

ArgumentTypeRequiredDescription
colorBOStrideYesThe block size in bytes.

setColorComponents ​

Set the number of components of the color.

ArgumentTypeRequiredDescription
colorComponentsYesThe number of components.

setColorOffset ​

Set the offset in bytes of the color inside a color buffer block.

ArgumentTypeRequiredDescription
colorOffsetYesThe offset in bytes.

setCoordShiftAndScale ​

Set the shift and the scale applied to the points before packing them, and recompute the inverse matrix. Both must be a Float64Array of three values, or both null to disable shift and scale.

ArgumentTypeRequiredDescription
coordShiftYesThe shift.
coordScaleYesThe scale.

setCustomData ​

Set the description of the extra attributes packed into the VBO.

ArgumentTypeRequiredDescription
customDataYesThe attribute descriptions.

setElementCount ​

Set the number of vertices to draw.

ArgumentTypeRequiredDescription
elementCountYesThe number of vertices.

setIndexBO ​

Set the index buffer.

ArgumentTypeRequiredDescription
indexBOYesThe index buffer.

setIndexElementType ​

Set the GL type of the indices.

ArgumentTypeRequiredDescription
indexElementTypeYesThe GL type.

setIndexed ​

Set whether the VBO is drawn through an index buffer.

ArgumentTypeRequiredDescription
indexedYesThe indexed flag.

setNormalOffset ​

Set the offset in bytes of the normal inside a block.

ArgumentTypeRequiredDescription
normalOffsetYesThe offset in bytes.

setStride ​

Set the size in bytes of one interleaved vertex block.

ArgumentTypeRequiredDescription
strideYesThe block size in bytes.

setTCoordComponents ​

Set the number of components of the texture coordinate.

ArgumentTypeRequiredDescription
tCoordComponentsYesThe number of components.

setTCoordOffset ​

Set the offset in bytes of the texture coordinate inside a block.

ArgumentTypeRequiredDescription
tCoordOffsetYesThe offset in bytes.

setVertexOffset ​

Set the offset in bytes of the position inside a block.

ArgumentTypeRequiredDescription
vertexOffsetYesThe offset in bytes.