Panda3D

Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Public Attributes | Friends | List of all members
GeomVertexArrayData Class Reference

This is the data for one array of a GeomVertexData structure. More...

`#include "geomVertexArrayData.h"`

Inheritance diagram for GeomVertexArrayData:

## Public Member Functions
| GeomVertexArrayData (const GeomVertexArrayData &copy)
| GeomVertexArrayData (const GeomVertexArrayFormat *array_format, UsageHint usage_hint)
void | clear_rows ()
| Removes all of the rows in the array.
int | compare_to (const GeomVertexArrayData &other) const
| Returns 0 if the two arrays are equivalent, even if they are not the same pointer.
virtual int | complete_pointers (TypedWritable **plist, BamReader *manager)
| Receives an array of pointers, one for each time manager->read_pointer() was called in fillin().
virtual void | evict_lru ()
| Evicts the page from the LRU.
virtual void | finalize (BamReader *manager)
| Called by the BamReader to perform any final actions needed for setting up the object after all objects have been read and all pointers have been completed.
virtual TypeHandle | force_init_type ()
const GeomVertexArrayFormat * | get_array_format () const
size_t | get_data_size_bytes () const
ConstPointerTo< GeomVertexArrayDataHandle > | get_handle (Thread *current_thread=Thread::get_current_thread()) const
UpdateSeq | get_modified () const
int | get_num_rows () const
| Returns the number of rows stored in the array, based on the number of bytes and the stride.
virtual TypeHandle | get_type () const
UsageHint | get_usage_hint () const
bool | has_column (const InternalName *name) const
| Returns true if the array has the named column, false otherwise.
bool | is_prepared (PreparedGraphicsObjects *prepared_objects) const
| Returns true if the data has already been prepared or enqueued for preparation on the indicated GSG, false otherwise.
PointerTo< GeomVertexArrayDataHandle > | modify_handle (Thread *current_thread=Thread::get_current_thread())
void | operator= (const GeomVertexArrayData &copy)
| The copy assignment operator is not pipeline-safe.
void | output (std::ostream &out) const
void | prepare (PreparedGraphicsObjects *prepared_objects)
| Indicates that the data should be enqueued to be prepared in the indicated prepared_objects at the beginning of the next frame.
VertexBufferContext * | prepare_now (PreparedGraphicsObjects *prepared_objects, GraphicsStateGuardianBase *gsg)
| Creates a context for the data on the particular GSG, if it does not already exist.
PTA_uchar | read_raw_data (BamReader *manager, DatagramIterator &source)
| Called by CData::fillin to read the raw data of the array from the indicated datagram.
bool | release (PreparedGraphicsObjects *prepared_objects)
| Frees the data context only on the indicated object, if it exists there.
int | release_all ()
| Frees the context allocated on all objects for which the data has been declared.
bool | request_resident (Thread *current_thread=Thread::get_current_thread()) const
| Returns true if the vertex data is currently resident in memory.
bool | reserve_num_rows (int n)
| This ensures that enough memory space for n rows is allocated, so that you may increase the number of rows to n without causing a new memory allocation.
bool | set_num_rows (int n)
| Sets the length of the array to n rows.
void | set_usage_hint (UsageHint usage_hint)
bool | unclean_set_num_rows (int n)
| This method behaves like set_num_rows(), except the new data is not initialized.
void | write (std::ostream &out, int indent_level=0) const
virtual void | write_datagram (BamWriter *manager, Datagram &dg)
| Writes the contents of this object to the datagram for shipping out to a Bam file.
Public Member Functions inherited from CopyOnWriteObject
| CopyOnWriteObject (const CopyOnWriteObject &copy)
void | operator= (const CopyOnWriteObject &copy)
Public Member Functions inherited from CachedTypedWritableReferenceCount
void | cache_ref () const
| Explicitly increments the cache reference count and the normal reference count simultaneously.
void | cache_ref_only () const
| Decrements the cache reference count without affecting the normal reference count.
bool | cache_unref () const
| Explicitly decrements the cache reference count and the normal reference count simultaneously.
int | get_cache_ref_count () const
bool | test_ref_count_integrity () const
| Does some easy checks to make sure that the reference count isn't completely bogus.
Public Member Functions inherited from TypedWritableReferenceCount
| TypedWritableReferenceCount (const TypedWritableReferenceCount &copy)
virtual ReferenceCount * | as_reference_count ()
| Returns the pointer cast to a ReferenceCount pointer, if it is in fact of that type.
void | operator= (const TypedWritableReferenceCount &copy)
Public Member Functions inherited from TypedWritable
| TypedWritable (const TypedWritable &copy)
vector_uchar | encode_to_bam_stream () const
| Converts the TypedWritable object into a single stream of data using a BamWriter, and returns that data as a bytes object.
bool | encode_to_bam_stream (vector_uchar &data, BamWriter *writer=nullptr) const
| Converts the TypedWritable object into a single stream of data using a BamWriter, and stores that data in the indicated string.
UpdateSeq | get_bam_modified () const
| Returns the current bam_modified counter.
void | mark_bam_modified ()
| Increments the bam_modified counter, so that this object will be invalidated and retransmitted on any open bam streams.
void | operator= (const TypedWritable &copy)
virtual bool | require_fully_complete () const
| Some objects require all of their nested pointers to have been completed before the objects themselves can be completed.
virtual void | update_bam_nested (BamWriter *manager)
| Called by the BamWriter when this object has not itself been modified recently, but it should check its nested objects for updates.
Public Member Functions inherited from TypedObject
| TypedObject (const TypedObject &copy)=default
TypedObject * | as_typed_object ()
| Returns the object, upcast (if necessary) to a TypedObject pointer.
const TypedObject * | as_typed_object () const
| Returns the object, upcast (if necessary) to a TypedObject pointer.
int | get_best_parent_from_Set (const std::set< int > &) const
int | get_type_index () const
| Returns the internal index number associated with this object's TypeHandle, a unique number for each different type.
bool | is_exact_type (TypeHandle handle) const
| Returns true if the current object is the indicated type exactly.
bool | is_of_type (TypeHandle handle) const
| Returns true if the current object is or derives from the indicated type.
TypedObject & | operator= (const TypedObject &copy)=default
Public Member Functions inherited from MemoryBase
void | operator delete (void *, void *)
void | operator delete (void *ptr)
void | operator delete[] (void *, void *)
void | operator delete[] (void *ptr)
void * | operator new (size_t size)
void * | operator new (size_t size, void *ptr)
void * | operator new[] (size_t size)
void * | operator new[] (size_t size, void *ptr)
Public Member Functions inherited from ReferenceCount
int | get_ref_count () const
WeakReferenceList * | get_weak_list () const
| Returns the WeakReferenceList associated with this ReferenceCount object.
bool | has_weak_list () const
| Returns true if this particular ReferenceCount object has a WeakReferenceList created, false otherwise.
void | local_object ()
| This function should be called, once, immediately after creating a new instance of some ReferenceCount-derived object on the stack.
void | ref () const
| Explicitly increments the reference count.
bool | ref_if_nonzero () const
| Atomically increases the reference count of this object if it is not zero.
bool | test_ref_count_integrity () const
| Does some easy checks to make sure that the reference count isn't completely bogus.
bool | test_ref_count_nonzero () const
| Does some easy checks to make sure that the reference count isn't zero, or completely bogus.
virtual bool | unref () const
| Explicitly decrements the reference count.
bool | unref_if_one () const
| Atomically decreases the reference count of this object if it is one.
WeakReferenceList * | weak_ref ()
| Adds the indicated PointerToVoid as a weak reference to this object.
void | weak_unref ()
| Removes the indicated PointerToVoid as a weak reference to this object.
Public Member Functions inherited from SimpleLruPage
| SimpleLruPage (const SimpleLruPage &copy)
| SimpleLruPage (size_t lru_size)
void | dequeue_lru ()
| Removes the page from its SimpleLru.
void | enqueue_lru (SimpleLru *lru)
| Adds the page to the LRU for the first time, or marks it recently-accessed if it has already been added.
SimpleLru * | get_lru () const
| Returns the LRU that manages this page, or NULL if it is not currently managed by any LRU.
size_t | get_lru_size () const
| Returns the size of this page as reported to the LRU, presumably in bytes.
void | mark_used_lru () const
| To be called when the page is used; this will move it to the tail of the SimpleLru queue it is already on.
void | mark_used_lru (SimpleLru *lru)
| To be called when the page is used; this will move it to the tail of the specified SimpleLru queue.
void | operator= (const SimpleLruPage &copy)
void | set_lru_size (size_t lru_size)
| Specifies the size of this page, presumably in bytes, although any unit is possible.

## Static Public Member Functions
static VertexDataBook & | get_book ()
| Returns the global VertexDataBook that will be used to allocate vertex data buffers.
static TypeHandle | get_class_type ()
static SimpleLru * | get_independent_lru ()
| Returns a pointer to the global LRU object that manages the GeomVertexArrayData's that have not (yet) been paged out.
static SimpleLru * | get_small_lru ()
| Returns a pointer to the global LRU object that manages the GeomVertexArrayData's that are deemed too small to be paged out.
static void | init_type ()
static void | lru_epoch ()
| Marks that an epoch has passed in each LRU.
static void | register_with_read_factory ()
| Tells the BamReader how to create objects of type GeomVertexArrayData.
Static Public Member Functions inherited from CopyOnWriteObject
static TypeHandle | get_class_type ()
static void | init_type ()
Static Public Member Functions inherited from CachedTypedWritableReferenceCount
static TypeHandle | get_class_type ()
static void | init_type ()
Static Public Member Functions inherited from TypedWritableReferenceCount
static TypeHandle | get_class_type ()
static void | init_type ()
static | PT (TypedWritableReferenceCount) decode_from_bam_stream(vector_uchar data
Static Public Member Functions inherited from TypedWritable
static bool | decode_raw_from_bam_stream (TypedWritable *&ptr, ReferenceCount *&ref_ptr, vector_uchar data, BamReader *reader=nullptr)
| Reads the bytes created by a previous call to encode_to_bam_stream(), and extracts the single object on those bytes.
static TypeHandle | get_class_type ()
static void | init_type ()
Static Public Member Functions inherited from TypedObject
static TypeHandle | get_class_type ()
static void | init_type ()
| This function is declared non-inline to work around a compiler bug in g++ 2.96.
Static Public Member Functions inherited from ReferenceCount
static TypeHandle | get_class_type ()
static void | init_type ()

## Public Attributes
| get_array_format
| Returns the format object that describes this array.
| get_data_size_bytes
| Returns the number of bytes stored in the array.
| get_modified
| Returns a sequence number which is guaranteed to change at least every time the array vertex data is modified.
| get_usage_hint
| Returns the usage hint that describes to the rendering backend how often the vertex data will be modified and/or rendered.
| set_usage_hint
| Changes the UsageHint hint for this array.
Public Attributes inherited from CachedTypedWritableReferenceCount
| get_cache_ref_count
| Returns the current reference count.
Public Attributes inherited from TypedWritableReferenceCount
static BamReader * | reader = nullptr)
Public Attributes inherited from TypedObject
| get_type
Public Attributes inherited from ReferenceCount
| get_ref_count
| Returns the current reference count.

## Friends
class | GeomCacheManager
class | GeomPrimitivePipelineReader
class | GeomVertexArrayDataHandle
class | GeomVertexData
class | PreparedGraphicsObjects

## Additional Inherited Members
Public Types inherited from GeomEnums
enum | AnimationType { AT_none , AT_panda , AT_hardware }
enum | Contents { C_other , C_point , C_clip_point , C_vector , C_texcoord , C_color , C_index , C_morph_delta , C_matrix , C_normal }
enum | GeomRendering { GR_indexed_point = 0x00001 , GR_indexed_other = 0x10000 , GR_indexed_bits = 0x10001 , GR_point = 0x00002 , GR_point_uniform_size = 0x00004 , GR_per_point_size = 0x00008 , GR_point_perspective = 0x00010 , GR_point_aspect_ratio = 0x00020 , GR_point_scale = 0x00040 , GR_point_rotate = 0x00080 , GR_point_sprite = 0x00100 , GR_point_sprite_tex_matrix = 0x00200 , GR_point_bits = 0x003fe , GR_triangle_strip = 0x00400 , GR_triangle_fan = 0x00800 , GR_line_strip = 0x01000 , GR_composite_bits = 0x01c00 , GR_strip_cut_index = 0x20000 , GR_flat_first_vertex = 0x02000 , GR_flat_last_vertex = 0x04000 , GR_shade_model_bits = 0x06000 , GR_render_mode_wireframe = 0x40000 , GR_render_mode_point = 0x80000 , GR_adjacency = 0x100000 }
enum | NumericType { NT_uint8 , NT_uint16 , NT_uint32 , NT_packed_dcba , NT_packed_dabc , NT_float32 , NT_float64 , NT_stdfloat , NT_int8 , NT_int16 , NT_int32 , NT_packed_ufloat }
enum | PrimitiveType { PT_none , PT_polygons , PT_lines , PT_points , PT_patches }
enum | ShadeModel { SM_uniform , SM_smooth , SM_flat_first_vertex , SM_flat_last_vertex }
enum | UsageHint { UH_client , UH_stream , UH_dynamic , UH_static , UH_unspecified }
Static Public Attributes inherited from TypedWritable
static TypedWritable *const | Null = nullptr

## Detailed Description

This is the data for one array of a GeomVertexData structure.

Many GeomVertexData structures will only define one array, with all data elements interleaved (DirectX 8.0 and before insisted on this format); some will define multiple arrays.

DirectX calls this concept of one array a "stream". It also closely correlates with the concept of a vertex buffer.

This object is just a block of data. In general, you should not be directly messing with this object from application code. See GeomVertexData for the organizing structure, and see GeomVertexReader/Writer/Rewriter for high-level tools to manipulate the actual vertex data.

Definition at line 58 of file geomVertexArrayData.h.

## Constructor & Destructor Documentation

## ◆ GeomVertexArrayData() [1/2]

GeomVertexArrayData::GeomVertexArrayData | ( | const GeomVertexArrayFormat * | array_format,
|  | GeomVertexArrayData::UsageHint | usage_hint )
| explicit

Definition at line 81 of file geomVertexArrayData.cxx.

## ◆ GeomVertexArrayData() [2/2]

GeomVertexArrayData::GeomVertexArrayData | ( | const GeomVertexArrayData & | copy | ) |

Definition at line 96 of file geomVertexArrayData.cxx.

## ◆ ~GeomVertexArrayData()

GeomVertexArrayData::~GeomVertexArrayData | ( |  | ) |
| virtual

Definition at line 137 of file geomVertexArrayData.cxx.

## Member Function Documentation

## ◆ clear_rows()

void GeomVertexArrayData::clear_rows | ( |  | ) |
| inline

Removes all of the rows in the array.

Functionally equivalent to set_num_rows(0).

Definition at line 104 of file geomVertexArrayData.I.

## ◆ compare_to()

int GeomVertexArrayData::compare_to | ( | const GeomVertexArrayData & | other | ) | const

Returns 0 if the two arrays are equivalent, even if they are not the same pointer.

Definition at line 146 of file geomVertexArrayData.cxx.

References Thread::get_current_thread.

## ◆ complete_pointers()

int GeomVertexArrayData::complete_pointers | ( | TypedWritable ** | p_list,
|  | BamReader * | manager )
| virtual

Receives an array of pointers, one for each time manager->read_pointer() was called in fillin().

Returns the number of pointers processed.

Reimplemented from TypedWritable.

Definition at line 440 of file geomVertexArrayData.cxx.

References TypedWritable::complete_pointers().

## ◆ evict_lru()

void GeomVertexArrayData::evict_lru | ( |  | ) |
| virtual

Evicts the page from the LRU.

Called internally when the LRU determines that it is full. May also be called externally when necessary to explicitly evict the page.

It is legal for this method to either evict the page as requested, do nothing (in which case the eviction will be requested again at the next epoch), or requeue itself on the tail of the queue (in which case the eviction will be requested again much later).

Reimplemented from SimpleLruPage.

Definition at line 335 of file geomVertexArrayData.cxx.

References SimpleLruPage::dequeue_lru(), and VertexDataBuffer::page_out().

## ◆ finalize()

void GeomVertexArrayData::finalize | ( | BamReader * | manager | ) |
| virtual

Called by the BamReader to perform any final actions needed for setting up the object after all objects have been read and all pointers have been completed.

Reimplemented from TypedWritable.

Definition at line 454 of file geomVertexArrayData.cxx.

References BamReader::change_pointer(), BamReader::get_aux_data(), VertexDataBuffer::get_read_pointer(), VertexDataBuffer::get_size(), VertexDataBuffer::get_write_pointer(), and VertexDataBuffer::swap().

## ◆ force_init_type()

virtual TypeHandle GeomVertexArrayData::force_init_type | ( |  | ) |
| inline virtual

Reimplemented from CopyOnWriteObject.

Definition at line 226 of file geomVertexArrayData.h.

## ◆ get_book()

VertexDataBook & GeomVertexArrayData::get_book | ( |  | ) |
| inline static

Returns the global VertexDataBook that will be used to allocate vertex data buffers.

Definition at line 200 of file geomVertexArrayData.I.

## ◆ get_class_type()

static TypeHandle GeomVertexArrayData::get_class_type | ( |  | ) |
| inline static

Definition at line 214 of file geomVertexArrayData.h.

## ◆ get_independent_lru()

SimpleLru * GeomVertexArrayData::get_independent_lru | ( |  | ) |
| inline static

Returns a pointer to the global LRU object that manages the GeomVertexArrayData's that have not (yet) been paged out.

Definition at line 182 of file geomVertexArrayData.I.

Referenced by GraphicsEngine::render_frame().

## ◆ get_num_rows()

int GeomVertexArrayData::get_num_rows | ( |  | ) | const
| inline

Returns the number of rows stored in the array, based on the number of bytes and the stride.

This should be the same for all arrays within a given GeomVertexData object.

Definition at line 46 of file geomVertexArrayData.I.

References VertexDataBuffer::get_size().

## ◆ get_small_lru()

SimpleLru * GeomVertexArrayData::get_small_lru | ( |  | ) |
| inline static

Returns a pointer to the global LRU object that manages the GeomVertexArrayData's that are deemed too small to be paged out.

Definition at line 191 of file geomVertexArrayData.I.

Referenced by GraphicsEngine::render_frame().

## ◆ get_type()

virtual TypeHandle GeomVertexArrayData::get_type | ( |  | ) | const
| inline virtual

Reimplemented from CopyOnWriteObject.

Definition at line 223 of file geomVertexArrayData.h.

## ◆ has_column()

bool GeomVertexArrayData::has_column | ( | const InternalName * | name | ) | const
| inline

Returns true if the array has the named column, false otherwise.

This is really just a shortcut for asking the same thing from the format.

Definition at line 36 of file geomVertexArrayData.I.

## ◆ init_type()

static void GeomVertexArrayData::init_type | ( |  | ) |
| inline static

Definition at line 217 of file geomVertexArrayData.h.

## ◆ is_prepared()

bool GeomVertexArrayData::is_prepared | ( | PreparedGraphicsObjects * | prepared_objects | ) | const

Returns true if the data has already been prepared or enqueued for preparation on the indicated GSG, false otherwise.

Definition at line 215 of file geomVertexArrayData.cxx.

References PreparedGraphicsObjects::is_vertex_buffer_queued().

## ◆ lru_epoch()

void GeomVertexArrayData::lru_epoch | ( |  | ) |
| static

Marks that an epoch has passed in each LRU.

Asks the LRU's to consider whether they should perform evictions.

Definition at line 318 of file geomVertexArrayData.cxx.

References SimpleLru::begin_epoch(), and VertexDataPage::get_global_lru().

Referenced by GraphicsEngine::render_frame().

## ◆ operator=()

void GeomVertexArrayData::operator= | ( | const GeomVertexArrayData & | copy | ) |

The copy assignment operator is not pipeline-safe.

This will completely obliterate all stages of the pipeline, so don't do it for a GeomVertexArrayData that is actively being used for rendering.

Definition at line 115 of file geomVertexArrayData.cxx.

References Geom::get_next_modified(), and SimpleLruPage::mark_used_lru().

## ◆ output()

void GeomVertexArrayData::output | ( | std::ostream & | out | ) | const
| virtual

Reimplemented from SimpleLruPage.

Definition at line 183 of file geomVertexArrayData.cxx.

## ◆ prepare()

void GeomVertexArrayData::prepare | ( | PreparedGraphicsObjects * | prepared_objects | ) |

Indicates that the data should be enqueued to be prepared in the indicated prepared_objects at the beginning of the next frame.

This will ensure the data is already loaded into the GSG if it is expected to be rendered soon.

Use this function instead of prepare_now() to preload datas from a user interface standpoint.

Definition at line 206 of file geomVertexArrayData.cxx.

References PreparedGraphicsObjects::enqueue_vertex_buffer().

## ◆ prepare_now()

VertexBufferContext * GeomVertexArrayData::prepare_now | ( | PreparedGraphicsObjects * | prepared_objects,
|  | GraphicsStateGuardianBase * | gsg )

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.

Definition at line 239 of file geomVertexArrayData.cxx.

References PreparedGraphicsObjects::prepare_vertex_buffer_now().

Referenced by PreparedGraphicsObjects::begin_frame().

## ◆ read_raw_data()

PTA_uchar GeomVertexArrayData::read_raw_data | ( | BamReader * | manager,
|  | DatagramIterator & | source )

Called by CData::fillin to read the raw data of the array from the indicated datagram.

Definition at line 424 of file geomVertexArrayData.cxx.

References DatagramIterator::get_current_index(), Datagram::get_data(), DatagramIterator::get_datagram(), DatagramIterator::get_uint32(), and DatagramIterator::skip_bytes().

## ◆ register_with_read_factory()

void GeomVertexArrayData::register_with_read_factory | ( |  | ) |
| static

Tells the BamReader how to create objects of type GeomVertexArrayData.

Definition at line 403 of file geomVertexArrayData.cxx.

References BamReader::get_factory(), and Factory< Type >::register_factory().

## ◆ release()

bool GeomVertexArrayData::release | ( | PreparedGraphicsObjects * | prepared_objects | ) |

Frees the data context only on the indicated object, if it exists there.

Returns true if it was released, false if it had not been prepared.

Definition at line 267 of file geomVertexArrayData.cxx.

References PreparedGraphicsObjects::dequeue_vertex_buffer(), and PreparedGraphicsObjects::release_vertex_buffer().

## ◆ release_all()

int GeomVertexArrayData::release_all | ( |  | ) |

Frees the context allocated on all objects for which the data has been declared.

Returns the number of contexts which have been freed.

Definition at line 287 of file geomVertexArrayData.cxx.

References PreparedGraphicsObjects::release_vertex_buffer().

## ◆ request_resident()

bool GeomVertexArrayData::request_resident | ( | Thread * | current_thread = Thread::get_current_thread() | ) | const
| inline

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.

Definition at line 134 of file geomVertexArrayData.I.

References ReMutexDirect::acquire(), VertexDataBuffer::get_read_pointer(), ReMutexDirect::release(), and unref_delete().

## ◆ reserve_num_rows()

bool GeomVertexArrayData::reserve_num_rows | ( | int | n | ) |
| inline

This ensures that enough memory space for n rows is allocated, so that you may increase the number of rows to n without causing a new memory allocation.

This is a performance optimization only; it is especially useful when you know ahead of time that you will be adding n rows to the data.

Definition at line 95 of file geomVertexArrayData.I.

## ◆ set_num_rows()

bool GeomVertexArrayData::set_num_rows | ( | int | n | ) |
| inline

Sets the length of the array to n rows.

Normally, you would not call this directly, since all of the arrays in a particular GeomVertexData must have the same number of rows; instead, call GeomVertexData::set_num_rows().

The return value is true if the number of rows was changed, false if the object already contained n rows (or if there was some error).

The new vertex data is initialized to 0, including the "color" column (but see GeomVertexData::set_num_rows()).

Don't call this in a downstream thread unless you don't mind it blowing away other changes you might have recently made in an upstream thread.

Definition at line 69 of file geomVertexArrayData.I.

## ◆ unclean_set_num_rows()

bool GeomVertexArrayData::unclean_set_num_rows | ( | int | n | ) |
| inline

This method behaves like set_num_rows(), except the new data is not initialized.

Furthermore, after this call, *any* of the data in the GeomVertexArrayData may be uninitialized, including the earlier rows.

Normally, you would not call this directly, since all of the arrays in a particular GeomVertexData must have the same number of rows; instead, call GeomVertexData::unclean_set_num_rows().

Definition at line 83 of file geomVertexArrayData.I.

## ◆ write()

void GeomVertexArrayData::write | ( | std::ostream & | out,
|  | int | indent_level = 0 ) const
| virtual

Reimplemented from SimpleLruPage.

Definition at line 192 of file geomVertexArrayData.cxx.

## ◆ write_datagram()

void GeomVertexArrayData::write_datagram | ( | BamWriter * | manager,
|  | Datagram & | dg )
| virtual

Writes the contents of this object to the datagram for shipping out to a Bam file.

Reimplemented from TypedWritable.

Definition at line 412 of file geomVertexArrayData.cxx.

References BamWriter::write_cdata(), TypedWritable::write_datagram(), and BamWriter::write_pointer().

## Friends And Related Symbol Documentation

## ◆ GeomCacheManager

friend class GeomCacheManager
| friend

Definition at line 231 of file geomVertexArrayData.h.

## ◆ GeomPrimitivePipelineReader

friend class GeomPrimitivePipelineReader
| friend

Definition at line 235 of file geomVertexArrayData.h.

## ◆ GeomVertexArrayDataHandle

friend class GeomVertexArrayDataHandle
| friend

Definition at line 234 of file geomVertexArrayData.h.

## ◆ GeomVertexData

friend class GeomVertexData
| friend

Definition at line 232 of file geomVertexArrayData.h.

## ◆ PreparedGraphicsObjects

friend class PreparedGraphicsObjects
| friend

Definition at line 233 of file geomVertexArrayData.h.

## Member Data Documentation

## ◆ get_array_format

const GeomVertexArrayFormat * GeomVertexArrayData::get_array_format
| inline

Returns the format object that describes this array.

Definition at line 76 of file geomVertexArrayData.h.

Referenced by GeomPrimitive::set_vertices().

## ◆ get_data_size_bytes

size_t GeomVertexArrayData::get_data_size_bytes
| inline

Returns the number of bytes stored in the array.

Definition at line 92 of file geomVertexArrayData.h.

Referenced by PreparedGraphicsObjects::release_vertex_buffer(), and SceneGraphAnalyzer::write().

## ◆ get_modified

UpdateSeq GeomVertexArrayData::get_modified
| inline

Returns a sequence number which is guaranteed to change at least every time the array vertex data is modified.

Definition at line 93 of file geomVertexArrayData.h.

## ◆ get_usage_hint

GeomVertexArrayData::UsageHint GeomVertexArrayData::get_usage_hint
| inline

Returns the usage hint that describes to the rendering backend how often the vertex data will be modified and/or rendered.

See geomEnums.h.

Definition at line 80 of file geomVertexArrayData.h.

Referenced by GeomPrimitive::finalize(), and PreparedGraphicsObjects::release_vertex_buffer().

## ◆ set_usage_hint

void GeomVertexArrayData::set_usage_hint

Changes the UsageHint hint for this array.

See get_usage_hint().

Don't call this in a downstream thread unless you don't mind it blowing away other changes you might have recently made in an upstream thread.

Definition at line 80 of file geomVertexArrayData.h.

The documentation for this class was generated from the following files:

- panda/src/gobj/geomVertexArrayData.h
- panda/src/gobj/geomVertexArrayData.cxx
- panda/src/gobj/geomVertexArrayData.I