# VertexDataBlock

from pandac.PandaModules import VertexDataBlock

Class : VertexDataBlock
Description : A block of bytes that stores the actual raw vertex data referenced by a GeomVertexArrayData object.

## Inheritance:

VertexDataBlock: SimpleAllocatorBlock ReferenceCount
SimpleAllocatorBlock: LinkedListNode
LinkedListNode:
ReferenceCount: MemoryBase
MemoryBase:

## Methods of VertexDataBlock:

getNextBlock
getPage

## Methods of SimpleAllocatorBlock:

free
getAllocator
getMaxSize
getNextBlock
getSize
getStart
isFree
output
realloc

## Methods of ReferenceCount:

getClassType
getRefCount
ref
testRefCountIntegrity
testRefCountNonzero
unref

getNextBlock VertexDataBlock *VertexDataBlock::get_next_block(void) const; Description: Returns a pointer to the next allocated block in the chain, or NULL if there are no more allocated blocks.

getPage VertexDataPage *VertexDataBlock::get_page(void) const; Description: Returns the page from which this buffer was allocated.

free void SimpleAllocatorBlock::free(void); Description: Releases the allocated space.

getAllocator SimpleAllocator *SimpleAllocatorBlock::get_allocator(void) const; Description: Returns the SimpleAllocator object that owns this block. Returns NULL if the block has been freed.

getMaxSize unsigned int SimpleAllocatorBlock::get_max_size(void) const; Description: Returns the maximum size this block can be reallocated to, as limited by the following block.

getNextBlock SimpleAllocatorBlock *SimpleAllocatorBlock::get_next_block(void) const; Description: Returns a pointer to the next allocated block in the chain, or NULL if there are no more allocated blocks.

getSize unsigned int SimpleAllocatorBlock::get_size(void) const; Description: Returns the size of this block. It is an error to call this if the block has been freed.

getStart unsigned int SimpleAllocatorBlock::get_start(void) const; Description: Returns the starting point of this block. It is an error to call this if the block has been freed.

isFree bool SimpleAllocatorBlock::is_free(void) const; Description: Returns true if the block has been freed, false if it is still valid.

output void SimpleAllocatorBlock::output(ostream &out) const; Description:

realloc bool SimpleAllocatorBlock::realloc(unsigned int size); Description: Changes the size of this block to the specified size. Returns true if the change is accepted, false if there was not enough room.

getClassType static TypeHandle ReferenceCount::get_class_type(void); Undocumented function.

getRefCount int ReferenceCount::get_ref_count(void) const; Description: Returns the current reference count.

ref void ReferenceCount::ref(void) const; Description: Explicitly increments the reference count. User code should avoid using ref() and unref() directly, which can result in missed reference counts. Instead, let a PointerTo object manage the reference counting automatically. This function is const, even though it changes the object, because generally fiddling with an object's reference count isn't considered part of fiddling with the object. An object might be const in other ways, but we still need to accurately count the number of references to it.

testRefCountIntegrity bool ReferenceCount::test_ref_count_integrity(void) const; Description: Does some easy checks to make sure that the reference count isn't completely bogus. Returns true if ok, false otherwise.

testRefCountNonzero bool ReferenceCount::test_ref_count_nonzero(void) const; Description: Does some easy checks to make sure that the reference count isn't zero, or completely bogus. Returns true if ok, false otherwise.

unref bool ReferenceCount::unref(void) const; Description: Explicitly decrements the reference count. Note that the object will not be implicitly deleted by unref() simply because the reference count drops to zero. (Having a member function delete itself is problematic; plus, we don't have a virtual destructor anyway.) However, see the helper function unref_delete(). User code should avoid using ref() and unref() directly, which can result in missed reference counts. Instead, let a PointerTo object manage the reference counting automatically. This function is const, even though it changes the object, because generally fiddling with an object's reference count isn't considered part of fiddling with the object. An object might be const in other ways, but we still need to accurately count the number of references to it. The return value is true if the new reference count is nonzero, false if it is zero.