14#ifndef GEOMVERTEXWRITER_H
15#define GEOMVERTEXWRITER_H
103 INLINE
void set_data2f(
const LVecBase2f &data);
104 INLINE
void set_data3f(
float x,
float y,
float z);
105 INLINE
void set_data3f(
const LVecBase3f &data);
106 INLINE
void set_data4f(
float x,
float y,
float z,
float w);
107 INLINE
void set_data4f(
const LVecBase4f &data);
113 INLINE
void set_data2d(
const LVecBase2d &data);
114 INLINE
void set_data3d(
double x,
double y,
double z);
115 INLINE
void set_data3d(
const LVecBase3d &data);
116 INLINE
void set_data4d(
double x,
double y,
double z,
double w);
117 INLINE
void set_data4d(
const LVecBase4d &data);
122 INLINE
void set_data2(PN_stdfloat x, PN_stdfloat y);
123 INLINE
void set_data2(
const LVecBase2 &data);
124 INLINE
void set_data3(PN_stdfloat x, PN_stdfloat y, PN_stdfloat z);
125 INLINE
void set_data3(
const LVecBase3 &data);
126 INLINE
void set_data4(PN_stdfloat x, PN_stdfloat y, PN_stdfloat z, PN_stdfloat w);
127 INLINE
void set_data4(
const LVecBase4 &data);
133 INLINE
void set_data2i(
const LVecBase2i &data);
135 INLINE
void set_data3i(
const LVecBase3i &data);
136 INLINE
void set_data4i(
int a,
int b,
int c,
int d);
137 INLINE
void set_data4i(
const LVecBase4i &data);
141 INLINE
void add_data2f(
const LVecBase2f &data);
142 INLINE
void add_data3f(
float x,
float y,
float z);
143 INLINE
void add_data3f(
const LVecBase3f &data);
144 INLINE
void add_data4f(
float x,
float y,
float z,
float w);
145 INLINE
void add_data4f(
const LVecBase4f &data);
151 INLINE
void add_data2d(
const LVecBase2d &data);
152 INLINE
void add_data3d(
double x,
double y,
double z);
153 INLINE
void add_data3d(
const LVecBase3d &data);
154 INLINE
void add_data4d(
double x,
double y,
double z,
double w);
155 INLINE
void add_data4d(
const LVecBase4d &data);
160 INLINE
void add_data2(PN_stdfloat x, PN_stdfloat y);
161 INLINE
void add_data2(
const LVecBase2 &data);
162 INLINE
void add_data3(PN_stdfloat x, PN_stdfloat y, PN_stdfloat z);
163 INLINE
void add_data3(
const LVecBase3 &data);
164 INLINE
void add_data4(PN_stdfloat x, PN_stdfloat y, PN_stdfloat z, PN_stdfloat w);
165 INLINE
void add_data4(
const LVecBase4 &data);
171 INLINE
void add_data2i(
const LVecBase2i &data);
173 INLINE
void add_data3i(
const LVecBase3i &data);
174 INLINE
void add_data4i(
int a,
int b,
int c,
int d);
175 INLINE
void add_data4i(
const LVecBase4i &data);
177 void output(std::ostream &out)
const;
180 INLINE GeomVertexColumn::Packer *get_packer()
const;
187 INLINE
void set_pointer(
int row);
188 INLINE
void quick_set_pointer(
int row);
189 INLINE
unsigned char *inc_pointer();
190 INLINE
unsigned char *inc_add_pointer();
205 GeomVertexColumn::Packer *_packer;
209 unsigned char *_pointer_begin;
210 unsigned char *_pointer_end;
211 unsigned char *_pointer;
218 static unsigned char empty_buffer[100];
This is a const pointer to an InternalName, and should be used in lieu of a CPT(InternalName) in func...
This data object is returned by GeomVertexArrayData::get_handle() or modify_handle().
This is the data for one array of a GeomVertexData structure.
This defines how a single column is interleaved within a vertex array stored within a Geom.
Encapsulates the data from a GeomVertexData, pre-fetched for one stage of the pipeline.
This defines the actual numeric vertex data stored in a Geom, in the structure defined by a particula...
This object provides a high-level interface for quickly writing a sequence of numeric values from a v...
void set_data4i(int a, int b, int c, int d)
Sets the write row to a particular 4-component value, and advances the write row.
void set_data2f(float x, float y)
Sets the write row to a particular 2-component value, and advances the write row.
void set_data2d(double x, double y)
Sets the write row to a particular 2-component value, and advances the write row.
void add_data4f(float x, float y, float z, float w)
Sets the write row to a particular 4-component value, and advances the write row.
void set_matrix3f(const LMatrix3f &mat)
Sets the write row to a 3-by-3 matrix, and advances the write row.
void add_matrix4d(const LMatrix4d &mat)
Sets the write row to a 4-by-4 matrix, and advances the write row.
void add_data1d(double data)
Sets the write row to a particular 1-component value, and advances the write row.
Thread * get_current_thread() const
Returns the Thread pointer of the currently-executing thread, as passed to the constructor of this ob...
void add_data3i(int a, int b, int c)
Sets the write row to a particular 3-component value, and advances the write row.
void set_data1f(float data)
Sets the write row to a particular 1-component value, and advances the write row.
void add_data4i(int a, int b, int c, int d)
Sets the write row to a particular 4-component value, and advances the write row.
size_t get_stride() const
Returns the per-row stride (bytes between consecutive rows) of the underlying vertex array.
void add_data1i(int data)
Sets the write row to a particular 1-component value, and advances the write row.
void add_data2i(int a, int b)
Sets the write row to a particular 2-component value, and advances the write row.
bool set_column(int column)
Sets up the writer to use the nth data type of the GeomVertexFormat, numbering from 0.
void set_matrix4d(const LMatrix4d &mat)
Sets the write row to a 4-by-4 matrix, and advances the write row.
void clear()
Resets the GeomVertexWriter to the initial state.
void set_data1i(int data)
Sets the write row to a particular 1-component value, and advances the write row.
void add_matrix3d(const LMatrix3d &mat)
Sets the write row to a 3-by-3 matrix, and advances the write row.
void set_row_unsafe(int row)
Sets the start row to the indicated value, without internal checks.
void add_matrix3(const LMatrix3 &mat)
Sets the write row to a 3-by-3 matrix, and advances the write row.
void set_data1d(double data)
Sets the write row to a particular 1-component value, and advances the write row.
void set_data3f(float x, float y, float z)
Sets the write row to a particular 3-component value, and advances the write row.
bool is_at_end() const
Returns true if the writer is currently at the end of the list of vertices, false otherwise.
void set_data1(PN_stdfloat data)
Sets the write row to a particular 1-component value, and advances the write row.
void add_data4(PN_stdfloat x, PN_stdfloat y, PN_stdfloat z, PN_stdfloat w)
Sets the write row to a particular 4-component value, and advances the write row.
GeomVertexArrayDataHandle * get_array_handle() const
Returns the write handle to the array object that the writer is currently processing.
void add_data2f(float x, float y)
Sets the write row to a particular 2-component value, and advances the write row.
bool reserve_num_rows(int num_rows)
This ensures that enough memory space for num_rows is allocated, so that you may add up to num_rows r...
void set_matrix4(const LMatrix4 &mat)
Sets the write row to a 4-by-4 matrix, and advances the write row.
void set_row(int row)
Sets the start row to the indicated value.
void add_data3d(double x, double y, double z)
Sets the write row to a particular 3-component value, and advances the write row.
void add_data1(PN_stdfloat data)
Sets the write row to a particular 1-component value, and advances the write row.
bool has_column() const
Returns true if a valid data type has been successfully set, or false if the data type does not exist...
int get_array() const
Returns the array index containing the data type that the writer is working on.
void add_matrix3f(const LMatrix3f &mat)
Sets the write row to a 3-by-3 matrix, and advances the write row.
int get_write_row() const
Returns the row index to which the data will be written at the next call to set_data*() or add_data*(...
void set_data4f(float x, float y, float z, float w)
Sets the write row to a particular 4-component value, and advances the write row.
void add_matrix4(const LMatrix4 &mat)
Sets the write row to a 4-by-4 matrix, and advances the write row.
void add_data3f(float x, float y, float z)
Sets the write row to a particular 3-component value, and advances the write row.
void set_data3i(int a, int b, int c)
Sets the write row to a particular 3-component value, and advances the write row.
GeomVertexWriter(Thread *current_thread=Thread::get_current_thread())
Constructs an invalid GeomVertexWriter.
void set_matrix4f(const LMatrix4f &mat)
Sets the write row to a 4-by-4 matrix, and advances the write row.
void add_matrix4f(const LMatrix4f &mat)
Sets the write row to a 4-by-4 matrix, and advances the write row.
GeomVertexArrayData * get_array_data() const
Returns the particular array object that the writer is currently processing.
void set_matrix3(const LMatrix3 &mat)
Sets the write row to a 3-by-3 matrix, and advances the write row.
int get_start_row() const
Returns the row index at which the writer started.
void set_data4d(double x, double y, double z, double w)
Sets the write row to a particular 4-component value, and advances the write row.
void set_matrix3d(const LMatrix3d &mat)
Sets the write row to a 3-by-3 matrix, and advances the write row.
void set_data3(PN_stdfloat x, PN_stdfloat y, PN_stdfloat z)
Sets the write row to a particular 3-component value, and advances the write row.
void add_data1f(float data)
Sets the write row to a particular 1-component value, and advances the write row.
void add_data2d(double x, double y)
Sets the write row to a particular 2-component value, and advances the write row.
void set_data2i(int a, int b)
Sets the write row to a particular 2-component value, and advances the write row.
const GeomVertexColumn * get_column() const
Returns the description of the data type that the writer is working on.
void set_data4(PN_stdfloat x, PN_stdfloat y, PN_stdfloat z, PN_stdfloat w)
Sets the write row to a particular 4-component value, and advances the write row.
void set_data3d(double x, double y, double z)
Sets the write row to a particular 3-component value, and advances the write row.
void add_data4d(double x, double y, double z, double w)
Sets the write row to a particular 4-component value, and advances the write row.
GeomVertexData * get_vertex_data() const
Returns the vertex data object that the writer is processing.
void add_data2(PN_stdfloat x, PN_stdfloat y)
Sets the write row to a particular 2-component value, and advances the write row.
void set_data2(PN_stdfloat x, PN_stdfloat y)
Sets the write row to a particular 2-component value, and advances the write row.
void add_data3(PN_stdfloat x, PN_stdfloat y, PN_stdfloat z)
Sets the write row to a particular 3-component value, and advances the write row.
Encodes a string name in a hash table, mapping it to a pointer.
A thread; that is, a lightweight process.
get_current_thread
Returns a pointer to the currently-executing Thread object.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.