#include <eggCurve.h>
Inheritance diagram for EggCurve:
Public Types | |
enum | CurveType { CT_none, CT_xyz, CT_hpr, CT_t } |
typedef Vertices::const_pointer | pointer |
typedef Vertices::const_pointer | const_pointer |
typedef Vertices::const_reference | reference |
typedef Vertices::const_reference | const_reference |
typedef Vertices::const_iterator | iterator |
typedef Vertices::const_iterator | const_iterator |
typedef Vertices::const_reverse_iterator | reverse_iterator |
typedef Vertices::const_reverse_iterator | const_reverse_iterator |
typedef Vertices::size_type | size_type |
typedef Vertices::difference_type | difference_type |
enum | AlphaMode { AM_unspecified, AM_off, AM_on, AM_blend, AM_blend_no_occlude, AM_ms, AM_ms_mask, AM_binary, AM_dual } |
enum | DepthWriteMode { DWM_unspecified, DWM_off, DWM_on } |
enum | DepthTestMode { DTM_unspecified, DTM_off, DTM_on } |
Public Member Functions | |
EggCurve (const string &name="") | |
EggCurve (const EggCurve ©) | |
EggCurve & | operator= (const EggCurve ©) |
void | set_subdiv (int subdiv) |
Sets the number of subdivisions that will be requested across the curve. | |
int | get_subdiv () const |
Returns the requested number of subdivisions, or 0 if no particular subdivisions have been requested. | |
void | set_curve_type (CurveType type) |
Sets the type of the curve. | |
CurveType | get_curve_type () const |
Returns the indicated type of the curve. | |
virtual TypeHandle | get_type () const |
virtual TypeHandle | force_init_type () |
virtual EggRenderMode * | determine_alpha_mode () |
Walks back up the hierarchy, looking for an EggPrimitive or EggPrimitive or some such object at this level or above this primitive that has an alpha_mode other than AM_unspecified. | |
virtual EggRenderMode * | determine_depth_write_mode () |
Walks back up the hierarchy, looking for an EggGroup or EggPrimitive or some such object at this level or above this node that has a depth_write_mode other than DWM_unspecified. | |
virtual EggRenderMode * | determine_depth_test_mode () |
Walks back up the hierarchy, looking for an EggGroup or EggPrimitive or some such object at this level or above this node that has a depth_test_mode other than DTM_unspecified. | |
virtual EggRenderMode * | determine_draw_order () |
Walks back up the hierarchy, looking for an EggPrimitive or EggPrimitive or some such object at this level or above this primitive that has a draw_order specified. | |
virtual EggRenderMode * | determine_bin () |
Walks back up the hierarchy, looking for an EggPrimitive or EggPrimitive or some such object at this level or above this primitive that has a bin specified. | |
void | set_texture (EggTexture *texture) |
Applies the indicated texture to the primitive. | |
void | clear_texture () |
Removes any texturing from the primitive. | |
EggTexture * | get_texture () const |
Returns a pointer to the applied texture, or NULL if there is no texture applied. | |
bool | has_texture () const |
Returns true if the primitive is textured (and get_texture() will return a real pointer), false otherwise (and get_texture() will return NULL). | |
void | set_material (EggMaterial *material) |
Applies the indicated material to the primitive. | |
void | clear_material () |
Removes any material from the primitive. | |
EggMaterial * | get_material () const |
Returns a pointer to the applied material, or NULL if there is no material applied. | |
bool | has_material () const |
Returns true if the primitive is materiald (and get_material() will return a real pointer), false otherwise (and get_material() will return NULL). | |
void | set_bface_flag (bool flag) |
Sets the backfacing flag of the polygon. | |
bool | get_bface_flag () const |
Retrieves the backfacing flag of the polygon. | |
bool | has_vertex_normal () const |
Returns true if any vertex on the primitive has a specific normal set, false otherwise. | |
bool | has_vertex_color () const |
Returns true if any vertex on the primitive has a specific color set, false otherwise. | |
virtual void | reverse_vertex_ordering () |
Reverses the ordering of the vertices in this primitive, if appropriate, in order to change the direction the polygon appears to be facing. | |
virtual bool | cleanup () |
Cleans up modeling errors in whatever context this makes sense. | |
void | remove_doubled_verts (bool closed) |
Certain kinds of primitives, particularly polygons, don't like to have the same vertex repeated consecutively. | |
void | remove_nonunique_verts () |
Removes any multiple appearances of the same vertex from the primitive. | |
iterator | begin () const |
iterator | end () const |
reverse_iterator | rbegin () const |
reverse_iterator | rend () const |
bool | empty () const |
size_type | size () const |
EggVertex * | operator[] (int index) const |
This is read-only: you can't assign directly to an indexed vertex. | |
iterator | insert (iterator position, EggVertex *x) |
iterator | erase (iterator position) |
iterator | erase (iterator first, iterator last) |
Part of the implementaion of the EggPrimitive as an STL container. | |
void | replace (iterator position, EggVertex *vertex) |
Replaces the vertex at the indicated position with the indicated vertex. | |
void | clear () |
EggVertex * | add_vertex (EggVertex *vertex) |
Adds the indicated vertex to the end of the primitive's list of vertices, and returns it. | |
EggVertex * | remove_vertex (EggVertex *vertex) |
Removes the indicated vertex vertex from the primitive and returns it. | |
void | copy_vertices (const EggPrimitive &other) |
Replaces the current primitive's list of vertices with a copy of the list of vertices on the other primitive. | |
void | set_vertex (int index, EggVertex *vertex) |
Replaces a particular vertex based on its index number in the list of vertices. | |
EggVertex * | get_vertex (int index) const |
Returns a particular index based on its index number. | |
EggVertexPool * | get_pool () const |
Returns the vertex pool associated with the vertices of the primitive, or NULL if the primitive has no vertices. | |
void | test_vref_integrity () const |
Verifies that each vertex in the primitive exists and that it knows it is referenced by the primitive. | |
EggGroupNode * | get_parent () const |
int | get_depth () const |
Returns the number of nodes above this node in the egg hierarchy. | |
bool | is_under_instance () const |
Returns true if there is an node somewhere in the egg tree at or above this node, false otherwise. | |
bool | is_under_transform () const |
Returns true if there is a entry somewhere in the egg tree at or above this node, false otherwise. | |
bool | is_local_coord () const |
Returns true if this node's vertices are not in the global coordinate space. | |
const LMatrix4d & | get_vertex_frame () const |
Returns the coordinate frame of the vertices referenced by primitives at or under this node. | |
const LMatrix4d & | get_node_frame () const |
Returns the coordinate frame of the node itself. | |
const LMatrix4d & | get_vertex_frame_inv () const |
Returns the inverse of the matrix returned by get_vertex_frame(). | |
const LMatrix4d & | get_node_frame_inv () const |
Returns the inverse of the matrix returned by get_node_frame(). | |
const LMatrix4d & | get_vertex_to_node () const |
Returns the transformation matrix suitable for converting the vertices as read from the egg file into the coordinate space of the node. | |
const LMatrix4d & | get_node_to_vertex () const |
Returns the transformation matrix suitable for converting vertices in the coordinate space of the node to the appropriate coordinate space for storing in the egg file. | |
void | transform (const LMatrix4d &mat) |
Applies the indicated transformation to the node and all of its descendants. | |
void | transform (const LMatrix4d &mat) |
Applies the indicated transformation matrix to the attributes. | |
void | transform_vertices_only (const LMatrix4d &mat) |
Applies the indicated transformation only to vertices that appear in global space within vertex pools at this node and below. | |
void | flatten_transforms () |
Removes any transform and instance records from this node in the scene graph and below. | |
void | apply_texmats () |
Applies the texture matrices to the UV's of the vertices that reference them, and then removes the texture matrices from the textures themselves. | |
virtual void | write (ostream &out, int indent_level) const=0 |
void | write (ostream &out, int indent_level) const |
Writes the attributes to the indicated output stream in Egg format. | |
void | write (ostream &out, int indent_level) const |
Writes the attributes to the indicated output stream in Egg format. | |
bool | parse_egg (const string &egg_syntax) |
Parses the egg syntax given in the indicate string as if it had been read from the egg file within this object's definition. | |
void | test_under_integrity () const |
Recursively checks the integrity of the _under_flags, _parent, and _depth members of this node and all of its ancestors. | |
void | write_header (ostream &out, int indent_level, const char *egg_keyword) const |
Writes the first line of the egg object, e.g. | |
int | get_type_index () const |
Returns the internal index number associated with this object's TypeHandle, a unique number for each different type. | |
bool | is_of_type (TypeHandle handle) const |
Returns true if the current object is or derives from the indicated type. | |
bool | is_exact_type (TypeHandle handle) const |
Returns true if the current object is the indicated type exactly. | |
int | get_ref_count () const |
Returns the current reference count. | |
int | ref () const |
Explicitly increments the reference count. | |
int | unref () const |
Explicitly decrements the reference count. | |
void | test_ref_count_integrity () const |
Does some easy checks to make sure that the reference count isn't completely bogus. | |
void | set_name (const string &name) |
void | clear_name () |
Resets the Namable's name to empty. | |
bool | has_name () const |
Returns true if the Namable has a nonempty name set, false if the name is empty. | |
const string & | get_name () const |
void | output (ostream &out) const |
Outputs the Namable. | |
bool | has_normal () const |
const Normald & | get_normal () const |
void | set_normal (const Normald &normal) |
void | clear_normal () |
bool | has_uv () const |
const TexCoordd & | get_uv () const |
void | set_uv (const TexCoordd &texCoord) |
void | clear_uv () |
bool | has_color () const |
Colorf | get_color () const |
Returns the color set on this particular attribute. | |
void | set_color (const Colorf &Color) |
void | clear_color () |
bool | sorts_less_than (const EggAttributes &other) const |
An ordering operator to compare two vertices for sorting order. | |
void | set_alpha_mode (AlphaMode mode) |
Specifies precisely how the transparency for this geometry should be achieved, or if it should be used. | |
AlphaMode | get_alpha_mode () const |
Returns the alpha mode that was set, or AM_unspecified if nothing was set. | |
void | set_depth_write_mode (DepthWriteMode mode) |
Specifies whether writes should be made to the depth buffer (assuming the rendering backend provides a depth buffer) when rendering this geometry. | |
DepthWriteMode | get_depth_write_mode () const |
Returns the depth_write mode that was set, or DWM_unspecified if nothing was set. | |
void | set_depth_test_mode (DepthTestMode mode) |
Specifies whether this geometry should be tested against the depth buffer when it is drawn (assuming the rendering backend provides a depth buffer). | |
DepthTestMode | get_depth_test_mode () const |
Returns the depth_test mode that was set, or DTM_unspecified if nothing was set. | |
void | set_draw_order (int order) |
Sets the "draw-order" flag associated with this object. | |
int | get_draw_order () const |
Returns the "draw-order" flag as set for this particular object. | |
bool | has_draw_order () const |
Returns true if the draw-order flag has been set for this particular object. | |
void | clear_draw_order () |
Removes the draw-order flag from this particular object. | |
void | set_bin (const string &bin) |
Sets the "bin" string for this particular object. | |
string | get_bin () const |
Returns the bin name that has been set for this particular object, if any. | |
bool | has_bin () const |
Returns true if a bin name has been set for this particular object. | |
void | clear_bin () |
Removes the bin name that was set for this particular object. | |
bool | operator== (const EggRenderMode &other) const |
bool | operator!= (const EggRenderMode &other) const |
bool | operator< (const EggRenderMode &other) const |
Static Public Member Functions | |
CurveType | string_curve_type (const string &string) |
Returns the CurveType value associated with the given string representation, or CT_invalid if the string does not match any known CurveType value. | |
TypeHandle | get_class_type () |
void | init_type () |
AlphaMode | string_alpha_mode (const string &string) |
Returns the AlphaMode value associated with the given string representation, or AM_unspecified if the string does not match any known AlphaMode value. | |
DepthWriteMode | string_depth_write_mode (const string &string) |
Returns the DepthWriteMode value associated with the given string representation, or DWM_unspecified if the string does not match any known DepthWriteMode value. | |
DepthTestMode | string_depth_test_mode (const string &string) |
Returns the DepthTestMode value associated with the given string representation, or DWM_unspecified if the string does not match any known DepthTestMode value. | |
Public Attributes | |
EggMorphNormalList | _dnormals |
EggMorphTexCoordList | _duvs |
EggMorphColorList | _drgbas |
Protected Types | |
typedef RefCountObj< LMatrix4d > | MatrixFrame |
enum | UnderFlags { UF_under_instance = 0x001, UF_under_transform = 0x002, UF_local_coord = 0x004 } |
Protected Member Functions | |
void | write_body (ostream &out, int indent_level) const |
Writes the attributes and the vertices referenced by the primitive to the indicated output stream in Egg format. | |
virtual bool | egg_start_parse_body () |
This function is called within parse_egg(). | |
virtual void | r_transform (const LMatrix4d &mat, const LMatrix4d &inv, CoordinateSystem to_cs) |
This is called from within the egg code by transform(). | |
virtual void | r_flatten_transforms () |
The recursive implementation of flatten_transforms(). | |
virtual void | r_apply_texmats (EggTextureCollection &textures) |
The recursive implementation of apply_texmats(). | |
virtual void | update_under (int depth_offset) |
This function is called from within EggGroupNode whenever the parentage of the node has changed. | |
virtual void | adjust_under () |
This is called within update_under() after all the various under settings have been inherited directly from the parent node. | |
virtual void | r_transform_vertices (const LMatrix4d &mat) |
This is called from within the egg code by transform_vertices_only()(). | |
virtual void | r_mark_coordsys (CoordinateSystem cs) |
This is only called immediately after loading an egg file from disk, to propagate the value found in the CoordinateSystem entry (or the default Y-up coordinate system) to all nodes that care about what the coordinate system is. | |
Protected Attributes | |
EggGroupNode * | _parent |
int | _depth |
int | _under_flags |
PointerTo< MatrixFrame > | _vertex_frame |
PointerTo< MatrixFrame > | _node_frame |
PointerTo< MatrixFrame > | _vertex_frame_inv |
PointerTo< MatrixFrame > | _node_frame_inv |
PointerTo< MatrixFrame > | _vertex_to_node |
PointerTo< MatrixFrame > | _node_to_vertex |
Private Attributes | |
int | _subdiv |
CurveType | _type |
Static Private Attributes | |
TypeHandle | _type_handle |
See EggNurbsCurve.
Definition at line 38 of file eggCurve.h.
|
Definition at line 130 of file eggPrimitive.h. Referenced by EggPolygon::cleanup(), EggLoader::find_collision_geometry(), EggLoader::make_collision_plane(), and CharacterMaker::make_static_primitive(). |
|
Definition at line 125 of file eggPrimitive.h. |
|
Definition at line 128 of file eggPrimitive.h. |
|
Definition at line 132 of file eggPrimitive.h. |
|
Definition at line 134 of file eggPrimitive.h. |
|
Definition at line 129 of file eggPrimitive.h. Referenced by EggPrimitive::end(), EggPrimitive::erase(), EggPrimitive::has_material(), EggPrimitive::remove_nonunique_verts(), and split_vertex(). |
|
Definition at line 118 of file eggNode.h. Referenced by EggGroup::string_collide_flags(). |
|
Definition at line 124 of file eggPrimitive.h. |
|
Definition at line 127 of file eggPrimitive.h. |
|
Definition at line 131 of file eggPrimitive.h. Referenced by EggPrimitive::set_bface_flag(). |
|
Definition at line 133 of file eggPrimitive.h. |
|
Definition at line 64 of file eggRenderMode.h. |
|
Definition at line 44 of file eggCurve.h. Referenced by get_subdiv(). |
|
Definition at line 80 of file eggRenderMode.h. Referenced by EggRenderMode::get_depth_write_mode(), and EggLoader::setup_bucket(). |
|
Definition at line 76 of file eggRenderMode.h. |
|
|
|
Definition at line 31 of file eggCurve.I. References INLINE. |
|
Definition at line 44 of file eggCurve.I. References _subdiv, _type, INLINE, and EggPrimitive::operator=(). |
|
Adds the indicated vertex to the end of the primitive's list of vertices, and returns it.
Definition at line 414 of file eggPrimitive.cxx. Referenced by EggPrimitive::remove_nonunique_verts(). |
|
This is called within update_under() after all the various under settings have been inherited directly from the parent node. It is responsible for adjusting these settings to reflect states local to the current node; for instance, an node will force the UF_under_instance bit on. Reimplemented in EggGroup. Definition at line 361 of file eggNode.cxx. Referenced by EggNode::test_under_integrity(). |
|
Applies the texture matrices to the UV's of the vertices that reference them, and then removes the texture matrices from the textures themselves.
Definition at line 49 of file eggNode.cxx. References EggNode::_parent, EggNode::determine_alpha_mode(), and NULL. |
|
Definition at line 247 of file eggPrimitive.I. References INLINE, nassertr, NULL, and EggPrimitive::size(). Referenced by EggPolygon::cleanup(), EggLoader::find_collision_geometry(), EggPrimitive::insert(), EggLoader::make_collision_plane(), EggPrimitive::operator[](), EggPrimitive::remove_nonunique_verts(), EggPrimitive::size(), and split_vertex(). |
|
Cleans up modeling errors in whatever context this makes sense. For instance, for a polygon, this calls remove_doubled_verts(true). For a point, it calls remove_nonunique_verts(). Returns true if the primitive is valid, or false if it is degenerate. Reimplemented in EggPoint, and EggPolygon. Definition at line 272 of file eggPrimitive.cxx. References EggPrimitive::_vertices, and EggPrimitive::prepare_remove_vertex(). |
|
Definition at line 390 of file eggPrimitive.I. Referenced by EggPrimitive::operator=(), and EggPrimitive::remove_nonunique_verts(). |
|
Removes the bin name that was set for this particular object. See set_bin(). Definition at line 326 of file eggRenderMode.I. |
|
Definition at line 177 of file eggAttributes.I. |
|
Removes the draw-order flag from this particular object. See set_draw_order(). Definition at line 254 of file eggRenderMode.I. |
|
Removes any material from the primitive.
Definition at line 165 of file eggPrimitive.I. References EggPrimitive::_bface, and INLINE. |
|
Resets the Namable's name to empty.
Definition at line 82 of file namable.I. References Namable::_name, and INLINE. |
|
Definition at line 71 of file eggAttributes.I. References EggAttributes::_flags, and EggAttributes::F_has_uv. Referenced by EggGroupNode::find_textures(), and EggPolygon::operator=(). |
|
Removes any texturing from the primitive.
Definition at line 106 of file eggPrimitive.I. References EggPrimitive::_texture, INLINE, and NULL. |
|
Definition at line 121 of file eggAttributes.I. References EggAttributes::_color, Colorf, EggAttributes::has_color(), and INLINE. |
|
Replaces the current primitive's list of vertices with a copy of the list of vertices on the other primitive.
Definition at line 469 of file eggPrimitive.cxx. |
|
Walks back up the hierarchy, looking for an EggPrimitive or EggPrimitive or some such object at this level or above this primitive that has an alpha_mode other than AM_unspecified. Returns a valid EggRenderMode pointer if one is found, or NULL otherwise. Reimplemented from EggNode. Definition at line 51 of file eggPrimitive.cxx. |
|
Walks back up the hierarchy, looking for an EggPrimitive or EggPrimitive or some such object at this level or above this primitive that has a bin specified. Returns a valid EggRenderMode pointer if one is found, or NULL otherwise. Reimplemented from EggNode. Definition at line 177 of file eggPrimitive.cxx. References EggPrimitive::_vertices. |
|
Walks back up the hierarchy, looking for an EggGroup or EggPrimitive or some such object at this level or above this node that has a depth_test_mode other than DTM_unspecified. Returns a valid EggRenderMode pointer if one is found, or NULL otherwise. Reimplemented from EggNode. Definition at line 114 of file eggPrimitive.cxx. References EggNode::determine_draw_order(), EggPrimitive::get_texture(), EggRenderMode::has_draw_order(), EggPrimitive::has_texture(), and NULL. |
|
Walks back up the hierarchy, looking for an EggGroup or EggPrimitive or some such object at this level or above this node that has a depth_write_mode other than DWM_unspecified. Returns a valid EggRenderMode pointer if one is found, or NULL otherwise. Reimplemented from EggNode. Definition at line 82 of file eggPrimitive.cxx. References EggNode::determine_depth_test_mode(), EggRenderMode::DTM_unspecified, EggRenderMode::get_depth_test_mode(), EggPrimitive::get_texture(), EggPrimitive::has_texture(), and NULL. |
|
Walks back up the hierarchy, looking for an EggPrimitive or EggPrimitive or some such object at this level or above this primitive that has a draw_order specified. Returns a valid EggRenderMode pointer if one is found, or NULL otherwise. Reimplemented from EggNode. Definition at line 146 of file eggPrimitive.cxx. References EggPrimitive::get_texture(). |
|
This function is called within parse_egg(). It should call the appropriate function on the lexer to initialize the parser into the state associated with this object. If the object cannot be parsed into directly, it should return false. Reimplemented from EggNode. Definition at line 718 of file eggPrimitive.cxx. |
|
Definition at line 295 of file eggPrimitive.I. References EggPrimitive::end(), nassertv, EggPrimitive::prepare_add_vertex(), EggPrimitive::prepare_remove_vertex(), EggPrimitive::test_vref_integrity(), and x. Referenced by EggLoader::find_collision_geometry(), and EggPrimitive::has_vertex_normal(). |
|
Definition at line 259 of file eggPrimitive.I. References EggPrimitive::_vertices, INLINE, EggPrimitive::iterator, EggPrimitive::prepare_add_vertex(), EggPrimitive::test_vref_integrity(), and x. Referenced by EggPolygon::cleanup(), EggPrimitive::empty(), EggLoader::find_collision_geometry(), EggLoader::make_collision_plane(), EggPrimitive::remove_nonunique_verts(), EggPrimitive::size(), and split_vertex(). |
|
Part of the implementaion of the EggPrimitive as an STL container. Most of the rest of these functions are inline and declared in EggPrimitive.I. Definition at line 391 of file eggPrimitive.cxx. References EggPrimitive::iterator. |
|
Definition at line 351 of file eggPrimitive.I. References EggPrimitive::_vertices. Referenced by EggPrimitive::size(). |
|
Removes any transform and instance records from this node in the scene graph and below. If an instance node is encountered, removes the instance and applies the transform to its vertices, duplicating vertices if necessary. Since this function may result in duplicated vertices, it may be a good idea to call remove_unused_vertices() after calling this. |
|
Reimplemented from EggPrimitive. Reimplemented in EggNurbsCurve. Definition at line 76 of file eggCurve.h. |
|
Returns the alpha mode that was set, or AM_unspecified if nothing was set. See set_alpha_mode(). Definition at line 186 of file eggRenderMode.I. References EggRenderMode::_has_draw_order, and INLINE. |
|
Retrieves the backfacing flag of the polygon. See set_bface_flag(). Definition at line 234 of file eggPrimitive.I. References EggPrimitive::_vertices. |
|
Returns the bin name that has been set for this particular object, if any. See set_bin(). Definition at line 296 of file eggRenderMode.I. |
|
Reimplemented from EggPrimitive. Reimplemented in EggNurbsCurve. Definition at line 65 of file eggCurve.h. |
|
Returns the color set on this particular attribute. If there is no color set, returns white. Definition at line 148 of file eggAttributes.I. References EggAttributes::_flags, and EggAttributes::F_has_color. |
|
Returns the indicated type of the curve.
Definition at line 132 of file eggCurve.I. |
|
Returns the number of nodes above this node in the egg hierarchy.
|
|
Returns the depth_test mode that was set, or DTM_unspecified if nothing was set. Definition at line 138 of file eggRenderMode.I. References EggRenderMode::_alpha_mode. Referenced by EggGroup::determine_alpha_mode(), and EggPrimitive::determine_depth_write_mode(). |
|
Returns the depth_write mode that was set, or DWM_unspecified if nothing was set. Definition at line 100 of file eggRenderMode.I. References EggRenderMode::_depth_test_mode, EggRenderMode::DepthTestMode, and INLINE. |
|
Returns the "draw-order" flag as set for this particular object. See set_draw_order(). Definition at line 224 of file eggRenderMode.I. References EggRenderMode::_bin, and INLINE. |
|
Returns a pointer to the applied material, or NULL if there is no material applied.
Definition at line 180 of file eggPrimitive.I. References EggPrimitive::_bface, and INLINE. Referenced by EggMaterialCollection::collapse_equivalent_materials(), and EggMaterialCollection::insert_materials(). |
|
|
Returns the coordinate frame of the node itself. This is simply the net product of all transformations up to the root. Definition at line 210 of file eggNode.I. Referenced by EggGroup::string_collide_flags(). |
|
Returns the inverse of the matrix returned by get_node_frame(). See get_node_frame(). Definition at line 249 of file eggNode.I. Referenced by EggGroup::string_collide_flags(). |
|
Returns the transformation matrix suitable for converting vertices in the coordinate space of the node to the appropriate coordinate space for storing in the egg file. This is the same thing as: |
|
Definition at line 45 of file eggAttributes.I. References EggAttributes::_flags, EggAttributes::_normal, EggAttributes::F_has_normal, and INLINE. Referenced by EggAttributes::~EggAttributes(). |
|
Definition at line 75 of file eggNode.I. References EggNode::_depth. Referenced by EggNode::determine_draw_order(), and CharacterMaker::make_dynamic_primitive(). |
|
Returns the vertex pool associated with the vertices of the primitive, or NULL if the primitive has no vertices.
Definition at line 442 of file eggPrimitive.I. |
|
Returns the current reference count.
Definition at line 183 of file referenceCount.I. Referenced by RenderState::determine_bin_index(), RenderEffects::determine_show_bounds(), FontPool::ns_garbage_collect(), TexturePool::ns_garbage_collect(), MaterialPool::ns_get_material(), and TexturePool::ns_release_texture(). |
|
Returns the requested number of subdivisions, or 0 if no particular subdivisions have been requested.
Definition at line 101 of file eggCurve.I. |
|
Returns a pointer to the applied texture, or NULL if there is no texture applied.
Definition at line 121 of file eggPrimitive.I. References EggPrimitive::_material, and INLINE. Referenced by EggTextureCollection::collapse_equivalent_textures(), EggPrimitive::determine_depth_test_mode(), EggPrimitive::determine_depth_write_mode(), EggPrimitive::determine_draw_order(), and EggTextureCollection::insert_textures(). |
|
Reimplemented from EggPrimitive. Reimplemented in EggNurbsCurve. Definition at line 73 of file eggCurve.h. |
|
Returns the internal index number associated with this object's TypeHandle, a unique number for each different type. This is equivalent to get_type().get_index(). Definition at line 71 of file typedObject.I. References TypeHandle::get_name(), TypedObject::get_type(), and INLINE. |
|
Definition at line 95 of file eggAttributes.I. References EggAttributes::_flags, EggAttributes::F_has_uv, and INLINE. |
|
Returns a particular index based on its index number.
Definition at line 423 of file eggPrimitive.I. Referenced by EggPolygon::decomp_concave(), EggGroupNode::find_textures(), EggNurbsSurface::get_num_v_cvs(), EggPolygon::triangulate_in_place(), and EggPolygon::write(). |
|
Returns the coordinate frame of the vertices referenced by primitives at or under this node. This is not the same as get_node_frame(). Generally, vertices in an egg file are stored in the global coordinate space, regardless of the transforms defined at each node. Thus, get_vertex_frame() will usually return the identity transform (global coordinate space). However, primitives under an entry reference their vertices in the coordinate system under effect at the time of the . Thus, nodes under an entry may return this non-identity matrix. Specifically, this may return a non-identity matrix only if is_local_coord() is true. Definition at line 188 of file eggNode.I. References EggNode::_node_frame_inv, and NULL. Referenced by EggGroup::string_collide_flags(). |
|
Returns the inverse of the matrix returned by get_vertex_frame(). See get_vertex_frame(). Definition at line 229 of file eggNode.I. Referenced by EggGroup::string_collide_flags(). |
|
Returns the transformation matrix suitable for converting the vertices as read from the egg file into the coordinate space of the node. This is the same thing as: get_vertex_frame() * get_node_frame_inv() Definition at line 278 of file eggNode.I. References INLINE, EggNode::r_flatten_transforms(), and EggNode::update_under(). Referenced by EggLoader::find_collision_geometry(). |
|
Returns true if a bin name has been set for this particular object. See set_bin(). Definition at line 311 of file eggRenderMode.I. Referenced by EggGroup::determine_depth_write_mode(). |
|
Definition at line 133 of file eggAttributes.I. References EggAttributes::_color, EggAttributes::_flags, EggAttributes::F_has_color, and INLINE. Referenced by EggAttributes::clear_uv(). |
|
Returns true if the draw-order flag has been set for this particular object. See set_draw_order(). Definition at line 239 of file eggRenderMode.I. Referenced by EggPrimitive::determine_depth_test_mode(). |
|
Returns true if the primitive is materiald (and get_material() will return a real pointer), false otherwise (and get_material() will return NULL).
Definition at line 198 of file eggPrimitive.I. References EggPrimitive::_vertices, INLINE, and EggPrimitive::iterator. Referenced by EggMaterialCollection::collapse_equivalent_materials(), and EggMaterialCollection::insert_materials(). |
|
Returns true if the Namable has a nonempty name set, false if the name is empty.
Definition at line 97 of file namable.I. References Namable::get_name(), and INLINE. Referenced by EggGroupUniquifier::EggGroupUniquifier(), Texture::read(), and Texture::Texture(). |
|
Definition at line 33 of file eggAttributes.I. References EggAttributes::_normal, INLINE, nassertr, and Normald. Referenced by EggAttributes::~EggAttributes(). |
|
Returns true if the primitive is textured (and get_texture() will return a real pointer), false otherwise (and get_texture() will return NULL).
Definition at line 139 of file eggPrimitive.I. References EggPrimitive::_material, and INLINE. Referenced by EggTextureCollection::collapse_equivalent_textures(), EggPrimitive::determine_depth_test_mode(), EggPrimitive::determine_depth_write_mode(), and EggTextureCollection::insert_textures(). |
|
Definition at line 83 of file eggAttributes.I. Referenced by EggAttributes::~EggAttributes(). |
|
Returns true if any vertex on the primitive has a specific color set, false otherwise.
Definition at line 223 of file eggPrimitive.cxx. References EggPrimitive::_vertices. |
|
Returns true if any vertex on the primitive has a specific normal set, false otherwise.
Definition at line 202 of file eggPrimitive.cxx. References EggPrimitive::empty(). |
|
Reimplemented from EggPrimitive. Reimplemented in EggNurbsCurve. Definition at line 68 of file eggCurve.h. |
|
Definition at line 335 of file eggPrimitive.I. References EggPrimitive::begin(), INLINE, nassertr, NULL, and EggPrimitive::size(). |
|
Returns true if the current object is the indicated type exactly.
Definition at line 101 of file typedObject.I. Referenced by PT(), and CollisionNode::xform(). |
|
Returns true if this node's vertices are not in the global coordinate space. This will be the case if there was an node under a transform at or above this node. Definition at line 144 of file eggNode.I. Referenced by EggVertex::sorts_less_than(). |
|
|
Returns true if there is an node somewhere in the egg tree at or above this node, false otherwise.
Definition at line 108 of file eggNode.I. References EggNode::_under_flags, INLINE, and EggNode::UF_local_coord. Referenced by EggGroupNode::find_textures(). |
|
Returns true if there is a entry somewhere in the egg tree at or above this node, false otherwise.
Definition at line 125 of file eggNode.I. References EggNode::_vertex_frame, INLINE, and NULL. |
|
Definition at line 338 of file eggRenderMode.I. |
|
Definition at line 100 of file eggRenderMode.cxx. References EggRenderMode::_has_draw_order. |
|
Definition at line 59 of file eggCurve.I. References _subdiv, and INLINE. Referenced by EggNurbsCurve::EggNurbsCurve(). |
|
Definition at line 71 of file eggRenderMode.cxx. References EggRenderMode::_draw_order. |
|
This is read-only: you can't assign directly to an indexed vertex. See set_vertex() instead. Definition at line 322 of file eggPrimitive.I. References EggPrimitive::begin(), INLINE, nassertv, EggPrimitive::replace(), and EggPrimitive::size(). |
|
Outputs the Namable. This function simply writes the name to the output stream; most Namable derivatives will probably redefine this. Reimplemented in BuilderBucket, AnimBundle, AnimChannelBase, AnimChannelFixed< SwitchType >, AnimGroup, PartBundle, CollisionNode, ButtonNode, HermiteCurve, RopeNode, Fog, GeomNode, LensNode, LightLensNode, LightNode, LODNode, PandaNode, PlaneNode, MouseWatcher, and MouseWatcherRegion. |
|
Parses the egg syntax given in the indicate string as if it had been read from the egg file within this object's definition. Updates the object accordingly. Returns true if successful, false if there was some parse error or if the object does not support this functionality. Definition at line 200 of file eggNode.cxx. References EggNode::_parent. |
|
The recursive implementation of apply_texmats().
Reimplemented from EggNode. Reimplemented in EggNurbsSurface. Definition at line 791 of file eggPrimitive.cxx. |
|
The recursive implementation of flatten_transforms().
Reimplemented from EggNode. Definition at line 761 of file eggPrimitive.cxx. |
|
This is only called immediately after loading an egg file from disk, to propagate the value found in the CoordinateSystem entry (or the default Y-up coordinate system) to all nodes that care about what the coordinate system is.
Reimplemented in EggGroupNode, EggXfmAnimData, and EggXfmSAnim. Definition at line 430 of file eggNode.cxx. |
|
This is called from within the egg code by transform(). It applies a transformation matrix to the current node in some sensible way, then continues down the tree. The first matrix is the transformation to apply; the second is its inverse. The third parameter is the coordinate system we are changing to, or CS_default if we are not changing coordinate systems. Reimplemented from EggNode. Definition at line 748 of file eggPrimitive.cxx. |
|
This is called from within the egg code by transform_vertices_only()(). It applies a transformation matrix to the current node in some sensible way (if the current node is a vertex pool with vertices), then continues down the tree. Reimplemented in EggGroupNode, and EggVertexPool. Definition at line 410 of file eggNode.cxx. |
|
Definition at line 271 of file eggPrimitive.I. |
|
Explicitly increments the reference count. User code should avoid using ref() and unref() directly, which can result in missed reference counts. Instead, let a PointerTo object manage the reference counting automatically. This function is const, even though it changes the object, because generally fiddling with an object's reference count isn't considered part of fiddling with the object. An object might be const in other ways, but we still need to accurately count the number of references to it. The return value is the new reference count. Definition at line 225 of file referenceCount.I. Referenced by ClientDevice::ClientDevice(), EggGroupNode::find_textures(), EggGroupNode::r_apply_texmats(), EggGroupNode::r_flatten_transforms(), and EggGroupNode::reverse_vertex_ordering(). |
|
Certain kinds of primitives, particularly polygons, don't like to have the same vertex repeated consecutively. Unfortunately, some modeling programs (like MultiGen) make this an easy mistake to make. It's handy to have a function to remove these redundant vertices. If closed is true, it also checks that the first and last vertices are not the same. This function identifies repeated vertices by pointer only; it does not remove consecutive equivalent but different vertices. Definition at line 309 of file eggPrimitive.cxx. |
|
Removes any multiple appearances of the same vertex from the primitive. This primarily makes sense for a point primitive, which is really a collection of points and which doesn't make sense to include the same point twice, in any order. Definition at line 358 of file eggPrimitive.cxx. References EggPrimitive::_vertices, EggPrimitive::add_vertex(), EggPrimitive::begin(), EggPrimitive::clear(), EggPrimitive::end(), EggPrimitive::iterator, EggPrimitive::size(), and EggPrimitive::test_vref_integrity(). |
|
Removes the indicated vertex vertex from the primitive and returns it. If the vertex was not already in the primitive, does nothing and returns NULL. Definition at line 439 of file eggPrimitive.cxx. |
|
Definition at line 283 of file eggPrimitive.I. |
|
Replaces the vertex at the indicated position with the indicated vertex. It is an error to call this with an invalid position iterator (e.g. end()). Definition at line 371 of file eggPrimitive.I. Referenced by EggPrimitive::operator[](), and split_vertex(). |
|
Reverses the ordering of the vertices in this primitive, if appropriate, in order to change the direction the polygon appears to be facing. Does not adjust the surface normal, if any. Definition at line 248 of file eggPrimitive.cxx. Referenced by EggGroupNode::steal_children(). |
|
Specifies precisely how the transparency for this geometry should be achieved, or if it should be used. The default, AM_unspecified, is to use transparency if the geometry has a color whose alpha value is non-1, or if it has a four-channel texture applied; otherwise, AM_on forces transparency on, and AM_off forces it off. The other flavors of transparency are specific ways to turn on transparency, which may or may not be supported by a particular rendering backend. Definition at line 169 of file eggRenderMode.I. References EggRenderMode::_has_draw_order, and INLINE. |
|
Sets the backfacing flag of the polygon. If this is true, the polygon will be rendered so that both faces are visible; if it is false, only the front face of the polygon will be visible. Definition at line 218 of file eggPrimitive.I. References EggPrimitive::_vertices, INLINE, and EggPrimitive::reverse_iterator. |
|
Sets the "bin" string for this particular object. This names a particular bin in which the object should be rendered. The exact meaning of a bin is implementation defined, but generally a GeomBin matching each bin name must also be specifically added to the rendering engine (e.g. the CullTraverser) in use for this to work. See also set_draw_order(). Definition at line 281 of file eggRenderMode.I. |
|
Definition at line 164 of file eggAttributes.I. |
|
Sets the type of the curve. This is primarily used as a hint to any code that may need to deal with this curve. Definition at line 119 of file eggCurve.I. |
|
Specifies whether this geometry should be tested against the depth buffer when it is drawn (assuming the rendering backend provides a depth buffer). Note that this is different, and independent from, the depth_write mode. Definition at line 121 of file eggRenderMode.I. References EggRenderMode::_alpha_mode, and INLINE. |
|
Specifies whether writes should be made to the depth buffer (assuming the rendering backend provides a depth buffer) when rendering this geometry.
Definition at line 83 of file eggRenderMode.I. |
|
Sets the "draw-order" flag associated with this object. This specifies a particular order in which objects of this type should be drawn, within the specified bin. If a bin is not explicitly specified, "fixed" is used. See also set_bin(). Definition at line 208 of file eggRenderMode.I. References EggRenderMode::_bin, and INLINE. |
|
Applies the indicated material to the primitive.
Definition at line 152 of file eggPrimitive.I. References EggPrimitive::_material, INLINE, and NULL. Referenced by EggMaterialCollection::collapse_equivalent_materials(). |
|
Definition at line 69 of file namable.I. References Namable::_name. Referenced by BuilderBucket::BuilderBucket(), SceneGraphReducer::do_flatten_siblings(), Texture::read(), PandaNode::reparent(), and Texture::Texture(). |
|
Definition at line 58 of file eggAttributes.I. References EggAttributes::_flags, EggAttributes::F_has_normal, and INLINE. Referenced by EggPolygon::operator=(). |
|
Sets the number of subdivisions that will be requested across the curve. (This doesn't necessary guarantee that this number of subdivisions will be made; it's just a hint to any curve renderer or quick tesselator.) Set the number to 0 to disable the hint. Definition at line 86 of file eggCurve.I. |
|
Applies the indicated texture to the primitive.
Definition at line 93 of file eggPrimitive.I. References EggPrimitive::_texture, and INLINE. Referenced by EggTextureCollection::collapse_equivalent_textures(). |
|
Definition at line 108 of file eggAttributes.I. References EggAttributes::_flags, EggAttributes::F_has_color, and INLINE. |
|
Replaces a particular vertex based on its index number in the list of vertices. This is just a convenience function for people who don't want to mess with the iterators. Definition at line 409 of file eggPrimitive.I. |
|
Definition at line 307 of file eggPrimitive.I. References EggPrimitive::begin(), EggPrimitive::end(), EggPrimitive::erase(), and INLINE. Referenced by EggPrimitive::begin(), EggGroupNode::find_textures(), EggPrimitive::insert(), EggPrimitive::operator[](), EggPrimitive::remove_nonunique_verts(), EggNurbsCurve::set_num_knots(), and EggPolygon::triangulate_in_place(). |
|
An ordering operator to compare two vertices for sorting order. This imposes an arbitrary ordering useful to identify unique vertices. Definition at line 149 of file eggAttributes.cxx. |
|
Returns the AlphaMode value associated with the given string representation, or AM_unspecified if the string does not match any known AlphaMode value.
Definition at line 141 of file eggRenderMode.cxx. References EggRenderMode::AM_dual. |
|
Returns the CurveType value associated with the given string representation, or CT_invalid if the string does not match any known CurveType value.
Definition at line 43 of file eggCurve.cxx. References CT_none. |
|
Returns the DepthTestMode value associated with the given string representation, or DWM_unspecified if the string does not match any known DepthTestMode value.
Definition at line 203 of file eggRenderMode.cxx. References EggRenderMode::AM_binary, EggRenderMode::AM_dual, and EggRenderMode::AM_ms_mask. |
|
Returns the DepthWriteMode value associated with the given string representation, or DWM_unspecified if the string does not match any known DepthWriteMode value.
Definition at line 178 of file eggRenderMode.cxx. |
|
Does some easy checks to make sure that the reference count isn't completely bogus.
Definition at line 328 of file referenceCount.I. References INLINE. Referenced by EggNode::determine_bin(), and ReferenceCount::~ReferenceCount(). |
|
Recursively checks the integrity of the _under_flags, _parent, and _depth members of this node and all of its ancestors.
Definition at line 235 of file eggNode.cxx. References EggNode::_depth, EggNode::_node_frame, EggNode::_node_frame_inv, EggNode::_node_to_vertex, EggNode::_parent, EggNode::_under_flags, EggNode::_vertex_frame, EggNode::_vertex_frame_inv, EggNode::_vertex_to_node, EggNode::adjust_under(), and NULL. |
|
Verifies that each vertex in the primitive exists and that it knows it is referenced by the primitive.
Definition at line 495 of file eggPrimitive.cxx. Referenced by EggPrimitive::empty(), EggPrimitive::end(), and EggPrimitive::remove_nonunique_verts(). |
|
Applies the indicated transformation matrix to the attributes.
Reimplemented in EggVertex. Definition at line 201 of file eggAttributes.cxx. |
|
Applies the indicated transformation to the node and all of its descendants.
Reimplemented in EggVertexPool. |
|
Applies the indicated transformation only to vertices that appear in global space within vertex pools at this node and below. Joints and other transforms are not affected, nor are local vertices. |
|
Explicitly decrements the reference count. Note that the object will not be implicitly deleted by unref() simply because the reference count drops to zero. (Having a member function delete itself is problematic; plus, we don't have a virtual destructor anyway.) However, see the helper function unref_delete(). User code should avoid using ref() and unref() directly, which can result in missed reference counts. Instead, let a PointerTo object manage the reference counting automatically. This function is const, even though it changes the object, because generally fiddling with an object's reference count isn't considered part of fiddling with the object. An object might be const in other ways, but we still need to accurately count the number of references to it. The return value is the new reference count. Definition at line 293 of file referenceCount.I. References INLINE. Referenced by RenderState::determine_bin_index(), and RenderEffects::determine_show_bounds(). |
|
This function is called from within EggGroupNode whenever the parentage of the node has changed. It should update the depth and under_instance flags accordingly. depth_offset is the difference between the old depth value and the new value. It should be consistent with the supplied depth value. If it is not, we have some error. Reimplemented in EggGroupNode. Definition at line 311 of file eggNode.cxx. Referenced by EggNode::EggNode(), EggNode::get_vertex_to_node(), and EggGroupNode::triangulate_polygons(). |
|
Writes the attributes to the indicated output stream in Egg format.
Reimplemented in EggGroup, EggNurbsCurve, EggNurbsSurface, EggPoint, EggPolygon, and EggTexture. Definition at line 40 of file eggRenderMode.cxx. |
|
Writes the attributes to the indicated output stream in Egg format.
Reimplemented in EggNurbsCurve, EggNurbsSurface, EggPoint, EggPolygon, and EggVertex. Definition at line 99 of file eggAttributes.cxx. |
|
Implemented in EggComment, EggCoordinateSystem, EggData, EggExternalReference, EggGroup, EggGroupNode, EggMaterial, EggNurbsCurve, EggNurbsSurface, EggPoint, EggPolygon, EggSAnimData, EggTable, EggTexture, EggVertexPool, EggXfmAnimData, and EggXfmSAnim. |
|
Writes the attributes and the vertices referenced by the primitive to the indicated output stream in Egg format.
Definition at line 617 of file eggPrimitive.cxx. References size_t. Referenced by EggPoint::cleanup(). |
|
Writes the first line of the egg object, e.g. "<Group> group_name {" or some such. It automatically enquotes the name if it contains any special characters. egg_keyword is the keyword that begins the line, e.g. "<Group>". Definition at line 46 of file eggNamedObject.cxx. Referenced by EggPoint::cleanup(), EggNurbsSurface::is_closed_u(), and EggExternalReference::operator=(). |
|
Definition at line 115 of file eggNode.h. Referenced by EggNode::determine_bin(), EggNode::EggNode(), EggNode::get_parent(), and EggNode::test_under_integrity(). |
|
Definition at line 80 of file eggAttributes.h. Referenced by EggAttributes::EggAttributes(), and EggAttributes::~EggAttributes(). |
|
Definition at line 82 of file eggAttributes.h. Referenced by EggAttributes::EggAttributes(). |
|
Definition at line 81 of file eggAttributes.h. Referenced by EggAttributes::EggAttributes(), and EggAttributes::~EggAttributes(). |
|
Definition at line 121 of file eggNode.h. Referenced by EggGroup::string_collide_flags(), and EggNode::test_under_integrity(). |
|
Definition at line 123 of file eggNode.h. Referenced by EggNode::get_vertex_frame(), EggGroup::string_collide_flags(), and EggNode::test_under_integrity(). |
|
Definition at line 125 of file eggNode.h. Referenced by EggGroup::string_collide_flags(), and EggNode::test_under_integrity(). |
|
Definition at line 114 of file eggNode.h. Referenced by EggNode::apply_texmats(), EggNode::determine_alpha_mode(), EggNode::determine_bin(), EggNode::determine_depth_test_mode(), EggNode::EggNode(), EggNode::operator=(), EggNode::parse_egg(), and EggNode::test_under_integrity(). |
|
Definition at line 60 of file eggCurve.h. Referenced by EggCurve(), and operator=(). |
|
Definition at line 61 of file eggCurve.h. Referenced by EggCurve(), get_subdiv(), and set_subdiv(). |
|
Reimplemented from EggPrimitive. Reimplemented in EggNurbsCurve. Definition at line 27 of file eggCurve.cxx. |
|
Definition at line 116 of file eggNode.h. Referenced by EggNode::determine_bin(), EggNode::EggNode(), EggNode::is_under_instance(), EggGroup::string_collide_flags(), and EggNode::test_under_integrity(). |
|
Definition at line 120 of file eggNode.h. Referenced by EggNode::is_under_transform(), and EggNode::test_under_integrity(). |
|
Definition at line 122 of file eggNode.h. Referenced by EggNode::test_under_integrity(). |
|
Definition at line 124 of file eggNode.h. Referenced by EggGroup::string_collide_flags(), and EggNode::test_under_integrity(). |