GeomVertexData

from panda3d.core import GeomVertexData
class GeomVertexData

Bases: CopyOnWriteObject, GeomEnums

This defines the actual numeric vertex data stored in a Geom, in the structure defined by a particular GeomVertexFormat object.

The data consists of one or more arrays, each of which in turn consists of a series of rows, one per vertex. All arrays should have the same number of rows; each vertex is defined by the column data from a particular row across all arrays.

Often, there will be only one array per Geom, and the various columns defined in the GeomVertexFormat will be interleaved within that array. However, it is also possible to have multiple different arrays, with a certain subset of the total columns defined in each array.

However the data is distributed, the effect is of a single table of vertices, where each vertex is represented by one row of the table.

In general, application code should not attempt to directly manipulate the vertex data through this structure; instead, use the GeomVertexReader, GeomVertexWriter, and GeomVertexRewriter objects to read and write vertex data at a high level.

Inheritance diagram

Inheritance diagram of GeomVertexData

__init__(*args, **kwargs)
animateVertices()

C++ Interface: animate_vertices(GeomVertexData self, bool force, Thread current_thread)

/**
  • Returns a GeomVertexData that represents the results of computing the

  • vertex animation on the CPU for this GeomVertexData.

  • If there is no CPU-defined vertex animation on this object, this just

  • returns the original object.

  • If there is vertex animation, but the VertexTransform values have not

  • changed since last time, this may return the same pointer it returned

  • previously. Even if the VertexTransform values have changed, it may still

  • return the same pointer, but with its contents modified (this is preferred,

  • since it allows the graphics backend to update vertex buffers optimally).

  • If force is false, this method may return immediately with stale data, if

  • the vertex data is not completely resident. If force is true, this method

  • will never return stale data, but may block until the data is available.

*/

animate_vertices()

C++ Interface: animate_vertices(GeomVertexData self, bool force, Thread current_thread)

/**
  • Returns a GeomVertexData that represents the results of computing the

  • vertex animation on the CPU for this GeomVertexData.

  • If there is no CPU-defined vertex animation on this object, this just

  • returns the original object.

  • If there is vertex animation, but the VertexTransform values have not

  • changed since last time, this may return the same pointer it returned

  • previously. Even if the VertexTransform values have changed, it may still

  • return the same pointer, but with its contents modified (this is preferred,

  • since it allows the graphics backend to update vertex buffers optimally).

  • If force is false, this method may return immediately with stale data, if

  • the vertex data is not completely resident. If force is true, this method

  • will never return stale data, but may block until the data is available.

*/

arrays
clearAnimatedVertices()

C++ Interface: clear_animated_vertices(const GeomVertexData self)

/**
  • Removes the cache of animated vertices computed by a previous call to

  • animate_vertices() within the same frame. This will force the next call to

  • animate_vertices() to recompute these values from scratch. Normally it is

  • not necessary to call this.

*/

clearCache()

C++ Interface: clear_cache(const GeomVertexData self)

/**
  • Removes all of the previously-cached results of convert_to().

  • This blows away the entire cache, upstream and downstream the pipeline.

  • Use clear_cache_stage() instead if you only want to blow away the cache at

  • the current stage and upstream.

*/

clearCacheStage()

C++ Interface: clear_cache_stage(const GeomVertexData self)

/**
  • Removes all of the previously-cached results of convert_to(), at the

  • current pipeline stage and upstream. Does not affect the downstream cache.

  • 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.

*/

clearRows()

C++ Interface: clear_rows(const GeomVertexData self)

/**
  • Removes all of the rows from the arrays; functionally equivalent to

  • set_num_rows(0) (but faster).

  • 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.

*/

clearSliderTable()

C++ Interface: clear_slider_table(const GeomVertexData self)

/**
  • Sets the SliderTable pointer to NULL, removing the table from the vertex

  • data. This disables morph (blend shape) animation.

*/

clearTransformBlendTable()

C++ Interface: clear_transform_blend_table(const GeomVertexData self)

/**
  • Sets the TransformBlendTable pointer to NULL, removing the table from the

  • vertex data. This disables CPU-driven vertex animation.

*/

clearTransformTable()

C++ Interface: clear_transform_table(const GeomVertexData self)

/**
  • Sets the TransformTable pointer to NULL, removing the table from the vertex

  • data. This disables hardware-driven vertex animation.

*/

clear_animated_vertices()

C++ Interface: clear_animated_vertices(const GeomVertexData self)

/**
  • Removes the cache of animated vertices computed by a previous call to

  • animate_vertices() within the same frame. This will force the next call to

  • animate_vertices() to recompute these values from scratch. Normally it is

  • not necessary to call this.

*/

clear_cache()

C++ Interface: clear_cache(const GeomVertexData self)

/**
  • Removes all of the previously-cached results of convert_to().

  • This blows away the entire cache, upstream and downstream the pipeline.

  • Use clear_cache_stage() instead if you only want to blow away the cache at

  • the current stage and upstream.

*/

clear_cache_stage()

C++ Interface: clear_cache_stage(const GeomVertexData self)

/**
  • Removes all of the previously-cached results of convert_to(), at the

  • current pipeline stage and upstream. Does not affect the downstream cache.

  • 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.

*/

clear_rows()

C++ Interface: clear_rows(const GeomVertexData self)

/**
  • Removes all of the rows from the arrays; functionally equivalent to

  • set_num_rows(0) (but faster).

  • 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.

*/

clear_slider_table()

C++ Interface: clear_slider_table(const GeomVertexData self)

/**
  • Sets the SliderTable pointer to NULL, removing the table from the vertex

  • data. This disables morph (blend shape) animation.

*/

clear_transform_blend_table()

C++ Interface: clear_transform_blend_table(const GeomVertexData self)

/**
  • Sets the TransformBlendTable pointer to NULL, removing the table from the

  • vertex data. This disables CPU-driven vertex animation.

*/

clear_transform_table()

C++ Interface: clear_transform_table(const GeomVertexData self)

/**
  • Sets the TransformTable pointer to NULL, removing the table from the vertex

  • data. This disables hardware-driven vertex animation.

*/

compareTo()

C++ Interface: compare_to(GeomVertexData self, const GeomVertexData other)

/**
  • Returns 0 if the two objects are equivalent, even if they are not the same

  • pointer.

*/

compare_to()

C++ Interface: compare_to(GeomVertexData self, const GeomVertexData other)

/**
  • Returns 0 if the two objects are equivalent, even if they are not the same

  • pointer.

*/

convertTo()

C++ Interface: convert_to(GeomVertexData self, const GeomVertexFormat new_format)

/**
  • Returns a new GeomVertexData that represents the same contents as this one,

  • with all data types matched up name-by-name to the indicated new format.

*/

convert_to()

C++ Interface: convert_to(GeomVertexData self, const GeomVertexFormat new_format)

/**
  • Returns a new GeomVertexData that represents the same contents as this one,

  • with all data types matched up name-by-name to the indicated new format.

*/

copyFrom()

C++ Interface: copy_from(const GeomVertexData self, const GeomVertexData source, bool keep_data_objects, Thread current_thread)

/**
  • Copies all the data from the other array into the corresponding data types

  • in this array, by matching data types name-by-name.

  • keep_data_objects specifies what to do when one or more of the arrays can

  • be copied without the need to apply any conversion operation. If it is

  • true, the original GeomVertexArrayData objects in this object are retained,

  • and their data arrays are copied byte-by-byte from the source; if it is

  • false, then the GeomVertexArrayData objects are copied pointerwise from the

  • source.

  • 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.

*/

copyRowFrom()

C++ Interface: copy_row_from(const GeomVertexData self, int dest_row, const GeomVertexData source, int source_row, Thread current_thread)

/**
  • Copies a single row of the data from the other array into the indicated row

  • of this array. In this case, the source format must exactly match the

  • destination format.

  • 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.

*/

copy_from()

C++ Interface: copy_from(const GeomVertexData self, const GeomVertexData source, bool keep_data_objects, Thread current_thread)

/**
  • Copies all the data from the other array into the corresponding data types

  • in this array, by matching data types name-by-name.

  • keep_data_objects specifies what to do when one or more of the arrays can

  • be copied without the need to apply any conversion operation. If it is

  • true, the original GeomVertexArrayData objects in this object are retained,

  • and their data arrays are copied byte-by-byte from the source; if it is

  • false, then the GeomVertexArrayData objects are copied pointerwise from the

  • source.

  • 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.

*/

copy_row_from()

C++ Interface: copy_row_from(const GeomVertexData self, int dest_row, const GeomVertexData source, int source_row, Thread current_thread)

/**
  • Copies a single row of the data from the other array into the indicated row

  • of this array. In this case, the source format must exactly match the

  • destination format.

  • 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.

*/

describeVertex()

C++ Interface: describe_vertex(GeomVertexData self, ostream out, int row)

/**
  • Writes a verbose, human-friendly description of the indicated vertex

  • number.

*/

describe_vertex()

C++ Interface: describe_vertex(GeomVertexData self, ostream out, int row)

/**
  • Writes a verbose, human-friendly description of the indicated vertex

  • number.

*/

format
getArray()

C++ Interface: get_array(GeomVertexData self, int i)

/**
  • Returns a const pointer to the vertex data for the indicated array, for

  • application code to directly examine (but not modify) the underlying vertex

  • data.

*/

getArrayHandle()

C++ Interface: get_array_handle(GeomVertexData self, int i)

/**
  • Equivalent to get_array(i).get_handle().

*/

getArrays()
getClassType()

C++ Interface: get_class_type()

getFormat()

C++ Interface: get_format(GeomVertexData self)

/**
  • Returns a pointer to the GeomVertexFormat structure that defines this data.

*/

getModified()

C++ Interface: get_modified(GeomVertexData self, Thread current_thread)

/**
  • Returns a sequence number which is guaranteed to change at least every time

  • the vertex data is modified.

*/

getName()

C++ Interface: get_name(GeomVertexData self)

/**
  • Returns the name passed to the constructor, if any. This name is reported

  • on the PStats graph for vertex computations.

*/

getNumArrays()

C++ Interface: get_num_arrays(GeomVertexData self)

/**
  • Returns the number of individual arrays stored within the data. This must

  • match get_format()->get_num_arrays().

*/

getNumBytes()

C++ Interface: get_num_bytes(GeomVertexData self)

/**
  • Returns the total number of bytes consumed by the different arrays of the

  • vertex data.

*/

getNumRows()

C++ Interface: get_num_rows(GeomVertexData self)

/**
  • Returns the number of rows stored within all the arrays. All arrays store

  • data for the same n rows.

*/

getSliderTable()

C++ Interface: get_slider_table(GeomVertexData self)

/**
  • Returns a const pointer to the SliderTable assigned to this data. Vertices

  • within the vertex data will look up their morph offsets, if any, within

  • this table.

  • This will return NULL if the vertex data does not have a SliderTable

  • assigned.

*/

getTransformBlendTable()

C++ Interface: get_transform_blend_table(GeomVertexData self)

/**
  • Returns a const pointer to the TransformBlendTable assigned to this data.

  • Vertices within the table will index into this table to indicate their

  • dynamic skinning information; this table is used when the vertex animation

  • is to be performed by the CPU (but also see get_transform_table()).

  • This will return NULL if the vertex data does not have a

  • TransformBlendTable assigned (which implies the vertices will not be

  • animated by the CPU).

*/

getTransformTable()

C++ Interface: get_transform_table(GeomVertexData self)

/**
  • Returns a const pointer to the TransformTable assigned to this data.

  • Vertices within the table will index into this table to indicate their

  • dynamic skinning information; this table is used when the vertex animation

  • is to be performed by the graphics hardware (but also see

  • get_transform_blend_table()).

  • This will return NULL if the vertex data does not have a TransformTable

  • assigned (which implies the vertices will not be animated by the graphics

  • hardware).

*/

getUsageHint()

C++ Interface: get_usage_hint(GeomVertexData self)

/**
  • Returns the usage hint that was passed to the constructor, and which will

  • be passed to each array data object created initially, and arrays created

  • as the result of a convert_to() operation. See geomEnums.h.

  • However, each individual array may be replaced with a different array

  • object with an independent usage hint specified, so there is no guarantee

  • that the individual arrays all have the same usage_hint.

*/

get_array()

C++ Interface: get_array(GeomVertexData self, int i)

/**
  • Returns a const pointer to the vertex data for the indicated array, for

  • application code to directly examine (but not modify) the underlying vertex

  • data.

*/

get_array_handle()

C++ Interface: get_array_handle(GeomVertexData self, int i)

/**
  • Equivalent to get_array(i).get_handle().

*/

get_arrays()
get_class_type()

C++ Interface: get_class_type()

get_format()

C++ Interface: get_format(GeomVertexData self)

/**
  • Returns a pointer to the GeomVertexFormat structure that defines this data.

*/

get_modified()

C++ Interface: get_modified(GeomVertexData self, Thread current_thread)

/**
  • Returns a sequence number which is guaranteed to change at least every time

  • the vertex data is modified.

*/

get_name()

C++ Interface: get_name(GeomVertexData self)

/**
  • Returns the name passed to the constructor, if any. This name is reported

  • on the PStats graph for vertex computations.

*/

get_num_arrays()

C++ Interface: get_num_arrays(GeomVertexData self)

/**
  • Returns the number of individual arrays stored within the data. This must

  • match get_format()->get_num_arrays().

*/

get_num_bytes()

C++ Interface: get_num_bytes(GeomVertexData self)

/**
  • Returns the total number of bytes consumed by the different arrays of the

  • vertex data.

*/

get_num_rows()

C++ Interface: get_num_rows(GeomVertexData self)

/**
  • Returns the number of rows stored within all the arrays. All arrays store

  • data for the same n rows.

*/

get_slider_table()

C++ Interface: get_slider_table(GeomVertexData self)

/**
  • Returns a const pointer to the SliderTable assigned to this data. Vertices

  • within the vertex data will look up their morph offsets, if any, within

  • this table.

  • This will return NULL if the vertex data does not have a SliderTable

  • assigned.

*/

get_transform_blend_table()

C++ Interface: get_transform_blend_table(GeomVertexData self)

/**
  • Returns a const pointer to the TransformBlendTable assigned to this data.

  • Vertices within the table will index into this table to indicate their

  • dynamic skinning information; this table is used when the vertex animation

  • is to be performed by the CPU (but also see get_transform_table()).

  • This will return NULL if the vertex data does not have a

  • TransformBlendTable assigned (which implies the vertices will not be

  • animated by the CPU).

*/

get_transform_table()

C++ Interface: get_transform_table(GeomVertexData self)

/**
  • Returns a const pointer to the TransformTable assigned to this data.

  • Vertices within the table will index into this table to indicate their

  • dynamic skinning information; this table is used when the vertex animation

  • is to be performed by the graphics hardware (but also see

  • get_transform_blend_table()).

  • This will return NULL if the vertex data does not have a TransformTable

  • assigned (which implies the vertices will not be animated by the graphics

  • hardware).

*/

get_usage_hint()

C++ Interface: get_usage_hint(GeomVertexData self)

/**
  • Returns the usage hint that was passed to the constructor, and which will

  • be passed to each array data object created initially, and arrays created

  • as the result of a convert_to() operation. See geomEnums.h.

  • However, each individual array may be replaced with a different array

  • object with an independent usage hint specified, so there is no guarantee

  • that the individual arrays all have the same usage_hint.

*/

hasColumn()

C++ Interface: has_column(GeomVertexData self, const InternalName name)

/**
  • Returns true if the data has the named column, false otherwise. This is

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

*/

has_column()

C++ Interface: has_column(GeomVertexData self, const InternalName name)

/**
  • Returns true if the data has the named column, false otherwise. This is

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

*/

insertArray()

C++ Interface: insert_array(const GeomVertexData self, int i, const GeomVertexArrayData array)

/**
  • Inserts the indicated vertex data array into the list of arrays, which also

  • modifies the format. You should be careful that the new array has the same

  • number of rows as the vertex data.

  • 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.

*/

insert_array()

C++ Interface: insert_array(const GeomVertexData self, int i, const GeomVertexArrayData array)

/**
  • Inserts the indicated vertex data array into the list of arrays, which also

  • modifies the format. You should be careful that the new array has the same

  • number of rows as the vertex data.

  • 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.

*/

modified
modifyArray()

C++ Interface: modify_array(const GeomVertexData self, int i)

/**
  • Returns a modifiable pointer to the indicated vertex array, so that

  • application code may directly manipulate the data. You should avoid

  • changing the length of this array, since all of the arrays should be kept

  • in sync–use set_num_rows() instead.

  • 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.

*/

modifyArrayHandle()

C++ Interface: modify_array_handle(const GeomVertexData self, int i)

/**
  • Equivalent to modify_array(i).modify_handle().

*/

modifyTransformBlendTable()

C++ Interface: modify_transform_blend_table(const GeomVertexData self)

/**
  • Returns a modifiable pointer to the current TransformBlendTable on this

  • vertex data, if any, or NULL if there is not a TransformBlendTable. See

  • get_transform_blend_table().

  • 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.

*/

modify_array()

C++ Interface: modify_array(const GeomVertexData self, int i)

/**
  • Returns a modifiable pointer to the indicated vertex array, so that

  • application code may directly manipulate the data. You should avoid

  • changing the length of this array, since all of the arrays should be kept

  • in sync–use set_num_rows() instead.

  • 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.

*/

modify_array_handle()

C++ Interface: modify_array_handle(const GeomVertexData self, int i)

/**
  • Equivalent to modify_array(i).modify_handle().

*/

modify_transform_blend_table()

C++ Interface: modify_transform_blend_table(const GeomVertexData self)

/**
  • Returns a modifiable pointer to the current TransformBlendTable on this

  • vertex data, if any, or NULL if there is not a TransformBlendTable. See

  • get_transform_blend_table().

  • 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.

*/

name
num_bytes
output()

C++ Interface: output(GeomVertexData self, ostream out)

/**

*/

removeArray()

C++ Interface: remove_array(const GeomVertexData self, int i)

/**
  • Removes the array with the given index from the GeomVertexData.

*/

remove_array()

C++ Interface: remove_array(const GeomVertexData self, int i)

/**
  • Removes the array with the given index from the GeomVertexData.

*/

replaceColumn()

C++ Interface: replace_column(GeomVertexData self, InternalName name, int num_components, int numeric_type, int contents)

/**
  • Returns a new GeomVertexData object, suitable for modification, with the

  • indicated data type replaced with a new table filled with undefined values.

  • The new table will be added as a new array; if the old table was

  • interleaved with a previous array, the previous array will not be repacked.

  • If num_components is 0, the indicated name is simply removed from the type,

  • without replacing it with anything else.

*/

replace_column()

C++ Interface: replace_column(GeomVertexData self, InternalName name, int num_components, int numeric_type, int contents)

/**
  • Returns a new GeomVertexData object, suitable for modification, with the

  • indicated data type replaced with a new table filled with undefined values.

  • The new table will be added as a new array; if the old table was

  • interleaved with a previous array, the previous array will not be repacked.

  • If num_components is 0, the indicated name is simply removed from the type,

  • without replacing it with anything else.

*/

requestResident()

C++ Interface: request_resident(GeomVertexData self)

/**
  • Returns true if the vertex data is currently resident in memory. If this

  • returns false, the vertex data will be brought back into memory shortly;

  • try again later.

*/

request_resident()

C++ Interface: request_resident(GeomVertexData self)

/**
  • Returns true if the vertex data is currently resident in memory. If this

  • returns false, the vertex data will be brought back into memory shortly;

  • try again later.

*/

reserveNumRows()

C++ Interface: reserve_num_rows(const GeomVertexData self, 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. 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.

  • If you know exactly how many rows you will be needing, it is significantly

  • faster to use set_num_rows() or unclean_set_num_rows() instead.

*/

reserve_num_rows()

C++ Interface: reserve_num_rows(const GeomVertexData self, 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. 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.

  • If you know exactly how many rows you will be needing, it is significantly

  • faster to use set_num_rows() or unclean_set_num_rows() instead.

*/

reverseNormals()

C++ Interface: reverse_normals(GeomVertexData self)

/**
  • Returns a new GeomVertexData object with the normal data modified in-place,

  • so that each lighting normal is now facing in the opposite direction.

  • If the vertex data does not include a normal column, this returns the

  • original GeomVertexData object, unchanged.

*/

reverse_normals()

C++ Interface: reverse_normals(GeomVertexData self)

/**
  • Returns a new GeomVertexData object with the normal data modified in-place,

  • so that each lighting normal is now facing in the opposite direction.

  • If the vertex data does not include a normal column, this returns the

  • original GeomVertexData object, unchanged.

*/

scaleColor()

C++ Interface: scale_color(GeomVertexData self, const LVecBase4f color_scale) scale_color(GeomVertexData self, const LVecBase4f color_scale, int num_components, int numeric_type, int contents)

/**
  • Returns a new GeomVertexData object with the color table modified in-place

  • to apply the indicated scale.

  • If the vertex data does not include a color column, a new one will not be

  • added.

*/

/**
  • Returns a new GeomVertexData object with the color table replaced with a

  • new color table that has been scaled by the indicated value. The new color

  • table will be added as a new array; if the old color table was interleaved

  • with a previous array, the previous array will not be repacked.

*/

scale_color()

C++ Interface: scale_color(GeomVertexData self, const LVecBase4f color_scale) scale_color(GeomVertexData self, const LVecBase4f color_scale, int num_components, int numeric_type, int contents)

/**
  • Returns a new GeomVertexData object with the color table modified in-place

  • to apply the indicated scale.

  • If the vertex data does not include a color column, a new one will not be

  • added.

*/

/**
  • Returns a new GeomVertexData object with the color table replaced with a

  • new color table that has been scaled by the indicated value. The new color

  • table will be added as a new array; if the old color table was interleaved

  • with a previous array, the previous array will not be repacked.

*/

setArray()

C++ Interface: set_array(const GeomVertexData self, int i, const GeomVertexArrayData array)

/**
  • Replaces the indicated vertex data array with a completely new array. You

  • should be careful that the new array has the same length and format as the

  • old one, unless you know what you are doing.

  • 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.

*/

setColor()

C++ Interface: set_color(GeomVertexData self, const LVecBase4f color) set_color(GeomVertexData self, const LVecBase4f color, int num_components, int numeric_type, int contents)

/**
  • Returns a new GeomVertexData object with the color data modified in-place

  • with the new value.

  • If the vertex data does not include a color column, a new one will not be

  • added.

*/

/**
  • Returns a new GeomVertexData object with the color table replaced with a

  • new color table for which each vertex has the indicated value. The new

  • color table will be added as a new array; if the old color table was

  • interleaved with a previous array, the previous array will not be repacked.

*/

setFormat()

C++ Interface: set_format(const GeomVertexData self, const GeomVertexFormat format)

/**
  • Changes the format of the vertex data. If the data is not empty, this will

  • implicitly change every row to match the new format.

  • 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.

*/

setName()

C++ Interface: set_name(const GeomVertexData self, str name)

/**
  • Changes the name of the vertex data. This name is reported on the PStats

  • graph for vertex computations.

*/

setNumRows()

C++ Interface: set_num_rows(const GeomVertexData self, int n)

/**
  • Sets the length of the array to n rows in all of the various arrays

  • (presumably by adding rows).

  • The new vertex data is initialized to 0, except for the “color” column,

  • which is initialized to (1, 1, 1, 1).

  • 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).

  • This can be used when you know exactly how many rows you will be needing.

  • It is faster than reserve_num_rows(). Also see unclean_set_num_rows() if

  • you are planning to fill in all the data yourself.

  • 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.

*/

setSliderTable()

C++ Interface: set_slider_table(const GeomVertexData self, const SliderTable table)

/**
  • Replaces the SliderTable on this vertex data with the indicated table.

  • There should be an entry in this table for each kind of morph offset

  • defined in the vertex data.

  • The SliderTable object must have been registered prior to setting it on the

  • GeomVertexData.

  • 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.

*/

setTransformBlendTable()

C++ Interface: set_transform_blend_table(const GeomVertexData self, const TransformBlendTable table)

/**
  • Replaces the TransformBlendTable on this vertex data with the indicated

  • table. The length of this table should be consistent with the maximum

  • table index assigned to the vertices under the “transform_blend” name.

  • 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.

*/

setTransformTable()

C++ Interface: set_transform_table(const GeomVertexData self, const TransformTable table)

/**
  • Replaces the TransformTable on this vertex data with the indicated table.

  • The length of this table should be consistent with the maximum table index

  • assigned to the vertices under the “transform_index” name.

  • 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.

*/

setUsageHint()

C++ Interface: set_usage_hint(const GeomVertexData self, int usage_hint)

/**
  • Changes the UsageHint hint for this vertex data, and for all of the arrays

  • that share this data. 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.

*/

set_array()

C++ Interface: set_array(const GeomVertexData self, int i, const GeomVertexArrayData array)

/**
  • Replaces the indicated vertex data array with a completely new array. You

  • should be careful that the new array has the same length and format as the

  • old one, unless you know what you are doing.

  • 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.

*/

set_color()

C++ Interface: set_color(GeomVertexData self, const LVecBase4f color) set_color(GeomVertexData self, const LVecBase4f color, int num_components, int numeric_type, int contents)

/**
  • Returns a new GeomVertexData object with the color data modified in-place

  • with the new value.

  • If the vertex data does not include a color column, a new one will not be

  • added.

*/

/**
  • Returns a new GeomVertexData object with the color table replaced with a

  • new color table for which each vertex has the indicated value. The new

  • color table will be added as a new array; if the old color table was

  • interleaved with a previous array, the previous array will not be repacked.

*/

set_format()

C++ Interface: set_format(const GeomVertexData self, const GeomVertexFormat format)

/**
  • Changes the format of the vertex data. If the data is not empty, this will

  • implicitly change every row to match the new format.

  • 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.

*/

set_name()

C++ Interface: set_name(const GeomVertexData self, str name)

/**
  • Changes the name of the vertex data. This name is reported on the PStats

  • graph for vertex computations.

*/

set_num_rows()

C++ Interface: set_num_rows(const GeomVertexData self, int n)

/**
  • Sets the length of the array to n rows in all of the various arrays

  • (presumably by adding rows).

  • The new vertex data is initialized to 0, except for the “color” column,

  • which is initialized to (1, 1, 1, 1).

  • 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).

  • This can be used when you know exactly how many rows you will be needing.

  • It is faster than reserve_num_rows(). Also see unclean_set_num_rows() if

  • you are planning to fill in all the data yourself.

  • 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.

*/

set_slider_table()

C++ Interface: set_slider_table(const GeomVertexData self, const SliderTable table)

/**
  • Replaces the SliderTable on this vertex data with the indicated table.

  • There should be an entry in this table for each kind of morph offset

  • defined in the vertex data.

  • The SliderTable object must have been registered prior to setting it on the

  • GeomVertexData.

  • 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.

*/

set_transform_blend_table()

C++ Interface: set_transform_blend_table(const GeomVertexData self, const TransformBlendTable table)

/**
  • Replaces the TransformBlendTable on this vertex data with the indicated

  • table. The length of this table should be consistent with the maximum

  • table index assigned to the vertices under the “transform_blend” name.

  • 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.

*/

set_transform_table()

C++ Interface: set_transform_table(const GeomVertexData self, const TransformTable table)

/**
  • Replaces the TransformTable on this vertex data with the indicated table.

  • The length of this table should be consistent with the maximum table index

  • assigned to the vertices under the “transform_index” name.

  • 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.

*/

set_usage_hint()

C++ Interface: set_usage_hint(const GeomVertexData self, int usage_hint)

/**
  • Changes the UsageHint hint for this vertex data, and for all of the arrays

  • that share this data. 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.

*/

slider_table
transformVertices()

C++ Interface: transform_vertices(const GeomVertexData self, const LMatrix4f mat) transform_vertices(const GeomVertexData self, const LMatrix4f mat, const SparseArray rows) transform_vertices(const GeomVertexData self, const LMatrix4f mat, int begin_row, int end_row)

/**
  • Applies the indicated transform matrix to all of the vertices in the

  • GeomVertexData. The transform is applied to all “point” and “vector” type

  • columns described in the format.

*/

/**
  • Applies the indicated transform matrix to all of the vertices from

  • begin_row up to but not including end_row. The transform is applied to all

  • “point” and “vector” type columns described in the format.

*/

/**
  • Applies the indicated transform matrix to all of the vertices mentioned in

  • the sparse array. The transform is applied to all “point” and “vector”

  • type columns described in the format.

*/

transform_table
transform_vertices()

C++ Interface: transform_vertices(const GeomVertexData self, const LMatrix4f mat) transform_vertices(const GeomVertexData self, const LMatrix4f mat, const SparseArray rows) transform_vertices(const GeomVertexData self, const LMatrix4f mat, int begin_row, int end_row)

/**
  • Applies the indicated transform matrix to all of the vertices in the

  • GeomVertexData. The transform is applied to all “point” and “vector” type

  • columns described in the format.

*/

/**
  • Applies the indicated transform matrix to all of the vertices from

  • begin_row up to but not including end_row. The transform is applied to all

  • “point” and “vector” type columns described in the format.

*/

/**
  • Applies the indicated transform matrix to all of the vertices mentioned in

  • the sparse array. The transform is applied to all “point” and “vector”

  • type columns described in the format.

*/

uncleanSetFormat()

C++ Interface: unclean_set_format(const GeomVertexData self, const GeomVertexFormat format)

/**
  • Changes the format of the vertex data, without reformatting the data to

  • match. The data is exactly the same after this operation, but will be

  • reinterpreted according to the new format. This assumes that the new

  • format is fundamentally compatible with the old format; in particular, it

  • must have the same number of arrays with the same stride in each one. No

  • checking is performed that the data remains sensible.

*/

uncleanSetNumRows()

C++ Interface: unclean_set_num_rows(const GeomVertexData self, int n)

/**
  • This method behaves like set_num_rows(), except the new data is not

  • initialized. Furthermore, after this call, any of the data in the

  • GeomVertexData may be uninitialized, including the earlier rows.

  • This is intended for applications that are about to completely fill the

  • GeomVertexData with new data anyway; it provides a tiny performance boost

  • over set_num_rows().

  • This can be used when you know exactly how many rows you will be needing.

  • It is faster than reserve_num_rows().

*/

unclean_set_format()

C++ Interface: unclean_set_format(const GeomVertexData self, const GeomVertexFormat format)

/**
  • Changes the format of the vertex data, without reformatting the data to

  • match. The data is exactly the same after this operation, but will be

  • reinterpreted according to the new format. This assumes that the new

  • format is fundamentally compatible with the old format; in particular, it

  • must have the same number of arrays with the same stride in each one. No

  • checking is performed that the data remains sensible.

*/

unclean_set_num_rows()

C++ Interface: unclean_set_num_rows(const GeomVertexData self, int n)

/**
  • This method behaves like set_num_rows(), except the new data is not

  • initialized. Furthermore, after this call, any of the data in the

  • GeomVertexData may be uninitialized, including the earlier rows.

  • This is intended for applications that are about to completely fill the

  • GeomVertexData with new data anyway; it provides a tiny performance boost

  • over set_num_rows().

  • This can be used when you know exactly how many rows you will be needing.

  • It is faster than reserve_num_rows().

*/

upcastToCopyOnWriteObject()

C++ Interface: upcast_to_CopyOnWriteObject(const GeomVertexData self)

upcast from GeomVertexData to CopyOnWriteObject

upcastToGeomEnums()

C++ Interface: upcast_to_GeomEnums(const GeomVertexData self)

upcast from GeomVertexData to GeomEnums

upcast_to_CopyOnWriteObject()

C++ Interface: upcast_to_CopyOnWriteObject(const GeomVertexData self)

upcast from GeomVertexData to CopyOnWriteObject

upcast_to_GeomEnums()

C++ Interface: upcast_to_GeomEnums(const GeomVertexData self)

upcast from GeomVertexData to GeomEnums

usage_hint
write()

C++ Interface: write(GeomVertexData self, ostream out, int indent_level)

/**

*/