#include <eggTexture.h>
Inheritance diagram for EggTexture:
Public Types | |
enum | Equivalence { E_basename = 0x001, E_extension = 0x002, E_dirname = 0x004, E_complete_filename = 0x007, E_transform = 0x008, E_attributes = 0x010, E_tref_name = 0x020 } |
enum | Format { F_unspecified, F_rgba, F_rgbm, F_rgba12, F_rgba8, F_rgba4, F_rgba5, F_rgb, F_rgb12, F_rgb8, F_rgb5, F_rgb332, F_red, F_green, F_blue, F_alpha, F_luminance, F_luminance_alpha, F_luminance_alphamask } |
enum | WrapMode { WM_unspecified, WM_repeat, WM_clamp } |
enum | FilterType { FT_unspecified, FT_nearest, FT_linear, FT_nearest_mipmap_nearest, FT_linear_mipmap_nearest, FT_nearest_mipmap_linear, FT_linear_mipmap_linear } |
enum | EnvType { ET_unspecified, ET_modulate, ET_decal } |
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 | |
EggTexture (const string &tref_name, const string &filename) | |
EggTexture (const EggTexture ©) | |
EggTexture & | operator= (const EggTexture ©) |
virtual void | write (ostream &out, int indent_level) const |
Writes the texture definition to the indicated output stream in Egg format. | |
bool | is_equivalent_to (const EggTexture &other, int eq) const |
Returns true if the two textures are equivalent in all relevant properties (according to eq), false otherwise. | |
bool | sorts_less_than (const EggTexture &other, int eq) const |
An ordering operator to compare two textures for sorting order. | |
bool | has_alpha_channel (int num_components) const |
Given the number of color components (channels) in the image file as actually read from the disk, return true if this texture seems to have an alpha channel or not. | |
void | set_format (Format format) |
Format | get_format () const |
void | set_wrap_mode (WrapMode mode) |
WrapMode | get_wrap_mode () const |
void | set_wrap_u (WrapMode mode) |
WrapMode | get_wrap_u () const |
Returns the amount specified for U wrap. | |
WrapMode | determine_wrap_u () const |
Determines the appropriate wrap in the U direction. | |
void | set_wrap_v (WrapMode mode) |
WrapMode | get_wrap_v () const |
Returns the amount specified for V wrap. | |
WrapMode | determine_wrap_v () const |
Determines the appropriate wrap in the V direction. | |
void | set_minfilter (FilterType type) |
FilterType | get_minfilter () const |
void | set_magfilter (FilterType type) |
FilterType | get_magfilter () const |
void | set_anisotropic_degree (int anisotropic_degree) |
Sets the degree of anisotropic filtering for this texture. | |
void | clear_anisotropic_degree () |
Removes the specification of anisotropic filtering from the texture. | |
bool | has_anisotropic_degree () const |
Returns true if a value for the anisotropic filtering degree has been specified for this texture, false otherwise. | |
int | get_anisotropic_degree () const |
Returns the anisotropic filtering degree that has been specified for this texture, or 0 if nothing has been specified. | |
void | set_env_type (EnvType type) |
EnvType | get_env_type () const |
void | set_transform (const LMatrix3d &transform) |
void | clear_transform () |
bool | has_transform () const |
Returns true if a texture matrix transform has been specified for the texture (even if the transform is identity). | |
const LMatrix3d & | get_transform () const |
Returns the texture matrix transform if one has been specified, or identity matrix otherwise. | |
bool | transform_is_identity () const |
Returns true if no texture matrix transform has been specified, or if the one specified is the identity transform. | |
void | set_alpha_filename (const Filename &filename) |
Specifies a separate file that will be loaded in with the 1- or 3-component texture and applied as the alpha channel. | |
void | clear_alpha_filename () |
bool | has_alpha_filename () const |
Returns true if a separate file for the alpha component has been applied, false otherwise. | |
const Filename & | get_alpha_filename () const |
Returns the separate file assigned for the alpha channel. | |
void | set_alpha_fullpath (const Filename &fullpath) |
Records the full pathname to the file, for the benefit of get_alpha_fullpath(). | |
const Filename & | get_alpha_fullpath () const |
Returns the full pathname to the alpha file, if it is known; otherwise, returns the same thing as get_alpha_filename(). | |
void | set_alpha_file_channel (int alpha_file_channel) |
If a separate alpha-file is specified, this indicates which channel number should be extracted from this file to derive the alpha channel for the final image. | |
void | clear_alpha_file_channel () |
Removes the specification of a particular channel to use from the alpha-file image. | |
bool | has_alpha_file_channel () const |
Returns true if a particular channel has been specified for the alpha-file image, false otherwise. | |
int | get_alpha_file_channel () const |
Returns the particular channel that has been specified for the alpha-file image, or 0 if no channel has been specified. | |
virtual TypeHandle | get_type () const |
virtual TypeHandle | force_init_type () |
virtual string | get_default_extension () const |
Returns the default extension for this filename type. | |
const Filename & | get_filename () const |
Returns a nonmodifiable reference to the filename. | |
void | set_filename (const Filename &filename) |
const Filename & | get_fullpath () const |
Returns the full pathname to the file, if it is known; otherwise, returns the same thing as get_filename(). | |
void | set_fullpath (const Filename &fullpath) |
Records the full pathname to the file, for the benefit of get_fullpath(). | |
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_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 EggRenderMode * | determine_alpha_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 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 EggGroup or EggPrimitive or some such object at this level or above this node that has a draw_order specified. | |
virtual EggRenderMode * | determine_bin () |
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 bin specified. | |
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. | |
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 | |
Format | string_format (const string &string) |
Returns the Format value associated with the given string representation, or F_unspecified if the string does not match any known Format value. | |
WrapMode | string_wrap_mode (const string &string) |
Returns the WrapMode value associated with the given string representation, or WM_unspecified if the string does not match any known WrapMode value. | |
FilterType | string_filter_type (const string &string) |
Returns the FilterType value associated with the given string representation, or FT_unspecified if the string does not match any known FilterType value. | |
EnvType | string_env_type (const string &string) |
Returns the EnvType value associated with the given string representation, or ET_unspecified if the string does not match any known EnvType 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. | |
Protected Types | |
typedef RefCountObj< LMatrix4d > | MatrixFrame |
enum | UnderFlags { UF_under_instance = 0x001, UF_under_transform = 0x002, UF_local_coord = 0x004 } |
Protected Member Functions | |
virtual bool | egg_start_parse_body () |
This function is called within parse_egg(). | |
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 (const LMatrix4d &mat, const LMatrix4d &inv, CoordinateSystem to_cs) |
This is called from within the egg code by transform(). | |
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. | |
virtual void | r_flatten_transforms () |
The recursive implementation of flatten_transforms(). | |
virtual void | r_apply_texmats (EggTextureCollection &textures) |
The recursive implementation of apply_texmats(). | |
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 Types | |
enum | Flags { F_has_transform = 0x0001, F_has_alpha_filename = 0x0002, F_has_anisotropic_degree = 0x0004, F_has_alpha_file_channel = 0x0008 } |
Private Attributes | |
Format | _format |
WrapMode | _wrap_mode |
WrapMode | _wrap_u |
WrapMode | _wrap_v |
FilterType | _minfilter |
FilterType | _magfilter |
int | _anisotropic_degree |
EnvType | _env_type |
int | _flags |
LMatrix3d | _transform |
Filename | _alpha_filename |
Filename | _alpha_fullpath |
int | _alpha_file_channel |
Static Private Attributes | |
TypeHandle | _type_handle |
Definition at line 42 of file eggTexture.h.
|
Definition at line 118 of file eggNode.h. Referenced by EggGroup::string_collide_flags(). |
|
Definition at line 64 of file eggRenderMode.h. |
|
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 92 of file eggTexture.h. |
|
Definition at line 50 of file eggTexture.h. |
|
Definition at line 75 of file eggTexture.h. Referenced by determine_wrap_v(), get_wrap_v(), and string_format(). |
|
Definition at line 152 of file eggTexture.h. |
|
Definition at line 65 of file eggTexture.h. Referenced by set_format(). |
|
|
|
Definition at line 72 of file eggTexture.h. Referenced by set_wrap_mode(). |
|
Definition at line 40 of file eggTexture.cxx. References _alpha_file_channel, _anisotropic_degree, _env_type, _flags, _magfilter, _minfilter, _transform, _wrap_u, _wrap_v, ET_unspecified, and FT_unspecified. |
|
Definition at line 64 of file eggTexture.cxx. References _format, _minfilter, _wrap_mode, _wrap_u, _wrap_v, EggRenderMode::operator=(), and EggFilenameNode::operator=(). |
|
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. |
|
Removes the specification of a particular channel to use from the alpha-file image.
Definition at line 543 of file eggTexture.I. |
|
Definition at line 415 of file eggTexture.I. References _flags, F_has_alpha_file_channel, and INLINE. |
|
Removes the specification of anisotropic filtering from the texture.
Definition at line 240 of file eggTexture.I. References _flags, _transform, F_has_transform, and INLINE. |
|
Removes the bin name that was set for this particular object. See set_bin(). Definition at line 326 of file eggRenderMode.I. |
|
Removes the draw-order flag from this particular object. See set_draw_order(). Definition at line 254 of file eggRenderMode.I. |
|
Resets the Namable's name to empty.
Definition at line 82 of file namable.I. References Namable::_name, and INLINE. |
|
Definition at line 327 of file eggTexture.I. References _flags, F_has_alpha_filename, and INLINE. |
|
Walks back up the hierarchy, looking for an EggGroup or EggPrimitive or some such object at this level or above this node that has an alpha_mode other than AM_unspecified. Returns a valid EggRenderMode pointer if one is found, or NULL otherwise. Reimplemented in EggGroup, and EggPrimitive. Definition at line 72 of file eggNode.cxx. References EggNode::_parent, EggNode::determine_depth_write_mode(), and NULL. Referenced by EggNode::apply_texmats(). |
|
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 bin specified. Returns a valid EggRenderMode pointer if one is found, or NULL otherwise. Reimplemented in EggGroup, and EggPrimitive. Definition at line 172 of file eggNode.cxx. References EggNode::_depth, EggNode::_parent, EggNode::_under_flags, EggGroupNode::begin(), EggGroupNode::end(), EggGroupNode::iterator, nassertv, NULL, and ReferenceCount::test_ref_count_integrity(). Referenced by EggNode::determine_depth_test_mode(), and EggGroup::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_test_mode other than DTM_unspecified. Returns a valid EggRenderMode pointer if one is found, or NULL otherwise. Reimplemented in EggGroup, and EggPrimitive. Definition at line 122 of file eggNode.cxx. References EggNode::_parent, EggNode::determine_bin(), and NULL. Referenced by EggGroup::determine_alpha_mode(), and EggPrimitive::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. Returns a valid EggRenderMode pointer if one is found, or NULL otherwise. Reimplemented in EggGroup, and EggPrimitive. Definition at line 97 of file eggNode.cxx. Referenced by EggNode::determine_alpha_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 draw_order specified. Returns a valid EggRenderMode pointer if one is found, or NULL otherwise. Reimplemented in EggGroup, and EggPrimitive. Definition at line 147 of file eggNode.cxx. References DCAST_INTO_R, egg_cleanup_parser(), egg_error_count(), egg_init_parser(), EggNode::egg_start_parse_body(), eggyyparse(), EggGroupNode::get_class_type(), EggNode::get_parent(), and TypedObject::is_of_type(). Referenced by EggPrimitive::determine_depth_test_mode(). |
|
Determines the appropriate wrap in the U direction. This is different from get_wrap_u() in that if the U wrap is unspecified, it returns the overall wrap value. Definition at line 113 of file eggTexture.I. |
|
Determines the appropriate wrap in the V direction. This is different from get_wrap_v() in that if the U wrap is unspecified, it returns the overall wrap value. Definition at line 159 of file eggTexture.I. References _magfilter, FilterType, and INLINE. Referenced by EggLoader::apply_texture_attributes(). |
|
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 624 of file eggTexture.cxx. References FT_linear, FT_linear_mipmap_linear, FT_linear_mipmap_nearest, FT_nearest_mipmap_linear, and FT_nearest_mipmap_nearest. |
|
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 EggFilenameNode. Definition at line 185 of file eggTexture.h. References EXPCL_PANDAEGG, and INLINE. |
|
Returns the particular channel that has been specified for the alpha-file image, or 0 if no channel has been specified. Definition at line 578 of file eggTexture.I. |
|
Returns the separate file assigned for the alpha channel. It is an error to call this unless has_alpha_filename() returns true. See set_alpha_filename(). Definition at line 451 of file eggTexture.I. References INLINE, and sorts_less_than(). |
|
Returns the full pathname to the alpha file, if it is known; otherwise, returns the same thing as get_alpha_filename(). This function simply returns whatever was set by the last call to set_alpha_fullpath(). This string is not written to the egg file; its main purpose is to record the full path to the alpha filename if it is known, for egg structures that are generated in-memory and then immediately converted to a scene graph. Definition at line 485 of file eggTexture.I. |
|
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. |
|
Returns the anisotropic filtering degree that has been specified for this texture, or 0 if nothing has been specified.
Definition at line 275 of file eggTexture.I. References _transform, and INLINE. |
|
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 EggFilenameNode. Definition at line 172 of file eggTexture.h. Referenced by EggPoolUniquifier::EggPoolUniquifier(). |
|
Returns the default extension for this filename type.
Reimplemented in EggExternalReference. Definition at line 35 of file eggFilenameNode.cxx. |
|
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. |
|
Definition at line 301 of file eggTexture.I. References _alpha_filename, _alpha_fullpath, _flags, F_has_alpha_filename, and INLINE. |
|
Returns a nonmodifiable reference to the filename.
Definition at line 88 of file eggFilenameNode.I. Referenced by EggExternalReference::operator=(). |
|
Definition at line 43 of file eggTexture.I. References _wrap_mode, and INLINE. |
|
Returns the full pathname to the file, if it is known; otherwise, returns the same thing as get_filename(). This function simply returns whatever was set by the last call to set_fullpath(). This string is not written to the egg file; its main purpose is to record the full path to a filename (for instance, a texture filename) if it is known, for egg structures that are generated in-memory and then immediately converted to a scene graph. Definition at line 134 of file eggFilenameNode.I. |
|
Definition at line 207 of file eggTexture.I. References _anisotropic_degree, and INLINE. |
|
Definition at line 183 of file eggTexture.I. References _anisotropic_degree, _flags, F_has_anisotropic_degree, and INLINE. |
|
|
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 75 of file eggNode.I. References EggNode::_depth. Referenced by EggNode::determine_draw_order(), and CharacterMaker::make_dynamic_primitive(). |
|
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 texture matrix transform if one has been specified, or identity matrix otherwise.
Definition at line 360 of file eggTexture.I. References _alpha_fullpath, and INLINE. |
|
Reimplemented from EggFilenameNode. Definition at line 182 of file eggTexture.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. |
|
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(). |
|
Definition at line 67 of file eggTexture.I. References _wrap_u. |
|
Returns the amount specified for U wrap. This may be unspecified, even if there is an overall wrap value. Definition at line 94 of file eggTexture.I. |
|
Returns the amount specified for V wrap. This may be unspecified, even if there is an overall wrap value. Definition at line 140 of file eggTexture.I. References _minfilter, FilterType, and INLINE. Referenced by set_wrap_v(). |
|
Given the number of color components (channels) in the image file as actually read from the disk, return true if this texture seems to have an alpha channel or not. This depends on the EggTexture's format as well as the number of channels. Definition at line 419 of file eggTexture.cxx. References F_rgb8. |
|
Returns true if a particular channel has been specified for the alpha-file image, false otherwise.
Definition at line 559 of file eggTexture.I. |
|
Returns true if a separate file for the alpha component has been applied, false otherwise. See set_alpha_filename(). Definition at line 434 of file eggTexture.I. References _alpha_file_channel. Referenced by has_transform(). |
|
Returns true if a value for the anisotropic filtering degree has been specified for this texture, false otherwise.
Definition at line 258 of file eggTexture.I. References _flags, _transform, and F_has_transform. |
|
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(). |
|
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 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(). |
|
Returns true if a texture matrix transform has been specified for the texture (even if the transform is identity).
Definition at line 345 of file eggTexture.I. References _alpha_filename, has_alpha_filename(), INLINE, and nassertr. Referenced by set_env_type(). |
|
Reimplemented from EggFilenameNode. Definition at line 175 of file eggTexture.h. References EggFilenameNode::get_class_type(). |
|
Returns true if the two textures are equivalent in all relevant properties (according to eq), false otherwise. The Equivalence parameter, eq, should be set to the bitwise OR of the following properties, according to what you consider relevant: EggTexture::E_basename: The basename part of the texture filename, without the directory prefix *or* the filename extension. EggTexture::E_extension: The extension part of the texture filename. EggTexture::E_dirname: The directory prefix of the texture filename. EggTexture::E_complete_filename: The union of the above three; that is, the complete filename, with directory, basename, and extension. EggTexture::E_transform: The texture matrix. EggTexture::E_attributes: All remaining texture attributes (mode, mipmap, etc.) except TRef name. EggTexture::E_tref_name: The TRef name. Definition at line 243 of file eggTexture.cxx. |
|
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 76 of file eggTexture.cxx. References _alpha_file_channel, _alpha_filename, _alpha_fullpath, _anisotropic_degree, _env_type, _flags, _magfilter, and _transform. |
|
Definition at line 71 of file eggRenderMode.cxx. References EggRenderMode::_draw_order. |
|
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 in EggGroupNode, EggNurbsSurface, and EggPrimitive. Definition at line 454 of file eggNode.cxx. |
|
The recursive implementation of flatten_transforms().
Reimplemented in EggGroup, EggGroupNode, and EggPrimitive. Definition at line 442 of file eggNode.cxx. Referenced by EggNode::get_vertex_to_node(). |
|
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 in EggGroup, EggGroupNode, EggPrimitive, EggVertexPool, EggXfmAnimData, and EggXfmSAnim. Definition at line 390 of file eggNode.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. |
|
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(). |
|
If a separate alpha-file is specified, this indicates which channel number should be extracted from this file to derive the alpha channel for the final image. The default is 0, which means the grayscale combination of r, g, b. Otherwise, this should be the 1-based channel number, for instance 1, 2, or 3 for r, g, or b, respectively, or 4 for the alpha channel of a four-component image. Definition at line 527 of file eggTexture.I. |
|
Specifies a separate file that will be loaded in with the 1- or 3-component texture and applied as the alpha channel. This is useful when loading textures from file formats that do not support alpha, for instance jpg. Definition at line 401 of file eggTexture.I. References _alpha_file_channel, _flags, F_has_alpha_file_channel, and INLINE. |
|
Records the full pathname to the file, for the benefit of get_alpha_fullpath().
Definition at line 500 of file eggTexture.I. |
|
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 degree of anisotropic filtering for this texture. 1 is off; higher levels indicate filtering in effect. Definition at line 224 of file eggTexture.I. |
|
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. |
|
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. |
|
Definition at line 289 of file eggTexture.I. References _transform, has_transform(), and INLINE. |
|
Definition at line 100 of file eggFilenameNode.I. References EggFilenameNode::_fullpath, and INLINE. |
|
Definition at line 31 of file eggTexture.I. |
|
Records the full pathname to the file, for the benefit of get_fullpath().
Definition at line 149 of file eggFilenameNode.I. |
|
Definition at line 195 of file eggTexture.I. References _flags, F_has_anisotropic_degree, and INLINE. |
|
Definition at line 171 of file eggTexture.I. References _anisotropic_degree, _flags, F_has_anisotropic_degree, and INLINE. |
|
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 314 of file eggTexture.I. References _alpha_filename, _alpha_fullpath, _flags, F_has_alpha_filename, and INLINE. |
|
Definition at line 55 of file eggTexture.I. References _wrap_mode, INLINE, and WrapMode. |
|
Definition at line 79 of file eggTexture.I. |
|
Definition at line 125 of file eggTexture.I. References _wrap_v, get_wrap_v(), and WM_unspecified. |
|
An ordering operator to compare two textures for sorting order. This imposes an arbitrary ordering useful to identify unique textures, according to the indicated Equivalence factor. See is_equivalent_to(). Definition at line 322 of file eggTexture.cxx. Referenced by get_alpha_filename(). |
|
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 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. |
|
Returns the EnvType value associated with the given string representation, or ET_unspecified if the string does not match any known EnvType value.
Definition at line 597 of file eggTexture.cxx. References nassertr, WM_clamp, WM_repeat, and WM_unspecified. |
|
Returns the FilterType value associated with the given string representation, or FT_unspecified if the string does not match any known FilterType value.
Definition at line 546 of file eggTexture.cxx. References F_alpha, F_blue, F_green, F_luminance, F_luminance_alpha, F_luminance_alphamask, F_red, F_rgb, F_rgb12, F_rgb332, F_rgb5, F_rgb8, F_rgba, F_rgba12, F_rgba4, F_rgba5, F_rgba8, F_rgbm, F_unspecified, and nassertr. |
|
Returns the Format value associated with the given string representation, or F_unspecified if the string does not match any known Format value.
Definition at line 467 of file eggTexture.cxx. References cmp_nocase_uh(), FilterType, FT_linear, FT_linear_mipmap_linear, FT_linear_mipmap_nearest, FT_nearest, FT_nearest_mipmap_linear, FT_nearest_mipmap_nearest, and FT_unspecified. |
|
Returns the WrapMode value associated with the given string representation, or WM_unspecified if the string does not match any known WrapMode value.
Definition at line 523 of file eggTexture.cxx. References ET_unspecified. |
|
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. |
|
Applies the indicated transformation to the node and all of its descendants.
Reimplemented in EggVertexPool. |
|
Returns true if no texture matrix transform has been specified, or if the one specified is the identity transform. Returns false only if a nonidentity transform has been applied. Definition at line 379 of file eggTexture.I. References _alpha_fullpath. |
|
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 texture definition to the indicated output stream in Egg format.
Reimplemented from EggRenderMode. Definition at line 108 of file eggTexture.cxx. |
|
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 168 of file eggTexture.h. Referenced by EggTexture(), has_alpha_filename(), operator=(), and set_alpha_filename(). |
|
Definition at line 166 of file eggTexture.h. Referenced by get_env_type(), has_transform(), operator=(), and set_transform(). |
|
Definition at line 167 of file eggTexture.h. Referenced by get_env_type(), get_transform(), operator=(), set_transform(), and transform_is_identity(). |
|
Definition at line 162 of file eggTexture.h. Referenced by EggTexture(), get_magfilter(), get_minfilter(), operator=(), and set_minfilter(). |
|
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 163 of file eggTexture.h. Referenced by EggTexture(), operator=(), and set_anisotropic_degree(). |
|
Definition at line 164 of file eggTexture.h. Referenced by clear_alpha_filename(), clear_anisotropic_degree(), clear_transform(), EggTexture(), get_env_type(), get_minfilter(), has_anisotropic_degree(), operator=(), set_alpha_filename(), set_magfilter(), set_minfilter(), and set_transform(). |
|
Definition at line 159 of file eggTexture.h. Referenced by EggTexture(), and set_format(). |
|
Definition at line 161 of file eggTexture.h. Referenced by determine_wrap_v(), EggTexture(), and operator=(). |
|
Definition at line 161 of file eggTexture.h. Referenced by EggTexture(), and get_wrap_v(). |
|
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 165 of file eggTexture.h. Referenced by clear_anisotropic_degree(), EggTexture(), get_anisotropic_degree(), has_anisotropic_degree(), operator=(), and set_env_type(). |
|
Reimplemented from EggFilenameNode. Definition at line 29 of file eggTexture.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(). |
|
Definition at line 160 of file eggTexture.h. Referenced by EggTexture(), get_format(), and set_wrap_mode(). |
|
Definition at line 160 of file eggTexture.h. Referenced by EggTexture(), and get_wrap_mode(). |
|
Definition at line 160 of file eggTexture.h. Referenced by EggTexture(), get_wrap_u(), and set_wrap_v(). |