This object provides the functionality of both a GeomVertexReader and a GeomVertexWriter, combined together into one convenient package. More...
Public Member Functions | |
GeomVertexRewriter (GeomVertexArrayData array_data, Thread current_thread) | |
Constructs a new rewriter to process the vertices of the indicated array only. | |
GeomVertexRewriter (GeomVertexArrayData array_data) | |
Constructs a new rewriter to process the vertices of the indicated array only. | |
GeomVertexRewriter (GeomVertexArrayData array_data, int column, Thread current_thread) | |
Constructs a new rewriter to process the vertices of the indicated array only. | |
GeomVertexRewriter (GeomVertexArrayData array_data, int column) | |
Constructs a new rewriter to process the vertices of the indicated array only. | |
GeomVertexRewriter (GeomVertexData vertex_data, InternalName const name, Thread current_thread) | |
Constructs a new rewriter to process the vertices of the indicated data object. | |
GeomVertexRewriter (GeomVertexData vertex_data, InternalName const name) | |
Constructs a new rewriter to process the vertices of the indicated data object. | |
GeomVertexRewriter (GeomVertexData vertex_data, Thread current_thread) | |
Constructs a new rewriter to process the vertices of the indicated data object. | |
GeomVertexRewriter (GeomVertexData vertex_data) | |
Constructs a new rewriter to process the vertices of the indicated data object. | |
GeomVertexRewriter (GeomVertexData vertex_data, string name, Thread current_thread) | |
Constructs a new rewriter to process the vertices of the indicated data object. | |
GeomVertexRewriter (GeomVertexData vertex_data, string name) | |
Constructs a new rewriter to process the vertices of the indicated data object. | |
GeomVertexRewriter (GeomVertexRewriter const copy) | |
GeomVertexRewriter (Thread current_thread) | |
Constructs an invalid GeomVertexRewriter. | |
GeomVertexRewriter () | |
Constructs an invalid GeomVertexRewriter. | |
clear () | |
Resets the GeomVertexRewriter to the initial state. | |
int | getArray () |
Returns the array index containing the data type that the rewriter is working on. | |
GeomVertexArrayData | getArrayData () |
Returns the particular array object that the rewriter is currently processing. | |
GeomVertexArrayDataHandle | getArrayHandle () |
Returns the write handle to the array object that the rewriter is currently processing. | |
GeomVertexColumn const | getColumn () |
Returns the description of the data type that the rewriter 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 rewriter started. | |
unsigned int | getStride () |
Returns the per-row stride (bytes between consecutive rows) of the underlying vertex array. | |
GeomVertexData | getVertexData () |
Returns the vertex data object that the rewriter is processing. | |
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 reader or writer is currently at the end of the list of vertices, false otherwise. | |
GeomVertexRewriter | operator= (GeomVertexRewriter const copy) |
output (ostream out) | |
bool | setColumn (InternalName const name) |
Sets up the rewriter to use the data type with the indicated name. | |
bool | setColumn (string name) |
Sets up the rewriter to use the data type with the indicated name. | |
bool | setColumn (int column) |
Sets up the rewriter to use the nth data type of the GeomVertexFormat, numbering from 0. | |
bool | setColumn (int array, GeomVertexColumn const column) |
Sets up the rewriter to use the indicated column description on the given array. | |
setRow (int row) | |
Sets the start, write, and write index to the indicated value. | |
setRowUnsafe (int row) | |
Sets the start row to the indicated value, without internal checks. |
This object provides the functionality of both a GeomVertexReader and a GeomVertexWriter, combined together into one convenient package.
It is designed for making a single pass over a GeomVertexData object, modifying rows as it goes.
Although it doesn't provide any real performance benefit over using a separate reader and writer on the same data, it should probably be used in preference to a separate reader and writer, because it makes an effort to manage the reference counts properly between the reader and the writer to avoid accidentally dereferencing either array while recopying.
GeomVertexRewriter | ( | GeomVertexArrayData | array_data, |
Thread | current_thread | ||
) |
Constructs a new rewriter to process the vertices of the indicated array only.
GeomVertexRewriter | ( | GeomVertexArrayData | array_data | ) |
Constructs a new rewriter to process the vertices of the indicated array only.
GeomVertexRewriter | ( | GeomVertexArrayData | array_data, |
int | column, | ||
Thread | current_thread | ||
) |
Constructs a new rewriter to process the vertices of the indicated array only.
GeomVertexRewriter | ( | GeomVertexArrayData | array_data, |
int | column | ||
) |
Constructs a new rewriter to process the vertices of the indicated array only.
GeomVertexRewriter | ( | GeomVertexData | vertex_data, |
InternalName const | name, | ||
Thread | current_thread | ||
) |
Constructs a new rewriter to process the vertices of the indicated data object.
This flavor creates the rewriter specifically to process the named data type.
GeomVertexRewriter | ( | GeomVertexData | vertex_data, |
InternalName const | name | ||
) |
Constructs a new rewriter to process the vertices of the indicated data object.
This flavor creates the rewriter specifically to process the named data type.
GeomVertexRewriter | ( | GeomVertexData | vertex_data, |
Thread | current_thread | ||
) |
Constructs a new rewriter to process the vertices of the indicated data object.
GeomVertexRewriter | ( | GeomVertexData | vertex_data | ) |
Constructs a new rewriter to process the vertices of the indicated data object.
GeomVertexRewriter | ( | GeomVertexData | vertex_data, |
string | name, | ||
Thread | current_thread | ||
) |
Constructs a new rewriter to process the vertices of the indicated data object.
This flavor creates the rewriter specifically to process the named data type.
GeomVertexRewriter | ( | GeomVertexData | vertex_data, |
string | name | ||
) |
Constructs a new rewriter to process the vertices of the indicated data object.
This flavor creates the rewriter specifically to process the named data type.
GeomVertexRewriter | ( | GeomVertexRewriter const | copy | ) |
GeomVertexRewriter | ( | Thread | current_thread | ) |
Constructs an invalid GeomVertexRewriter.
You must use the assignment operator to assign a valid GeomVertexRewriter to this object before you can use it.
Constructs an invalid GeomVertexRewriter.
You must use the assignment operator to assign a valid GeomVertexRewriter to this object before you can use it.
clear | ( | ) |
Resets the GeomVertexRewriter to the initial state.
Reimplemented from GeomVertexReader.
Returns the array index containing the data type that the rewriter is working on.
Reimplemented from GeomVertexReader.
Returns the particular array object that the rewriter is currently processing.
Reimplemented from GeomVertexReader.
Returns the write handle to the array object that the rewriter 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 GeomVertexRewriter.
Reimplemented from GeomVertexReader.
GeomVertexColumn const getColumn | ( | ) |
Returns the description of the data type that the rewriter is working on.
Reimplemented from GeomVertexReader.
Returns the Thread pointer of the currently-executing thread, as passed to the constructor of this object.
Reimplemented from GeomVertexReader.
int getStartRow | ( | ) |
Returns the row index at which the rewriter started.
It will return to this row if you reset the current column.
Reimplemented from GeomVertexReader.
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 GeomVertexRewriter directly.
Reimplemented from GeomVertexReader.
Returns the vertex data object that the rewriter is processing.
Reimplemented from GeomVertexReader.
bool hasColumn | ( | ) |
Returns true if a valid data type has been successfully set, or false if the data type does not exist.
Reimplemented from GeomVertexReader.
bool isAtEnd | ( | ) |
Returns true if the reader or writer is currently at the end of the list of vertices, false otherwise.
Reimplemented from GeomVertexReader.
GeomVertexRewriter operator= | ( | GeomVertexRewriter const | copy | ) |
Reimplemented from GeomVertexReader.
bool setColumn | ( | InternalName const | name | ) |
Sets up the rewriter to use the data type with the indicated name.
This also resets both the read and write row numbers 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.
Reimplemented from GeomVertexReader.
bool setColumn | ( | string | name | ) |
Sets up the rewriter to use the data type with the indicated name.
This also resets both the read and write row numbers 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.
Reimplemented from GeomVertexReader.
Sets up the rewriter to use the nth data type of the GeomVertexFormat, numbering from 0.
This also resets both the read and write row numbers 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.
Reimplemented from GeomVertexReader.
bool setColumn | ( | int | array, |
GeomVertexColumn const | column | ||
) |
Sets up the rewriter to use the indicated column description on the given array.
This also resets both the read and write row numbers 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.
Reimplemented from GeomVertexReader.
Sets the start, write, and write index to the indicated value.
The rewriter will begin traversing from the given row.
Reimplemented from GeomVertexReader.
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.
Reimplemented from GeomVertexReader.