GeomVertexArrayDataHandle

from panda3d.core import GeomVertexArrayDataHandle
class GeomVertexArrayDataHandle

Bases: ReferenceCount, GeomEnums

This data object is returned by GeomVertexArrayData.getHandle() or modify_handle(). As long as it exists, the data is locked; when the last of these destructs, the data is unlocked.

Only one thread at a time may lock the data; other threads attempting to lock the data will block. A given thread may simultaneously lock the data multiple times.

This class serves in lieu of a pair of GeomVertexArrayDataPipelineReader and GeomVertexArrayDataPipelineWriter classes

Inheritance diagram

Inheritance diagram of GeomVertexArrayDataHandle

property array_formatGeomVertexArrayFormat
clearRows()None
copyDataFrom(other: GeomVertexArrayDataHandle)None

Copies the entire data array from the other object.

copyDataFrom(buffer: object)None
copySubdataFrom(to_start: int, to_size: int, other: GeomVertexArrayDataHandle, from_start: int, from_size: int)None

Copies a portion of the data array from the other object into a portion of the data array of this object. If to_size != from_size, the size of this data array is adjusted accordingly.

copySubdataFrom(to_start: int, to_size: int, buffer: object)None
copySubdataFrom(to_start: int, to_size: int, buffer: object, from_start: int, from_size: int)None
property data_size_bytesint
getArrayFormat()GeomVertexArrayFormat
static getClassType()TypeHandle
getData()bytes

Returns the entire raw data of the GeomVertexArrayData object, formatted as a string. This is primarily for the benefit of high-level languages such as Python.

getDataSizeBytes()int
getModified()UpdateSeq
getNumRows()int
getObject()GeomVertexArrayData
getObject()GeomVertexArrayData
getSubdata(start: int, size: int)bytes

Returns a subset of the raw data of the GeomVertexArrayData object, formatted as a string. This is primarily for the benefit of high-level languages such as Python.

getUsageHint() → UsageHint
markUsed()None

Marks the array data recently-used.

property modifiedUpdateSeq
property objectGeomVertexArrayData
prepareNow(prepared_objects: PreparedGraphicsObjects, gsg: GraphicsStateGuardianBase)VertexBufferContext

Creates a context for the data on the particular GSG, if it does not already exist. Returns the new (or old) VertexBufferContext. This assumes that the GraphicsStateGuardian is the currently active rendering context and that it is ready to accept new datas. If this is not necessarily the case, you should use prepare() instead.

Normally, this is not called directly except by the GraphicsStateGuardian; a data does not need to be explicitly prepared by the user before it may be rendered.

requestResident()bool

Returns true if the vertex data is currently resident in memory. If this returns true, the next call to get_handle()->get_read_pointer() will probably not block. If this returns false, the vertex data will be brought back into memory shortly; try again later.

reserveNumRows(n: int)bool
setData(data: bytes)None

Replaces the entire raw data array with the contents of the indicated string. This is primarily for the benefit of high-level languages like Python.

setNumRows(n: int)bool
setSubdata(start: int, size: int, data: bytes)None

Replaces a portion of the data array from the indicated string. If size != data.size(), the size of this data array is adjusted accordingly.

This is primarily for the benefit of high-level languages like Python.

uncleanSetNumRows(n: int)bool
property usage_hint → UsageHint