GeomVertexArrayDataHandle
from panda3d.core import GeomVertexArrayDataHandle
- class GeomVertexArrayDataHandle
Bases:
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
- property array_format GeomVertexArrayFormat
- clearRows()
- copyDataFrom(other: GeomVertexArrayDataHandle)
Copies the entire data array from the other object.
- copyDataFrom(buffer: object)
- copySubdataFrom(to_start: int, to_size: int, other: GeomVertexArrayDataHandle, from_start: int, from_size: int)
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.
- 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.
- 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()
Marks the array data recently-used.
- property object GeomVertexArrayData
- 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 theGraphicsStateGuardian
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.
- setData(data: bytes)
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.
- setSubdata(start: int, size: int, data: bytes)
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.
- property usage_hint UsageHint