Panda3D
|
This object provides a high-level interface for quickly writing a sequence of numeric values from a vertex table. More...
Public Member Functions | |
__init__ (GeomVertexArrayData array_data, Thread current_thread) | |
Constructs a new writer to process the vertices of the indicated array only. More... | |
__init__ (GeomVertexArrayData array_data, int column, Thread current_thread) | |
Constructs a new writer to process the vertices of the indicated array only. More... | |
__init__ (GeomVertexData vertex_data, const InternalName name, Thread current_thread) | |
Constructs a new writer to process the vertices of the indicated data object. This flavor creates the writer specifically to process the named data type. More... | |
__init__ (GeomVertexData vertex_data, Thread current_thread) | |
Constructs a new writer to process the vertices of the indicated data object. More... | |
__init__ (const GeomVertexWriter copy) | |
__init__ (Thread current_thread) | |
Constructs an invalid GeomVertexWriter. You must use the assignment operator to assign a valid GeomVertexWriter to this object before you can use it. More... | |
addData1 (float data) | |
Sets the write row to a particular 1-component value, and advances the write row. More... | |
addData1d (double data) | |
Sets the write row to a particular 1-component value, and advances the write row. More... | |
addData1f (float data) | |
Sets the write row to a particular 1-component value, and advances the write row. More... | |
addData1i (int data) | |
Sets the write row to a particular 1-component value, and advances the write row. More... | |
addData2 (const LVecBase2 data) | |
Sets the write row to a particular 2-component value, and advances the write row. More... | |
addData2 (float x, float y) | |
Sets the write row to a particular 2-component value, and advances the write row. More... | |
addData2d (const LVecBase2d data) | |
Sets the write row to a particular 2-component value, and advances the write row. More... | |
addData2d (double x, double y) | |
Sets the write row to a particular 2-component value, and advances the write row. More... | |
addData2f (const LVecBase2f data) | |
Sets the write row to a particular 2-component value, and advances the write row. More... | |
addData2f (float x, float y) | |
Sets the write row to a particular 2-component value, and advances the write row. More... | |
addData2i (const LVecBase2i data) | |
Sets the write row to a particular 2-component value, and advances the write row. More... | |
addData2i (IntConst[2] data) | |
Sets the write row to a particular 2-component value, and advances the write row. More... | |
addData2i (int a, int b) | |
Sets the write row to a particular 2-component value, and advances the write row. More... | |
addData3 (const LVecBase3 data) | |
Sets the write row to a particular 3-component value, and advances the write row. More... | |
addData3 (float x, float y, float z) | |
Sets the write row to a particular 3-component value, and advances the write row. More... | |
addData3d (const LVecBase3d data) | |
Sets the write row to a particular 3-component value, and advances the write row. More... | |
addData3d (double x, double y, double z) | |
Sets the write row to a particular 3-component value, and advances the write row. More... | |
addData3f (const LVecBase3f data) | |
Sets the write row to a particular 3-component value, and advances the write row. More... | |
addData3f (float x, float y, float z) | |
Sets the write row to a particular 3-component value, and advances the write row. More... | |
addData3i (const LVecBase3i data) | |
Sets the write row to a particular 3-component value, and advances the write row. More... | |
addData3i (IntConst[3] data) | |
Sets the write row to a particular 3-component value, and advances the write row. More... | |
addData3i (int a, int b, int c) | |
Sets the write row to a particular 3-component value, and advances the write row. More... | |
addData4 (const LVecBase4 data) | |
Sets the write row to a particular 4-component value, and advances the write row. More... | |
addData4 (float x, float y, float z, float w) | |
Sets the write row to a particular 4-component value, and advances the write row. More... | |
addData4d (const LVecBase4d data) | |
Sets the write row to a particular 4-component value, and advances the write row. More... | |
addData4d (double x, double y, double z, double w) | |
Sets the write row to a particular 4-component value, and advances the write row. More... | |
addData4f (const LVecBase4f data) | |
Sets the write row to a particular 4-component value, and advances the write row. More... | |
addData4f (float x, float y, float z, float w) | |
Sets the write row to a particular 4-component value, and advances the write row. More... | |
addData4i (const LVecBase4i data) | |
Sets the write row to a particular 4-component value, and advances the write row. More... | |
addData4i (IntConst[4] data) | |
Sets the write row to a particular 4-component value, and advances the write row. More... | |
addData4i (int a, int b, int c, int d) | |
Sets the write row to a particular 4-component value, and advances the write row. More... | |
addMatrix3 (const LMatrix3 mat) | |
Sets the write row to a 3-by-3 matrix, and advances the write row. This is a special method that can only be used on matrix columns. More... | |
addMatrix3d (const LMatrix3d mat) | |
Sets the write row to a 3-by-3 matrix, and advances the write row. This is a special method that can only be used on matrix columns. More... | |
addMatrix3f (const LMatrix3f mat) | |
Sets the write row to a 3-by-3 matrix, and advances the write row. This is a special method that can only be used on matrix columns. More... | |
addMatrix4 (const LMatrix4 mat) | |
Sets the write row to a 4-by-4 matrix, and advances the write row. This is a special method that can only be used on matrix columns. More... | |
addMatrix4d (const LMatrix4d mat) | |
Sets the write row to a 4-by-4 matrix, and advances the write row. This is a special method that can only be used on matrix columns. More... | |
addMatrix4f (const LMatrix4f mat) | |
Sets the write row to a 4-by-4 matrix, and advances the write row. This is a special method that can only be used on matrix columns. More... | |
clear () | |
Resets the GeomVertexWriter to the initial state. More... | |
int | getArray () |
Returns the array index containing the data type that the writer is working on. More... | |
GeomVertexArrayData | getArrayData () |
Returns the particular array object that the writer is currently processing. More... | |
GeomVertexArrayDataHandle | getArrayHandle () |
Returns the write handle to the array object that the writer is currently processing. This low-level call should be used with caution; be careful with modifying the data in the handle out from under the GeomVertexWriter. More... | |
const GeomVertexColumn | getColumn () |
Returns the description of the data type that the writer is working on. More... | |
Thread | getCurrentThread () |
Returns the Thread pointer of the currently-executing thread, as passed to the constructor of this object. More... | |
int | getStartRow () |
Returns the row index at which the writer started. It will return to this row if you reset the current column. More... | |
size_t | getStride () |
Returns the per-row stride (bytes between consecutive rows) of the underlying vertex array. This low-level information is normally not needed to use the GeomVertexWriter directly. More... | |
GeomVertexData | getVertexData () |
Returns the vertex data object that the writer is processing. This may return NULL if the writer was constructed with just an array pointer. More... | |
int | getWriteRow () |
Returns the row index to which the data will be written at the next call to set_data*() or add_data*(). More... | |
bool | hasColumn () |
Returns true if a valid data type has been successfully set, or false if the data type does not exist. More... | |
bool | isAtEnd () |
Returns true if the writer is currently at the end of the list of vertices, false otherwise. If this is true, another call to set_data*() will result in a crash, but another call to add_data*() will add a new row. More... | |
GeomVertexWriter | operator= (const GeomVertexWriter copy) |
output (Ostream out) | |
bool | reserveNumRows (int num_rows) |
This ensures that enough memory space for num_rows is allocated, so that you may add up to num_rows rows without causing a new memory allocation. This is a performance optimization only; it is especially useful when you know the number of rows you will be adding ahead of time. More... | |
bool | setColumn (const InternalName name) |
Sets up the writer to use the data type with the indicated name. More... | |
bool | setColumn (int column) |
Sets up the writer to use the nth data type of the GeomVertexFormat, numbering from 0. More... | |
bool | setColumn (int array, const GeomVertexColumn column) |
Sets up the writer to use the indicated column description on the given array. More... | |
setData1 (float data) | |
Sets the write row to a particular 1-component value, and advances the write row. More... | |
setData1d (double data) | |
Sets the write row to a particular 1-component value, and advances the write row. More... | |
setData1f (float data) | |
Sets the write row to a particular 1-component value, and advances the write row. More... | |
setData1i (int data) | |
Sets the write row to a particular 1-component value, and advances the write row. More... | |
setData2 (const LVecBase2 data) | |
Sets the write row to a particular 2-component value, and advances the write row. More... | |
setData2 (float x, float y) | |
Sets the write row to a particular 2-component value, and advances the write row. More... | |
setData2d (const LVecBase2d data) | |
Sets the write row to a particular 2-component value, and advances the write row. More... | |
setData2d (double x, double y) | |
Sets the write row to a particular 2-component value, and advances the write row. More... | |
setData2f (const LVecBase2f data) | |
Sets the write row to a particular 2-component value, and advances the write row. More... | |
setData2f (float x, float y) | |
Sets the write row to a particular 2-component value, and advances the write row. More... | |
setData2i (const LVecBase2i data) | |
Sets the write row to a particular 2-component value, and advances the write row. More... | |
setData2i (IntConst[2] data) | |
Sets the write row to a particular 2-component value, and advances the write row. More... | |
setData2i (int a, int b) | |
Sets the write row to a particular 2-component value, and advances the write row. More... | |
setData3 (const LVecBase3 data) | |
Sets the write row to a particular 3-component value, and advances the write row. More... | |
setData3 (float x, float y, float z) | |
Sets the write row to a particular 3-component value, and advances the write row. More... | |
setData3d (const LVecBase3d data) | |
Sets the write row to a particular 3-component value, and advances the write row. More... | |
setData3d (double x, double y, double z) | |
Sets the write row to a particular 3-component value, and advances the write row. More... | |
setData3f (const LVecBase3f data) | |
Sets the write row to a particular 3-component value, and advances the write row. More... | |
setData3f (float x, float y, float z) | |
Sets the write row to a particular 3-component value, and advances the write row. More... | |
setData3i (const LVecBase3i data) | |
Sets the write row to a particular 3-component value, and advances the write row. More... | |
setData3i (IntConst[3] data) | |
Sets the write row to a particular 3-component value, and advances the write row. More... | |
setData3i (int a, int b, int c) | |
Sets the write row to a particular 3-component value, and advances the write row. More... | |
setData4 (const LVecBase4 data) | |
Sets the write row to a particular 4-component value, and advances the write row. More... | |
setData4 (float x, float y, float z, float w) | |
Sets the write row to a particular 4-component value, and advances the write row. More... | |
setData4d (const LVecBase4d data) | |
Sets the write row to a particular 4-component value, and advances the write row. More... | |
setData4d (double x, double y, double z, double w) | |
Sets the write row to a particular 4-component value, and advances the write row. More... | |
setData4f (const LVecBase4f data) | |
Sets the write row to a particular 4-component value, and advances the write row. More... | |
setData4f (float x, float y, float z, float w) | |
Sets the write row to a particular 4-component value, and advances the write row. More... | |
setData4i (const LVecBase4i data) | |
Sets the write row to a particular 4-component value, and advances the write row. More... | |
setData4i (IntConst[4] data) | |
Sets the write row to a particular 4-component value, and advances the write row. More... | |
setData4i (int a, int b, int c, int d) | |
Sets the write row to a particular 4-component value, and advances the write row. More... | |
setMatrix3 (const LMatrix3 mat) | |
Sets the write row to a 3-by-3 matrix, and advances the write row. This is a special method that can only be used on matrix columns. More... | |
setMatrix3d (const LMatrix3d mat) | |
Sets the write row to a 3-by-3 matrix, and advances the write row. This is a special method that can only be used on matrix columns. More... | |
setMatrix3f (const LMatrix3f mat) | |
Sets the write row to a 3-by-3 matrix, and advances the write row. This is a special method that can only be used on matrix columns. More... | |
setMatrix4 (const LMatrix4 mat) | |
Sets the write row to a 4-by-4 matrix, and advances the write row. This is a special method that can only be used on matrix columns. More... | |
setMatrix4d (const LMatrix4d mat) | |
Sets the write row to a 4-by-4 matrix, and advances the write row. This is a special method that can only be used on matrix columns. More... | |
setMatrix4f (const LMatrix4f mat) | |
Sets the write row to a 4-by-4 matrix, and advances the write row. This is a special method that can only be used on matrix columns. More... | |
setRow (int row) | |
Sets the start row to the indicated value. The writer will begin writing to the indicated row; each subsequent set_data*() call will store the data into the subsequent row. If set_column() is called, the writer will return to this row. More... | |
setRowUnsafe (int row) | |
Sets the start row to the indicated value, without internal checks. This is the same as set_row(), but it does not check for the possibility that the array has been reallocated internally for some reason; use only when you are confident that the array is unchanged and you really need every bit of available performance. More... | |
Additional Inherited Members | |
![]() | |
enum | AnimationType { AT_none = 0, AT_panda = 1, AT_hardware = 2 } |
The type of animation data that is represented by a particular GeomVertexFormat. More... | |
enum | Contents { C_other = 0, C_point = 1, C_clip_point = 2, C_vector = 3, C_texcoord = 4, C_color = 5, C_index = 6, C_morph_delta = 7, C_matrix = 8, C_normal = 9 } |
The contents determine the semantic meaning of a numeric value within the vertex data. This is also used to determine what automatic transforms might be applied to the various columns. More... | |
enum | GeomRendering { GR_indexed_point = 1, GR_indexed_other = 65536, GR_indexed_bits = 65537, GR_point = 2, GR_point_uniform_size = 4, GR_per_point_size = 8, GR_point_perspective = 16, GR_point_aspect_ratio = 32, GR_point_scale = 64, GR_point_rotate = 128, GR_point_sprite = 256, GR_point_sprite_tex_matrix = 512, GR_point_bits = 1022, GR_triangle_strip = 1024, GR_triangle_fan = 2048, GR_line_strip = 4096, GR_composite_bits = 7168, GR_strip_cut_index = 131072, GR_flat_first_vertex = 8192, GR_flat_last_vertex = 16384, GR_shade_model_bits = 24576 } |
This type specifies a number of bits that are used to represent the rendering requirements of a particular Geom, as well as the rendering capabilities of the GSG. The difference between the two indicates whether the Geom needs to be munged for the GSG. More... | |
enum | NumericType { NT_uint8 = 0, NT_uint16 = 1, NT_uint32 = 2, NT_packed_dcba = 3, NT_packed_dabc = 4, NT_float32 = 5, NT_float64 = 6, NT_stdfloat = 7 } |
The numeric type determines what physical representation is used to encode a numeric value within the vertex data. More... | |
enum | PrimitiveType { PT_none = 0, PT_polygons = 1, PT_lines = 2, PT_points = 3, PT_patches = 4 } |
The primitive type represents the core primitive type of a particular GeomPrimitive. It's used for determining what kind of antialiasing should be enabled. More... | |
enum | ShadeModel { SM_uniform = 0, SM_smooth = 1, SM_flat_first_vertex = 2, SM_flat_last_vertex = 3 } |
The shade model specifies whether the per-vertex colors and normals indexed by a given primitive truly represent per-vertex colors and normals, or whether they actually represent per-triangle flat-shaded colors and normals. More... | |
enum | UsageHint { UH_client = 0, UH_stream = 1, UH_dynamic = 2, UH_static = 3, UH_unspecified = 4 } |
This object provides a high-level interface for quickly writing a sequence of numeric values from a vertex table.
This object can be used both to replace existing vertices in the table, or to extend the table with new vertices. The set_data*() family of methods can only be used to replace existing data; it is an error to allow these to run past the end of the data. The add_data*() family of methods, on the other hand, can be used to replace existing data or add new data; if you call set_row() into the middle of existing data the add_data*() methods will behave like the corresponding set_data*(), but if they run past the end of existing data they will quietly add new vertices.
Like GeomVertexReader, the writer is particularly optimized for writing a single column of data values for a series of vertices, without changing columns between each number. Although you can also use one GeomVertexWriter to write across the columns if it is convenient, by calling set_column() repeatedly at each vertex, it is faster to write down the columns, and to use a different GeomVertexWriter for each column.
Note that, like a GeomVertexReader, a GeomVertexWriter does not keep a reference count to the actual vertex data buffer. This means that it is important not to keep a GeomVertexWriter object around over a long period of time in which the data buffer is likely to be deallocated; it is intended for making a quick pass over the data in one session.
It also means that you should create any GeomVertexWriters before creating GeomVertexReaders on the same data, since the writer itself might cause the vertex buffer to be deallocated. Better yet, use a GeomVertexRewriter if you are going to create both of them anyway.
__init__ | ( | GeomVertexArrayData | array_data, |
Thread | current_thread | ||
) |
Constructs a new writer to process the vertices of the indicated array only.
__init__ | ( | GeomVertexArrayData | array_data, |
int | column, | ||
Thread | current_thread | ||
) |
Constructs a new writer to process the vertices of the indicated array only.
__init__ | ( | GeomVertexData | vertex_data, |
const InternalName | name, | ||
Thread | current_thread | ||
) |
Constructs a new writer to process the vertices of the indicated data object. This flavor creates the writer specifically to process the named data type.
__init__ | ( | GeomVertexData | vertex_data, |
Thread | current_thread | ||
) |
Constructs a new writer to process the vertices of the indicated data object.
__init__ | ( | const GeomVertexWriter | copy | ) |
__init__ | ( | Thread | current_thread | ) |
Constructs an invalid GeomVertexWriter. You must use the assignment operator to assign a valid GeomVertexWriter to this object before you can use it.
addData1 | ( | float | data | ) |
Sets the write row to a particular 1-component value, and advances the write row.
If the write row advances past the end of data, implicitly adds a new row to the data.
addData1d | ( | double | data | ) |
Sets the write row to a particular 1-component value, and advances the write row.
If the write row advances past the end of data, implicitly adds a new row to the data.
addData1f | ( | float | data | ) |
Sets the write row to a particular 1-component value, and advances the write row.
If the write row advances past the end of data, implicitly adds a new row to the data.
addData1i | ( | int | data | ) |
Sets the write row to a particular 1-component value, and advances the write row.
If the write row advances past the end of data, implicitly adds a new row to the data.
addData2 | ( | const LVecBase2 | data | ) |
Sets the write row to a particular 2-component value, and advances the write row.
If the write row advances past the end of data, implicitly adds a new row to the data.
addData2 | ( | float | x, |
float | y | ||
) |
Sets the write row to a particular 2-component value, and advances the write row.
If the write row advances past the end of data, implicitly adds a new row to the data.
addData2d | ( | const LVecBase2d | data | ) |
Sets the write row to a particular 2-component value, and advances the write row.
If the write row advances past the end of data, implicitly adds a new row to the data.
addData2d | ( | double | x, |
double | y | ||
) |
Sets the write row to a particular 2-component value, and advances the write row.
If the write row advances past the end of data, implicitly adds a new row to the data.
addData2f | ( | const LVecBase2f | data | ) |
Sets the write row to a particular 2-component value, and advances the write row.
If the write row advances past the end of data, implicitly adds a new row to the data.
addData2f | ( | float | x, |
float | y | ||
) |
Sets the write row to a particular 2-component value, and advances the write row.
If the write row advances past the end of data, implicitly adds a new row to the data.
addData2i | ( | const LVecBase2i | data | ) |
Sets the write row to a particular 2-component value, and advances the write row.
If the write row advances past the end of data, implicitly adds a new row to the data.
addData2i | ( | IntConst | data[2] | ) |
Sets the write row to a particular 2-component value, and advances the write row.
If the write row advances past the end of data, implicitly adds a new row to the data.
addData2i | ( | int | a, |
int | b | ||
) |
Sets the write row to a particular 2-component value, and advances the write row.
If the write row advances past the end of data, implicitly adds a new row to the data.
addData3 | ( | const LVecBase3 | data | ) |
Sets the write row to a particular 3-component value, and advances the write row.
If the write row advances past the end of data, implicitly adds a new row to the data.
addData3 | ( | float | x, |
float | y, | ||
float | z | ||
) |
Sets the write row to a particular 3-component value, and advances the write row.
If the write row advances past the end of data, implicitly adds a new row to the data.
addData3d | ( | const LVecBase3d | data | ) |
Sets the write row to a particular 3-component value, and advances the write row.
If the write row advances past the end of data, implicitly adds a new row to the data.
addData3d | ( | double | x, |
double | y, | ||
double | z | ||
) |
Sets the write row to a particular 3-component value, and advances the write row.
If the write row advances past the end of data, implicitly adds a new row to the data.
addData3f | ( | const LVecBase3f | data | ) |
Sets the write row to a particular 3-component value, and advances the write row.
If the write row advances past the end of data, implicitly adds a new row to the data.
addData3f | ( | float | x, |
float | y, | ||
float | z | ||
) |
Sets the write row to a particular 3-component value, and advances the write row.
If the write row advances past the end of data, implicitly adds a new row to the data.
addData3i | ( | const LVecBase3i | data | ) |
Sets the write row to a particular 3-component value, and advances the write row.
If the write row advances past the end of data, implicitly adds a new row to the data.
addData3i | ( | IntConst | data[3] | ) |
Sets the write row to a particular 3-component value, and advances the write row.
If the write row advances past the end of data, implicitly adds a new row to the data.
addData3i | ( | int | a, |
int | b, | ||
int | c | ||
) |
Sets the write row to a particular 3-component value, and advances the write row.
If the write row advances past the end of data, implicitly adds a new row to the data.
addData4 | ( | const LVecBase4 | data | ) |
Sets the write row to a particular 4-component value, and advances the write row.
If the write row advances past the end of data, implicitly adds a new row to the data.
addData4 | ( | float | x, |
float | y, | ||
float | z, | ||
float | w | ||
) |
Sets the write row to a particular 4-component value, and advances the write row.
If the write row advances past the end of data, implicitly adds a new row to the data.
addData4d | ( | const LVecBase4d | data | ) |
Sets the write row to a particular 4-component value, and advances the write row.
If the write row advances past the end of data, implicitly adds a new row to the data.
addData4d | ( | double | x, |
double | y, | ||
double | z, | ||
double | w | ||
) |
Sets the write row to a particular 4-component value, and advances the write row.
If the write row advances past the end of data, implicitly adds a new row to the data.
addData4f | ( | const LVecBase4f | data | ) |
Sets the write row to a particular 4-component value, and advances the write row.
If the write row advances past the end of data, implicitly adds a new row to the data.
addData4f | ( | float | x, |
float | y, | ||
float | z, | ||
float | w | ||
) |
Sets the write row to a particular 4-component value, and advances the write row.
If the write row advances past the end of data, implicitly adds a new row to the data.
addData4i | ( | const LVecBase4i | data | ) |
Sets the write row to a particular 4-component value, and advances the write row.
If the write row advances past the end of data, implicitly adds a new row to the data.
addData4i | ( | IntConst | data[4] | ) |
Sets the write row to a particular 4-component value, and advances the write row.
If the write row advances past the end of data, implicitly adds a new row to the data.
addData4i | ( | int | a, |
int | b, | ||
int | c, | ||
int | d | ||
) |
Sets the write row to a particular 4-component value, and advances the write row.
If the write row advances past the end of data, implicitly adds a new row to the data.
addMatrix3 | ( | const LMatrix3 | mat | ) |
Sets the write row to a 3-by-3 matrix, and advances the write row. This is a special method that can only be used on matrix columns.
If the write row advances past the end of data, implicitly adds a new row to the data.
addMatrix3d | ( | const LMatrix3d | mat | ) |
Sets the write row to a 3-by-3 matrix, and advances the write row. This is a special method that can only be used on matrix columns.
If the write row advances past the end of data, implicitly adds a new row to the data.
addMatrix3f | ( | const LMatrix3f | mat | ) |
Sets the write row to a 3-by-3 matrix, and advances the write row. This is a special method that can only be used on matrix columns.
If the write row advances past the end of data, implicitly adds a new row to the data.
addMatrix4 | ( | const LMatrix4 | mat | ) |
Sets the write row to a 4-by-4 matrix, and advances the write row. This is a special method that can only be used on matrix columns.
If the write row advances past the end of data, implicitly adds a new row to the data.
addMatrix4d | ( | const LMatrix4d | mat | ) |
Sets the write row to a 4-by-4 matrix, and advances the write row. This is a special method that can only be used on matrix columns.
If the write row advances past the end of data, implicitly adds a new row to the data.
addMatrix4f | ( | const LMatrix4f | mat | ) |
Sets the write row to a 4-by-4 matrix, and advances the write row. This is a special method that can only be used on matrix columns.
If the write row advances past the end of data, implicitly adds a new row to the data.
clear | ( | ) |
Resets the GeomVertexWriter to the initial state.
int getArray | ( | ) |
Returns the array index containing the data type that the writer is working on.
GeomVertexArrayData getArrayData | ( | ) |
Returns the particular array object that the writer is currently processing.
GeomVertexArrayDataHandle getArrayHandle | ( | ) |
Returns the write handle to the array object that the writer is currently processing. This low-level call should be used with caution; be careful with modifying the data in the handle out from under the GeomVertexWriter.
const GeomVertexColumn getColumn | ( | ) |
Returns the description of the data type that the writer is working on.
Thread getCurrentThread | ( | ) |
Returns the Thread pointer of the currently-executing thread, as passed to the constructor of this object.
int getStartRow | ( | ) |
Returns the row index at which the writer started. It will return to this row if you reset the current column.
size_t getStride | ( | ) |
Returns the per-row stride (bytes between consecutive rows) of the underlying vertex array. This low-level information is normally not needed to use the GeomVertexWriter directly.
GeomVertexData getVertexData | ( | ) |
Returns the vertex data object that the writer is processing. This may return NULL if the writer was constructed with just an array pointer.
int getWriteRow | ( | ) |
Returns the row index to which the data will be written at the next call to set_data*() or add_data*().
bool hasColumn | ( | ) |
Returns true if a valid data type has been successfully set, or false if the data type does not exist.
bool isAtEnd | ( | ) |
Returns true if the writer is currently at the end of the list of vertices, false otherwise. If this is true, another call to set_data*() will result in a crash, but another call to add_data*() will add a new row.
GeomVertexWriter operator= | ( | const GeomVertexWriter | copy | ) |
output | ( | Ostream | out | ) |
bool reserveNumRows | ( | int | num_rows | ) |
This ensures that enough memory space for num_rows is allocated, so that you may add up to num_rows rows without causing a new memory allocation. This is a performance optimization only; it is especially useful when you know the number of rows you will be adding ahead of time.
bool setColumn | ( | const InternalName | name | ) |
Sets up the writer to use the data type with the indicated name.
This also resets the write number to the start row (the same value passed to a previous call to set_row(), or 0 if set_row() was never called.)
The return value is true if the data type is valid, false otherwise.
bool setColumn | ( | int | column | ) |
Sets up the writer to use the nth data type of the GeomVertexFormat, numbering from 0.
This also resets the write row number to the start row (the same value passed to a previous call to set_row(), or 0 if set_row() was never called.)
The return value is true if the data type is valid, false otherwise.
bool setColumn | ( | int | array, |
const GeomVertexColumn | column | ||
) |
Sets up the writer to use the indicated column description on the given array.
This also resets the current write row number to the start row (the same value passed to a previous call to set_row(), or 0 if set_row() was never called.)
The return value is true if the data type is valid, false otherwise.
setData1 | ( | float | data | ) |
Sets the write row to a particular 1-component value, and advances the write row.
It is an error for the write row to advance past the end of data.
setData1d | ( | double | data | ) |
Sets the write row to a particular 1-component value, and advances the write row.
It is an error for the write row to advance past the end of data.
setData1f | ( | float | data | ) |
Sets the write row to a particular 1-component value, and advances the write row.
It is an error for the write row to advance past the end of data.
setData1i | ( | int | data | ) |
Sets the write row to a particular 1-component value, and advances the write row.
It is an error for the write row to advance past the end of data.
setData2 | ( | const LVecBase2 | data | ) |
Sets the write row to a particular 2-component value, and advances the write row.
It is an error for the write row to advance past the end of data.
setData2 | ( | float | x, |
float | y | ||
) |
Sets the write row to a particular 2-component value, and advances the write row.
It is an error for the write row to advance past the end of data.
setData2d | ( | const LVecBase2d | data | ) |
Sets the write row to a particular 2-component value, and advances the write row.
It is an error for the write row to advance past the end of data.
setData2d | ( | double | x, |
double | y | ||
) |
Sets the write row to a particular 2-component value, and advances the write row.
It is an error for the write row to advance past the end of data.
setData2f | ( | const LVecBase2f | data | ) |
Sets the write row to a particular 2-component value, and advances the write row.
It is an error for the write row to advance past the end of data.
setData2f | ( | float | x, |
float | y | ||
) |
Sets the write row to a particular 2-component value, and advances the write row.
It is an error for the write row to advance past the end of data.
setData2i | ( | const LVecBase2i | data | ) |
Sets the write row to a particular 2-component value, and advances the write row.
It is an error for the write row to advance past the end of data.
setData2i | ( | IntConst | data[2] | ) |
Sets the write row to a particular 2-component value, and advances the write row.
It is an error for the write row to advance past the end of data.
setData2i | ( | int | a, |
int | b | ||
) |
Sets the write row to a particular 2-component value, and advances the write row.
It is an error for the write row to advance past the end of data.
setData3 | ( | const LVecBase3 | data | ) |
Sets the write row to a particular 3-component value, and advances the write row.
It is an error for the write row to advance past the end of data.
setData3 | ( | float | x, |
float | y, | ||
float | z | ||
) |
Sets the write row to a particular 3-component value, and advances the write row.
It is an error for the write row to advance past the end of data.
setData3d | ( | const LVecBase3d | data | ) |
Sets the write row to a particular 3-component value, and advances the write row.
It is an error for the write row to advance past the end of data.
setData3d | ( | double | x, |
double | y, | ||
double | z | ||
) |
Sets the write row to a particular 3-component value, and advances the write row.
It is an error for the write row to advance past the end of data.
setData3f | ( | const LVecBase3f | data | ) |
Sets the write row to a particular 3-component value, and advances the write row.
It is an error for the write row to advance past the end of data.
setData3f | ( | float | x, |
float | y, | ||
float | z | ||
) |
Sets the write row to a particular 3-component value, and advances the write row.
It is an error for the write row to advance past the end of data.
setData3i | ( | const LVecBase3i | data | ) |
Sets the write row to a particular 3-component value, and advances the write row.
It is an error for the write row to advance past the end of data.
setData3i | ( | IntConst | data[3] | ) |
Sets the write row to a particular 3-component value, and advances the write row.
It is an error for the write row to advance past the end of data.
setData3i | ( | int | a, |
int | b, | ||
int | c | ||
) |
Sets the write row to a particular 3-component value, and advances the write row.
It is an error for the write row to advance past the end of data.
setData4 | ( | const LVecBase4 | data | ) |
Sets the write row to a particular 4-component value, and advances the write row.
It is an error for the write row to advance past the end of data.
setData4 | ( | float | x, |
float | y, | ||
float | z, | ||
float | w | ||
) |
Sets the write row to a particular 4-component value, and advances the write row.
It is an error for the write row to advance past the end of data.
setData4d | ( | const LVecBase4d | data | ) |
Sets the write row to a particular 4-component value, and advances the write row.
It is an error for the write row to advance past the end of data.
setData4d | ( | double | x, |
double | y, | ||
double | z, | ||
double | w | ||
) |
Sets the write row to a particular 4-component value, and advances the write row.
It is an error for the write row to advance past the end of data.
setData4f | ( | const LVecBase4f | data | ) |
Sets the write row to a particular 4-component value, and advances the write row.
It is an error for the write row to advance past the end of data.
setData4f | ( | float | x, |
float | y, | ||
float | z, | ||
float | w | ||
) |
Sets the write row to a particular 4-component value, and advances the write row.
It is an error for the write row to advance past the end of data.
setData4i | ( | const LVecBase4i | data | ) |
Sets the write row to a particular 4-component value, and advances the write row.
It is an error for the write row to advance past the end of data.
setData4i | ( | IntConst | data[4] | ) |
Sets the write row to a particular 4-component value, and advances the write row.
It is an error for the write row to advance past the end of data.
setData4i | ( | int | a, |
int | b, | ||
int | c, | ||
int | d | ||
) |
Sets the write row to a particular 4-component value, and advances the write row.
It is an error for the write row to advance past the end of data.
setMatrix3 | ( | const LMatrix3 | mat | ) |
Sets the write row to a 3-by-3 matrix, and advances the write row. This is a special method that can only be used on matrix columns.
It is an error for the write row to advance past the end of data.
setMatrix3d | ( | const LMatrix3d | mat | ) |
Sets the write row to a 3-by-3 matrix, and advances the write row. This is a special method that can only be used on matrix columns.
It is an error for the write row to advance past the end of data.
setMatrix3f | ( | const LMatrix3f | mat | ) |
Sets the write row to a 3-by-3 matrix, and advances the write row. This is a special method that can only be used on matrix columns.
It is an error for the write row to advance past the end of data.
setMatrix4 | ( | const LMatrix4 | mat | ) |
Sets the write row to a 4-by-4 matrix, and advances the write row. This is a special method that can only be used on matrix columns.
It is an error for the write row to advance past the end of data.
setMatrix4d | ( | const LMatrix4d | mat | ) |
Sets the write row to a 4-by-4 matrix, and advances the write row. This is a special method that can only be used on matrix columns.
It is an error for the write row to advance past the end of data.
setMatrix4f | ( | const LMatrix4f | mat | ) |
Sets the write row to a 4-by-4 matrix, and advances the write row. This is a special method that can only be used on matrix columns.
It is an error for the write row to advance past the end of data.
setRow | ( | int | row | ) |
Sets the start row to the indicated value. The writer will begin writing to the indicated row; each subsequent set_data*() call will store the data into the subsequent row. If set_column() is called, the writer will return to this row.
setRowUnsafe | ( | int | row | ) |
Sets the start row to the indicated value, without internal checks. This is the same as set_row(), but it does not check for the possibility that the array has been reallocated internally for some reason; use only when you are confident that the array is unchanged and you really need every bit of available performance.