Panda3D
|
This object provides a high-level interface for quickly writing a sequence of numeric values from a vertex table. More...
#include "geomVertexWriter.h"
Public Member Functions | |
GeomVertexWriter (Thread *current_thread=Thread::get_current_thread()) | |
Constructs an invalid GeomVertexWriter. More... | |
GeomVertexWriter (GeomVertexData *vertex_data, Thread *current_thread=Thread::get_current_thread()) | |
Constructs a new writer to process the vertices of the indicated data object. More... | |
GeomVertexWriter (GeomVertexData *vertex_data, CPT_InternalName name, Thread *current_thread=Thread::get_current_thread()) | |
Constructs a new writer to process the vertices of the indicated data object. More... | |
GeomVertexWriter (GeomVertexArrayData *array_data, Thread *current_thread=Thread::get_current_thread()) | |
Constructs a new writer to process the vertices of the indicated array only. More... | |
GeomVertexWriter (GeomVertexArrayData *array_data, int column, Thread *current_thread=Thread::get_current_thread()) | |
Constructs a new writer to process the vertices of the indicated array only. More... | |
GeomVertexWriter (GeomVertexDataPipelineWriter *data_writer, const InternalName *name) | |
Constructs a new writer to process the vertices of the indicated data object. More... | |
GeomVertexWriter (const GeomVertexWriter ©) | |
void | add_data1 (PN_stdfloat data) |
Sets the write row to a particular 1-component value, and advances the write row. More... | |
void | add_data1d (double data) |
Sets the write row to a particular 1-component value, and advances the write row. More... | |
void | add_data1f (float data) |
Sets the write row to a particular 1-component value, and advances the write row. More... | |
void | add_data1i (int data) |
Sets the write row to a particular 1-component value, and advances the write row. More... | |
void | add_data2 (PN_stdfloat x, PN_stdfloat y) |
Sets the write row to a particular 2-component value, and advances the write row. More... | |
void | add_data2 (const LVecBase2 &data) |
Sets the write row to a particular 2-component value, and advances the write row. More... | |
void | add_data2d (double x, double y) |
Sets the write row to a particular 2-component value, and advances the write row. More... | |
void | add_data2d (const LVecBase2d &data) |
Sets the write row to a particular 2-component value, and advances the write row. More... | |
void | add_data2f (float x, float y) |
Sets the write row to a particular 2-component value, and advances the write row. More... | |
void | add_data2f (const LVecBase2f &data) |
Sets the write row to a particular 2-component value, and advances the write row. More... | |
void | add_data2i (int a, int b) |
Sets the write row to a particular 2-component value, and advances the write row. More... | |
void | add_data2i (const int data[2]) |
Sets the write row to a particular 2-component value, and advances the write row. More... | |
void | add_data2i (const LVecBase2i &data) |
Sets the write row to a particular 2-component value, and advances the write row. More... | |
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. More... | |
void | add_data3 (const LVecBase3 &data) |
Sets the write row to a particular 3-component value, and advances the write row. More... | |
void | add_data3d (double x, double y, double z) |
Sets the write row to a particular 3-component value, and advances the write row. More... | |
void | add_data3d (const LVecBase3d &data) |
Sets the write row to a particular 3-component value, and advances the write row. More... | |
void | add_data3f (float x, float y, float z) |
Sets the write row to a particular 3-component value, and advances the write row. More... | |
void | add_data3f (const LVecBase3f &data) |
Sets the write row to a particular 3-component value, and advances the write row. More... | |
void | add_data3i (int a, int b, int c) |
Sets the write row to a particular 3-component value, and advances the write row. More... | |
void | add_data3i (const int data[3]) |
Sets the write row to a particular 3-component value, and advances the write row. More... | |
void | add_data3i (const LVecBase3i &data) |
Sets the write row to a particular 3-component value, and advances the write row. More... | |
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. More... | |
void | add_data4 (const LVecBase4 &data) |
Sets the write row to a particular 4-component value, and advances the write row. More... | |
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. More... | |
void | add_data4d (const LVecBase4d &data) |
Sets the write row to a particular 4-component value, and advances the write row. More... | |
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. More... | |
void | add_data4f (const LVecBase4f &data) |
Sets the write row to a particular 4-component value, and advances the write row. More... | |
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. More... | |
void | add_data4i (const int data[4]) |
Sets the write row to a particular 4-component value, and advances the write row. More... | |
void | add_data4i (const LVecBase4i &data) |
Sets the write row to a particular 4-component value, and advances the write row. More... | |
void | add_matrix3 (const LMatrix3 &mat) |
Sets the write row to a 3-by-3 matrix, and advances the write row. More... | |
void | add_matrix3d (const LMatrix3d &mat) |
Sets the write row to a 3-by-3 matrix, and advances the write row. More... | |
void | add_matrix3f (const LMatrix3f &mat) |
Sets the write row to a 3-by-3 matrix, and advances the write row. More... | |
void | add_matrix4 (const LMatrix4 &mat) |
Sets the write row to a 4-by-4 matrix, and advances the write row. More... | |
void | add_matrix4d (const LMatrix4d &mat) |
Sets the write row to a 4-by-4 matrix, and advances the write row. More... | |
void | add_matrix4f (const LMatrix4f &mat) |
Sets the write row to a 4-by-4 matrix, and advances the write row. More... | |
void | clear () |
Resets the GeomVertexWriter to the initial state. More... | |
int | get_array () const |
Returns the array index containing the data type that the writer is working on. More... | |
GeomVertexArrayData * | get_array_data () const |
Returns the particular array object that the writer is currently processing. More... | |
GeomVertexArrayDataHandle * | get_array_handle () const |
Returns the write handle to the array object that the writer is currently processing. More... | |
const GeomVertexColumn * | get_column () const |
Returns the description of the data type that the writer is working on. More... | |
Thread * | get_current_thread () const |
Returns the Thread pointer of the currently-executing thread, as passed to the constructor of this object. More... | |
int | get_start_row () const |
Returns the row index at which the writer started. More... | |
size_t | get_stride () const |
Returns the per-row stride (bytes between consecutive rows) of the underlying vertex array. More... | |
GeomVertexData * | get_vertex_data () const |
Returns the vertex data object that the writer is processing. More... | |
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*(). More... | |
bool | has_column () const |
Returns true if a valid data type has been successfully set, or false if the data type does not exist. More... | |
bool | is_at_end () const |
Returns true if the writer is currently at the end of the list of vertices, false otherwise. More... | |
void | operator= (const GeomVertexWriter ©) |
void | output (ostream &out) const |
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 rows without causing a new memory allocation. More... | |
bool | set_column (int column) |
Sets up the writer to use the nth data type of the GeomVertexFormat, numbering from 0. More... | |
bool | set_column (CPT_InternalName name) |
Sets up the writer to use the data type with the indicated name. More... | |
bool | set_column (int array, const GeomVertexColumn *column) |
Sets up the writer to use the indicated column description on the given array. More... | |
void | set_data1 (PN_stdfloat data) |
Sets the write row to a particular 1-component value, and advances the write row. More... | |
void | set_data1d (double data) |
Sets the write row to a particular 1-component value, and advances the write row. More... | |
void | set_data1f (float data) |
Sets the write row to a particular 1-component value, and advances the write row. More... | |
void | set_data1i (int data) |
Sets the write row to a particular 1-component value, and advances the write row. More... | |
void | set_data2 (PN_stdfloat x, PN_stdfloat y) |
Sets the write row to a particular 2-component value, and advances the write row. More... | |
void | set_data2 (const LVecBase2 &data) |
Sets the write row to a particular 2-component value, and advances the write row. More... | |
void | set_data2d (double x, double y) |
Sets the write row to a particular 2-component value, and advances the write row. More... | |
void | set_data2d (const LVecBase2d &data) |
Sets the write row to a particular 2-component value, and advances the write row. More... | |
void | set_data2f (float x, float y) |
Sets the write row to a particular 2-component value, and advances the write row. More... | |
void | set_data2f (const LVecBase2f &data) |
Sets the write row to a particular 2-component value, and advances the write row. More... | |
void | set_data2i (int a, int b) |
Sets the write row to a particular 2-component value, and advances the write row. More... | |
void | set_data2i (const int data[2]) |
Sets the write row to a particular 2-component value, and advances the write row. More... | |
void | set_data2i (const LVecBase2i &data) |
Sets the write row to a particular 2-component value, and advances the write row. More... | |
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. More... | |
void | set_data3 (const LVecBase3 &data) |
Sets the write row to a particular 3-component value, and advances the write row. More... | |
void | set_data3d (double x, double y, double z) |
Sets the write row to a particular 3-component value, and advances the write row. More... | |
void | set_data3d (const LVecBase3d &data) |
Sets the write row to a particular 3-component value, and advances the write row. More... | |
void | set_data3f (float x, float y, float z) |
Sets the write row to a particular 3-component value, and advances the write row. More... | |
void | set_data3f (const LVecBase3f &data) |
Sets the write row to a particular 3-component value, and advances the write row. More... | |
void | set_data3i (int a, int b, int c) |
Sets the write row to a particular 3-component value, and advances the write row. More... | |
void | set_data3i (const int data[3]) |
Sets the write row to a particular 3-component value, and advances the write row. More... | |
void | set_data3i (const LVecBase3i &data) |
Sets the write row to a particular 3-component value, and advances the write row. More... | |
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. More... | |
void | set_data4 (const LVecBase4 &data) |
Sets the write row to a particular 4-component value, and advances the write row. More... | |
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. More... | |
void | set_data4d (const LVecBase4d &data) |
Sets the write row to a particular 4-component value, and advances the write row. More... | |
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. More... | |
void | set_data4f (const LVecBase4f &data) |
Sets the write row to a particular 4-component value, and advances the write row. More... | |
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. More... | |
void | set_data4i (const int data[4]) |
Sets the write row to a particular 4-component value, and advances the write row. More... | |
void | set_data4i (const LVecBase4i &data) |
Sets the write row to a particular 4-component value, and advances the write row. More... | |
void | set_matrix3 (const LMatrix3 &mat) |
Sets the write row to a 3-by-3 matrix, and advances the write row. More... | |
void | set_matrix3d (const LMatrix3d &mat) |
Sets the write row to a 3-by-3 matrix, and advances the write row. More... | |
void | set_matrix3f (const LMatrix3f &mat) |
Sets the write row to a 3-by-3 matrix, and advances the write row. More... | |
void | set_matrix4 (const LMatrix4 &mat) |
Sets the write row to a 4-by-4 matrix, and advances the write row. More... | |
void | set_matrix4d (const LMatrix4d &mat) |
Sets the write row to a 4-by-4 matrix, and advances the write row. More... | |
void | set_matrix4f (const LMatrix4f &mat) |
Sets the write row to a 4-by-4 matrix, and advances the write row. More... | |
void | set_row (int row) |
Sets the start row to the indicated value. More... | |
void | set_row_unsafe (int row) |
Sets the start row to the indicated value, without internal checks. More... | |
Additional Inherited Members | |
![]() | |
enum | AnimationType { AT_none, AT_panda, AT_hardware } |
enum | Contents { C_other, C_point, C_clip_point, C_vector, C_texcoord, C_color, C_index, C_morph_delta, C_matrix, C_normal } |
enum | GeomRendering { GR_indexed_point = 0x00001, GR_indexed_other = 0x10000, GR_indexed_bits = 0x10001, GR_point = 0x00002, GR_point_uniform_size = 0x00004, GR_per_point_size = 0x00008, GR_point_perspective = 0x00010, GR_point_aspect_ratio = 0x00020, GR_point_scale = 0x00040, GR_point_rotate = 0x00080, GR_point_sprite = 0x00100, GR_point_sprite_tex_matrix = 0x00200, GR_point_bits = 0x003fe, GR_triangle_strip = 0x00400, GR_triangle_fan = 0x00800, GR_line_strip = 0x01000, GR_composite_bits = 0x01c00, GR_strip_cut_index = 0x20000, GR_flat_first_vertex = 0x02000, GR_flat_last_vertex = 0x04000, GR_shade_model_bits = 0x06000 } |
enum | NumericType { NT_uint8, NT_uint16, NT_uint32, NT_packed_dcba, NT_packed_dabc, NT_float32, NT_float64, NT_stdfloat } |
enum | PrimitiveType { PT_none, PT_polygons, PT_lines, PT_points, PT_patches } |
enum | ShadeModel { SM_uniform, SM_smooth, SM_flat_first_vertex, SM_flat_last_vertex } |
enum | UsageHint { UH_client, UH_stream, UH_dynamic, UH_static, UH_unspecified } |
This object provides a high-level interface for quickly writing a sequence of numeric values from a vertex table.
This object can be used both to replace existing vertices in the table, or to extend the table with new vertices. The set_data*() family of methods can only be used to replace existing data; it is an error to allow these to run past the end of the data. The add_data*() family of methods, on the other hand, can be used to replace existing data or add new data; if you call set_row() into the middle of existing data the add_data*() methods will behave like the corresponding set_data*(), but if they run past the end of existing data they will quietly add new vertices.
Like GeomVertexReader, the writer is particularly optimized for writing a single column of data values for a series of vertices, without changing columns between each number. Although you can also use one GeomVertexWriter to write across the columns if it is convenient, by calling set_column() repeatedly at each vertex, it is faster to write down the columns, and to use a different GeomVertexWriter for each column.
Note that, like a GeomVertexReader, a GeomVertexWriter does not keep a reference count to the actual vertex data buffer. This means that it is important not to keep a GeomVertexWriter 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.
Definition at line 69 of file geomVertexWriter.h.
|
inline |
Constructs an invalid GeomVertexWriter.
You must use the assignment operator to assign a valid GeomVertexWriter to this object before you can use it.
Definition at line 25 of file geomVertexWriter.I.
Referenced by clear(), GeomVertexRewriter::GeomVertexRewriter(), and GeomVertexWriter().
|
inline |
Constructs a new writer to process the vertices of the indicated data object.
Definition at line 39 of file geomVertexWriter.I.
References GeomVertexWriter().
|
inline |
Constructs a new writer to process the vertices of the indicated data object.
This flavor creates the writer specifically to process the named data type.
Definition at line 54 of file geomVertexWriter.I.
References GeomVertexWriter(), and set_column().
|
inline |
Constructs a new writer to process the vertices of the indicated array only.
Definition at line 70 of file geomVertexWriter.I.
References GeomVertexWriter().
|
inline |
Constructs a new writer to process the vertices of the indicated array only.
Definition at line 85 of file geomVertexWriter.I.
References GeomVertexWriter(), and set_column().
|
inline |
Constructs a new writer to process the vertices of the indicated data object.
This flavor creates the writer specifically to process the named data type.
Definition at line 102 of file geomVertexWriter.I.
References GeomVertexWriter(), and get_vertex_data().
|
inline |
Sets the write row to a particular 1-component value, and advances the write row.
If the write row advances past the end of data, implicitly adds a new row to the data.
Definition at line 1346 of file geomVertexWriter.I.
References add_data1d(), add_data1f(), and add_data2().
Referenced by add_matrix4d().
|
inline |
Sets the write row to a particular 1-component value, and advances the write row.
If the write row advances past the end of data, implicitly adds a new row to the data.
Definition at line 1190 of file geomVertexWriter.I.
References add_data2d(), and has_column().
Referenced by add_data1(), and add_matrix4f().
|
inline |
Sets the write row to a particular 1-component value, and advances the write row.
If the write row advances past the end of data, implicitly adds a new row to the data.
Definition at line 1034 of file geomVertexWriter.I.
References add_data2f(), and has_column().
Referenced by add_data1(), and set_data4i().
|
inline |
Sets the write row to a particular 1-component value, and advances the write row.
If the write row advances past the end of data, implicitly adds a new row to the data.
Definition at line 1510 of file geomVertexWriter.I.
References add_data2i(), and has_column().
Referenced by add_matrix4(), GeomPrimitive::add_vertex(), GeomPrimitive::pack_vertices(), and RocketRenderInterface::render().
|
inline |
Sets the write row to a particular 2-component value, and advances the write row.
If the write row advances past the end of data, implicitly adds a new row to the data.
Definition at line 1364 of file geomVertexWriter.I.
References add_data2d(), and add_data2f().
Referenced by add_data1(), CMotionTrail::add_geometry_quad(), ObjToEggConverter::convert_file(), MultitexReducer::flatten(), PGFrameStyle::generate_into(), WindowFramework::load_default_model(), WindowFramework::make_camera(), OccluderNode::output(), GraphicsOutput::process_events(), MeshDrawer2D::quad_raw(), TextNode::r_prepare_scene(), SheetNode::reset_bound(), RopeNode::reset_bound(), and MeshDrawer::tri().
|
inline |
Sets the write row to a particular 2-component value, and advances the write row.
If the write row advances past the end of data, implicitly adds a new row to the data.
Definition at line 1382 of file geomVertexWriter.I.
References add_data2d(), add_data2f(), and add_data3().
|
inline |
Sets the write row to a particular 2-component value, and advances the write row.
If the write row advances past the end of data, implicitly adds a new row to the data.
Definition at line 1205 of file geomVertexWriter.I.
Referenced by add_data1d(), and add_data2().
|
inline |
Sets the write row to a particular 2-component value, and advances the write row.
If the write row advances past the end of data, implicitly adds a new row to the data.
Definition at line 1219 of file geomVertexWriter.I.
References add_data3d(), and has_column().
|
inline |
Sets the write row to a particular 2-component value, and advances the write row.
If the write row advances past the end of data, implicitly adds a new row to the data.
Definition at line 1049 of file geomVertexWriter.I.
Referenced by add_data1f(), add_data2(), PfmVizzer::generate_vis_points(), RocketRenderInterface::render(), and PhysxSoftBodyNode::set_from_geom().
|
inline |
Sets the write row to a particular 2-component value, and advances the write row.
If the write row advances past the end of data, implicitly adds a new row to the data.
Definition at line 1063 of file geomVertexWriter.I.
References add_data3f(), and has_column().
|
inline |
Sets the write row to a particular 2-component value, and advances the write row.
If the write row advances past the end of data, implicitly adds a new row to the data.
Definition at line 1525 of file geomVertexWriter.I.
Referenced by add_data1i(), and add_data2i().
|
inline |
Sets the write row to a particular 2-component value, and advances the write row.
If the write row advances past the end of data, implicitly adds a new row to the data.
Definition at line 1539 of file geomVertexWriter.I.
References add_data2i().
|
inline |
Sets the write row to a particular 2-component value, and advances the write row.
If the write row advances past the end of data, implicitly adds a new row to the data.
Definition at line 1553 of file geomVertexWriter.I.
References add_data3i(), and has_column().
|
inline |
Sets the write row to a particular 3-component value, and advances the write row.
If the write row advances past the end of data, implicitly adds a new row to the data.
Definition at line 1400 of file geomVertexWriter.I.
References add_data3d(), and add_data3f().
Referenced by add_data2(), CMotionTrail::add_geometry_quad(), AssimpLoader::build_graph(), MouseWatcher::clear_trail_node(), ObjToEggConverter::convert_file(), LineSegs::create(), CullTraverser::draw_bounding_volume(), PortalClipper::draw_lines(), BulletDebugNode::draw_mask_changed(), MeshDrawer::end(), MeshDrawer2D::end(), PGFrameStyle::generate_into(), CollisionFloorMesh::get_collision_origin(), HeightfieldTesselator::get_elevation(), CollisionPlane::get_test_pcollector(), CollisionInvSphere::get_test_pcollector(), CollisionSphere::get_test_pcollector(), CollisionTube::get_test_pcollector(), CollisionParabola::get_test_pcollector(), CollisionPolygon::get_test_pcollector(), PipeOcclusionCullTraverser::get_texture(), PlaneNode::is_renderable(), TextAssembler::is_whitespace(), WindowFramework::load_default_model(), WindowFramework::make_camera(), LineParticleRenderer::make_copy(), SparkleParticleRenderer::make_copy(), PointParticleRenderer::make_copy(), OccluderNode::output(), GraphicsOutput::process_events(), MeshDrawer2D::quad_raw(), TextNode::r_prepare_scene(), CardMaker::reset(), SheetNode::reset_bound(), RopeNode::reset_bound(), FisheyeMaker::set_fov(), CollisionRay::set_from_lens(), CollisionSegment::set_from_lens(), ProjectionScreen::set_projector(), TextFont::string_winding_order(), MeshDrawer::tri(), and LODNode::write_datagram().
|
inline |
Sets the write row to a particular 3-component value, and advances the write row.
If the write row advances past the end of data, implicitly adds a new row to the data.
Definition at line 1418 of file geomVertexWriter.I.
References add_data3d(), add_data3f(), and add_data4().
|
inline |
Sets the write row to a particular 3-component value, and advances the write row.
If the write row advances past the end of data, implicitly adds a new row to the data.
Definition at line 1234 of file geomVertexWriter.I.
Referenced by add_data2d(), add_data3(), and EggLoader::make_polyset().
|
inline |
Sets the write row to a particular 3-component value, and advances the write row.
If the write row advances past the end of data, implicitly adds a new row to the data.
Definition at line 1248 of file geomVertexWriter.I.
References add_data4d(), and has_column().
|
inline |
Sets the write row to a particular 3-component value, and advances the write row.
If the write row advances past the end of data, implicitly adds a new row to the data.
Definition at line 1078 of file geomVertexWriter.I.
Referenced by add_data2f(), add_data3(), PfmVizzer::generate_vis_points(), RocketRenderInterface::render(), and PhysxSoftBodyNode::set_from_geom().
|
inline |
Sets the write row to a particular 3-component value, and advances the write row.
If the write row advances past the end of data, implicitly adds a new row to the data.
Definition at line 1092 of file geomVertexWriter.I.
References add_data4f(), and has_column().
|
inline |
Sets the write row to a particular 3-component value, and advances the write row.
If the write row advances past the end of data, implicitly adds a new row to the data.
Definition at line 1568 of file geomVertexWriter.I.
Referenced by add_data2i(), and add_data3i().
|
inline |
Sets the write row to a particular 3-component value, and advances the write row.
If the write row advances past the end of data, implicitly adds a new row to the data.
Definition at line 1582 of file geomVertexWriter.I.
References add_data3i().
|
inline |
Sets the write row to a particular 3-component value, and advances the write row.
If the write row advances past the end of data, implicitly adds a new row to the data.
Definition at line 1596 of file geomVertexWriter.I.
References add_data4i(), and has_column().
|
inline |
Sets the write row to a particular 4-component value, and advances the write row.
If the write row advances past the end of data, implicitly adds a new row to the data.
Definition at line 1436 of file geomVertexWriter.I.
References add_data4d(), and add_data4f().
Referenced by add_data3(), CMotionTrail::add_geometry_quad(), AssimpLoader::build_graph(), ObjToEggConverter::convert_file(), LineSegs::create(), PortalClipper::draw_lines(), BulletDebugNode::draw_mask_changed(), PGFrameStyle::generate_into(), CollisionParabola::get_test_pcollector(), TextAssembler::is_whitespace(), LineParticleRenderer::make_copy(), PointParticleRenderer::make_copy(), SparkleParticleRenderer::make_copy(), EggLoader::make_polyset(), MeshDrawer2D::quad_raw(), SheetNode::reset_bound(), RopeNode::reset_bound(), CollisionRay::set_from_lens(), MeshDrawer::tri(), and LODNode::write_datagram().
|
inline |
Sets the write row to a particular 4-component value, and advances the write row.
If the write row advances past the end of data, implicitly adds a new row to the data.
Definition at line 1454 of file geomVertexWriter.I.
References add_data4d(), add_data4f(), and add_matrix3().
|
inline |
Sets the write row to a particular 4-component value, and advances the write row.
If the write row advances past the end of data, implicitly adds a new row to the data.
Definition at line 1263 of file geomVertexWriter.I.
Referenced by add_data3d(), add_data4(), and EggLoader::make_polyset().
|
inline |
Sets the write row to a particular 4-component value, and advances the write row.
If the write row advances past the end of data, implicitly adds a new row to the data.
Definition at line 1277 of file geomVertexWriter.I.
References add_matrix3d(), and has_column().
|
inline |
Sets the write row to a particular 4-component value, and advances the write row.
If the write row advances past the end of data, implicitly adds a new row to the data.
Definition at line 1107 of file geomVertexWriter.I.
Referenced by add_data3f(), add_data4(), and ColladaInput::write_data().
|
inline |
Sets the write row to a particular 4-component value, and advances the write row.
If the write row advances past the end of data, implicitly adds a new row to the data.
Definition at line 1121 of file geomVertexWriter.I.
References add_matrix3f(), and has_column().
|
inline |
Sets the write row to a particular 4-component value, and advances the write row.
If the write row advances past the end of data, implicitly adds a new row to the data.
Definition at line 1611 of file geomVertexWriter.I.
Referenced by add_data3i(), add_data4i(), and RocketRenderInterface::render().
|
inline |
Sets the write row to a particular 4-component value, and advances the write row.
If the write row advances past the end of data, implicitly adds a new row to the data.
Definition at line 1625 of file geomVertexWriter.I.
References add_data4i().
|
inline |
Sets the write row to a particular 4-component value, and advances the write row.
If the write row advances past the end of data, implicitly adds a new row to the data.
Definition at line 1639 of file geomVertexWriter.I.
References get_write_row(), and has_column().
|
inline |
Sets the write row to a 3-by-3 matrix, and advances the write row.
This is a special method that can only be used on matrix columns.
If the write row advances past the end of data, implicitly adds a new row to the data.
Definition at line 1473 of file geomVertexWriter.I.
References add_matrix3d(), add_matrix3f(), and add_matrix4().
Referenced by add_data4().
|
inline |
Sets the write row to a 3-by-3 matrix, and advances the write row.
This is a special method that can only be used on matrix columns.
If the write row advances past the end of data, implicitly adds a new row to the data.
Definition at line 1293 of file geomVertexWriter.I.
References add_matrix4d(), LMatrix3d::get_row(), and has_column().
Referenced by add_data4d(), and add_matrix3().
|
inline |
Sets the write row to a 3-by-3 matrix, and advances the write row.
This is a special method that can only be used on matrix columns.
If the write row advances past the end of data, implicitly adds a new row to the data.
Definition at line 1137 of file geomVertexWriter.I.
References add_matrix4f(), LMatrix3f::get_row(), and has_column().
Referenced by add_data4f(), and add_matrix3().
|
inline |
Sets the write row to a 4-by-4 matrix, and advances the write row.
This is a special method that can only be used on matrix columns.
If the write row advances past the end of data, implicitly adds a new row to the data.
Definition at line 1492 of file geomVertexWriter.I.
References add_data1i(), add_matrix4d(), and add_matrix4f().
Referenced by add_matrix3().
|
inline |
Sets the write row to a 4-by-4 matrix, and advances the write row.
This is a special method that can only be used on matrix columns.
If the write row advances past the end of data, implicitly adds a new row to the data.
Definition at line 1319 of file geomVertexWriter.I.
References add_data1(), LMatrix4d::get_row(), and has_column().
Referenced by add_matrix3d(), and add_matrix4().
|
inline |
Sets the write row to a 4-by-4 matrix, and advances the write row.
This is a special method that can only be used on matrix columns.
If the write row advances past the end of data, implicitly adds a new row to the data.
Definition at line 1163 of file geomVertexWriter.I.
References add_data1d(), LMatrix4f::get_row(), and has_column().
Referenced by add_matrix3f(), and add_matrix4().
|
inline |
Resets the GeomVertexWriter to the initial state.
Definition at line 289 of file geomVertexWriter.I.
References GeomVertexWriter(), and has_column().
Referenced by CMotionTrail::check_for_update(), GeomVertexRewriter::clear(), and set_column().
|
inline |
Returns the array index containing the data type that the writer is working on.
Definition at line 312 of file geomVertexWriter.I.
References get_column().
Referenced by GeomVertexData::copy_from(), GeomVertexRewriter::get_array(), has_column(), and GeomVertexData::transform_vertices().
|
inline |
Returns the particular array object that the writer is currently processing.
Definition at line 183 of file geomVertexWriter.I.
References get_array_handle().
Referenced by GeomPrimitive::calc_sphere_radius(), GeomVertexRewriter::get_array_data(), get_vertex_data(), and reserve_num_rows().
|
inline |
Returns the write handle to the array object that the writer 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 GeomVertexWriter.
Definition at line 197 of file geomVertexWriter.I.
References get_stride().
Referenced by get_array_data(), and GeomVertexRewriter::get_array_handle().
|
inline |
Returns the description of the data type that the writer is working on.
Definition at line 323 of file geomVertexWriter.I.
References set_row_unsafe().
Referenced by get_array(), GeomVertexRewriter::get_column(), GeomVertexRewriter::has_column(), and reserve_num_rows().
|
inline |
Returns the Thread pointer of the currently-executing thread, as passed to the constructor of this object.
Definition at line 221 of file geomVertexWriter.I.
References set_column().
Referenced by GeomVertexRewriter::get_current_thread(), and get_stride().
|
inline |
Returns the row index at which the writer started.
It will return to this row if you reset the current column.
Definition at line 374 of file geomVertexWriter.I.
References get_write_row().
Referenced by GeomVertexRewriter::get_start_row(), and set_row().
|
inline |
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 GeomVertexWriter directly.
Definition at line 210 of file geomVertexWriter.I.
References get_current_thread().
Referenced by get_array_handle(), and GeomVertexRewriter::get_stride().
|
inline |
Returns the vertex data object that the writer is processing.
This may return NULL if the writer was constructed with just an array pointer.
Definition at line 172 of file geomVertexWriter.I.
References get_array_data().
Referenced by GeomVertexWriter(), and GeomVertexRewriter::get_vertex_data().
|
inline |
Returns the row index to which the data will be written at the next call to set_data*() or add_data*().
Definition at line 386 of file geomVertexWriter.I.
References is_at_end().
Referenced by add_data4i(), get_start_row(), CullableObject::munge_geom(), and reserve_num_rows().
|
inline |
Returns true if a valid data type has been successfully set, or false if the data type does not exist.
Definition at line 301 of file geomVertexWriter.I.
References get_array().
Referenced by add_data1d(), add_data1f(), add_data1i(), add_data2d(), add_data2f(), add_data2i(), add_data3d(), add_data3f(), add_data3i(), add_data4d(), add_data4f(), add_data4i(), add_matrix3d(), add_matrix3f(), add_matrix4d(), add_matrix4f(), clear(), GeomVertexData::copy_from(), GeomVertexRewriter::has_column(), EggLoader::make_polyset(), CullableObject::munge_geom(), set_data1d(), set_data1f(), set_data1i(), set_data2d(), set_data2f(), set_data2i(), set_data3d(), set_data3f(), set_data3i(), set_data4d(), set_data4f(), set_data4i(), set_matrix3d(), set_matrix3f(), set_matrix4d(), set_matrix4f(), set_row(), and set_row_unsafe().
|
inline |
Returns true if the writer is currently at the end of 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 row.
Definition at line 400 of file geomVertexWriter.I.
References set_data1f().
Referenced by GeomVertexData::copy_row_from(), get_write_row(), and GeomVertexRewriter::is_at_end().
bool GeomVertexWriter::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 rows without causing a new memory allocation.
This is a performance optimization only; it is especially useful when you know the number of rows you will be adding ahead of time.
Definition at line 79 of file geomVertexWriter.cxx.
References get_array_data(), get_column(), GeomVertexColumn::get_name(), get_write_row(), and set_column().
Referenced by set_column().
|
inline |
Sets up the writer to use the nth data type of the GeomVertexFormat, numbering from 0.
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.
Definition at line 239 of file geomVertexWriter.I.
Referenced by GeomVertexData::copy_from(), GeomVertexWriter(), get_current_thread(), EggLoader::make_polyset(), ProjectionScreen::recompute_if_stale(), reserve_num_rows(), and GeomVertexRewriter::set_column().
|
inline |
Sets up the writer to use the data type with the indicated name.
This also resets the write 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.
Definition at line 268 of file geomVertexWriter.I.
References clear().
bool GeomVertexWriter::set_column | ( | int | array, |
const GeomVertexColumn * | column | ||
) |
Sets up the writer to use the indicated column description on the given array.
This also resets the current 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.
Definition at line 38 of file geomVertexWriter.cxx.
References reserve_num_rows().
|
inline |
Sets the write row to a particular 1-component value, and advances the write row.
It is an error for the write row to advance past the end of data.
Definition at line 726 of file geomVertexWriter.I.
References set_data1d(), set_data1f(), and set_data2().
Referenced by set_matrix4d().
|
inline |
Sets the write row to a particular 1-component value, and advances the write row.
It is an error for the write row to advance past the end of data.
Definition at line 570 of file geomVertexWriter.I.
References has_column(), and set_data2d().
Referenced by set_data1(), and set_matrix4f().
|
inline |
Sets the write row to a particular 1-component value, and advances the write row.
It is an error for the write row to advance past the end of data.
Definition at line 414 of file geomVertexWriter.I.
References has_column(), and set_data2f().
Referenced by is_at_end(), and set_data1().
|
inline |
Sets the write row to a particular 1-component value, and advances the write row.
It is an error for the write row to advance past the end of data.
Definition at line 890 of file geomVertexWriter.I.
References has_column(), and set_data2i().
Referenced by GeomPrimitive::add_consecutive_vertices(), GeomPrimitive::calc_sphere_radius(), GeomTransformer::finish_collect(), BulletSoftBodyNode::get_closest_node_index(), GeomPrimitive::get_primitive_max_vertex(), EggLoader::make_polyset(), CullableObject::munge_geom(), GeomPrimitive::offset_vertices(), and set_matrix4().
|
inline |
Sets the write row to a particular 2-component value, and advances the write row.
It is an error for the write row to advance past the end of data.
Definition at line 744 of file geomVertexWriter.I.
References set_data2d(), and set_data2f().
Referenced by CullableObject::munge_geom(), and set_data1().
|
inline |
Sets the write row to a particular 2-component value, and advances the write row.
It is an error for the write row to advance past the end of data.
Definition at line 762 of file geomVertexWriter.I.
References set_data2d(), set_data2f(), and set_data3().
|
inline |
Sets the write row to a particular 2-component value, and advances the write row.
It is an error for the write row to advance past the end of data.
Definition at line 585 of file geomVertexWriter.I.
Referenced by set_data1d(), and set_data2().
|
inline |
Sets the write row to a particular 2-component value, and advances the write row.
It is an error for the write row to advance past the end of data.
Definition at line 599 of file geomVertexWriter.I.
References has_column(), and set_data3d().
|
inline |
Sets the write row to a particular 2-component value, and advances the write row.
It is an error for the write row to advance past the end of data.
Definition at line 429 of file geomVertexWriter.I.
Referenced by PfmVizzer::make_displacement(), set_data1f(), and set_data2().
|
inline |
Sets the write row to a particular 2-component value, and advances the write row.
It is an error for the write row to advance past the end of data.
Definition at line 443 of file geomVertexWriter.I.
References has_column(), and set_data3f().
|
inline |
Sets the write row to a particular 2-component value, and advances the write row.
It is an error for the write row to advance past the end of data.
Definition at line 905 of file geomVertexWriter.I.
Referenced by set_data1i(), and set_data2i().
|
inline |
Sets the write row to a particular 2-component value, and advances the write row.
It is an error for the write row to advance past the end of data.
Definition at line 919 of file geomVertexWriter.I.
References set_data2i().
|
inline |
Sets the write row to a particular 2-component value, and advances the write row.
It is an error for the write row to advance past the end of data.
Definition at line 933 of file geomVertexWriter.I.
References has_column(), and set_data3i().
|
inline |
Sets the write row to a particular 3-component value, and advances the write row.
It is an error for the write row to advance past the end of data.
Definition at line 780 of file geomVertexWriter.I.
References set_data3d(), and set_data3f().
Referenced by GeomVertexData::clear_cache_stage(), GeomVertexData::copy_row_from(), STBasicTerrain::fill_vertices(), MultitexReducer::flatten(), CollisionBox::get_test_pcollector(), Lens::is_orthographic(), TextAssembler::is_whitespace(), CullableObject::munge_geom(), ProjectionScreen::recompute_if_stale(), set_data2(), and LineSegs::set_vertex().
|
inline |
Sets the write row to a particular 3-component value, and advances the write row.
It is an error for the write row to advance past the end of data.
Definition at line 798 of file geomVertexWriter.I.
References set_data3d(), set_data3f(), and set_data4().
|
inline |
Sets the write row to a particular 3-component value, and advances the write row.
It is an error for the write row to advance past the end of data.
Definition at line 614 of file geomVertexWriter.I.
Referenced by PfmVizzer::make_displacement(), EggLoader::make_polyset(), set_data2d(), and set_data3().
|
inline |
Sets the write row to a particular 3-component value, and advances the write row.
It is an error for the write row to advance past the end of data.
Definition at line 628 of file geomVertexWriter.I.
References has_column(), and set_data4d().
|
inline |
Sets the write row to a particular 3-component value, and advances the write row.
It is an error for the write row to advance past the end of data.
Definition at line 458 of file geomVertexWriter.I.
Referenced by PfmVizzer::make_displacement(), set_data2f(), set_data3(), and PhysxSoftBodyNode::set_from_geom().
|
inline |
Sets the write row to a particular 3-component value, and advances the write row.
It is an error for the write row to advance past the end of data.
Definition at line 472 of file geomVertexWriter.I.
References has_column(), and set_data4f().
|
inline |
Sets the write row to a particular 3-component value, and advances the write row.
It is an error for the write row to advance past the end of data.
Definition at line 948 of file geomVertexWriter.I.
Referenced by set_data2i(), and set_data3i().
|
inline |
Sets the write row to a particular 3-component value, and advances the write row.
It is an error for the write row to advance past the end of data.
Definition at line 962 of file geomVertexWriter.I.
References set_data3i().
|
inline |
Sets the write row to a particular 3-component value, and advances the write row.
It is an error for the write row to advance past the end of data.
Definition at line 976 of file geomVertexWriter.I.
References has_column(), and set_data4i().
|
inline |
Sets the write row to a particular 4-component value, and advances the write row.
It is an error for the write row to advance past the end of data.
Definition at line 816 of file geomVertexWriter.I.
References set_data4d(), and set_data4f().
Referenced by GeomVertexData::clear_cache_stage(), GeomVertexData::copy_from(), GeomVertexData::copy_row_from(), CullableObject::munge_geom(), ProjectionScreen::recompute_if_stale(), set_data3(), LineSegs::set_vertex_color(), and GeomTransformer::transform_texcoords().
|
inline |
Sets the write row to a particular 4-component value, and advances the write row.
It is an error for the write row to advance past the end of data.
Definition at line 834 of file geomVertexWriter.I.
References set_data4d(), set_data4f(), and set_matrix3().
|
inline |
Sets the write row to a particular 4-component value, and advances the write row.
It is an error for the write row to advance past the end of data.
Definition at line 643 of file geomVertexWriter.I.
Referenced by EggLoader::make_polyset(), set_data3d(), and set_data4().
|
inline |
Sets the write row to a particular 4-component value, and advances the write row.
It is an error for the write row to advance past the end of data.
Definition at line 657 of file geomVertexWriter.I.
References has_column(), and set_matrix3d().
|
inline |
Sets the write row to a particular 4-component value, and advances the write row.
It is an error for the write row to advance past the end of data.
Definition at line 487 of file geomVertexWriter.I.
Referenced by set_data3f(), and set_data4().
|
inline |
Sets the write row to a particular 4-component value, and advances the write row.
It is an error for the write row to advance past the end of data.
Definition at line 501 of file geomVertexWriter.I.
References has_column(), and set_matrix3f().
|
inline |
Sets the write row to a particular 4-component value, and advances the write row.
It is an error for the write row to advance past the end of data.
Definition at line 991 of file geomVertexWriter.I.
Referenced by GeomVertexData::copy_from(), GeomTransformer::finish_collect(), set_data3i(), and set_data4i().
|
inline |
Sets the write row to a particular 4-component value, and advances the write row.
It is an error for the write row to advance past the end of data.
Definition at line 1005 of file geomVertexWriter.I.
References set_data4i().
|
inline |
Sets the write row to a particular 4-component value, and advances the write row.
It is an error for the write row to advance past the end of data.
Definition at line 1019 of file geomVertexWriter.I.
References add_data1f(), and has_column().
|
inline |
Sets the write row to a 3-by-3 matrix, and advances the write row.
This is a special method that can only be used on matrix columns.
It is an error for the write row to advance past the end of data.
Definition at line 853 of file geomVertexWriter.I.
References set_matrix3d(), set_matrix3f(), and set_matrix4().
Referenced by set_data4().
|
inline |
Sets the write row to a 3-by-3 matrix, and advances the write row.
This is a special method that can only be used on matrix columns.
It is an error for the write row to advance past the end of data.
Definition at line 673 of file geomVertexWriter.I.
References LMatrix3d::get_row(), has_column(), and set_matrix4d().
Referenced by set_data4d(), and set_matrix3().
|
inline |
Sets the write row to a 3-by-3 matrix, and advances the write row.
This is a special method that can only be used on matrix columns.
It is an error for the write row to advance past the end of data.
Definition at line 517 of file geomVertexWriter.I.
References LMatrix3f::get_row(), has_column(), and set_matrix4f().
Referenced by set_data4f(), and set_matrix3().
|
inline |
Sets the write row to a 4-by-4 matrix, and advances the write row.
This is a special method that can only be used on matrix columns.
It is an error for the write row to advance past the end of data.
Definition at line 872 of file geomVertexWriter.I.
References set_data1i(), set_matrix4d(), and set_matrix4f().
Referenced by set_matrix3().
|
inline |
Sets the write row to a 4-by-4 matrix, and advances the write row.
This is a special method that can only be used on matrix columns.
It is an error for the write row to advance past the end of data.
Definition at line 699 of file geomVertexWriter.I.
References LMatrix4d::get_row(), has_column(), and set_data1().
Referenced by set_matrix3d(), and set_matrix4().
|
inline |
Sets the write row to a 4-by-4 matrix, and advances the write row.
This is a special method that can only be used on matrix columns.
It is an error for the write row to advance past the end of data.
Definition at line 543 of file geomVertexWriter.I.
References LMatrix4f::get_row(), has_column(), and set_data1d().
Referenced by set_matrix3f(), and set_matrix4().
|
inline |
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.
Definition at line 359 of file geomVertexWriter.I.
References get_start_row(), and has_column().
Referenced by ObjToEggConverter::convert_file(), PfmVizzer::make_displacement(), EggLoader::make_polyset(), GeomVertexRewriter::set_row(), and set_row_unsafe().
|
inline |
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.
Definition at line 342 of file geomVertexWriter.I.
References has_column(), and set_row().
Referenced by GeomPrimitive::add_consecutive_vertices(), GeomPrimitive::add_vertex(), get_column(), GeomVertexRewriter::set_row_unsafe(), LineSegs::set_vertex(), LineSegs::set_vertex_color(), and ColladaInput::write_data().