A block of bytes that stores the actual raw vertex data referenced by a GeomVertexArrayData object. More...
#include "vertexDataBlock.h"
Public Member Functions | |
VertexDataBlock * | get_next_block () const |
Returns a pointer to the next allocated block in the chain, or NULL if there are no more allocated blocks. More... | |
VertexDataPage * | get_page () const |
Returns the page from which this buffer was allocated. More... | |
unsigned char * | get_pointer (bool force) const |
Returns a pointer to the start of the allocated memory for this buffer, or NULL if the data is not currently resident. More... | |
![]() | |
~SimpleAllocatorBlock () | |
The block automatically frees itself when it destructs. More... | |
void | free () |
Releases the allocated space. More... | |
SimpleAllocator * | get_allocator () const |
Returns the SimpleAllocator object that owns this block. More... | |
size_t | get_max_size () const |
Returns the maximum size this block can be reallocated to, as limited by the following block. More... | |
SimpleAllocatorBlock * | get_next_block () const |
Returns a pointer to the next allocated block in the chain, or NULL if there are no more allocated blocks. More... | |
size_t | get_size () const |
Returns the size of this block. More... | |
size_t | get_start () const |
Returns the starting point of this block. More... | |
bool | is_free () const |
Returns true if the block has been freed, false if it is still valid. More... | |
void | output (ostream &out) const |
bool | realloc (size_t size) |
Changes the size of this block to the specified size. More... | |
![]() | |
int | get_ref_count () const |
Returns the current reference count. More... | |
WeakReferenceList * | get_weak_list () const |
Returns the WeakReferenceList associated with this ReferenceCount object. More... | |
bool | has_weak_list () const |
Returns true if this particular ReferenceCount object has a WeakReferenceList created, false otherwise. More... | |
void | local_object () |
This function should be called, once, immediately after creating a new instance of some ReferenceCount-derived object on the stack. More... | |
void | ref () const |
Explicitly increments the reference count. More... | |
bool | test_ref_count_integrity () const |
Does some easy checks to make sure that the reference count isn't completely bogus. More... | |
bool | test_ref_count_nonzero () const |
Does some easy checks to make sure that the reference count isn't zero, or completely bogus. More... | |
virtual bool | unref () const |
Explicitly decrements the reference count. More... | |
void | weak_ref (WeakPointerToVoid *ptv) |
Adds the indicated PointerToVoid as a weak reference to this object. More... | |
void | weak_unref (WeakPointerToVoid *ptv) |
Removes the indicated PointerToVoid as a weak reference to this object. More... | |
Friends | |
class | VertexDataPage |
Additional Inherited Members | |
![]() | |
static TypeHandle | get_class_type () |
static void | init_type () |
A block of bytes that stores the actual raw vertex data referenced by a GeomVertexArrayData object.
Definition at line 31 of file vertexDataBlock.h.
|
inline |
Returns a pointer to the next allocated block in the chain, or NULL if there are no more allocated blocks.
Definition at line 68 of file vertexDataBlock.I.
References SimpleAllocatorBlock::get_next_block().
|
inline |
Returns the page from which this buffer was allocated.
Definition at line 34 of file vertexDataBlock.I.
References SimpleAllocatorBlock::get_allocator().
Referenced by get_pointer().
|
inline |
Returns a pointer to the start of the allocated memory for this buffer, or NULL if the data is not currently resident.
If the data is not currently resident, this will implicitly request it to become resident soon.
If force is true, this method will never return NULL, but may block until the data is available.
Definition at line 51 of file vertexDataBlock.I.
References get_page(), VertexDataPage::get_page_data(), and SimpleAllocatorBlock::get_start().