GeomVertexArrayFormat
from panda3d.core import GeomVertexArrayFormat
- class GeomVertexArrayFormat
Bases:
TypedWritableReferenceCount
,GeomEnums
This describes the structure of a single array within a Geom data. See GeomVertexFormat for the parent class which collects together all of the individual GeomVertexArrayFormat objects.
A particular array may include any number of standard or user-defined columns. All columns consist of a sequence of one or more numeric values, packed in any of a variety of formats; the semantic meaning of each column is defined in general with its contents member, and in particular by its name. The standard array types used most often are named “vertex”, “normal”, “texcoord”, and “color”; other kinds of data may be piggybacked into the data record simply by choosing a unique name.
Inheritance diagram
- __init__(*args, **kwargs)
- addColumn()
C++ Interface: add_column(const GeomVertexArrayFormat self, const GeomVertexColumn column) add_column(const GeomVertexArrayFormat self, const InternalName name, int num_components, int numeric_type, int contents, int start, int column_alignment)
- /**
Adds a new column to the specification. This is a table of per-vertex
floating-point numbers such as “vertex” or “normal”; you must specify where
in each record the table starts, and how many components (dimensions) exist
per vertex.
The return value is the index number of the new data type.
*/
- /**
Adds a new column to the specification. This is a table of per-vertex
floating-point numbers such as “vertex” or “normal”; you must specify where
in each record the table starts, and how many components (dimensions) exist
per vertex.
Adding a column with the same name as a previous type, or that overlaps
with one or more previous types, quietly removes the previous type(s).
The return value is the index number of the new data type.
*/
- add_column()
C++ Interface: add_column(const GeomVertexArrayFormat self, const GeomVertexColumn column) add_column(const GeomVertexArrayFormat self, const InternalName name, int num_components, int numeric_type, int contents, int start, int column_alignment)
- /**
Adds a new column to the specification. This is a table of per-vertex
floating-point numbers such as “vertex” or “normal”; you must specify where
in each record the table starts, and how many components (dimensions) exist
per vertex.
The return value is the index number of the new data type.
*/
- /**
Adds a new column to the specification. This is a table of per-vertex
floating-point numbers such as “vertex” or “normal”; you must specify where
in each record the table starts, and how many components (dimensions) exist
per vertex.
Adding a column with the same name as a previous type, or that overlaps
with one or more previous types, quietly removes the previous type(s).
The return value is the index number of the new data type.
*/
- alignColumnsForAnimation()
C++ Interface: align_columns_for_animation(const GeomVertexArrayFormat self)
- /**
Reprocesses the columns in the format to align the C_point and C_vector
columns to 16-byte boundaries to allow for the more efficient SSE2
operations (assuming SSE2 is enabled in the build).
The caller is responsible for testing vertex_animation_align_16 to decide
whether to call this method.
*/
- align_columns_for_animation()
C++ Interface: align_columns_for_animation(const GeomVertexArrayFormat self)
- /**
Reprocesses the columns in the format to align the C_point and C_vector
columns to 16-byte boundaries to allow for the more efficient SSE2
operations (assuming SSE2 is enabled in the build).
The caller is responsible for testing vertex_animation_align_16 to decide
whether to call this method.
*/
- assign()
C++ Interface: assign(const GeomVertexArrayFormat self, const GeomVertexArrayFormat copy)
- clearColumns()
C++ Interface: clear_columns(const GeomVertexArrayFormat self)
- /**
Removes all columns previously added, sets the stride to zero, and prepares
to start over.
*/
- clear_columns()
C++ Interface: clear_columns(const GeomVertexArrayFormat self)
- /**
Removes all columns previously added, sets the stride to zero, and prepares
to start over.
*/
- columns
- countUnusedSpace()
C++ Interface: count_unused_space(GeomVertexArrayFormat self)
- /**
Returns the number of bytes per row that are not assigned to any column.
*/
- count_unused_space()
C++ Interface: count_unused_space(GeomVertexArrayFormat self)
- /**
Returns the number of bytes per row that are not assigned to any column.
*/
- divisor
- getClassType()
C++ Interface: get_class_type()
- getColumn()
C++ Interface: get_column(GeomVertexArrayFormat self, const InternalName name) get_column(GeomVertexArrayFormat self, int i) get_column(GeomVertexArrayFormat self, int start_byte, int num_bytes)
- getColumns()
- getDivisor()
C++ Interface: get_divisor(GeomVertexArrayFormat self)
- /**
Returns the divisor attribute for the data in this array. If 0, it
contains per-vertex data. If 1, it contains per-instance data. If higher
than 1, the read row is advanced for each n instances.
*/
- getFormatString()
C++ Interface: get_format_string(GeomVertexArrayFormat self, bool pad)
- /**
Returns a string with format codes representing the exact memory layout of
the columns in memory, as understood by Python’s struct module. If pad is
true, extra padding bytes are added to the end as ‘x’ characters as needed.
*/
- getNumColumns()
C++ Interface: get_num_columns(GeomVertexArrayFormat self)
- /**
Returns the number of different columns in the array.
*/
- getPadTo()
C++ Interface: get_pad_to(GeomVertexArrayFormat self)
- /**
Returns the byte divisor to which the data record must be padded to meet
hardware limitations. For instance, if this is 4, the stride will be
automatically rounded up to the next multiple of 4 bytes. This value is
automatically increased as needed to ensure the individual numeric
components in the array are word-aligned.
*/
- getStride()
C++ Interface: get_stride(GeomVertexArrayFormat self)
- /**
Returns the total number of bytes reserved in the array for each vertex.
*/
- getTotalBytes()
C++ Interface: get_total_bytes(GeomVertexArrayFormat self)
- /**
Returns the total number of bytes used by the data types within the format,
including gaps between elements.
*/
- get_class_type()
C++ Interface: get_class_type()
- get_column()
C++ Interface: get_column(GeomVertexArrayFormat self, const InternalName name) get_column(GeomVertexArrayFormat self, int i) get_column(GeomVertexArrayFormat self, int start_byte, int num_bytes)
- get_columns()
- get_divisor()
C++ Interface: get_divisor(GeomVertexArrayFormat self)
- /**
Returns the divisor attribute for the data in this array. If 0, it
contains per-vertex data. If 1, it contains per-instance data. If higher
than 1, the read row is advanced for each n instances.
*/
- get_format_string()
C++ Interface: get_format_string(GeomVertexArrayFormat self, bool pad)
- /**
Returns a string with format codes representing the exact memory layout of
the columns in memory, as understood by Python’s struct module. If pad is
true, extra padding bytes are added to the end as ‘x’ characters as needed.
*/
- get_num_columns()
C++ Interface: get_num_columns(GeomVertexArrayFormat self)
- /**
Returns the number of different columns in the array.
*/
- get_pad_to()
C++ Interface: get_pad_to(GeomVertexArrayFormat self)
- /**
Returns the byte divisor to which the data record must be padded to meet
hardware limitations. For instance, if this is 4, the stride will be
automatically rounded up to the next multiple of 4 bytes. This value is
automatically increased as needed to ensure the individual numeric
components in the array are word-aligned.
*/
- get_stride()
C++ Interface: get_stride(GeomVertexArrayFormat self)
- /**
Returns the total number of bytes reserved in the array for each vertex.
*/
- get_total_bytes()
C++ Interface: get_total_bytes(GeomVertexArrayFormat self)
- /**
Returns the total number of bytes used by the data types within the format,
including gaps between elements.
*/
- hasColumn()
C++ Interface: has_column(GeomVertexArrayFormat self, const InternalName name)
- /**
Returns true if the array has the named column, false otherwise.
*/
- has_column()
C++ Interface: has_column(GeomVertexArrayFormat self, const InternalName name)
- /**
Returns true if the array has the named column, false otherwise.
*/
- isDataSubsetOf()
C++ Interface: is_data_subset_of(GeomVertexArrayFormat self, const GeomVertexArrayFormat other)
- /**
Returns true if all of the fields in this array format are also present and
equivalent in the other array format, and in the same byte positions, and
the stride is the same. That is, true if this format can share the same
data pointer as the other format (with possibly some unused gaps).
*/
- isRegistered()
C++ Interface: is_registered(GeomVertexArrayFormat self)
- /**
Returns true if this format has been registered, false if it has not. It
may not be used for a Geom until it has been registered, but once
registered, it may no longer be modified.
*/
- is_data_subset_of()
C++ Interface: is_data_subset_of(GeomVertexArrayFormat self, const GeomVertexArrayFormat other)
- /**
Returns true if all of the fields in this array format are also present and
equivalent in the other array format, and in the same byte positions, and
the stride is the same. That is, true if this format can share the same
data pointer as the other format (with possibly some unused gaps).
*/
- is_registered()
C++ Interface: is_registered(GeomVertexArrayFormat self)
- /**
Returns true if this format has been registered, false if it has not. It
may not be used for a Geom until it has been registered, but once
registered, it may no longer be modified.
*/
- packColumns()
C++ Interface: pack_columns(const GeomVertexArrayFormat self)
- /**
Removes wasted space between columns.
*/
- pack_columns()
C++ Interface: pack_columns(const GeomVertexArrayFormat self)
- /**
Removes wasted space between columns.
*/
- pad_to
- registerFormat()
C++ Interface: register_format(const GeomVertexArrayFormat format)
- /**
Adds the indicated format to the registry, if there is not an equivalent
format already there; in either case, returns the pointer to the equivalent
format now in the registry.
This is similar to GeomVertexFormat::register_format(), except that you
generally need not call it explicitly. Calling
GeomVertexFormat::register_format() automatically registers all of the
nested array formats.
*/
- register_format()
C++ Interface: register_format(const GeomVertexArrayFormat format)
- /**
Adds the indicated format to the registry, if there is not an equivalent
format already there; in either case, returns the pointer to the equivalent
format now in the registry.
This is similar to GeomVertexFormat::register_format(), except that you
generally need not call it explicitly. Calling
GeomVertexFormat::register_format() automatically registers all of the
nested array formats.
*/
- registered
- removeColumn()
C++ Interface: remove_column(const GeomVertexArrayFormat self, const InternalName name)
- /**
Removes the column with the indicated name, if any. This leaves a gap in
the byte structure.
*/
- remove_column()
C++ Interface: remove_column(const GeomVertexArrayFormat self, const InternalName name)
- /**
Removes the column with the indicated name, if any. This leaves a gap in
the byte structure.
*/
- setDivisor()
C++ Interface: set_divisor(const GeomVertexArrayFormat self, int divisor)
- /**
Set this to 0 to indicate that this array contains per-vertex data, or to 1
to indicate that it contains per-instance data. If higher than 1, the read
row is advanced for each n instances.
*/
- setPadTo()
C++ Interface: set_pad_to(const GeomVertexArrayFormat self, int pad_to)
- /**
Explicitly sets the byte divisor to which the data record must be padded to
meet hardware limitations. See get_pad_to(). Normally it is not necessary
to call this unless you have some specific requirements for row-to-row data
alignment. Note that this value may be automatically increased at each
subsequent call to add_column().
*/
- setStride()
C++ Interface: set_stride(const GeomVertexArrayFormat self, int stride)
- /**
Changes the total number of bytes reserved in the array for each vertex.
You may not reduce this below get_total_bytes(), but you may increase it
arbitrarily.
You should avoid arrays with stride higher than 2048, which is the typical
limit supported by graphics hardware.
*/
- set_divisor()
C++ Interface: set_divisor(const GeomVertexArrayFormat self, int divisor)
- /**
Set this to 0 to indicate that this array contains per-vertex data, or to 1
to indicate that it contains per-instance data. If higher than 1, the read
row is advanced for each n instances.
*/
- set_pad_to()
C++ Interface: set_pad_to(const GeomVertexArrayFormat self, int pad_to)
- /**
Explicitly sets the byte divisor to which the data record must be padded to
meet hardware limitations. See get_pad_to(). Normally it is not necessary
to call this unless you have some specific requirements for row-to-row data
alignment. Note that this value may be automatically increased at each
subsequent call to add_column().
*/
- set_stride()
C++ Interface: set_stride(const GeomVertexArrayFormat self, int stride)
- /**
Changes the total number of bytes reserved in the array for each vertex.
You may not reduce this below get_total_bytes(), but you may increase it
arbitrarily.
You should avoid arrays with stride higher than 2048, which is the typical
limit supported by graphics hardware.
*/
- stride
- total_bytes
- unref()
C++ Interface: unref(GeomVertexArrayFormat self)
- /**
This method overrides ReferenceCount::unref() to unregister the object when
its reference count goes to zero.
*/
- upcastToGeomEnums()
C++ Interface: upcast_to_GeomEnums(const GeomVertexArrayFormat self)
upcast from GeomVertexArrayFormat to GeomEnums
- upcastToTypedWritableReferenceCount()
C++ Interface: upcast_to_TypedWritableReferenceCount(const GeomVertexArrayFormat self)
upcast from GeomVertexArrayFormat to TypedWritableReferenceCount
- upcast_to_GeomEnums()
C++ Interface: upcast_to_GeomEnums(const GeomVertexArrayFormat self)
upcast from GeomVertexArrayFormat to GeomEnums
- upcast_to_TypedWritableReferenceCount()
C++ Interface: upcast_to_TypedWritableReferenceCount(const GeomVertexArrayFormat self)
upcast from GeomVertexArrayFormat to TypedWritableReferenceCount