Panda3D
|
This object provides the functionality of both a GeomVertexReader and a GeomVertexWriter, combined together into one convenient package. More...
#include "geomVertexRewriter.h"
Public Types | |
enum | AnimationType { AT_none, AT_panda, AT_hardware } |
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 } |
enum | Contents { C_other, C_point, C_clip_point, C_vector, C_texcoord, C_color, C_index, C_morph_delta } |
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_flat_first_vertex = 0x02000, GR_flat_last_vertex = 0x04000, GR_shade_model_bits = 0x06000, GR_texcoord_light_vector = 0x08000 } |
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_flat_first_vertex = 0x02000, GR_flat_last_vertex = 0x04000, GR_shade_model_bits = 0x06000, GR_texcoord_light_vector = 0x08000 } |
enum | NumericType { NT_uint8, NT_uint16, NT_uint32, NT_packed_dcba, NT_packed_dabc, NT_float32 } |
enum | NumericType { NT_uint8, NT_uint16, NT_uint32, NT_packed_dcba, NT_packed_dabc, NT_float32 } |
enum | PrimitiveType { PT_none, PT_polygons, PT_lines, PT_points } |
enum | PrimitiveType { PT_none, PT_polygons, PT_lines, PT_points } |
enum | ShadeModel { SM_uniform, SM_smooth, SM_flat_first_vertex, SM_flat_last_vertex } |
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 } |
enum | UsageHint { UH_client, UH_stream, UH_dynamic, UH_static, UH_unspecified } |
Public Member Functions | |
GeomVertexRewriter (Thread *current_thread=Thread::get_current_thread()) | |
Constructs an invalid GeomVertexRewriter. | |
GeomVertexRewriter (GeomVertexData *vertex_data, Thread *current_thread=Thread::get_current_thread()) | |
Constructs a new rewriter to process the vertices of the indicated data object. | |
GeomVertexRewriter (GeomVertexData *vertex_data, const InternalName *name, Thread *current_thread=Thread::get_current_thread()) | |
Constructs a new rewriter to process the vertices of the indicated data object. | |
GeomVertexRewriter (GeomVertexArrayData *array_data, Thread *current_thread=Thread::get_current_thread()) | |
Constructs a new rewriter to process the vertices of the indicated array only. | |
GeomVertexRewriter (GeomVertexData *vertex_data, const string &name, Thread *current_thread=Thread::get_current_thread()) | |
Constructs a new rewriter to process the vertices of the indicated data object. | |
GeomVertexRewriter (GeomVertexArrayData *array_data, int column, Thread *current_thread=Thread::get_current_thread()) | |
Constructs a new rewriter to process the vertices of the indicated array only. | |
GeomVertexRewriter (const GeomVertexRewriter ©) | |
void | add_data1f (float data) |
Sets the write row to a particular 1-component value, and advances the write row. | |
void | add_data1i (int data) |
Sets the write row to a particular 1-component value, and advances the write row. | |
void | add_data2f (float x, float y) |
Sets the write row to a particular 2-component value, and advances the write row. | |
void | add_data2f (const LVecBase2f &data) |
Sets the write row to a particular 2-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. | |
void | add_data2i (const int data[2]) |
Sets the write row to a particular 2-component value, 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 | add_data3f (const LVecBase3f &data) |
Sets the write row to a particular 3-component value, and advances the write row. | |
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 | add_data3i (const int data[3]) |
Sets the write row to a particular 3-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 | add_data4f (const LVecBase4f &data) |
Sets the write row to a particular 4-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. | |
void | add_data4i (const int data[4]) |
Sets the write row to a particular 4-component value, and advances the write row. | |
void | clear () |
Resets the GeomVertexRewriter to the initial state. | |
int | get_array () const |
Returns the array index containing the data type that the rewriter is working on. | |
GeomVertexArrayData * | get_array_data () const |
Returns the particular array object that the rewriter is currently processing. | |
const GeomVertexColumn * | get_column () const |
Returns the description of the data type that the rewriter is working on. | |
Thread * | get_current_thread () const |
Returns the Thread pointer of the currently-executing thread, as passed to the constructor of this object. | |
Thread * | get_current_thread () const |
Returns the Thread pointer of the currently-executing thread, as passed to the constructor of this object. | |
float | get_data1f () |
Returns the data associated with the read row, expressed as a 1-component value, and advances the read row. | |
int | get_data1i () |
Returns the data associated with the read row, expressed as a 1-component value, and advances the read row. | |
const LVecBase2f & | get_data2f () |
Returns the data associated with the read row, expressed as a 2-component value, and advances the read row. | |
const int * | get_data2i () |
Returns the data associated with the read row, expressed as a 2-component value, and advances the read row. | |
const LVecBase3f & | get_data3f () |
Returns the data associated with the read row, expressed as a 3-component value, and advances the read row. | |
const int * | get_data3i () |
Returns the data associated with the read row, expressed as a 3-component value, and advances the read row. | |
const LVecBase4f & | get_data4f () |
Returns the data associated with the read row, expressed as a 4-component value, and advances the read row. | |
const int * | get_data4i () |
Returns the data associated with the read row, expressed as a 4-component value, and advances the read row. | |
bool | get_force () const |
Returns the value of the force flag. | |
int | get_read_row () const |
Returns the row index from which the data will be retrieved by the next call to get_data*(). | |
int | get_start_row () const |
Returns the row index at which the rewriter started. | |
GeomVertexData * | get_vertex_data () const |
Returns the vertex data object that the rewriter is processing. | |
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*(). | |
bool | has_column () const |
Returns true if a valid data type has been successfully set, or false if the data type does not exist. | |
bool | is_at_end () const |
Returns true if the reader or writer is currently at the end of the list of vertices, false otherwise. | |
void | operator= (const GeomVertexRewriter ©) |
void | output (ostream &out) const |
bool | set_column (int array, const GeomVertexColumn *column) |
Sets up the rewriter to use the indicated column description on the given array. | |
bool | set_column (const InternalName *name) |
Sets up the rewriter to use the data type with the indicated name. | |
bool | set_column (int column) |
Sets up the rewriter to use the nth data type of the GeomVertexFormat, numbering from 0. | |
bool | set_column (const string &name) |
Sets up the rewriter to use the data type with the indicated name. | |
void | set_data1f (float data) |
Sets the write row to a particular 1-component value, and advances the write row. | |
void | set_data1i (int data) |
Sets the write row to a particular 1-component value, and advances the write row. | |
void | set_data2f (const LVecBase2f &data) |
Sets the write row to a particular 2-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_data2i (int a, int b) |
Sets the write row to a particular 2-component value, and advances the write row. | |
void | set_data2i (const int data[2]) |
Sets the write row to a particular 2-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. | |
void | set_data3f (const LVecBase3f &data) |
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. | |
void | set_data3i (const int data[3]) |
Sets the write row to a particular 3-component value, and advances the write row. | |
void | set_data4f (const LVecBase4f &data) |
Sets the write row to a particular 4-component value, and advances the write row. | |
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 | set_data4i (const int data[4]) |
Sets the write row to a particular 4-component value, and advances the write row. | |
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_force (bool force) |
Sets the value of the force flag. | |
void | set_row (int row) |
Sets the start, write, and write index to the indicated value. | |
Protected Member Functions | |
GeomVertexColumn::Packer * | get_packer () const |
Returns the writer's Packer object. | |
GeomVertexColumn::Packer * | get_packer () const |
Returns the reader's Packer object. |
This object provides the functionality of both a GeomVertexReader and a GeomVertexWriter, combined together into one convenient package.
It is designed for making a single pass over a GeomVertexData object, modifying rows as it goes.
Although it doesn't provide any real performance benefit over using a separate reader and writer on the same data, it should probably be used in preference to a separate reader and writer, because it makes an effort to manage the reference counts properly between the reader and the writer to avoid accidentally dereferencing either array while recopying.
Definition at line 39 of file geomVertexRewriter.h.
GeomVertexRewriter::GeomVertexRewriter | ( | Thread * | current_thread = Thread::get_current_thread() | ) | [inline] |
Constructs an invalid GeomVertexRewriter.
You must use the assignment operator to assign a valid GeomVertexRewriter to this object before you can use it.
Definition at line 25 of file geomVertexRewriter.I.
GeomVertexRewriter::GeomVertexRewriter | ( | GeomVertexData * | vertex_data, |
Thread * | current_thread = Thread::get_current_thread() |
||
) | [inline] |
Constructs a new rewriter to process the vertices of the indicated data object.
Definition at line 38 of file geomVertexRewriter.I.
GeomVertexRewriter::GeomVertexRewriter | ( | GeomVertexData * | vertex_data, |
const string & | name, | ||
Thread * | current_thread = Thread::get_current_thread() |
||
) | [inline] |
Constructs a new rewriter to process the vertices of the indicated data object.
This flavor creates the rewriter specifically to process the named data type.
Definition at line 52 of file geomVertexRewriter.I.
References set_column().
GeomVertexRewriter::GeomVertexRewriter | ( | GeomVertexData * | vertex_data, |
const InternalName * | name, | ||
Thread * | current_thread = Thread::get_current_thread() |
||
) | [inline] |
Constructs a new rewriter to process the vertices of the indicated data object.
This flavor creates the rewriter specifically to process the named data type.
Definition at line 68 of file geomVertexRewriter.I.
References set_column().
GeomVertexRewriter::GeomVertexRewriter | ( | GeomVertexArrayData * | array_data, |
Thread * | current_thread = Thread::get_current_thread() |
||
) | [inline] |
Constructs a new rewriter to process the vertices of the indicated array only.
Definition at line 83 of file geomVertexRewriter.I.
GeomVertexRewriter::GeomVertexRewriter | ( | GeomVertexArrayData * | array_data, |
int | column, | ||
Thread * | current_thread = Thread::get_current_thread() |
||
) | [inline] |
Constructs a new rewriter to process the vertices of the indicated array only.
Definition at line 96 of file geomVertexRewriter.I.
References set_column().
void GeomVertexWriter::add_data1f | ( | float | data | ) | [inline, inherited] |
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 607 of file geomVertexWriter.I.
References GeomVertexWriter::has_column().
void GeomVertexWriter::add_data1i | ( | int | data | ) | [inline, inherited] |
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 709 of file geomVertexWriter.I.
References GeomVertexWriter::has_column().
Referenced by GeomPrimitive::add_consecutive_vertices(), GeomPrimitive::add_vertex(), GeomTristrips::append_unused_vertices(), and GeomPrimitive::pack_vertices().
void GeomVertexWriter::add_data2f | ( | float | x, |
float | y | ||
) | [inline, inherited] |
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 622 of file geomVertexWriter.I.
Referenced by CMotionTrail::add_geometry_quad(), WindowFramework::load_default_model(), MeshDrawer2D::quad_raw(), PhysxSoftBodyNode::set_from_geom(), and MeshDrawer::tri().
void GeomVertexWriter::add_data2f | ( | const LVecBase2f & | data | ) | [inline, inherited] |
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 636 of file geomVertexWriter.I.
References GeomVertexWriter::has_column().
void GeomVertexWriter::add_data2i | ( | int | a, |
int | b | ||
) | [inline, inherited] |
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 724 of file geomVertexWriter.I.
References GeomVertexWriter::has_column().
Referenced by GeomVertexWriter::add_data2i().
void GeomVertexWriter::add_data2i | ( | const int | data[2] | ) | [inline, inherited] |
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 739 of file geomVertexWriter.I.
References GeomVertexWriter::add_data2i().
void GeomVertexWriter::add_data3f | ( | float | x, |
float | y, | ||
float | z | ||
) | [inline, inherited] |
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 651 of file geomVertexWriter.I.
Referenced by CMotionTrail::add_geometry_quad(), LineSegs::create(), PortalClipper::draw_lines(), MeshDrawer2D::end(), MeshDrawer::end(), CollisionTube::fill_viz_geom(), CollisionSphere::fill_viz_geom(), CollisionSegment::fill_viz_geom(), CollisionRay::fill_viz_geom(), CollisionPlane::fill_viz_geom(), CollisionParabola::fill_viz_geom(), CollisionLine::fill_viz_geom(), CollisionInvSphere::fill_viz_geom(), CollisionFloorMesh::fill_viz_geom(), CollisionDSSolid::fill_viz_geom(), CollisionBox::fill_viz_geom(), WindowFramework::load_default_model(), MeshDrawer2D::quad_raw(), PhysxSoftBodyNode::set_from_geom(), and MeshDrawer::tri().
void GeomVertexWriter::add_data3f | ( | const LVecBase3f & | data | ) | [inline, inherited] |
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 665 of file geomVertexWriter.I.
References GeomVertexWriter::has_column().
void GeomVertexWriter::add_data3i | ( | int | a, |
int | b, | ||
int | c | ||
) | [inline, inherited] |
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 753 of file geomVertexWriter.I.
References GeomVertexWriter::has_column().
Referenced by GeomVertexWriter::add_data3i().
void GeomVertexWriter::add_data3i | ( | const int | data[3] | ) | [inline, inherited] |
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 768 of file geomVertexWriter.I.
References GeomVertexWriter::add_data3i().
void GeomVertexWriter::add_data4f | ( | float | x, |
float | y, | ||
float | z, | ||
float | w | ||
) | [inline, inherited] |
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 680 of file geomVertexWriter.I.
Referenced by CMotionTrail::add_geometry_quad(), LineSegs::create(), PortalClipper::draw_lines(), CollisionRay::fill_viz_geom(), CollisionParabola::fill_viz_geom(), CollisionLine::fill_viz_geom(), MeshDrawer2D::quad_raw(), and MeshDrawer::tri().
void GeomVertexWriter::add_data4f | ( | const LVecBase4f & | data | ) | [inline, inherited] |
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 694 of file geomVertexWriter.I.
References GeomVertexWriter::has_column().
void GeomVertexWriter::add_data4i | ( | int | a, |
int | b, | ||
int | c, | ||
int | d | ||
) | [inline, inherited] |
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 782 of file geomVertexWriter.I.
References GeomVertexWriter::has_column().
Referenced by GeomVertexWriter::add_data4i().
void GeomVertexWriter::add_data4i | ( | const int | data[4] | ) | [inline, inherited] |
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 797 of file geomVertexWriter.I.
References GeomVertexWriter::add_data4i().
void GeomVertexRewriter::clear | ( | ) | [inline] |
Resets the GeomVertexRewriter to the initial state.
Reimplemented from GeomVertexReader.
Definition at line 253 of file geomVertexRewriter.I.
int GeomVertexRewriter::get_array | ( | ) | const [inline] |
Returns the array index containing the data type that the rewriter is working on.
Reimplemented from GeomVertexReader.
Definition at line 279 of file geomVertexRewriter.I.
References GeomVertexReader::get_array(), and GeomVertexWriter::get_array().
GeomVertexArrayData * GeomVertexRewriter::get_array_data | ( | ) | const [inline] |
Returns the particular array object that the rewriter is currently processing.
Reimplemented from GeomVertexReader.
Definition at line 156 of file geomVertexRewriter.I.
References GeomVertexWriter::get_array_data(), and GeomVertexReader::get_array_data().
const GeomVertexColumn * GeomVertexRewriter::get_column | ( | ) | const [inline] |
Returns the description of the data type that the rewriter is working on.
Reimplemented from GeomVertexReader.
Definition at line 292 of file geomVertexRewriter.I.
References GeomVertexReader::get_column(), and GeomVertexWriter::get_column().
Thread * GeomVertexWriter::get_current_thread | ( | ) | const [inline, inherited] |
Returns the Thread pointer of the currently-executing thread, as passed to the constructor of this object.
Definition at line 211 of file geomVertexWriter.I.
Referenced by GeomVertexData::clear_rows(), GeomVertexData::set_format(), and GeomVertexData::set_transform_table().
Thread * GeomVertexReader::get_current_thread | ( | ) | const [inline, inherited] |
Returns the Thread pointer of the currently-executing thread, as passed to the constructor of this object.
Definition at line 216 of file geomVertexReader.I.
float GeomVertexReader::get_data1f | ( | ) | [inline, inherited] |
Returns the data associated with the read row, expressed as a 1-component value, and advances the read row.
Definition at line 438 of file geomVertexReader.I.
References GeomVertexReader::has_column().
int GeomVertexReader::get_data1i | ( | ) | [inline, inherited] |
Returns the data associated with the read row, expressed as a 1-component value, and advances the read row.
Definition at line 490 of file geomVertexReader.I.
References GeomVertexReader::has_column().
Referenced by GeomTristrips::append_unused_vertices(), GeomPrimitive::calc_tight_bounds(), GeomVertexData::copy_from(), GeomVertexData::describe_vertex(), GeomPrimitive::get_primitive_max_vertex(), GeomPrimitive::get_primitive_min_vertex(), and GeomPrimitive::offset_vertices().
const LVecBase2f & GeomVertexReader::get_data2f | ( | ) | [inline, inherited] |
Returns the data associated with the read row, expressed as a 2-component value, and advances the read row.
Definition at line 451 of file geomVertexReader.I.
References GeomVertexReader::has_column(), and LVecBase2f::zero().
Referenced by MeshDrawer::geometry(), PhysxSoftBodyNode::set_from_geom(), and PhysxClothMeshDesc::set_from_node_path().
const int * GeomVertexReader::get_data2i | ( | ) | [inline, inherited] |
Returns the data associated with the read row, expressed as a 2-component value, and advances the read row.
Definition at line 503 of file geomVertexReader.I.
References GeomVertexReader::has_column().
const LVecBase3f & GeomVertexReader::get_data3f | ( | ) | [inline, inherited] |
Returns the data associated with the read row, expressed as a 3-component value, and advances the read row.
Definition at line 464 of file geomVertexReader.I.
References GeomVertexReader::has_column(), and LVecBase3f::zero().
Referenced by TinyGraphicsStateGuardian::begin_draw_primitives(), GeomPrimitive::calc_tight_bounds(), MeshDrawer::geometry(), LineSegs::get_vertex(), PhysxSoftBodyNode::set_from_geom(), PhysxTriangleMeshDesc::set_from_node_path(), PhysxConvexMeshDesc::set_from_node_path(), and PhysxClothMeshDesc::set_from_node_path().
const int * GeomVertexReader::get_data3i | ( | ) | [inline, inherited] |
Returns the data associated with the read row, expressed as a 3-component value, and advances the read row.
Definition at line 516 of file geomVertexReader.I.
References GeomVertexReader::has_column().
const LVecBase4f & GeomVertexReader::get_data4f | ( | ) | [inline, inherited] |
Returns the data associated with the read row, expressed as a 4-component value, and advances the read row.
Definition at line 477 of file geomVertexReader.I.
References GeomVertexReader::has_column(), and LVecBase4f::zero().
Referenced by TinyGraphicsStateGuardian::begin_draw_primitives(), GeomVertexData::copy_from(), GeomVertexData::describe_vertex(), LineSegs::get_vertex_color(), and GeomTransformer::transform_texcoords().
const int * GeomVertexReader::get_data4i | ( | ) | [inline, inherited] |
Returns the data associated with the read row, expressed as a 4-component value, and advances the read row.
Definition at line 529 of file geomVertexReader.I.
References GeomVertexReader::has_column().
bool GeomVertexReader::get_force | ( | ) | const [inline, inherited] |
Returns the value of the force flag.
See set_force().
Definition at line 248 of file geomVertexReader.I.
GeomVertexColumn::Packer * GeomVertexWriter::get_packer | ( | ) | const [inline, protected, inherited] |
Returns the writer's Packer object.
Definition at line 807 of file geomVertexWriter.I.
GeomVertexColumn::Packer * GeomVertexReader::get_packer | ( | ) | const [inline, protected, inherited] |
Returns the reader's Packer object.
Definition at line 540 of file geomVertexReader.I.
int GeomVertexReader::get_read_row | ( | ) | const [inline, inherited] |
Returns the row index from which the data will be retrieved by the next call to get_data*().
Definition at line 413 of file geomVertexReader.I.
int GeomVertexRewriter::get_start_row | ( | ) | const [inline] |
Returns the row index at which the rewriter started.
It will return to this row if you reset the current column.
Reimplemented from GeomVertexReader.
Definition at line 322 of file geomVertexRewriter.I.
References GeomVertexReader::get_start_row(), and GeomVertexWriter::get_start_row().
GeomVertexData * GeomVertexRewriter::get_vertex_data | ( | ) | const [inline] |
Returns the vertex data object that the rewriter is processing.
Reimplemented from GeomVertexReader.
Definition at line 143 of file geomVertexRewriter.I.
References GeomVertexReader::get_vertex_data(), and GeomVertexWriter::get_vertex_data().
int GeomVertexWriter::get_write_row | ( | ) | const [inline, inherited] |
Returns the row index to which the data will be written at the next call to set_data*() or add_data*().
Definition at line 375 of file geomVertexWriter.I.
bool GeomVertexRewriter::has_column | ( | ) | const [inline] |
Returns true if a valid data type has been successfully set, or false if the data type does not exist.
Reimplemented from GeomVertexReader.
Definition at line 266 of file geomVertexRewriter.I.
References GeomVertexReader::get_column(), and GeomVertexWriter::get_column().
bool GeomVertexRewriter::is_at_end | ( | ) | const [inline] |
Returns true if the reader or writer is currently at the end of the list of vertices, false otherwise.
Reimplemented from GeomVertexReader.
Definition at line 335 of file geomVertexRewriter.I.
Referenced by GeomPrimitive::offset_vertices().
bool GeomVertexRewriter::set_column | ( | int | array, |
const GeomVertexColumn * | column | ||
) | [inline] |
Sets up the rewriter to use the indicated column description on the given array.
This also resets both the read and write row numbers 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.
Reimplemented from GeomVertexReader.
Definition at line 240 of file geomVertexRewriter.I.
References set_column().
bool GeomVertexRewriter::set_column | ( | int | column | ) | [inline] |
Sets up the rewriter to use the nth data type of the GeomVertexFormat, numbering from 0.
This also resets both the read and write row numbers 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.
Reimplemented from GeomVertexReader.
Definition at line 177 of file geomVertexRewriter.I.
Referenced by GeomVertexRewriter(), and set_column().
bool GeomVertexRewriter::set_column | ( | const InternalName * | name | ) | [inline] |
Sets up the rewriter to use the data type with the indicated name.
This also resets both the read and write row numbers 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.
Reimplemented from GeomVertexReader.
Definition at line 218 of file geomVertexRewriter.I.
References set_column().
bool GeomVertexRewriter::set_column | ( | const string & | name | ) | [inline] |
Sets up the rewriter to use the data type with the indicated name.
This also resets both the read and write row numbers 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.
Reimplemented from GeomVertexReader.
Definition at line 199 of file geomVertexRewriter.I.
References set_column().
void GeomVertexWriter::set_data1f | ( | float | data | ) | [inline, inherited] |
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 403 of file geomVertexWriter.I.
References GeomVertexWriter::has_column().
void GeomVertexWriter::set_data1i | ( | int | data | ) | [inline, inherited] |
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 505 of file geomVertexWriter.I.
References GeomVertexWriter::has_column().
Referenced by GeomPrimitive::offset_vertices().
void GeomVertexWriter::set_data2f | ( | float | x, |
float | y | ||
) | [inline, inherited] |
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 418 of file geomVertexWriter.I.
void GeomVertexWriter::set_data2f | ( | const LVecBase2f & | data | ) | [inline, inherited] |
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 432 of file geomVertexWriter.I.
References GeomVertexWriter::has_column().
void GeomVertexWriter::set_data2i | ( | int | a, |
int | b | ||
) | [inline, inherited] |
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 520 of file geomVertexWriter.I.
References GeomVertexWriter::has_column().
Referenced by GeomVertexWriter::set_data2i().
void GeomVertexWriter::set_data2i | ( | const int | data[2] | ) | [inline, inherited] |
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 535 of file geomVertexWriter.I.
References GeomVertexWriter::set_data2i().
void GeomVertexWriter::set_data3f | ( | float | x, |
float | y, | ||
float | z | ||
) | [inline, inherited] |
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 447 of file geomVertexWriter.I.
Referenced by LineSegs::set_vertex().
void GeomVertexWriter::set_data3f | ( | const LVecBase3f & | data | ) | [inline, inherited] |
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 461 of file geomVertexWriter.I.
References GeomVertexWriter::has_column().
void GeomVertexWriter::set_data3i | ( | int | a, |
int | b, | ||
int | c | ||
) | [inline, inherited] |
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 549 of file geomVertexWriter.I.
References GeomVertexWriter::has_column().
Referenced by GeomVertexWriter::set_data3i().
void GeomVertexWriter::set_data3i | ( | const int | data[3] | ) | [inline, inherited] |
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 564 of file geomVertexWriter.I.
References GeomVertexWriter::set_data3i().
void GeomVertexWriter::set_data4f | ( | float | x, |
float | y, | ||
float | z, | ||
float | w | ||
) | [inline, inherited] |
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 476 of file geomVertexWriter.I.
Referenced by GeomVertexData::copy_from(), LineSegs::set_vertex_color(), and GeomTransformer::transform_texcoords().
void GeomVertexWriter::set_data4f | ( | const LVecBase4f & | data | ) | [inline, inherited] |
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 490 of file geomVertexWriter.I.
References GeomVertexWriter::has_column().
void GeomVertexWriter::set_data4i | ( | int | a, |
int | b, | ||
int | c, | ||
int | d | ||
) | [inline, inherited] |
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 578 of file geomVertexWriter.I.
References GeomVertexWriter::has_column().
Referenced by GeomVertexData::copy_from(), and GeomVertexWriter::set_data4i().
void GeomVertexWriter::set_data4i | ( | const int | data[4] | ) | [inline, inherited] |
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 593 of file geomVertexWriter.I.
References GeomVertexWriter::set_data4i().
void GeomVertexReader::set_force | ( | bool | force | ) | [inline, inherited] |
Sets the value of the force flag.
When this is true (the default), vertex data will be paged in from disk if necessary. When this is false, the GeomVertexData will simply return a failure code when attempting to read vertex data that is not resident (but will put it on the queue to become resident later).
Normally, vertex data is always resident, so this will not be an issue. It is only possible for vertex data to be nonresident if you have enabled vertex paging via the GeomVertexArrayData and VertexDataPage interfaces.
Definition at line 237 of file geomVertexReader.I.
void GeomVertexRewriter::set_row | ( | int | row | ) | [inline] |
Sets the start, write, and write index to the indicated value.
The rewriter will begin traversing from the given row.
Reimplemented from GeomVertexReader.
Definition at line 306 of file geomVertexRewriter.I.