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.
| Argument | Type | Required | Description |
|---|---|---|---|
cellArray | Yes | The cells to pack. | |
inRep | Yes | The primitive kind the cell array holds. | |
outRep | Yes | The representation to draw the cells with. | |
options | ICreateVBOOptions | Yes | The attributes to pack. |
selectionMaps | ISelectionMaps | No | (default: null) Filled with the point and cell id of every packed vertex. |
Returns
| Type | Description |
|---|---|
| number | The number of cells packed. |
extend
Method used to decorate a given object (publicAPI+model) with vtkOpenGLCellArrayBufferObject characteristics.
| Argument | Type | Required | Description |
|---|---|---|---|
publicAPI | Yes | object on which methods will be bounds (public) | |
model | Yes | object on which data structure will be bounds (protected) | |
initialValues | ICellArrayBufferObjectInitialValues | No | (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.
| Argument | Type | Required | Description |
|---|---|---|---|
initialValues | ICellArrayBufferObjectInitialValues | No | for pre-setting some of its content |
setColorBO
Set the buffer holding the packed colors.
| Argument | Type | Required | Description |
|---|---|---|---|
colorBO | Yes | The buffer. |
setColorBOStride
Set the size in bytes of one block of the color buffer.
| Argument | Type | Required | Description |
|---|---|---|---|
colorBOStride | Yes | The block size in bytes. |
setColorComponents
Set the number of components of the color.
| Argument | Type | Required | Description |
|---|---|---|---|
colorComponents | Yes | The number of components. |
setColorOffset
Set the offset in bytes of the color inside a color buffer block.
| Argument | Type | Required | Description |
|---|---|---|---|
colorOffset | Yes | The 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.
| Argument | Type | Required | Description |
|---|---|---|---|
coordShift | Yes | The shift. | |
coordScale | Yes | The scale. |
setCustomData
Set the description of the extra attributes packed into the VBO.
| Argument | Type | Required | Description |
|---|---|---|---|
customData | Yes | The attribute descriptions. |
setElementCount
Set the number of vertices to draw.
| Argument | Type | Required | Description |
|---|---|---|---|
elementCount | Yes | The number of vertices. |
setIndexBO
Set the index buffer.
| Argument | Type | Required | Description |
|---|---|---|---|
indexBO | Yes | The index buffer. |
setIndexElementType
Set the GL type of the indices.
| Argument | Type | Required | Description |
|---|---|---|---|
indexElementType | Yes | The GL type. |
setIndexed
Set whether the VBO is drawn through an index buffer.
| Argument | Type | Required | Description |
|---|---|---|---|
indexed | Yes | The indexed flag. |
setNormalOffset
Set the offset in bytes of the normal inside a block.
| Argument | Type | Required | Description |
|---|---|---|---|
normalOffset | Yes | The offset in bytes. |
setStride
Set the size in bytes of one interleaved vertex block.
| Argument | Type | Required | Description |
|---|---|---|---|
stride | Yes | The block size in bytes. |
setTCoordComponents
Set the number of components of the texture coordinate.
| Argument | Type | Required | Description |
|---|---|---|---|
tCoordComponents | Yes | The number of components. |
setTCoordOffset
Set the offset in bytes of the texture coordinate inside a block.
| Argument | Type | Required | Description |
|---|---|---|---|
tCoordOffset | Yes | The offset in bytes. |
setVertexOffset
Set the offset in bytes of the position inside a block.
| Argument | Type | Required | Description |
|---|---|---|---|
vertexOffset | Yes | The offset in bytes. |