GeomVertexArrayDataHandle

from panda3d.core import GeomVertexArrayDataHandle
class GeomVertexArrayDataHandle

Bases:

Bases: ReferenceCount, GeomEnums

This data object is returned by GeomVertexArrayData.get_handle() 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_format GeomVertexArrayFormat
clear_rows()
copy_data_from(other: GeomVertexArrayDataHandle)

Copies the entire data array from the other object.

copy_data_from(buffer: object)
copy_subdata_from(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.

copy_subdata_from(to_start: int, to_size: int, buffer: object)
copy_subdata_from(to_start: int, to_size: int, buffer: object, from_start: int, from_size: int)
property data_size_bytes int
get_array_format() GeomVertexArrayFormat
static get_class_type() TypeHandle
get_data() 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.

get_data_size_bytes() int
get_modified() UpdateSeq
get_num_rows() int
get_object() GeomVertexArrayData
get_object() GeomVertexArrayData
get_subdata(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.

get_usage_hint() UsageHint
mark_used()

Marks the array data recently-used.

property modified UpdateSeq
property object GeomVertexArrayData
prepare_now(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.

request_resident() 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.

reserve_num_rows(n: int) bool
set_data(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.

set_num_rows(n: int) bool
set_subdata(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.

unclean_set_num_rows(n: int) bool
property usage_hint UsageHint