19 const unsigned char GeomVertexReader::empty_buffer[100] = { 0 };
34 if (column ==
nullptr) {
40 _pointer_end =
nullptr;
45 if (_vertex_data !=
nullptr) {
47 reader.check_array_readers();
48 return set_vertex_column(array, column, &reader);
50 if (_array_data !=
nullptr) {
51 return set_array_column(column);
61 void GeomVertexReader::
62 output(std::ostream &out)
const {
64 if (column ==
nullptr) {
65 out <<
"GeomVertexReader()";
69 <<
", column = " << column->
get_name()
70 <<
" (" << get_packer()->get_name()
78 void GeomVertexReader::
82 _pointer_begin =
nullptr;
83 _pointer_end =
nullptr;
93 bool GeomVertexReader::
96 if (column ==
nullptr) {
100 nassertr(_vertex_data !=
nullptr,
false);
105 nassertr(array >= 0 && (
size_t)array < _vertex_data->get_num_arrays(),
false);
109 _handle = data_reader->get_array_reader(_array);
110 _stride = _handle->get_array_format()->get_stride();
112 _packer = column->_packer;
113 return set_pointer(_start_row);
120 bool GeomVertexReader::
122 if (column ==
nullptr) {
126 nassertr(_array_data !=
nullptr,
false);
128 _handle = _array_data->get_handle();
129 _stride = _handle->get_array_format()->get_stride();
131 _packer = column->_packer;
132 return set_pointer(_start_row);
const GeomVertexArrayData * get_array_data() const
Returns the particular array object that the reader is currently processing.
bool set_column(int column)
Sets up the reader to use the nth data type of the GeomVertexFormat, numbering from 0.
const GeomVertexColumn * get_column() const
Returns the description of the data type that the reader is working on.
This defines how a single column is interleaved within a vertex array stored within a Geom.
int get_read_row() const
Returns the row index from which the data will be retrieved by the next call to get_data*().
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
Encapsulates the data from a GeomVertexData, pre-fetched for one stage of the pipeline.
const InternalName * get_name() const
Returns the name of this particular data field, e.g.