# GeomVertexReader

from pandac.PandaModules import GeomVertexReader

Class : GeomVertexReader
Description : This object provides a high-level interface for quickly reading a sequence of numeric values from a vertex table.
It is particularly optimized for reading a single column of data values for a series of vertices, without changing columns between each number. Although you can also use one GeomVertexReader to read across the columns if it is convenient, by calling set_column() repeatedly at each vertex, it is faster to read down the columns, and to use a different GeomVertexReader for each column.
Note that a GeomVertexReader does not keep a reference count to the actual vertex data buffer (it grabs the current data buffer from the GeomVertexData whenever set_column() is called). This means that it is important not to keep a GeomVertexReader 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.

## Inheritance:

GeomVertexReader: GeomEnums
GeomEnums:

## Methods of GeomVertexReader:

getArray
getArrayData
getColumn
getData1f
getData1i
getData2f
getData2i
getData3f
getData3i
getData4f
getData4i
getReadRow
getStartRow
getVertexData
hasColumn
isAtEnd
operator =
output
setColumn
setRow

## Constants in GeomEnums:

UHClient | (UsageHint)
UHStream | (UsageHint)
UHDynamic | (UsageHint)
UHStatic | (UsageHint)
UHUnspecified | (UsageHint)
GRIndexedPoint | (GeomRendering)
GRIndexedOther | (GeomRendering)
GRIndexedBits | (GeomRendering)
GRPoint | (GeomRendering)
GRPointUniformSize | (GeomRendering)
GRPerPointSize | (GeomRendering)
GRPointPerspective | (GeomRendering)
GRPointAspectRatio | (GeomRendering)
GRPointScale | (GeomRendering)
GRPointRotate | (GeomRendering)
GRPointSprite | (GeomRendering)
GRPointSpriteTexMatrix | (GeomRendering)
GRPointBits | (GeomRendering)
GRTriangleStrip | (GeomRendering)
GRTriangleFan | (GeomRendering)
GRLineStrip | (GeomRendering)
GRCompositeBits | (GeomRendering)
GRFlatFirstVertex | (GeomRendering)
GRFlatLastVertex | (GeomRendering)
GRShadeModelBits | (GeomRendering)
GRTexcoordLightVector | (GeomRendering)
SMUniform | (ShadeModel)
SMSmooth | (ShadeModel)
SMFlatFirstVertex | (ShadeModel)
SMFlatLastVertex | (ShadeModel)
PTNone | (PrimitiveType)
PTPolygons | (PrimitiveType)
PTLines | (PrimitiveType)
PTPoints | (PrimitiveType)
NTUint8 | (NumericType)
NTUint16 | (NumericType)
NTUint32 | (NumericType)
NTPackedDcba | (NumericType)
NTPackedDabc | (NumericType)
NTFloat32 | (NumericType)
COther | (Contents)
CPoint | (Contents)
CClipPoint | (Contents)
CVector | (Contents)
CTexcoord | (Contents)
CColor | (Contents)
CIndex | (Contents)
CMorphDelta | (Contents)
ATNone | (AnimationType)
ATPanda | (AnimationType)
ATHardware | (AnimationType)

getArray int GeomVertexReader::get_array(void) const; Description: Returns the array index containing the data type that the reader is working on.

getArrayData GeomVertexArrayData const *GeomVertexReader::get_array_data(void) const; Description: Returns the particular array object that the reader is currently processing.

getColumn GeomVertexColumn const *GeomVertexReader::get_column(void) const; Description: Returns the description of the data type that the reader is working on.

getData1f float GeomVertexReader::get_data1f(void); Description: Returns the data associated with the read row, expressed as a 1-component value, and advances the read row.

getData1i int GeomVertexReader::get_data1i(void); Description: Returns the data associated with the read row, expressed as a 1-component value, and advances the read row.

getData2f LVecBase2f const &GeomVertexReader::get_data2f(void); Description: Returns the data associated with the read row, expressed as a 2-component value, and advances the read row.

getData2i int const *GeomVertexReader::get_data2i(void); Description: Returns the data associated with the read row, expressed as a 2-component value, and advances the read row.

getData3f LVecBase3f const &GeomVertexReader::get_data3f(void); Description: Returns the data associated with the read row, expressed as a 3-component value, and advances the read row.

getData3i int const *GeomVertexReader::get_data3i(void); Description: Returns the data associated with the read row, expressed as a 3-component value, and advances the read row.

getData4f LVecBase4f const &GeomVertexReader::get_data4f(void); Description: Returns the data associated with the read row, expressed as a 4-component value, and advances the read row.

getData4i int const *GeomVertexReader::get_data4i(void); Description: Returns the data associated with the read row, expressed as a 4-component value, and advances the read row.

getReadRow int GeomVertexReader::get_read_row(void) const; Description: Returns the row index from which the data will be retrieved by the next call to get_data*().

getStartRow int GeomVertexReader::get_start_row(void) const; Description: Returns the row index at which the reader started. It will return to this row if you reset the current column.

getVertexData GeomVertexData const *GeomVertexReader::get_vertex_data(void) const; Description: Returns the vertex data object that the reader is processing. This may return NULL if the reader was constructed with just an array pointer.

hasColumn bool GeomVertexReader::has_column(void) const; Description: Returns true if a valid data type has been successfully set, or false if the data type does not exist.

isAtEnd bool GeomVertexReader::is_at_end(void) const; Description: Returns true if the reader is currently at the end of the list of vertices, false otherwise. If this is true, another call to get_data*() will result in a crash.

operator = void GeomVertexReader::operator =(GeomVertexReader const &copy); Description:

output void GeomVertexReader::output(ostream &out) const; Description:

setColumn bool GeomVertexReader::set_column(int column); Description: Sets up the reader to use the nth data type of the GeomVertexFormat, numbering from 0. This also resets the read 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. Description: Sets up the reader to use the data type with the indicated name. Description: Sets up the reader to use the indicated column description on the given array. This also resets the current read 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.)

setRow void GeomVertexReader::set_row(int row); Description: Sets the start row to the indicated value. The reader will begin reading from the indicated row; each subsequent get_data*() call will return the data from the subsequent row. If set_column() is called, the reader will return to this row.