GeomVertexRewriter Class Reference

This object provides the functionality of both a GeomVertexReader and a GeomVertexWriter, combined together into one convenient package. More...

Inheritance diagram for GeomVertexRewriter:

## Public Member Functions | |

__init__ (GeomVertexArrayData array_data, Thread current_thread) | |

Constructs a new rewriter to process the vertices of the indicated array only. More... | |

__init__ (GeomVertexArrayData array_data, int column, Thread current_thread) | |

Constructs a new rewriter to process the vertices of the indicated array only. More... | |

__init__ (GeomVertexData vertex_data, const InternalName name, Thread current_thread) | |

Constructs a new rewriter to process the vertices of the indicated data object. More... | |

__init__ (GeomVertexData vertex_data, Thread current_thread) | |

Constructs a new rewriter to process the vertices of the indicated data object. More... | |

__init__ (const GeomVertexRewriter copy) | |

__init__ (Thread current_thread) | |

Constructs an invalid GeomVertexRewriter. More... | |

clear () | |

Resets the GeomVertexRewriter to the initial state. More... | |

int | getArray () |

Returns the array index containing the data type that the rewriter is working on. More... | |

GeomVertexArrayData | getArrayData () |

Returns the particular array object that the rewriter is currently processing. More... | |

GeomVertexArrayDataHandle | getArrayHandle () |

Returns the write handle to the array object that the rewriter is currently processing. More... | |

const GeomVertexColumn | getColumn () |

Returns the description of the data type that the rewriter 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 rewriter started. More... | |

int | getStride () |

Returns the per-row stride (bytes between consecutive rows) of the underlying vertex array. More... | |

GeomVertexData | getVertexData () |

Returns the vertex data object that the rewriter is processing. 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 reader or writer is currently at the end of the list of vertices, false otherwise. More... | |

GeomVertexRewriter | operator= (const GeomVertexRewriter copy) |

output (Ostream out) | |

bool | setColumn (const InternalName name) |

Sets up the rewriter to use the data type with the indicated name. More... | |

bool | setColumn (int column) |

Sets up the rewriter to use the nth data type of the GeomVertexFormat, numbering from 0. More... | |

bool | setColumn (int array, const GeomVertexColumn column) |

Sets up the rewriter to use the indicated column description on the given array. More... | |

setRow (int row) | |

Sets the start, write, and write index to the indicated value. More... | |

setRowUnsafe (int row) | |

Sets the start row to the indicated value, without internal checks. More... | |

Public Member Functions inherited from GeomVertexWriter | |

__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. 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. 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 (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 (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 (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. More... | |

addMatrix3d (const LMatrix3d mat) | |

Sets the write row to a 3-by-3 matrix, and advances the write row. More... | |

addMatrix3f (const LMatrix3f mat) | |

Sets the write row to a 3-by-3 matrix, and advances the write row. More... | |

addMatrix4 (const LMatrix4 mat) | |

Sets the write row to a 4-by-4 matrix, and advances the write row. More... | |

addMatrix4d (const LMatrix4d mat) | |

Sets the write row to a 4-by-4 matrix, and advances the write row. More... | |

addMatrix4f (const LMatrix4f mat) | |

Sets the write row to a 4-by-4 matrix, and advances the write row. 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. 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. More... | |

int | getStride () |

Returns the per-row stride (bytes between consecutive rows) of the underlying vertex array. More... | |

GeomVertexData | getVertexData () |

Returns the vertex data object that the writer is processing. 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. 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. 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 (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 (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 (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. More... | |

setMatrix3d (const LMatrix3d mat) | |

Sets the write row to a 3-by-3 matrix, and advances the write row. More... | |

setMatrix3f (const LMatrix3f mat) | |

Sets the write row to a 3-by-3 matrix, and advances the write row. More... | |

setMatrix4 (const LMatrix4 mat) | |

Sets the write row to a 4-by-4 matrix, and advances the write row. More... | |

setMatrix4d (const LMatrix4d mat) | |

Sets the write row to a 4-by-4 matrix, and advances the write row. More... | |

setMatrix4f (const LMatrix4f mat) | |

Sets the write row to a 4-by-4 matrix, and advances the write row. More... | |

setRow (int row) | |

Sets the start row to the indicated value. More... | |

setRowUnsafe (int row) | |

Sets the start row to the indicated value, without internal checks. More... | |

Public Member Functions inherited from GeomEnums | |

__init__ () | |

__init__ (const GeomEnums) | |

Public Member Functions inherited from GeomVertexReader | |

__init__ (const GeomVertexArrayData array_data, Thread current_thread) | |

Constructs a new reader to process the vertices of the indicated array only. More... | |

__init__ (const GeomVertexArrayData array_data, int column, Thread current_thread) | |

Constructs a new reader to process the vertices of the indicated array only. More... | |

__init__ (const GeomVertexData vertex_data, const InternalName name, Thread current_thread) | |

Constructs a new reader to process the vertices of the indicated data object. More... | |

__init__ (const GeomVertexData vertex_data, Thread current_thread) | |

Constructs a new reader to process the vertices of the indicated data object. More... | |

__init__ (const GeomVertexReader copy) | |

__init__ (Thread current_thread) | |

Constructs an invalid GeomVertexReader. More... | |

clear () | |

Resets the GeomVertexReader to the initial state. More... | |

int | getArray () |

Returns the array index containing the data type that the reader is working on. More... | |

const GeomVertexArrayData | getArrayData () |

Returns the particular array object that the reader is currently processing. More... | |

const GeomVertexArrayDataHandle | getArrayHandle () |

Returns the read handle to the array object that the read is currently processing. More... | |

const GeomVertexColumn | getColumn () |

Returns the description of the data type that the reader is working on. More... | |

Thread | getCurrentThread () |

Returns the Thread pointer of the currently-executing thread, as passed to the constructor of this object. More... | |

float | getData1 () |

Returns the data associated with the read row, expressed as a 1-component value, and advances the read row. More... | |

double | getData1d () |

Returns the data associated with the read row, expressed as a 1-component value, and advances the read row. More... | |

float | getData1f () |

Returns the data associated with the read row, expressed as a 1-component value, and advances the read row. More... | |

int | getData1i () |

Returns the data associated with the read row, expressed as a 1-component value, and advances the read row. More... | |

const LVecBase2 | getData2 () |

Returns the data associated with the read row, expressed as a 2-component value, and advances the read row. More... | |

const LVecBase2d | getData2d () |

Returns the data associated with the read row, expressed as a 2-component value, and advances the read row. More... | |

const LVecBase2f | getData2f () |

Returns the data associated with the read row, expressed as a 2-component value, and advances the read row. More... | |

const LVecBase2i | getData2i () |

Returns the data associated with the read row, expressed as a 2-component value, and advances the read row. More... | |

const LVecBase3 | getData3 () |

Returns the data associated with the read row, expressed as a 3-component value, and advances the read row. More... | |

const LVecBase3d | getData3d () |

Returns the data associated with the read row, expressed as a 3-component value, and advances the read row. More... | |

const LVecBase3f | getData3f () |

Returns the data associated with the read row, expressed as a 3-component value, and advances the read row. More... | |

const LVecBase3i | getData3i () |

Returns the data associated with the read row, expressed as a 3-component value, and advances the read row. More... | |

const LVecBase4 | getData4 () |

Returns the data associated with the read row, expressed as a 4-component value, and advances the read row. More... | |

const LVecBase4d | getData4d () |

Returns the data associated with the read row, expressed as a 4-component value, and advances the read row. More... | |

const LVecBase4f | getData4f () |

Returns the data associated with the read row, expressed as a 4-component value, and advances the read row. More... | |

const LVecBase4i | getData4i () |

Returns the data associated with the read row, expressed as a 4-component value, and advances the read row. More... | |

bool | getForce () |

Returns the value of the force flag. More... | |

LMatrix3 | getMatrix3 () |

Returns the 3-by-3 matrix associated with the read row and advances the read row. More... | |

LMatrix3d | getMatrix3d () |

Returns the 3-by-3 matrix associated with the read row and advances the read row. More... | |

LMatrix3f | getMatrix3f () |

Returns the 3-by-3 matrix associated with the read row and advances the read row. More... | |

LMatrix4 | getMatrix4 () |

Returns the 4-by-4 matrix associated with the read row and advances the read row. More... | |

LMatrix4d | getMatrix4d () |

Returns the 4-by-4 matrix associated with the read row and advances the read row. More... | |

LMatrix4f | getMatrix4f () |

Returns the 4-by-4 matrix associated with the read row and advances the read row. More... | |

int | getReadRow () |

Returns the row index from which the data will be retrieved by the next call to get_data*(). More... | |

int | getStartRow () |

Returns the row index at which the reader started. More... | |

int | getStride () |

Returns the per-row stride (bytes between consecutive rows) of the underlying vertex array. More... | |

const GeomVertexData | getVertexData () |

Returns the vertex data object that the reader is processing. More... | |

bool | hasColumn () |

Returns true if a valid data type has been successfully set, or false if the data type does not exist (or if get_force() is false and the vertex data is nonresident). More... | |

bool | isAtEnd () |

Returns true if the reader is currently at the end of the list of vertices, false otherwise. More... | |

GeomVertexReader | operator= (const GeomVertexReader copy) |

output (Ostream out) | |

bool | setColumn (const InternalName name) |

Sets up the reader to use the data type with the indicated name. More... | |

bool | setColumn (int column) |

Sets up the reader to use the nth data type of the GeomVertexFormat, numbering from 0. More... | |

bool | setColumn (int array, const GeomVertexColumn column) |

Sets up the reader to use the indicated column description on the given array. More... | |

setForce (bool force) | |

Sets the value of the force flag. More... | |

setRow (int row) | |

Sets the start row to the indicated value. More... | |

setRowUnsafe (int row) | |

Sets the start row to the indicated value, without internal checks. More... | |

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.

__init__ | ( | GeomVertexArrayData | array_data, |

Thread | current_thread |
||

) |

Constructs a new rewriter to process the vertices of the indicated array only.

__init__ | ( | GeomVertexArrayData | array_data, |

int | column, |
||

Thread | current_thread |
||

) |

Constructs a new rewriter to process the vertices of the indicated array only.

__init__ | ( | GeomVertexData | vertex_data, |

const InternalName | 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.

__init__ | ( | GeomVertexData | vertex_data, |

Thread | current_thread |
||

) |

Constructs a new rewriter to process the vertices of the indicated data object.

__init__ | ( | const GeomVertexRewriter | copy | ) |

__init__ | ( | 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.

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.

This low-level call should be used with caution; be careful with modifying the data in the handle out from under the GeomVertexRewriter.

const GeomVertexColumn 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.

It will return to this row if you reset the current column.

int 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 GeomVertexRewriter directly.

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= | ( | const GeomVertexRewriter | copy | ) |

output | ( | Ostream | out | ) |

bool setColumn | ( | const InternalName | 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.

bool setColumn | ( | int | column | ) |

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.

bool setColumn | ( | int | array, |

const GeomVertexColumn | 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.

setRow | ( | int | row | ) |

Sets the start, write, and write index to the indicated value.

The rewriter will begin traversing from the given 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.

Generated on Wed Jan 23 2019 21:39:10 for Panda3D by 1.8.15