|
|
@@ -125,9 +125,9 @@ get_array_data() const {
|
|
|
// Description: Sets up the writer to use the nth data type of the
|
|
|
// GeomVertexFormat, numbering from 0.
|
|
|
//
|
|
|
-// This also resets the write vertex number to the start
|
|
|
-// vertex (the same value passed to a previous call to
|
|
|
-// set_vertex(), or 0 if set_vertex() was never called.)
|
|
|
+// 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.
|
|
|
@@ -150,9 +150,9 @@ set_column(int column) {
|
|
|
// Description: Sets up the writer to use the data type with the
|
|
|
// indicated name.
|
|
|
//
|
|
|
-// This also resets the write vertex number to the start
|
|
|
-// vertex (the same value passed to a previous call to
|
|
|
-// set_vertex(), or 0 if set_vertex() was never called.)
|
|
|
+// 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.
|
|
|
@@ -168,9 +168,9 @@ set_column(const string &name) {
|
|
|
// Description: Sets up the writer to use the data type with the
|
|
|
// indicated name.
|
|
|
//
|
|
|
-// This also resets the write number to the start vertex
|
|
|
+// This also resets the write number to the start row
|
|
|
// (the same value passed to a previous call to
|
|
|
-// set_vertex(), or 0 if set_vertex() was never called.)
|
|
|
+// set_row(), or 0 if set_row() was never called.)
|
|
|
//
|
|
|
// The return value is true if the data type is valid,
|
|
|
// false otherwise.
|
|
|
@@ -226,30 +226,32 @@ get_column() const {
|
|
|
}
|
|
|
|
|
|
////////////////////////////////////////////////////////////////////
|
|
|
-// Function: qpGeomVertexWriter::set_vertex
|
|
|
+// Function: qpGeomVertexWriter::set_row
|
|
|
// Access: Published
|
|
|
-// Description: Sets the start, write, and write index to the
|
|
|
-// indicated value. The writer will begin traversing
|
|
|
-// from the given vertex.
|
|
|
+// Description: 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.
|
|
|
////////////////////////////////////////////////////////////////////
|
|
|
INLINE void qpGeomVertexWriter::
|
|
|
-set_vertex(int vertex) {
|
|
|
- _start_vertex = vertex;
|
|
|
+set_row(int row) {
|
|
|
+ _start_row = row;
|
|
|
if (has_column()) {
|
|
|
- set_pointer(_start_vertex);
|
|
|
+ set_pointer(_start_row);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
////////////////////////////////////////////////////////////////////
|
|
|
-// Function: qpGeomVertexWriter::get_start_vertex
|
|
|
+// Function: qpGeomVertexWriter::get_start_row
|
|
|
// Access: Published
|
|
|
-// Description: Returns the vertex index at which the writer
|
|
|
-// started. It will return to this vertex if you reset
|
|
|
+// Description: Returns the row index at which the writer
|
|
|
+// started. It will return to this row if you reset
|
|
|
// the current column.
|
|
|
////////////////////////////////////////////////////////////////////
|
|
|
INLINE int qpGeomVertexWriter::
|
|
|
-get_start_vertex() const {
|
|
|
- return _start_vertex;
|
|
|
+get_start_row() const {
|
|
|
+ return _start_row;
|
|
|
}
|
|
|
|
|
|
////////////////////////////////////////////////////////////////////
|
|
|
@@ -259,7 +261,7 @@ get_start_vertex() const {
|
|
|
// 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
|
|
|
-// vertex.
|
|
|
+// row.
|
|
|
////////////////////////////////////////////////////////////////////
|
|
|
INLINE bool qpGeomVertexWriter::
|
|
|
is_at_end() const {
|
|
|
@@ -269,10 +271,10 @@ is_at_end() const {
|
|
|
////////////////////////////////////////////////////////////////////
|
|
|
// Function: qpGeomVertexWriter::set_data1f
|
|
|
// Access: Published
|
|
|
-// Description: Sets the write vertex to a particular 1-component
|
|
|
-// value, and advances the write vertex.
|
|
|
+// Description: Sets the write row to a particular 1-component
|
|
|
+// value, and advances the write row.
|
|
|
//
|
|
|
-// It is an error for the write vertex to advance past
|
|
|
+// It is an error for the write row to advance past
|
|
|
// the end of data.
|
|
|
////////////////////////////////////////////////////////////////////
|
|
|
INLINE void qpGeomVertexWriter::
|
|
|
@@ -284,10 +286,10 @@ set_data1f(float data) {
|
|
|
////////////////////////////////////////////////////////////////////
|
|
|
// Function: qpGeomVertexWriter::set_data2f
|
|
|
// Access: Published
|
|
|
-// Description: Sets the write vertex to a particular 2-component
|
|
|
-// value, and advances the write vertex.
|
|
|
+// Description: Sets the write row to a particular 2-component
|
|
|
+// value, and advances the write row.
|
|
|
//
|
|
|
-// It is an error for the write vertex to advance past
|
|
|
+// It is an error for the write row to advance past
|
|
|
// the end of data.
|
|
|
////////////////////////////////////////////////////////////////////
|
|
|
INLINE void qpGeomVertexWriter::
|
|
|
@@ -298,10 +300,10 @@ set_data2f(float x, float y) {
|
|
|
////////////////////////////////////////////////////////////////////
|
|
|
// Function: qpGeomVertexWriter::set_data2f
|
|
|
// Access: Published
|
|
|
-// Description: Sets the write vertex to a particular 2-component
|
|
|
-// value, and advances the write vertex.
|
|
|
+// Description: Sets the write row to a particular 2-component
|
|
|
+// value, and advances the write row.
|
|
|
//
|
|
|
-// It is an error for the write vertex to advance past
|
|
|
+// It is an error for the write row to advance past
|
|
|
// the end of data.
|
|
|
////////////////////////////////////////////////////////////////////
|
|
|
INLINE void qpGeomVertexWriter::
|
|
|
@@ -313,10 +315,10 @@ set_data2f(const LVecBase2f &data) {
|
|
|
////////////////////////////////////////////////////////////////////
|
|
|
// Function: qpGeomVertexWriter::set_data3f
|
|
|
// Access: Published
|
|
|
-// Description: Sets the write vertex to a particular 3-component
|
|
|
-// value, and advances the write vertex.
|
|
|
+// Description: Sets the write row to a particular 3-component
|
|
|
+// value, and advances the write row.
|
|
|
//
|
|
|
-// It is an error for the write vertex to advance past
|
|
|
+// It is an error for the write row to advance past
|
|
|
// the end of data.
|
|
|
////////////////////////////////////////////////////////////////////
|
|
|
INLINE void qpGeomVertexWriter::
|
|
|
@@ -327,10 +329,10 @@ set_data3f(float x, float y, float z) {
|
|
|
////////////////////////////////////////////////////////////////////
|
|
|
// Function: qpGeomVertexWriter::set_data3f
|
|
|
// Access: Published
|
|
|
-// Description: Sets the write vertex to a particular 3-component
|
|
|
-// value, and advances the write vertex.
|
|
|
+// Description: Sets the write row to a particular 3-component
|
|
|
+// value, and advances the write row.
|
|
|
//
|
|
|
-// It is an error for the write vertex to advance past
|
|
|
+// It is an error for the write row to advance past
|
|
|
// the end of data.
|
|
|
////////////////////////////////////////////////////////////////////
|
|
|
INLINE void qpGeomVertexWriter::
|
|
|
@@ -342,10 +344,10 @@ set_data3f(const LVecBase3f &data) {
|
|
|
////////////////////////////////////////////////////////////////////
|
|
|
// Function: qpGeomVertexWriter::set_data4f
|
|
|
// Access: Published
|
|
|
-// Description: Sets the write vertex to a particular 4-component
|
|
|
-// value, and advances the write vertex.
|
|
|
+// Description: Sets the write row to a particular 4-component
|
|
|
+// value, and advances the write row.
|
|
|
//
|
|
|
-// It is an error for the write vertex to advance past
|
|
|
+// It is an error for the write row to advance past
|
|
|
// the end of data.
|
|
|
////////////////////////////////////////////////////////////////////
|
|
|
INLINE void qpGeomVertexWriter::
|
|
|
@@ -356,10 +358,10 @@ set_data4f(float x, float y, float z, float w) {
|
|
|
////////////////////////////////////////////////////////////////////
|
|
|
// Function: qpGeomVertexWriter::set_data4f
|
|
|
// Access: Published
|
|
|
-// Description: Sets the write vertex to a particular 4-component
|
|
|
-// value, and advances the write vertex.
|
|
|
+// Description: Sets the write row to a particular 4-component
|
|
|
+// value, and advances the write row.
|
|
|
//
|
|
|
-// It is an error for the write vertex to advance past
|
|
|
+// It is an error for the write row to advance past
|
|
|
// the end of data.
|
|
|
////////////////////////////////////////////////////////////////////
|
|
|
INLINE void qpGeomVertexWriter::
|
|
|
@@ -371,10 +373,10 @@ set_data4f(const LVecBase4f &data) {
|
|
|
////////////////////////////////////////////////////////////////////
|
|
|
// Function: qpGeomVertexWriter::set_data1i
|
|
|
// Access: Published
|
|
|
-// Description: Sets the write vertex to a particular 1-component
|
|
|
-// value, and advances the write vertex.
|
|
|
+// Description: Sets the write row to a particular 1-component
|
|
|
+// value, and advances the write row.
|
|
|
//
|
|
|
-// It is an error for the write vertex to advance past
|
|
|
+// It is an error for the write row to advance past
|
|
|
// the end of data.
|
|
|
////////////////////////////////////////////////////////////////////
|
|
|
INLINE void qpGeomVertexWriter::
|
|
|
@@ -386,10 +388,10 @@ set_data1i(int data) {
|
|
|
////////////////////////////////////////////////////////////////////
|
|
|
// Function: qpGeomVertexWriter::set_data2i
|
|
|
// Access: Published
|
|
|
-// Description: Sets the write vertex to a particular 2-component
|
|
|
-// value, and advances the write vertex.
|
|
|
+// Description: Sets the write row to a particular 2-component
|
|
|
+// value, and advances the write row.
|
|
|
//
|
|
|
-// It is an error for the write vertex to advance past
|
|
|
+// It is an error for the write row to advance past
|
|
|
// the end of data.
|
|
|
////////////////////////////////////////////////////////////////////
|
|
|
INLINE void qpGeomVertexWriter::
|
|
|
@@ -401,10 +403,10 @@ set_data2i(int a, int b) {
|
|
|
////////////////////////////////////////////////////////////////////
|
|
|
// Function: qpGeomVertexWriter::set_data2i
|
|
|
// Access: Published
|
|
|
-// Description: Sets the write vertex to a particular 2-component
|
|
|
-// value, and advances the write vertex.
|
|
|
+// Description: Sets the write row to a particular 2-component
|
|
|
+// value, and advances the write row.
|
|
|
//
|
|
|
-// It is an error for the write vertex to advance past
|
|
|
+// It is an error for the write row to advance past
|
|
|
// the end of data.
|
|
|
////////////////////////////////////////////////////////////////////
|
|
|
INLINE void qpGeomVertexWriter::
|
|
|
@@ -415,10 +417,10 @@ set_data2i(const int data[2]) {
|
|
|
////////////////////////////////////////////////////////////////////
|
|
|
// Function: qpGeomVertexWriter::set_data3i
|
|
|
// Access: Published
|
|
|
-// Description: Sets the write vertex to a particular 3-component
|
|
|
-// value, and advances the write vertex.
|
|
|
+// Description: Sets the write row to a particular 3-component
|
|
|
+// value, and advances the write row.
|
|
|
//
|
|
|
-// It is an error for the write vertex to advance past
|
|
|
+// It is an error for the write row to advance past
|
|
|
// the end of data.
|
|
|
////////////////////////////////////////////////////////////////////
|
|
|
INLINE void qpGeomVertexWriter::
|
|
|
@@ -430,10 +432,10 @@ set_data3i(int a, int b, int c) {
|
|
|
////////////////////////////////////////////////////////////////////
|
|
|
// Function: qpGeomVertexWriter::set_data3i
|
|
|
// Access: Published
|
|
|
-// Description: Sets the write vertex to a particular 3-component
|
|
|
-// value, and advances the write vertex.
|
|
|
+// Description: Sets the write row to a particular 3-component
|
|
|
+// value, and advances the write row.
|
|
|
//
|
|
|
-// It is an error for the write vertex to advance past
|
|
|
+// It is an error for the write row to advance past
|
|
|
// the end of data.
|
|
|
////////////////////////////////////////////////////////////////////
|
|
|
INLINE void qpGeomVertexWriter::
|
|
|
@@ -444,10 +446,10 @@ set_data3i(const int data[3]) {
|
|
|
////////////////////////////////////////////////////////////////////
|
|
|
// Function: qpGeomVertexWriter::set_data4i
|
|
|
// Access: Published
|
|
|
-// Description: Sets the write vertex to a particular 4-component
|
|
|
-// value, and advances the write vertex.
|
|
|
+// Description: Sets the write row to a particular 4-component
|
|
|
+// value, and advances the write row.
|
|
|
//
|
|
|
-// It is an error for the write vertex to advance past
|
|
|
+// It is an error for the write row to advance past
|
|
|
// the end of data.
|
|
|
////////////////////////////////////////////////////////////////////
|
|
|
INLINE void qpGeomVertexWriter::
|
|
|
@@ -459,10 +461,10 @@ set_data4i(int a, int b, int c, int d) {
|
|
|
////////////////////////////////////////////////////////////////////
|
|
|
// Function: qpGeomVertexWriter::set_data4i
|
|
|
// Access: Published
|
|
|
-// Description: Sets the write vertex to a particular 4-component
|
|
|
-// value, and advances the write vertex.
|
|
|
+// Description: Sets the write row to a particular 4-component
|
|
|
+// value, and advances the write row.
|
|
|
//
|
|
|
-// It is an error for the write vertex to advance past
|
|
|
+// It is an error for the write row to advance past
|
|
|
// the end of data.
|
|
|
////////////////////////////////////////////////////////////////////
|
|
|
INLINE void qpGeomVertexWriter::
|
|
|
@@ -473,11 +475,11 @@ set_data4i(const int data[4]) {
|
|
|
////////////////////////////////////////////////////////////////////
|
|
|
// Function: qpGeomVertexWriter::add_data1f
|
|
|
// Access: Published
|
|
|
-// Description: Sets the write vertex to a particular 1-component
|
|
|
-// value, and advances the write vertex.
|
|
|
+// Description: Sets the write row to a particular 1-component
|
|
|
+// value, and advances the write row.
|
|
|
//
|
|
|
-// If the write vertex advances past the end of data,
|
|
|
-// implicitly adds a new vertex to the data.
|
|
|
+// If the write row advances past the end of data,
|
|
|
+// implicitly adds a new row to the data.
|
|
|
////////////////////////////////////////////////////////////////////
|
|
|
INLINE void qpGeomVertexWriter::
|
|
|
add_data1f(float data) {
|
|
|
@@ -488,11 +490,11 @@ add_data1f(float data) {
|
|
|
////////////////////////////////////////////////////////////////////
|
|
|
// Function: qpGeomVertexWriter::add_data2f
|
|
|
// Access: Published
|
|
|
-// Description: Sets the write vertex to a particular 2-component
|
|
|
-// value, and advances the write vertex.
|
|
|
+// Description: Sets the write row to a particular 2-component
|
|
|
+// value, and advances the write row.
|
|
|
//
|
|
|
-// If the write vertex advances past the end of data,
|
|
|
-// implicitly adds a new vertex to the data.
|
|
|
+// If the write row advances past the end of data,
|
|
|
+// implicitly adds a new row to the data.
|
|
|
////////////////////////////////////////////////////////////////////
|
|
|
INLINE void qpGeomVertexWriter::
|
|
|
add_data2f(float x, float y) {
|
|
|
@@ -502,11 +504,11 @@ add_data2f(float x, float y) {
|
|
|
////////////////////////////////////////////////////////////////////
|
|
|
// Function: qpGeomVertexWriter::add_data2f
|
|
|
// Access: Published
|
|
|
-// Description: Sets the write vertex to a particular 2-component
|
|
|
-// value, and advances the write vertex.
|
|
|
+// Description: Sets the write row to a particular 2-component
|
|
|
+// value, and advances the write row.
|
|
|
//
|
|
|
-// If the write vertex advances past the end of data,
|
|
|
-// implicitly adds a new vertex to the data.
|
|
|
+// If the write row advances past the end of data,
|
|
|
+// implicitly adds a new row to the data.
|
|
|
////////////////////////////////////////////////////////////////////
|
|
|
INLINE void qpGeomVertexWriter::
|
|
|
add_data2f(const LVecBase2f &data) {
|
|
|
@@ -517,11 +519,11 @@ add_data2f(const LVecBase2f &data) {
|
|
|
////////////////////////////////////////////////////////////////////
|
|
|
// Function: qpGeomVertexWriter::add_data3f
|
|
|
// Access: Published
|
|
|
-// Description: Sets the write vertex to a particular 3-component
|
|
|
-// value, and advances the write vertex.
|
|
|
+// Description: Sets the write row to a particular 3-component
|
|
|
+// value, and advances the write row.
|
|
|
//
|
|
|
-// If the write vertex advances past the end of data,
|
|
|
-// implicitly adds a new vertex to the data.
|
|
|
+// If the write row advances past the end of data,
|
|
|
+// implicitly adds a new row to the data.
|
|
|
////////////////////////////////////////////////////////////////////
|
|
|
INLINE void qpGeomVertexWriter::
|
|
|
add_data3f(float x, float y, float z) {
|
|
|
@@ -531,11 +533,11 @@ add_data3f(float x, float y, float z) {
|
|
|
////////////////////////////////////////////////////////////////////
|
|
|
// Function: qpGeomVertexWriter::add_data3f
|
|
|
// Access: Published
|
|
|
-// Description: Sets the write vertex to a particular 3-component
|
|
|
-// value, and advances the write vertex.
|
|
|
+// Description: Sets the write row to a particular 3-component
|
|
|
+// value, and advances the write row.
|
|
|
//
|
|
|
-// If the write vertex advances past the end of data,
|
|
|
-// implicitly adds a new vertex to the data.
|
|
|
+// If the write row advances past the end of data,
|
|
|
+// implicitly adds a new row to the data.
|
|
|
////////////////////////////////////////////////////////////////////
|
|
|
INLINE void qpGeomVertexWriter::
|
|
|
add_data3f(const LVecBase3f &data) {
|
|
|
@@ -546,11 +548,11 @@ add_data3f(const LVecBase3f &data) {
|
|
|
////////////////////////////////////////////////////////////////////
|
|
|
// Function: qpGeomVertexWriter::add_data4f
|
|
|
// Access: Published
|
|
|
-// Description: Sets the write vertex to a particular 4-component
|
|
|
-// value, and advances the write vertex.
|
|
|
+// Description: Sets the write row to a particular 4-component
|
|
|
+// value, and advances the write row.
|
|
|
//
|
|
|
-// If the write vertex advances past the end of data,
|
|
|
-// implicitly adds a new vertex to the data.
|
|
|
+// If the write row advances past the end of data,
|
|
|
+// implicitly adds a new row to the data.
|
|
|
////////////////////////////////////////////////////////////////////
|
|
|
INLINE void qpGeomVertexWriter::
|
|
|
add_data4f(float x, float y, float z, float w) {
|
|
|
@@ -560,11 +562,11 @@ add_data4f(float x, float y, float z, float w) {
|
|
|
////////////////////////////////////////////////////////////////////
|
|
|
// Function: qpGeomVertexWriter::add_data4f
|
|
|
// Access: Published
|
|
|
-// Description: Sets the write vertex to a particular 4-component
|
|
|
-// value, and advances the write vertex.
|
|
|
+// Description: Sets the write row to a particular 4-component
|
|
|
+// value, and advances the write row.
|
|
|
//
|
|
|
-// If the write vertex advances past the end of data,
|
|
|
-// implicitly adds a new vertex to the data.
|
|
|
+// If the write row advances past the end of data,
|
|
|
+// implicitly adds a new row to the data.
|
|
|
////////////////////////////////////////////////////////////////////
|
|
|
INLINE void qpGeomVertexWriter::
|
|
|
add_data4f(const LVecBase4f &data) {
|
|
|
@@ -575,11 +577,11 @@ add_data4f(const LVecBase4f &data) {
|
|
|
////////////////////////////////////////////////////////////////////
|
|
|
// Function: qpGeomVertexWriter::add_data1i
|
|
|
// Access: Published
|
|
|
-// Description: Sets the write vertex to a particular 1-component
|
|
|
-// value, and advances the write vertex.
|
|
|
+// Description: Sets the write row to a particular 1-component
|
|
|
+// value, and advances the write row.
|
|
|
//
|
|
|
-// If the write vertex advances past the end of data,
|
|
|
-// implicitly adds a new vertex to the data.
|
|
|
+// If the write row advances past the end of data,
|
|
|
+// implicitly adds a new row to the data.
|
|
|
////////////////////////////////////////////////////////////////////
|
|
|
INLINE void qpGeomVertexWriter::
|
|
|
add_data1i(int data) {
|
|
|
@@ -590,11 +592,11 @@ add_data1i(int data) {
|
|
|
////////////////////////////////////////////////////////////////////
|
|
|
// Function: qpGeomVertexWriter::add_data2i
|
|
|
// Access: Published
|
|
|
-// Description: Sets the write vertex to a particular 2-component
|
|
|
-// value, and advances the write vertex.
|
|
|
+// Description: Sets the write row to a particular 2-component
|
|
|
+// value, and advances the write row.
|
|
|
//
|
|
|
-// If the write vertex advances past the end of data,
|
|
|
-// implicitly adds a new vertex to the data.
|
|
|
+// If the write row advances past the end of data,
|
|
|
+// implicitly adds a new row to the data.
|
|
|
////////////////////////////////////////////////////////////////////
|
|
|
INLINE void qpGeomVertexWriter::
|
|
|
add_data2i(int a, int b) {
|
|
|
@@ -605,11 +607,11 @@ add_data2i(int a, int b) {
|
|
|
////////////////////////////////////////////////////////////////////
|
|
|
// Function: qpGeomVertexWriter::add_data2i
|
|
|
// Access: Published
|
|
|
-// Description: Sets the write vertex to a particular 2-component
|
|
|
-// value, and advances the write vertex.
|
|
|
+// Description: Sets the write row to a particular 2-component
|
|
|
+// value, and advances the write row.
|
|
|
//
|
|
|
-// If the write vertex advances past the end of data,
|
|
|
-// implicitly adds a new vertex to the data.
|
|
|
+// If the write row advances past the end of data,
|
|
|
+// implicitly adds a new row to the data.
|
|
|
////////////////////////////////////////////////////////////////////
|
|
|
INLINE void qpGeomVertexWriter::
|
|
|
add_data2i(const int data[2]) {
|
|
|
@@ -619,11 +621,11 @@ add_data2i(const int data[2]) {
|
|
|
////////////////////////////////////////////////////////////////////
|
|
|
// Function: qpGeomVertexWriter::add_data3i
|
|
|
// Access: Published
|
|
|
-// Description: Sets the write vertex to a particular 3-component
|
|
|
-// value, and advances the write vertex.
|
|
|
+// Description: Sets the write row to a particular 3-component
|
|
|
+// value, and advances the write row.
|
|
|
//
|
|
|
-// If the write vertex advances past the end of data,
|
|
|
-// implicitly adds a new vertex to the data.
|
|
|
+// If the write row advances past the end of data,
|
|
|
+// implicitly adds a new row to the data.
|
|
|
////////////////////////////////////////////////////////////////////
|
|
|
INLINE void qpGeomVertexWriter::
|
|
|
add_data3i(int a, int b, int c) {
|
|
|
@@ -634,11 +636,11 @@ add_data3i(int a, int b, int c) {
|
|
|
////////////////////////////////////////////////////////////////////
|
|
|
// Function: qpGeomVertexWriter::add_data3i
|
|
|
// Access: Published
|
|
|
-// Description: Sets the write vertex to a particular 3-component
|
|
|
-// value, and advances the write vertex.
|
|
|
+// Description: Sets the write row to a particular 3-component
|
|
|
+// value, and advances the write row.
|
|
|
//
|
|
|
-// If the write vertex advances past the end of data,
|
|
|
-// implicitly adds a new vertex to the data.
|
|
|
+// If the write row advances past the end of data,
|
|
|
+// implicitly adds a new row to the data.
|
|
|
////////////////////////////////////////////////////////////////////
|
|
|
INLINE void qpGeomVertexWriter::
|
|
|
add_data3i(const int data[3]) {
|
|
|
@@ -648,11 +650,11 @@ add_data3i(const int data[3]) {
|
|
|
////////////////////////////////////////////////////////////////////
|
|
|
// Function: qpGeomVertexWriter::add_data4i
|
|
|
// Access: Published
|
|
|
-// Description: Sets the write vertex to a particular 4-component
|
|
|
-// value, and advances the write vertex.
|
|
|
+// Description: Sets the write row to a particular 4-component
|
|
|
+// value, and advances the write row.
|
|
|
//
|
|
|
-// If the write vertex advances past the end of data,
|
|
|
-// implicitly adds a new vertex to the data.
|
|
|
+// If the write row advances past the end of data,
|
|
|
+// implicitly adds a new row to the data.
|
|
|
////////////////////////////////////////////////////////////////////
|
|
|
INLINE void qpGeomVertexWriter::
|
|
|
add_data4i(int a, int b, int c, int d) {
|
|
|
@@ -663,11 +665,11 @@ add_data4i(int a, int b, int c, int d) {
|
|
|
////////////////////////////////////////////////////////////////////
|
|
|
// Function: qpGeomVertexWriter::add_data4i
|
|
|
// Access: Published
|
|
|
-// Description: Sets the write vertex to a particular 4-component
|
|
|
-// value, and advances the write vertex.
|
|
|
+// Description: Sets the write row to a particular 4-component
|
|
|
+// value, and advances the write row.
|
|
|
//
|
|
|
-// If the write vertex advances past the end of data,
|
|
|
-// implicitly adds a new vertex to the data.
|
|
|
+// If the write row advances past the end of data,
|
|
|
+// implicitly adds a new row to the data.
|
|
|
////////////////////////////////////////////////////////////////////
|
|
|
INLINE void qpGeomVertexWriter::
|
|
|
add_data4i(const int data[4]) {
|
|
|
@@ -678,29 +680,29 @@ add_data4i(const int data[4]) {
|
|
|
// Function: qpGeomVertexWriter::set_pointer
|
|
|
// Access: Private
|
|
|
// Description: Sets up the internal write pointer, etc. to use the
|
|
|
-// indicated vertex.
|
|
|
+// indicated row.
|
|
|
////////////////////////////////////////////////////////////////////
|
|
|
INLINE void qpGeomVertexWriter::
|
|
|
-set_pointer(int vertex) {
|
|
|
+set_pointer(int row) {
|
|
|
nassertv(has_column());
|
|
|
if (_vertex_data != (qpGeomVertexData *)NULL) {
|
|
|
qpGeomVertexArrayData *array_data = _vertex_data->modify_array(_array);
|
|
|
_pointer = array_data->modify_data();
|
|
|
_pointer_end = _pointer + array_data->get_data_size_bytes();
|
|
|
- _pointer += _packer->_column->get_start() + _stride * vertex;
|
|
|
+ _pointer += _packer->_column->get_start() + _stride * row;
|
|
|
|
|
|
} else {
|
|
|
_pointer = _array_data->modify_data();
|
|
|
_pointer_end = _pointer + _array_data->get_data_size_bytes();
|
|
|
- _pointer += _packer->_column->get_start() + _stride * vertex;
|
|
|
+ _pointer += _packer->_column->get_start() + _stride * row;
|
|
|
}
|
|
|
- _write_vertex = vertex;
|
|
|
+ _write_row = row;
|
|
|
}
|
|
|
|
|
|
////////////////////////////////////////////////////////////////////
|
|
|
// Function: qpGeomVertexWriter::inc_pointer
|
|
|
// Access: Private
|
|
|
-// Description: Increments to the next vertex, and returns the data
|
|
|
+// Description: Increments to the next row, and returns the data
|
|
|
// pointer as it was before incrementing.
|
|
|
////////////////////////////////////////////////////////////////////
|
|
|
INLINE unsigned char *qpGeomVertexWriter::
|
|
|
@@ -717,28 +719,28 @@ inc_pointer() {
|
|
|
|
|
|
unsigned char *orig_pointer = _pointer;
|
|
|
_pointer += _stride;
|
|
|
- ++_write_vertex;
|
|
|
+ ++_write_row;
|
|
|
return orig_pointer;
|
|
|
}
|
|
|
|
|
|
////////////////////////////////////////////////////////////////////
|
|
|
// Function: qpGeomVertexWriter::inc_add_pointer
|
|
|
// Access: Private
|
|
|
-// Description: Increments to the next vertex, and returns the data
|
|
|
+// Description: Increments to the next row, and returns the data
|
|
|
// pointer as it was before incrementing. If we are at
|
|
|
// or past the end of data, implicitly adds more
|
|
|
-// vertices first.
|
|
|
+// rows first.
|
|
|
////////////////////////////////////////////////////////////////////
|
|
|
INLINE unsigned char *qpGeomVertexWriter::
|
|
|
inc_add_pointer() {
|
|
|
if (_pointer >= _pointer_end) {
|
|
|
// Reset the data pointer.
|
|
|
if (_vertex_data != (qpGeomVertexData *)NULL) {
|
|
|
- _vertex_data->set_num_vertices(max(_write_vertex + 1, _vertex_data->get_num_vertices()));
|
|
|
+ _vertex_data->set_num_rows(max(_write_row + 1, _vertex_data->get_num_rows()));
|
|
|
} else {
|
|
|
- _array_data->set_num_vertices(max(_write_vertex + 1, _array_data->get_num_vertices()));
|
|
|
+ _array_data->set_num_rows(max(_write_row + 1, _array_data->get_num_rows()));
|
|
|
}
|
|
|
- set_pointer(_write_vertex);
|
|
|
+ set_pointer(_write_row);
|
|
|
}
|
|
|
return inc_pointer();
|
|
|
}
|