Panda3D
|
Defines a texture map that may be applied to geometry. More...
#include "eggTexture.h"
Classes | |
class | Combiner |
class | SourceAndOperand |
Public Types | |
enum | AlphaMode { AM_unspecified, AM_off, AM_on, AM_blend, AM_blend_no_occlude, AM_ms, AM_ms_mask, AM_binary, AM_dual } |
enum | CombineChannel { CC_rgb = 0, CC_alpha = 1, CC_num_channels = 2 } |
enum | CombineIndex { CI_num_indices = 3 } |
enum | CombineMode { CM_unspecified, CM_replace, CM_modulate, CM_add, CM_add_signed, CM_interpolate, CM_subtract, CM_dot3_rgb, CM_dot3_rgba } |
enum | CombineOperand { CO_unspecified, CO_src_color, CO_one_minus_src_color, CO_src_alpha, CO_one_minus_src_alpha } |
enum | CombineSource { CS_unspecified, CS_texture, CS_constant, CS_primary_color, CS_previous, CS_constant_color_scale, CS_last_saved_result } |
enum | ComponentType { CT_invalid, CT_translate2d, CT_translate3d, CT_rotate2d, CT_rotx, CT_roty, CT_rotz, CT_rotate3d, CT_scale2d, CT_scale3d, CT_uniform_scale, CT_matrix3, CT_matrix4 } |
enum | CompressionMode { CM_default, CM_off, CM_on, CM_fxt1, CM_dxt1, CM_dxt2, CM_dxt3, CM_dxt4, CM_dxt5 } |
enum | DepthTestMode { DTM_unspecified, DTM_off, DTM_on } |
enum | DepthWriteMode { DWM_unspecified, DWM_off, DWM_on } |
enum | EnvType { ET_unspecified, ET_modulate, ET_decal, ET_blend, ET_replace, ET_add, ET_blend_color_scale, ET_modulate_glow, ET_modulate_gloss, ET_normal, ET_normal_height, ET_glow, ET_gloss, ET_height, ET_selector } |
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 | FilterType { FT_unspecified, FT_nearest, FT_linear, FT_nearest_mipmap_nearest, FT_linear_mipmap_nearest, FT_nearest_mipmap_linear, FT_linear_mipmap_linear } |
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 | QualityLevel { QL_unspecified, QL_default, QL_fastest, QL_normal, QL_best } |
enum | TexGen { TG_unspecified, TG_eye_sphere_map, TG_world_cube_map, TG_eye_cube_map, TG_world_normal, TG_eye_normal, TG_world_position, TG_eye_position, TG_point_sprite } |
enum | TextureType { TT_unspecified, TT_1d_texture, TT_2d_texture, TT_3d_texture, TT_cube_map } |
enum | VisibilityMode { VM_unspecified, VM_hidden, VM_normal } |
enum | WrapMode { WM_unspecified, WM_clamp, WM_repeat, WM_mirror, WM_mirror_once, WM_border_color } |
Public Member Functions | |
EggTexture (const string &tref_name, const Filename &filename) | |
EggTexture (const EggTexture ©) | |
void | add_matrix3 (const LMatrix3d &mat) |
Appends an arbitrary 3x3 matrix to the current transform. | |
void | add_matrix4 (const LMatrix4d &mat) |
Appends an arbitrary 4x4 matrix to the current transform. | |
void | add_rotate2d (double angle) |
Appends a 2-d rotation to the current transform. | |
void | add_rotate3d (const LQuaterniond &quat) |
Appends an arbitrary 3-d rotation to the current transform, expressed as a quaternion. | |
void | add_rotate3d (double angle, const LVector3d &axis) |
Appends a 3-d rotation about an arbitrary axis to the current transform. | |
void | add_rotx (double angle) |
Appends a rotation about the X axis to the current transform. | |
void | add_roty (double angle) |
Appends a rotation about the Y axis to the current transform. | |
void | add_rotz (double angle) |
Appends a rotation about the Z axis to the current transform. | |
void | add_scale2d (const LVecBase2d &scale) |
Appends a possibly non-uniform scale to the current transform. | |
void | add_scale3d (const LVecBase3d &scale) |
Appends a possibly non-uniform scale to the current transform. | |
void | add_translate2d (const LVector2d &translate) |
Appends a 2-d translation operation to the current transform. | |
void | add_translate3d (const LVector3d &translate) |
Appends a 3-d translation operation to the current transform. | |
void | add_uniform_scale (double scale) |
Appends a uniform scale to the current transform. | |
bool | affects_polygon_alpha () const |
Returns true if this texture's environment type or combine mode allows the texture to have an affect on the polygon's alpha values, false otherwise. | |
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 EggTransform * | as_transform () |
Returns this object cross-cast to an EggTransform pointer, if it inherits from EggTransform, or NULL if it does not. | |
TypedObject * | as_typed_object () |
Returns the object, upcast (if necessary) to a TypedObject pointer. | |
const TypedObject * | as_typed_object () const |
Returns the object, upcast (if necessary) to a TypedObject pointer. | |
void | clear_alpha_file_channel () |
Removes the specification of a particular channel to use from the alpha-file image. | |
void | clear_alpha_filename () |
void | clear_alpha_scale () |
Removes the alpha_scale from the texture and restores it to the default value of 1. | |
void | clear_anisotropic_degree () |
Removes the specification of anisotropic filtering from the texture. | |
void | clear_bin () |
Removes the bin name that was set for this particular object. | |
void | clear_border_color () |
void | clear_color () |
void | clear_depth_offset () |
Removes the depth-offset flag from this particular object. | |
void | clear_draw_order () |
Removes the draw-order flag from this particular object. | |
void | clear_multitexture () |
Resets the multitexture flags set by multitexture_over(). | |
void | clear_name () |
Resets the Namable's name to empty. | |
void | clear_priority () |
Removes the specification of multitexture priority from the texture. | |
void | clear_rgb_scale () |
Removes the rgb_scale from the texture and restores it to the default value of 1. | |
void | clear_stage_name () |
Removes the named TextureStage specification. | |
void | clear_transform () |
Resets the transform to empty, identity. | |
void | clear_user_data () |
Removes *all* user data pointers from the node. | |
void | clear_user_data (TypeHandle type) |
Removes the user data pointer of the indicated type. | |
void | clear_uv_name () |
Removes the restriction to a particular named set of texture coordinates and restores the texture to using the default texture coordinates. | |
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_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. | |
virtual bool | determine_decal () |
Walks back up the hierarchy, looking for an EggGroup at this level or above that has the "decal" flag set. | |
virtual EggRenderMode * | determine_depth_offset () |
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_offset specified. | |
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_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_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 bool | determine_indexed () |
Walks back up the hierarchy, looking for an EggGroup at this level or above that has the "indexed" scalar set. | |
virtual EggRenderMode * | determine_visibility_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 visibility_mode other than VM_unspecified. | |
WrapMode | determine_wrap_u () const |
Determines the appropriate wrap in the U direction. | |
WrapMode | determine_wrap_v () const |
Determines the appropriate wrap in the V direction. | |
WrapMode | determine_wrap_w () const |
Determines the appropriate wrap in the W direction. | |
void | flatten_transforms () |
Removes any transform and instance records from this node in the scene graph and below. | |
virtual TypeHandle | force_init_type () |
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. | |
const Filename & | get_alpha_filename () const |
Returns the separate file assigned for the alpha channel. | |
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(). | |
AlphaMode | get_alpha_mode () const |
Returns the alpha mode that was set, or AM_unspecified if nothing was set. | |
int | get_alpha_scale () const |
Returns the alpha_scale value that has been specified for the texture, or 1 if no alpha_scale value has been specified. | |
int | get_anisotropic_degree () const |
Returns the anisotropic filtering degree that has been specified for this texture, or 0 if nothing has been specified. | |
int | get_best_parent_from_Set (const std::set< int > &) const |
string | get_bin () const |
Returns the bin name that has been set for this particular object, if any. | |
const Colorf & | get_border_color () const |
Returns the border color if one has been specified, or (0, 0, 0, 1) otherwise. | |
const Colorf & | get_color () const |
Returns the blend color if one has been specified, or (0, 0, 0, 1) otherwise. | |
CombineMode | get_combine_mode (CombineChannel channel) const |
CombineOperand | get_combine_operand (CombineChannel channel, int n) const |
CombineSource | get_combine_source (CombineChannel channel, int n) const |
const LMatrix3d & | get_component_mat3 (int n) const |
Returns the 3x3 matrix associated with the nth component. | |
const LMatrix4d & | get_component_mat4 (int n) const |
Returns the 4x4 matrix associated with the nth component. | |
double | get_component_number (int n) const |
Returns the solitary number associated with the nth component. | |
ComponentType | get_component_type (int n) const |
Returns the type of the nth component. | |
const LVecBase2d & | get_component_vec2 (int n) const |
Returns the 2-component vector associated with the nth component. | |
const LVecBase3d & | get_component_vec3 (int n) const |
Returns the 3-component vector associated with the nth component. | |
CompressionMode | get_compression_mode () const |
virtual string | get_default_extension () const |
Returns the default extension for this filename type. | |
int | get_depth () const |
Returns the number of nodes above this node in the egg hierarchy. | |
int | get_depth_offset () const |
Returns the "depth-offset" flag as set for this particular object. | |
DepthTestMode | get_depth_test_mode () const |
Returns the depth_test mode that was set, or DTM_unspecified if nothing was set. | |
DepthWriteMode | get_depth_write_mode () const |
Returns the depth_write mode that was set, or DWM_unspecified if nothing was set. | |
int | get_draw_order () const |
Returns the "draw-order" flag as set for this particular object. | |
EnvType | get_env_type () const |
const Filename & | get_filename () const |
Returns a nonmodifiable reference to the filename. | |
Format | get_format () const |
const Filename & | get_fullpath () const |
Returns the full pathname to the file, if it is known; otherwise, returns the same thing as get_filename(). | |
FilterType | get_magfilter () const |
FilterType | get_minfilter () const |
int | get_multitexture_sort () const |
Returns an integer that represents the depth to which this texture is layered on all other textures in the egg file. | |
const string & | get_name () const |
const LMatrix4d & | get_node_frame () const |
Returns the coordinate frame of the node itself. | |
const LMatrix4d & | get_node_frame_inv () const |
Returns the inverse of the matrix returned by get_node_frame(). | |
const LMatrix4d * | get_node_frame_inv_ptr () const |
Returns either a NULL pointer or a unique pointer shared by nodes with the same get_node_frame_inv() matrix. | |
const LMatrix4d * | get_node_frame_ptr () const |
Returns either a NULL pointer or a unique pointer shared by nodes with the same get_node_frame() matrix. | |
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. | |
const LMatrix4d * | get_node_to_vertex_ptr () const |
Returns either a NULL pointer or a unique pointer shared by nodes with the same get_node_to_vertex() matrix. | |
int | get_num_components () const |
Returns the number of components that make up the transform. | |
EggGroupNode * | get_parent () const |
int | get_priority () const |
Returns the multitexture importance value that has been specified for the texture, or 0 if no priority value has been specified. | |
QualityLevel | get_quality_level () const |
bool | get_read_mipmaps () const |
Returns the current setting of the read_mipmaps flag. | |
int | get_ref_count () const |
Returns the current reference count. | |
int | get_rgb_scale () const |
Returns the rgb_scale value that has been specified for the texture, or 1 if no rgb_scale value has been specified. | |
bool | get_saved_result () const |
Returns the current setting of the saved_result flag. | |
const string & | get_stage_name () const |
Returns the stage name that has been specified for this texture, or the tref name if no texture stage has explicitly been specified. | |
TexGen | get_tex_gen () const |
TextureType | get_texture_type () const |
LMatrix3d | get_transform2d () const |
Returns the overall transform as a 3x3 matrix. | |
const LMatrix4d & | get_transform3d () const |
Returns the overall transform as a 4x4 matrix. | |
virtual TypeHandle | get_type () const |
int | get_type_index () const |
Returns the internal index number associated with this object's TypeHandle, a unique number for each different type. | |
EggUserData * | get_user_data () const |
Returns the user data pointer most recently stored on this object, or NULL if nothing was previously stored. | |
EggUserData * | get_user_data (TypeHandle type) const |
Returns the user data pointer of the indicated type, if it exists, or NULL if it does not. | |
const string & | get_uv_name () const |
Returns the texcoord name that has been specified for this texture, or the empty string if no texcoord name has explicitly been specified. | |
const LMatrix4d & | get_vertex_frame () const |
Returns the coordinate frame of the vertices referenced by primitives at or under this node. | |
const LMatrix4d & | get_vertex_frame_inv () const |
Returns the inverse of the matrix returned by get_vertex_frame(). | |
const LMatrix4d * | get_vertex_frame_inv_ptr () const |
Returns either a NULL pointer or a unique pointer shared by nodes with the same get_vertex_frame_inv() matrix. | |
const LMatrix4d * | get_vertex_frame_ptr () const |
Returns either a NULL pointer or a unique pointer shared by nodes with the same get_vertex_frame() matrix. | |
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_vertex_to_node_ptr () const |
Returns either a NULL pointer or a unique pointer shared by nodes with the same get_vertex_to_node() matrix. | |
VisibilityMode | get_visibility_mode () const |
Returns the visibility mode that was set, or VM_unspecified if nothing was set. | |
WeakReferenceList * | get_weak_list () const |
Returns the WeakReferenceList associated with this ReferenceCount object. | |
WrapMode | get_wrap_mode () const |
WrapMode | get_wrap_u () const |
Returns the amount specified for U wrap. | |
WrapMode | get_wrap_v () const |
Returns the amount specified for V wrap. | |
WrapMode | get_wrap_w () const |
Returns the amount specified for W wrap. | |
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. | |
bool | has_alpha_file_channel () const |
Returns true if a particular channel has been specified for the alpha-file image, false otherwise. | |
bool | has_alpha_filename () const |
Returns true if a separate file for the alpha component has been applied, false otherwise. | |
bool | has_alpha_scale () const |
Returns true if an alpha_scale has been specified for the texture, false otherwise. | |
bool | has_anisotropic_degree () const |
Returns true if a value for the anisotropic filtering degree has been specified for this texture, false otherwise. | |
bool | has_bin () const |
Returns true if a bin name has been set for this particular object. | |
bool | has_border_color () const |
Returns true if a border color has been specified for the texture. | |
bool | has_color () const |
Returns true if a blend color has been specified for the texture. | |
bool | has_depth_offset () const |
Returns true if the depth-offset flag has been set for this particular object. | |
bool | has_draw_order () const |
Returns true if the draw-order flag has been set for this particular object. | |
bool | has_name () const |
Returns true if the Namable has a nonempty name set, false if the name is empty. | |
bool | has_priority () const |
Returns true if a priority value for multitexture importance has been specified for the texture, false otherwise. | |
bool | has_rgb_scale () const |
Returns true if an rgb_scale has been specified for the texture, false otherwise. | |
bool | has_stage_name () const |
Returns true if a stage name has been explicitly specified for this texture, false otherwise. | |
bool | has_transform () const |
Returns true if the transform is nonempty, false if it is empty (no transform components have been added). | |
bool | has_transform2d () const |
Returns true if the transform is specified as a 2-d transform, e.g. | |
bool | has_transform3d () const |
Returns true if the transform is specified as a 3-d transform, e.g. | |
bool | has_user_data () const |
Returns true if a generic user data pointer has recently been set and not yet cleared, false otherwise. | |
bool | has_user_data (TypeHandle type) const |
Returns true if the user data pointer of the indicated type has been set, false otherwise. | |
bool | has_uv_name () const |
Returns true if a texcoord name has been explicitly specified for this texture, false otherwise. | |
bool | has_weak_list () const |
Returns true if this particular ReferenceCount object has a WeakReferenceList created, false otherwise. | |
virtual bool | is_anim_matrix () const |
Returns true if this node represents a table of animation transformation data, false otherwise. | |
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 | is_exact_type (TypeHandle handle) const |
Returns true if the current object is the indicated type exactly. | |
virtual bool | is_joint () const |
Returns true if this particular node represents a <Joint> entry or not. | |
bool | is_local_coord () const |
Returns true if this node's vertices are not in the global coordinate space. | |
bool | is_of_type (TypeHandle handle) const |
Returns true if the current object is or derives from the indicated type. | |
bool | is_under_instance () const |
Returns true if there is an <Instance> node somewhere in the egg tree at or above this node, false otherwise. | |
bool | is_under_transform () const |
Returns true if there is a <Transform> entry somewhere in the egg tree at or above this node, false otherwise. | |
void | local_object () |
This function should be called, once, immediately after creating a new instance of some ReferenceCount-derived object on the stack. | |
bool | multitexture_over (EggTexture *other) |
Indicates that this texture should be layered on top of the other texture. | |
void | operator delete (void *ptr, void *) |
void | operator delete (void *ptr) |
void | operator delete (void *ptr) |
void | operator delete (void *ptr, void *) |
void | operator delete[] (void *ptr) |
void | operator delete[] (void *, void *) |
void | operator delete[] (void *ptr) |
void | operator delete[] (void *, void *) |
void * | operator new (size_t size) |
void * | operator new (size_t size) |
void * | operator new (size_t size, void *ptr) |
void * | operator new (size_t size, void *ptr) |
void * | operator new[] (size_t size) |
void * | operator new[] (size_t size) |
void * | operator new[] (size_t size, void *ptr) |
void * | operator new[] (size_t size, void *ptr) |
bool | operator!= (const EggRenderMode &other) const |
bool | operator< (const EggRenderMode &other) const |
EggTexture & | operator= (const EggTexture ©) |
bool | operator== (const EggRenderMode &other) const |
void | output (ostream &out) const |
Outputs the Namable. | |
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 | ref () const |
Explicitly increments the reference count. | |
int | rename_node (vector_string strip_prefix) |
Rename by stripping out the prefix. | |
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 | 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 | set_alpha_fullpath (const Filename &fullpath) |
Records the full pathname to the file, for the benefit of get_alpha_fullpath(). | |
void | set_alpha_mode (AlphaMode mode) |
Specifies precisely how the transparency for this geometry should be achieved, or if it should be used. | |
void | set_alpha_scale (int alpha_scale) |
Sets an additional factor that will scale the alpha component after the texture has been applied. | |
void | set_anisotropic_degree (int anisotropic_degree) |
Sets the degree of anisotropic filtering for this texture. | |
void | set_bin (const string &bin) |
Sets the "bin" string for this particular object. | |
void | set_border_color (const Colorf &border_color) |
void | set_color (const Colorf &color) |
void | set_combine_mode (CombineChannel channel, CombineMode cm) |
void | set_combine_operand (CombineChannel channel, int n, CombineOperand co) |
void | set_combine_source (CombineChannel channel, int n, CombineSource cs) |
void | set_compression_mode (CompressionMode mode) |
void | set_depth_offset (int bias) |
Sets the "depth-offset" flag associated with this object. | |
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). | |
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. | |
void | set_draw_order (int order) |
Sets the "draw-order" flag associated with this object. | |
void | set_env_type (EnvType type) |
void | set_filename (const Filename &filename) |
void | set_format (Format format) |
void | set_fullpath (const Filename &fullpath) |
Records the full pathname to the file, for the benefit of get_fullpath(). | |
void | set_magfilter (FilterType type) |
void | set_minfilter (FilterType type) |
void | set_name (const string &name) |
void | set_priority (int priority) |
Sets the importance of this texture with respect to other textures also applied on the same geometry. | |
void | set_quality_level (QualityLevel quality_level) |
void | set_read_mipmaps (bool read_mipmaps) |
Sets the read_mipmaps flag. | |
void | set_rgb_scale (int rgb_scale) |
Sets an additional factor that will scale all three r, g, b components after the texture has been applied. | |
void | set_saved_result (bool saved_result) |
Sets the saved_result flag. | |
void | set_stage_name (const string &stage_name) |
Specifies the particular TextureStage this texture will be rendered on by name. | |
void | set_tex_gen (TexGen tex_gen) |
void | set_texture_type (TextureType texture_type) |
void | set_transform2d (const LMatrix3d &mat) |
Sets the overall transform as a 3x3 matrix. | |
void | set_transform3d (const LMatrix4d &mat) |
Sets the overall transform as a 4x4 matrix. | |
void | set_user_data (EggUserData *user_data) |
Sets the user data associated with this object. | |
void | set_uv_name (const string &uv_name) |
Specifies the named set of texture coordinates that this texture will use when it is applied to geometry. | |
void | set_visibility_mode (VisibilityMode mode) |
Specifies whether this geometry is to be considered normally visible, or hidden. | |
void | set_wrap_mode (WrapMode mode) |
void | set_wrap_u (WrapMode mode) |
void | set_wrap_v (WrapMode mode) |
void | set_wrap_w (WrapMode mode) |
bool | sorts_less_than (const EggTexture &other, int eq) const |
An ordering operator to compare two textures for sorting order. | |
bool | test_ref_count_integrity () const |
Does some easy checks to make sure that the reference count isn't completely bogus. | |
bool | test_ref_count_nonzero () const |
Does some easy checks to make sure that the reference count isn't zero, or completely bogus. | |
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 | transform (const LMatrix4d &mat) |
Applies the indicated transformation to the node and all of its descendants. | |
bool | transform_is_identity () const |
Returns true if the described transform is identity, false otherwise. | |
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. | |
virtual bool | unref () const |
Explicitly decrements the reference count. | |
void | weak_ref (WeakPointerToVoid *ptv) |
Adds the indicated PointerToVoid as a weak reference to this object. | |
void | weak_unref (WeakPointerToVoid *ptv) |
Removes the indicated PointerToVoid as a weak reference to this object. | |
virtual void | write (ostream &out, int indent_level) const |
Writes the texture definition to the indicated output stream in Egg format. | |
void | write (ostream &out, int indent_level, const string &label) const |
Writes the transform to the indicated stream in Egg format. | |
void | write_header (ostream &out, int indent_level, const char *egg_keyword) const |
Writes the first line of the egg object, e.g. | |
Static Public Member Functions | |
static TypeHandle | get_class_type () |
static void | init_type () |
This function is declared non-inline to work around a compiler bug in g++ 2.96. | |
static 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. | |
static CombineMode | string_combine_mode (const string &string) |
Returns the CombineMode value associated with the given string representation, or CM_unspecified if the string does not match any known CombineMode value. | |
static CombineOperand | string_combine_operand (const string &string) |
Returns the CombineOperand value associated with the given string representation, or CO_unspecified if the string does not match any known CombineOperand value. | |
static CombineSource | string_combine_source (const string &string) |
Returns the CombineSource value associated with the given string representation, or CS_unspecified if the string does not match any known CombineSource value. | |
static CompressionMode | string_compression_mode (const string &string) |
Returns the CompressionMode value associated with the given string representation, or CM_default if the string does not match any known CompressionMode value. | |
static DepthTestMode | string_depth_test_mode (const string &string) |
Returns the DepthTestMode value associated with the given string representation, or DTM_unspecified if the string does not match any known DepthTestMode value. | |
static 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. | |
static 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. | |
static 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. | |
static 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. | |
static QualityLevel | string_quality_level (const string &string) |
Returns the TexGen value associated with the given string representation, or ET_unspecified if the string does not match any known TexGen value. | |
static TexGen | string_tex_gen (const string &string) |
Returns the TexGen value associated with the given string representation, or ET_unspecified if the string does not match any known TexGen value. | |
static TextureType | string_texture_type (const string &string) |
Returns the Texture_ype value associated with the given string representation, or TT_unspecified if the string does not match any known TextureType value. | |
static VisibilityMode | string_visibility_mode (const string &string) |
Returns the HiddenMode value associated with the given string representation, or VM_unspecified if the string does not match any known HiddenMode value. | |
static 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. | |
Protected Types | |
typedef RefCountObj< LMatrix4d > | MatrixFrame |
enum | UnderFlags { UF_under_instance = 0x001, UF_under_transform = 0x002, UF_local_coord = 0x004 } |
Protected Member Functions | |
virtual void | adjust_under () |
This is called within update_under() after all the various under settings have been inherited directly from the parent node. | |
bool | do_test_ref_count_integrity () const |
Does some easy checks to make sure that the reference count isn't completely bogus. | |
bool | do_test_ref_count_nonzero () const |
Returns true if the reference count is nonzero, false otherwise. | |
virtual bool | egg_start_parse_body () |
This function is called within parse_egg(). | |
virtual bool | has_normals () const |
Returns true if any of the primitives (e.g. | |
virtual bool | has_primitives () const |
Returns true if there are any primitives (e.g. | |
void | internal_add_matrix (const LMatrix3d &mat) |
Appends an arbitrary 4x4 matrix to the current transform, without calling transform_changed(). | |
void | internal_add_matrix (const LMatrix4d &mat) |
Appends an arbitrary 4x4 matrix to the current transform, without calling transform_changed(). | |
void | internal_clear_transform () |
Resets the transform to empty without calling transform_changed(). | |
void | internal_set_transform (const LMatrix3d &mat) |
Sets the overall transform without calling transform_changed(). | |
void | internal_set_transform (const LMatrix4d &mat) |
Sets the overall transform without calling transform_changed(). | |
virtual bool | joint_has_primitives () const |
Returns true if there are any primitives (e.g. | |
PT (MatrixFrame) _node_frame_inv | |
PT (MatrixFrame) _vertex_frame | |
PT (MatrixFrame) _node_to_vertex | |
PT (MatrixFrame) _vertex_to_node | |
PT (MatrixFrame) _node_frame | |
PT (MatrixFrame) _vertex_frame_inv | |
virtual void | r_apply_texmats (EggTextureCollection &textures) |
The recursive implementation of apply_texmats(). | |
virtual void | r_flatten_transforms () |
The recursive implementation of flatten_transforms(). | |
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_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 | transform_changed () |
This virtual method is called whenever the transform is changed; it is intended to provide a hook for derived classes (e.g. | |
virtual void | update_under (int depth_offset) |
This function is called from within EggGroupNode whenever the parentage of the node has changed. | |
Protected Attributes | |
int | _depth |
Filename | _filename |
Filename | _fullpath |
EggGroupNode * | _parent |
int | _under_flags |
Defines a texture map that may be applied to geometry.
Definition at line 33 of file eggTexture.h.
void EggTransform::add_matrix3 | ( | const LMatrix3d & | mat | ) | [inline, inherited] |
Appends an arbitrary 3x3 matrix to the current transform.
Definition at line 137 of file eggTransform.I.
References EggTransform::internal_add_matrix(), and EggTransform::transform_changed().
void EggTransform::add_matrix4 | ( | const LMatrix4d & | mat | ) | [inline, inherited] |
Appends an arbitrary 4x4 matrix to the current transform.
Definition at line 149 of file eggTransform.I.
References EggTransform::internal_add_matrix(), and EggTransform::transform_changed().
Referenced by EggGroup::r_transform().
void EggTransform::add_rotate2d | ( | double | angle | ) | [inherited] |
Appends a 2-d rotation to the current transform.
The rotation angle is specified in degrees counterclockwise about the origin.
Definition at line 102 of file eggTransform.cxx.
References LMatrix4d::rotate_mat_normaxis(), and EggTransform::transform_changed().
void EggTransform::add_rotate3d | ( | double | angle, |
const LVector3d & | axis | ||
) | [inherited] |
Appends a 3-d rotation about an arbitrary axis to the current transform.
The rotation angle is specified in degrees counterclockwise about the axis.
Definition at line 161 of file eggTransform.cxx.
References LMatrix4d::rotate_mat(), and EggTransform::transform_changed().
Referenced by EggTransform::add_rotate3d(), and FltToEggLevelState::set_transform().
void EggTransform::add_rotate3d | ( | const LQuaterniond & | quat | ) | [inherited] |
Appends an arbitrary 3-d rotation to the current transform, expressed as a quaternion.
This is converted to axis-angle notation for the egg file.
Definition at line 178 of file eggTransform.cxx.
References EggTransform::add_rotate3d(), LQuaterniond::get_angle(), LQuaterniond::get_axis(), and EggTransform::transform_changed().
void EggTransform::add_rotx | ( | double | angle | ) | [inherited] |
Appends a rotation about the X axis to the current transform.
The rotation angle is specified in degrees counterclockwise about the axis.
Definition at line 116 of file eggTransform.cxx.
References LMatrix4d::rotate_mat_normaxis(), and EggTransform::transform_changed().
void EggTransform::add_roty | ( | double | angle | ) | [inherited] |
Appends a rotation about the Y axis to the current transform.
The rotation angle is specified in degrees counterclockwise about the axis.
Definition at line 131 of file eggTransform.cxx.
References LMatrix4d::rotate_mat_normaxis(), and EggTransform::transform_changed().
void EggTransform::add_rotz | ( | double | angle | ) | [inherited] |
Appends a rotation about the Z axis to the current transform.
The rotation angle is specified in degrees counterclockwise about the axis.
Definition at line 146 of file eggTransform.cxx.
References LMatrix4d::rotate_mat_normaxis(), and EggTransform::transform_changed().
void EggTransform::add_scale2d | ( | const LVecBase2d & | scale | ) | [inherited] |
Appends a possibly non-uniform scale to the current transform.
Definition at line 191 of file eggTransform.cxx.
References LMatrix4d::scale_mat(), and EggTransform::transform_changed().
void EggTransform::add_scale3d | ( | const LVecBase3d & | scale | ) | [inherited] |
Appends a possibly non-uniform scale to the current transform.
Definition at line 206 of file eggTransform.cxx.
References LMatrix4d::scale_mat(), and EggTransform::transform_changed().
Referenced by FltToEggLevelState::set_transform().
void EggTransform::add_translate2d | ( | const LVector2d & | translate | ) | [inherited] |
Appends a 2-d translation operation to the current transform.
Definition at line 72 of file eggTransform.cxx.
References EggTransform::transform_changed(), and LMatrix4d::translate_mat().
void EggTransform::add_translate3d | ( | const LVector3d & | translate | ) | [inherited] |
Appends a 3-d translation operation to the current transform.
Definition at line 86 of file eggTransform.cxx.
References EggTransform::transform_changed(), and LMatrix4d::translate_mat().
Referenced by FltToEggLevelState::set_transform().
void EggTransform::add_uniform_scale | ( | double | scale | ) | [inherited] |
Appends a uniform scale to the current transform.
Definition at line 220 of file eggTransform.cxx.
References LMatrix4d::scale_mat(), and EggTransform::transform_changed().
void EggNode::adjust_under | ( | ) | [protected, virtual, inherited] |
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 <Instance> node will force the UF_under_instance bit on.
Reimplemented in EggGroup.
Definition at line 401 of file eggNode.cxx.
Referenced by EggNode::update_under().
bool EggTexture::affects_polygon_alpha | ( | ) | const |
Returns true if this texture's environment type or combine mode allows the texture to have an affect on the polygon's alpha values, false otherwise.
Definition at line 557 of file eggTexture.cxx.
Referenced by EggPrimitive::determine_alpha_mode().
void EggNode::apply_texmats | ( | ) | [inherited] |
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 58 of file eggNode.cxx.
References EggTextureCollection::find_used_textures(), and EggNode::r_apply_texmats().
EggTransform * EggTexture::as_transform | ( | ) | [virtual] |
Returns this object cross-cast to an EggTransform pointer, if it inherits from EggTransform, or NULL if it does not.
Reimplemented from EggObject.
Definition at line 1095 of file eggTexture.cxx.
TypedObject * TypedObject::as_typed_object | ( | ) | [inline, inherited] |
Returns the object, upcast (if necessary) to a TypedObject pointer.
Definition at line 99 of file typedObject.I.
const TypedObject * TypedObject::as_typed_object | ( | ) | const [inline, inherited] |
Returns the object, upcast (if necessary) to a TypedObject pointer.
Definition at line 110 of file typedObject.I.
void EggTexture::clear_alpha_file_channel | ( | ) | [inline] |
Removes the specification of a particular channel to use from the alpha-file image.
Definition at line 919 of file eggTexture.I.
Referenced by ImageFile::update_egg_tex().
void EggTexture::clear_alpha_scale | ( | ) | [inline] |
Removes the alpha_scale from the texture and restores it to the default value of 1.
Definition at line 782 of file eggTexture.I.
void EggTexture::clear_anisotropic_degree | ( | ) | [inline] |
Removes the specification of anisotropic filtering from the texture.
Definition at line 264 of file eggTexture.I.
void EggRenderMode::clear_bin | ( | ) | [inline, inherited] |
Removes the bin name that was set for this particular object.
See set_bin().
Definition at line 277 of file eggRenderMode.I.
void EggRenderMode::clear_depth_offset | ( | ) | [inline, inherited] |
Removes the depth-offset flag from this particular object.
See set_depth_offset().
Definition at line 178 of file eggRenderMode.I.
void EggRenderMode::clear_draw_order | ( | ) | [inline, inherited] |
Removes the draw-order flag from this particular object.
See set_draw_order().
Definition at line 227 of file eggRenderMode.I.
void EggTexture::clear_multitexture | ( | ) |
Resets the multitexture flags set by multitexture_over().
After this call, get_multitexture() will return false, and get_multitexture_sort() will return 0.
Definition at line 615 of file eggTexture.cxx.
void Namable::clear_name | ( | ) | [inline, inherited] |
void EggTexture::clear_priority | ( | ) | [inline] |
Removes the specification of multitexture priority from the texture.
The default priority value is 0.
Definition at line 535 of file eggTexture.I.
void EggTexture::clear_rgb_scale | ( | ) | [inline] |
Removes the rgb_scale from the texture and restores it to the default value of 1.
Definition at line 732 of file eggTexture.I.
void EggTexture::clear_stage_name | ( | ) | [inline] |
Removes the named TextureStage specification.
Definition at line 486 of file eggTexture.I.
void EggTransform::clear_transform | ( | ) | [inline, inherited] |
Resets the transform to empty, identity.
Definition at line 125 of file eggTransform.I.
References EggTransform::internal_clear_transform(), and EggTransform::transform_changed().
Referenced by EggGroup::clear_default_pose(), EggPrimitive::r_apply_texmats(), EggGroup::r_transform(), and FltToEggLevelState::set_transform().
void EggObject::clear_user_data | ( | ) | [inherited] |
Removes *all* user data pointers from the node.
Definition at line 153 of file eggObject.cxx.
void EggObject::clear_user_data | ( | TypeHandle | type | ) | [inherited] |
Removes the user data pointer of the indicated type.
Definition at line 164 of file eggObject.cxx.
void EggTexture::clear_uv_name | ( | ) | [inline] |
Removes the restriction to a particular named set of texture coordinates and restores the texture to using the default texture coordinates.
Definition at line 681 of file eggTexture.I.
Referenced by set_uv_name().
EggRenderMode * EggNode::determine_alpha_mode | ( | ) | [virtual, inherited] |
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 99 of file eggNode.cxx.
References EggNode::determine_alpha_mode().
Referenced by EggNode::determine_alpha_mode().
EggRenderMode * EggNode::determine_bin | ( | ) | [virtual, inherited] |
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 207 of file eggNode.cxx.
References EggNode::determine_bin().
Referenced by EggNode::determine_bin().
bool EggNode::determine_decal | ( | ) | [virtual, inherited] |
Walks back up the hierarchy, looking for an EggGroup at this level or above that has the "decal" flag set.
Returns the value of the decal flag if it is found, or false if it is not.
In other words, returns true if the "decal" flag is in effect for the indicated node, false otherwise.
Reimplemented in EggGroup.
Definition at line 247 of file eggNode.cxx.
References EggNode::determine_decal().
Referenced by EggNode::determine_decal().
EggRenderMode * EggNode::determine_depth_offset | ( | ) | [virtual, inherited] |
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_offset specified.
Returns a valid EggRenderMode pointer if one is found, or NULL otherwise.
Reimplemented in EggGroup, and EggPrimitive.
Definition at line 171 of file eggNode.cxx.
References EggNode::determine_depth_offset().
Referenced by EggNode::determine_depth_offset().
EggRenderMode * EggNode::determine_depth_test_mode | ( | ) | [virtual, inherited] |
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 135 of file eggNode.cxx.
References EggNode::determine_depth_test_mode().
Referenced by EggNode::determine_depth_test_mode().
EggRenderMode * EggNode::determine_depth_write_mode | ( | ) | [virtual, inherited] |
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 117 of file eggNode.cxx.
References EggNode::determine_depth_write_mode().
Referenced by EggNode::determine_depth_write_mode().
EggRenderMode * EggNode::determine_draw_order | ( | ) | [virtual, inherited] |
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 189 of file eggNode.cxx.
References EggNode::determine_draw_order().
Referenced by EggNode::determine_draw_order().
bool EggNode::determine_indexed | ( | ) | [virtual, inherited] |
Walks back up the hierarchy, looking for an EggGroup at this level or above that has the "indexed" scalar set.
Returns the value of the indexed scalar if it is found, or false if it is not.
In other words, returns true if the "indexed" flag is in effect for the indicated node, false otherwise.
Reimplemented in EggGroup.
Definition at line 227 of file eggNode.cxx.
References EggNode::determine_indexed().
Referenced by EggNode::determine_indexed().
EggRenderMode * EggNode::determine_visibility_mode | ( | ) | [virtual, inherited] |
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 visibility_mode other than VM_unspecified.
Returns a valid EggRenderMode pointer if one is found, or NULL otherwise.
Reimplemented in EggGroup, and EggPrimitive.
Definition at line 153 of file eggNode.cxx.
References EggNode::determine_visibility_mode().
Referenced by EggNode::determine_visibility_mode().
EggTexture::WrapMode EggTexture::determine_wrap_u | ( | ) | const [inline] |
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 132 of file eggTexture.I.
References get_wrap_u().
Referenced by TextureReference::from_egg().
EggTexture::WrapMode EggTexture::determine_wrap_v | ( | ) | const [inline] |
Determines the appropriate wrap in the V direction.
This is different from get_wrap_v() in that if the V wrap is unspecified, it returns the overall wrap value.
Definition at line 166 of file eggTexture.I.
References get_wrap_v().
Referenced by TextureReference::from_egg().
EggTexture::WrapMode EggTexture::determine_wrap_w | ( | ) | const [inline] |
Determines the appropriate wrap in the W direction.
This is different from get_wrap_w() in that if the W wrap is unspecified, it returns the overall wrap value.
Definition at line 200 of file eggTexture.I.
References get_wrap_w().
bool ReferenceCount::do_test_ref_count_integrity | ( | ) | const [protected, inherited] |
Does some easy checks to make sure that the reference count isn't completely bogus.
Returns true if ok, false otherwise.
Reimplemented in NodeReferenceCount, CachedTypedWritableReferenceCount, and NodeCachedReferenceCount.
Definition at line 29 of file referenceCount.cxx.
Referenced by ReferenceCount::do_test_ref_count_nonzero(), and ReferenceCount::test_ref_count_integrity().
bool ReferenceCount::do_test_ref_count_nonzero | ( | ) | const [protected, inherited] |
Returns true if the reference count is nonzero, false otherwise.
Definition at line 56 of file referenceCount.cxx.
References ReferenceCount::do_test_ref_count_integrity().
Referenced by ReferenceCount::test_ref_count_nonzero().
bool EggTexture::egg_start_parse_body | ( | ) | [protected, virtual] |
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 1109 of file eggTexture.cxx.
void EggNode::flatten_transforms | ( | ) | [inline, inherited] |
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.
Definition at line 351 of file eggNode.I.
References EggNode::r_flatten_transforms(), and EggNode::update_under().
int EggTexture::get_alpha_file_channel | ( | ) | const [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 944 of file eggTexture.I.
Referenced by TextureReference::from_egg(), and write().
const Filename & EggTexture::get_alpha_filename | ( | ) | const [inline] |
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 858 of file eggTexture.I.
References has_alpha_filename().
Referenced by EggBase::convert_paths(), EggGroupNode::force_filenames(), TextureReference::from_egg(), EggGroupNode::has_absolute_pathnames(), EggGroupNode::resolve_filenames(), and write().
const Filename & EggTexture::get_alpha_fullpath | ( | ) | const [inline] |
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 879 of file eggTexture.I.
EggRenderMode::AlphaMode EggRenderMode::get_alpha_mode | ( | ) | const [inline, inherited] |
Returns the alpha mode that was set, or AM_unspecified if nothing was set.
See set_alpha_mode().
Definition at line 130 of file eggRenderMode.I.
Referenced by EggPrimitive::determine_alpha_mode(), EggGroup::determine_alpha_mode(), EggRenderState::fill_state(), TextureReference::from_egg(), and EggRenderMode::write().
int EggTexture::get_alpha_scale | ( | ) | const [inline] |
Returns the alpha_scale value that has been specified for the texture, or 1 if no alpha_scale value has been specified.
Definition at line 806 of file eggTexture.I.
Referenced by write().
int EggTexture::get_anisotropic_degree | ( | ) | const [inline] |
Returns the anisotropic filtering degree that has been specified for this texture, or 0 if nothing has been specified.
Definition at line 289 of file eggTexture.I.
Referenced by TextureReference::from_egg(), and write().
string EggRenderMode::get_bin | ( | ) | const [inline, inherited] |
Returns the bin name that has been set for this particular object, if any.
See set_bin().
Definition at line 255 of file eggRenderMode.I.
Referenced by EggRenderState::fill_state(), and EggRenderMode::write().
const Colorf & EggTexture::get_border_color | ( | ) | const [inline] |
Returns the border color if one has been specified, or (0, 0, 0, 1) otherwise.
Definition at line 648 of file eggTexture.I.
const Colorf & EggTexture::get_color | ( | ) | const [inline] |
Returns the blend color if one has been specified, or (0, 0, 0, 1) otherwise.
Definition at line 604 of file eggTexture.I.
const LMatrix3d & EggTransform::get_component_mat3 | ( | int | n | ) | const [inline, inherited] |
Returns the 3x3 matrix associated with the nth component.
It is an error to call this if the component type is not CT_matrix3.
Definition at line 344 of file eggTransform.I.
References LMatrix3d::ident_mat().
Referenced by EggTransform::write().
const LMatrix4d & EggTransform::get_component_mat4 | ( | int | n | ) | const [inline, inherited] |
Returns the 4x4 matrix associated with the nth component.
It is an error to call this if the component type is not CT_matrix4.
Definition at line 358 of file eggTransform.I.
References LMatrix4d::ident_mat().
Referenced by EggTransform::write().
double EggTransform::get_component_number | ( | int | n | ) | const [inline, inherited] |
Returns the solitary number associated with the nth component.
In the case of a rotation, this is the angle in degrees to rotate; in the case of uniform scale, this is the amount of the scale. Other types do not use this property.
Definition at line 299 of file eggTransform.I.
Referenced by EggTransform::write().
EggTransform::ComponentType EggTransform::get_component_type | ( | int | n | ) | const [inline, inherited] |
Returns the type of the nth component.
Definition at line 284 of file eggTransform.I.
Referenced by EggTransform::write().
const LVecBase2d & EggTransform::get_component_vec2 | ( | int | n | ) | const [inline, inherited] |
Returns the 2-component vector associated with the nth component.
This may be the translate vector, rotate axis, or non-uniform scale. It is an error to call this if the component type does not use a 2-d vector property.
Definition at line 314 of file eggTransform.I.
References LVector2d::zero().
Referenced by EggTransform::write().
const LVecBase3d & EggTransform::get_component_vec3 | ( | int | n | ) | const [inline, inherited] |
Returns the 3-component vector associated with the nth component.
This may be the translate vector, rotate axis, or non-uniform scale. It is an error to call this if the component type does not use a 3-d vector property.
Definition at line 330 of file eggTransform.I.
References LVector3d::zero().
Referenced by EggTransform::write().
string EggFilenameNode::get_default_extension | ( | ) | const [virtual, inherited] |
Returns the default extension for this filename type.
Reimplemented in EggExternalReference.
Definition at line 25 of file eggFilenameNode.cxx.
Referenced by EggGroupNode::resolve_filenames().
int EggNode::get_depth | ( | ) | const [inline, inherited] |
int EggRenderMode::get_depth_offset | ( | ) | const [inline, inherited] |
Returns the "depth-offset" flag as set for this particular object.
See set_depth_offset().
Definition at line 156 of file eggRenderMode.I.
Referenced by EggRenderState::fill_state(), and EggRenderMode::write().
EggRenderMode::DepthTestMode EggRenderMode::get_depth_test_mode | ( | ) | const [inline, inherited] |
Returns the depth_test mode that was set, or DTM_unspecified if nothing was set.
Definition at line 73 of file eggRenderMode.I.
Referenced by EggGroup::determine_depth_test_mode(), EggPrimitive::determine_depth_test_mode(), EggRenderState::fill_state(), and EggRenderMode::write().
EggRenderMode::DepthWriteMode EggRenderMode::get_depth_write_mode | ( | ) | const [inline, inherited] |
Returns the depth_write mode that was set, or DWM_unspecified if nothing was set.
Definition at line 47 of file eggRenderMode.I.
Referenced by EggGroup::determine_depth_write_mode(), EggPrimitive::determine_depth_write_mode(), EggRenderState::fill_state(), and EggRenderMode::write().
int EggRenderMode::get_draw_order | ( | ) | const [inline, inherited] |
Returns the "draw-order" flag as set for this particular object.
See set_draw_order().
Definition at line 205 of file eggRenderMode.I.
Referenced by EggRenderState::fill_state(), and EggRenderMode::write().
const Filename & EggFilenameNode::get_filename | ( | ) | const [inline, inherited] |
Returns a nonmodifiable reference to the filename.
Definition at line 70 of file eggFilenameNode.I.
Referenced by EggBase::convert_paths(), EggTextureCollection::find_filename(), EggGroupNode::force_filenames(), TextureReference::from_egg(), EggGroupNode::has_absolute_pathnames(), is_equivalent_to(), EggGroupNode::resolve_filenames(), XFileMaterial::set_from_egg(), sorts_less_than(), TextureReference::update_egg(), write(), and EggExternalReference::write().
const Filename & EggFilenameNode::get_fullpath | ( | ) | const [inline, inherited] |
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 101 of file eggFilenameNode.I.
int EggTexture::get_multitexture_sort | ( | ) | const [inline] |
Returns an integer that represents the depth to which this texture is layered on all other textures in the egg file.
In general, if texture A is layered over texture B, then sort(A) > sort(B). If texture A is never layered over any other texture, then sort(A) == 0. More than that is difficult to guarantee.
Definition at line 992 of file eggTexture.I.
Referenced by multitexture_over().
const LMatrix4d & EggNode::get_node_frame | ( | ) | const [inline, inherited] |
Returns the coordinate frame of the node itself.
This is simply the net product of all transformations up to the root.
Definition at line 152 of file eggNode.I.
References LMatrix4d::ident_mat().
Referenced by EggGroup::adjust_under().
const LMatrix4d & EggNode::get_node_frame_inv | ( | ) | const [inline, inherited] |
Returns the inverse of the matrix returned by get_node_frame().
See get_node_frame().
Definition at line 183 of file eggNode.I.
References LMatrix4d::ident_mat().
Referenced by EggGroup::adjust_under().
const LMatrix4d * EggNode::get_node_frame_inv_ptr | ( | ) | const [inline, inherited] |
Returns either a NULL pointer or a unique pointer shared by nodes with the same get_node_frame_inv() matrix.
const LMatrix4d * EggNode::get_node_frame_ptr | ( | ) | const [inline, inherited] |
Returns either a NULL pointer or a unique pointer shared by nodes with the same get_node_frame() matrix.
const LMatrix4d & EggNode::get_node_to_vertex | ( | ) | const [inline, inherited] |
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:
get_node_frame() * get_vertex_frame_inv()
Definition at line 223 of file eggNode.I.
References LMatrix4d::ident_mat().
Referenced by XFileMesh::create_polygons().
const LMatrix4d * EggNode::get_node_to_vertex_ptr | ( | ) | const [inline, inherited] |
Returns either a NULL pointer or a unique pointer shared by nodes with the same get_node_to_vertex() matrix.
int EggTransform::get_num_components | ( | ) | const [inline, inherited] |
Returns the number of components that make up the transform.
Definition at line 274 of file eggTransform.I.
Referenced by EggTransform::write().
int EggTexture::get_priority | ( | ) | const [inline] |
Returns the multitexture importance value that has been specified for the texture, or 0 if no priority value has been specified.
Definition at line 560 of file eggTexture.I.
Referenced by write().
bool EggTexture::get_read_mipmaps | ( | ) | const [inline] |
Returns the current setting of the read_mipmaps flag.
See set_read_mipmaps().
Definition at line 977 of file eggTexture.I.
Referenced by write().
int ReferenceCount::get_ref_count | ( | ) | const [inline, inherited] |
Returns the current reference count.
Definition at line 155 of file referenceCount.I.
References ReferenceCount::test_ref_count_integrity().
Referenced by TransformState::clear_cache(), RenderState::clear_cache(), RenderState::finalize(), RenderEffects::finalize(), RenderEffect::finalize(), RenderAttrib::finalize(), InternalName::finalize(), TransformState::get_num_unused_states(), RenderState::get_num_unused_states(), TransformState::list_cycles(), RenderState::list_cycles(), GeomVertexFormat::remove_column(), TransformState::unref(), RenderState::unref(), RenderState::~RenderState(), and TransformState::~TransformState().
int EggTexture::get_rgb_scale | ( | ) | const [inline] |
Returns the rgb_scale value that has been specified for the texture, or 1 if no rgb_scale value has been specified.
Definition at line 756 of file eggTexture.I.
Referenced by write().
bool EggTexture::get_saved_result | ( | ) | const [inline] |
Returns the current setting of the saved_result flag.
See set_saved_result().
Definition at line 416 of file eggTexture.I.
Referenced by write().
const string & EggTexture::get_stage_name | ( | ) | const [inline] |
Returns the stage name that has been specified for this texture, or the tref name if no texture stage has explicitly been specified.
Definition at line 510 of file eggTexture.I.
References has_stage_name().
Referenced by write().
LMatrix3d EggTransform::get_transform2d | ( | ) | const [inline, inherited] |
Returns the overall transform as a 3x3 matrix.
It is an error to call this if has_transform3d() is true.
Definition at line 234 of file eggTransform.I.
References EggTransform::has_transform3d(), and LMatrix3d::ident_mat().
Referenced by TextureReference::from_egg(), and XFileVertex::set_from_egg().
const LMatrix4d & EggTransform::get_transform3d | ( | ) | const [inline, inherited] |
Returns the overall transform as a 4x4 matrix.
It is valid to call this even if has_transform2d() is true; in this case, the 3x3 transform will be expanded to a 4x4 matrix.
Definition at line 251 of file eggTransform.I.
Referenced by EggGroup::adjust_under(), XFileAnimationSet::create_hierarchy(), is_equivalent_to(), EggPrimitive::r_apply_texmats(), EggGroup::r_transform(), and sorts_less_than().
int TypedObject::get_type_index | ( | ) | const [inline, inherited] |
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 52 of file typedObject.I.
References TypeHandle::get_index().
EggUserData * EggObject::get_user_data | ( | ) | const [inherited] |
Returns the user data pointer most recently stored on this object, or NULL if nothing was previously stored.
Definition at line 102 of file eggObject.cxx.
Referenced by MayaNodeTree::get_egg_group(), and EggBinner::sorts_less().
EggUserData * EggObject::get_user_data | ( | TypeHandle | type | ) | const [inherited] |
Returns the user data pointer of the indicated type, if it exists, or NULL if it does not.
Definition at line 113 of file eggObject.cxx.
const string & EggTexture::get_uv_name | ( | ) | const [inline] |
Returns the texcoord name that has been specified for this texture, or the empty string if no texcoord name has explicitly been specified.
Definition at line 705 of file eggTexture.I.
Referenced by EggPrimitive::r_apply_texmats(), EggGroupNode::recompute_tangent_binormal_auto(), and write().
const LMatrix4d & EggNode::get_vertex_frame | ( | ) | const [inline, inherited] |
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 <Instance> entry reference their vertices in the coordinate system under effect at the time of the <Instance>. Thus, nodes under an <Instance> 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 135 of file eggNode.I.
References LMatrix4d::ident_mat().
Referenced by EggGroup::adjust_under(), EggPrimitive::r_flatten_transforms(), EggGroup::r_flatten_transforms(), XFileVertex::set_from_egg(), XFileNormal::set_from_egg(), EggToDXFLayer::write_3d_face(), and EggToDXFLayer::write_polyline().
const LMatrix4d & EggNode::get_vertex_frame_inv | ( | ) | const [inline, inherited] |
Returns the inverse of the matrix returned by get_vertex_frame().
See get_vertex_frame().
Definition at line 167 of file eggNode.I.
References LMatrix4d::ident_mat().
Referenced by EggGroup::adjust_under().
const LMatrix4d * EggNode::get_vertex_frame_inv_ptr | ( | ) | const [inline, inherited] |
Returns either a NULL pointer or a unique pointer shared by nodes with the same get_vertex_frame_inv() matrix.
const LMatrix4d * EggNode::get_vertex_frame_ptr | ( | ) | const [inline, inherited] |
Returns either a NULL pointer or a unique pointer shared by nodes with the same get_vertex_frame() matrix.
const LMatrix4d & EggNode::get_vertex_to_node | ( | ) | const [inline, inherited] |
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 203 of file eggNode.I.
References LMatrix4d::ident_mat().
Referenced by EggLoader::make_polyset(), XFileVertex::set_from_egg(), and XFileNormal::set_from_egg().
const LMatrix4d * EggNode::get_vertex_to_node_ptr | ( | ) | const [inline, inherited] |
Returns either a NULL pointer or a unique pointer shared by nodes with the same get_vertex_to_node() matrix.
EggRenderMode::VisibilityMode EggRenderMode::get_visibility_mode | ( | ) | const [inline, inherited] |
Returns the visibility mode that was set, or VM_unspecified if nothing was set.
Definition at line 99 of file eggRenderMode.I.
Referenced by EggGroup::determine_visibility_mode(), EggPrimitive::determine_visibility_mode(), EggRenderState::fill_state(), and EggRenderMode::write().
WeakReferenceList * ReferenceCount::get_weak_list | ( | ) | const [inline, inherited] |
Returns the WeakReferenceList associated with this ReferenceCount object.
If there has never been a WeakReferenceList associated with this object, creates one now.
Definition at line 307 of file referenceCount.I.
Referenced by ReferenceCount::weak_ref().
EggTexture::WrapMode EggTexture::get_wrap_u | ( | ) | const [inline] |
Returns the amount specified for U wrap.
This may be unspecified, even if there is an overall wrap value.
Definition at line 119 of file eggTexture.I.
Referenced by determine_wrap_u(), and write().
EggTexture::WrapMode EggTexture::get_wrap_v | ( | ) | const [inline] |
Returns the amount specified for V wrap.
This may be unspecified, even if there is an overall wrap value.
Definition at line 153 of file eggTexture.I.
Referenced by determine_wrap_v(), and write().
EggTexture::WrapMode EggTexture::get_wrap_w | ( | ) | const [inline] |
Returns the amount specified for W wrap.
This may be unspecified, even if there is an overall wrap value.
Definition at line 187 of file eggTexture.I.
Referenced by determine_wrap_w(), and write().
bool EggTexture::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.
This depends on the EggTexture's format as well as the number of channels.
Definition at line 514 of file eggTexture.cxx.
Referenced by TextureReference::from_egg(), and TextureReference::update_egg().
bool EggTexture::has_alpha_file_channel | ( | ) | const [inline] |
Returns true if a particular channel has been specified for the alpha-file image, false otherwise.
Definition at line 931 of file eggTexture.I.
Referenced by write().
bool EggTexture::has_alpha_filename | ( | ) | const [inline] |
Returns true if a separate file for the alpha component has been applied, false otherwise.
See set_alpha_filename().
Definition at line 846 of file eggTexture.I.
Referenced by EggBase::convert_paths(), EggGroupNode::force_filenames(), TextureReference::from_egg(), get_alpha_filename(), EggGroupNode::has_absolute_pathnames(), EggGroupNode::resolve_filenames(), and write().
bool EggTexture::has_alpha_scale | ( | ) | const [inline] |
Returns true if an alpha_scale has been specified for the texture, false otherwise.
Definition at line 794 of file eggTexture.I.
Referenced by write().
bool EggTexture::has_anisotropic_degree | ( | ) | const [inline] |
Returns true if a value for the anisotropic filtering degree has been specified for this texture, false otherwise.
Definition at line 277 of file eggTexture.I.
Referenced by write().
bool EggRenderMode::has_bin | ( | ) | const [inline, inherited] |
Returns true if a bin name has been set for this particular object.
See set_bin().
Definition at line 266 of file eggRenderMode.I.
Referenced by EggPrimitive::determine_bin(), EggGroup::determine_bin(), and EggRenderMode::write().
bool EggTexture::has_border_color | ( | ) | const [inline] |
Returns true if a border color has been specified for the texture.
Definition at line 637 of file eggTexture.I.
Referenced by write().
bool EggTexture::has_color | ( | ) | const [inline] |
Returns true if a blend color has been specified for the texture.
Definition at line 593 of file eggTexture.I.
Referenced by write().
bool EggRenderMode::has_depth_offset | ( | ) | const [inline, inherited] |
Returns true if the depth-offset flag has been set for this particular object.
See set_depth_offset().
Definition at line 167 of file eggRenderMode.I.
Referenced by EggPrimitive::determine_depth_offset(), EggGroup::determine_depth_offset(), and EggRenderMode::write().
bool EggRenderMode::has_draw_order | ( | ) | const [inline, inherited] |
Returns true if the draw-order flag has been set for this particular object.
See set_draw_order().
Definition at line 216 of file eggRenderMode.I.
Referenced by EggPrimitive::determine_draw_order(), EggGroup::determine_draw_order(), and EggRenderMode::write().
bool Namable::has_name | ( | ) | const [inline, inherited] |
Returns true if the Namable has a nonempty name set, false if the name is empty.
Definition at line 75 of file namable.I.
Referenced by XFileNode::add_child(), EggComponentData::add_name(), Texture::do_read_dds_file(), Texture::do_read_one(), Character::fillin(), EggGroupUniquifier::get_category(), EggXfmSAnim::optimize(), NodePathComponent::output(), AsyncTask::output(), EggNamedObject::output(), EggSAnimData::write(), EggPrimitive::write_body(), ParametricCurveCollection::write_egg(), ParametricCurve::write_egg(), EggNamedObject::write_header(), XFileDataNodeTemplate::write_text(), and XFileDataDef::write_text().
bool EggNode::has_normals | ( | ) | const [protected, virtual, inherited] |
Returns true if any of the primitives (e.g.
polygons) defined within this group or below have either face or vertex normals defined, false otherwise.
Reimplemented in EggGroupNode, EggPrimitive, and EggVertexPool.
Definition at line 436 of file eggNode.cxx.
bool EggNode::has_primitives | ( | ) | const [protected, virtual, inherited] |
Returns true if there are any primitives (e.g.
polygons) defined within this group or below, false otherwise.
Reimplemented in EggGroupNode, and EggPrimitive.
Definition at line 412 of file eggNode.cxx.
bool EggTexture::has_priority | ( | ) | const [inline] |
Returns true if a priority value for multitexture importance has been specified for the texture, false otherwise.
Definition at line 548 of file eggTexture.I.
Referenced by write().
bool EggTexture::has_rgb_scale | ( | ) | const [inline] |
Returns true if an rgb_scale has been specified for the texture, false otherwise.
Definition at line 744 of file eggTexture.I.
Referenced by write().
bool EggTexture::has_stage_name | ( | ) | const [inline] |
Returns true if a stage name has been explicitly specified for this texture, false otherwise.
Definition at line 498 of file eggTexture.I.
Referenced by get_stage_name(), and write().
bool EggTransform::has_transform | ( | ) | const [inline, inherited] |
Returns true if the transform is nonempty, false if it is empty (no transform components have been added).
This is true for either a 2-d or a 3-d transform.
Definition at line 163 of file eggTransform.I.
Referenced by EggGroup::adjust_under(), EggRenderState::fill_state(), EggTransform::has_transform2d(), EggTransform::has_transform3d(), is_equivalent_to(), EggPrimitive::r_apply_texmats(), EggGroup::r_transform(), sorts_less_than(), write(), and EggGroup::write().
bool EggTransform::has_transform2d | ( | ) | const [inline, inherited] |
Returns true if the transform is specified as a 2-d transform, e.g.
with a 3x3 matrix, or false if it is specified as a 3-d transform (with a 4x4 matrix), or not specified at all.
Normally, EggTextures have a 2-d matrix (but occasionally they use a 3-d matrix), and EggGroups always have a 3-d matrix.
Definition at line 180 of file eggTransform.I.
References EggTransform::has_transform().
Referenced by TextureReference::from_egg(), and XFileVertex::set_from_egg().
bool EggTransform::has_transform3d | ( | ) | const [inline, inherited] |
Returns true if the transform is specified as a 3-d transform, e.g.
with a 4x4 matrix, or false if it is specified as a 2-d transform (with a 2x2 matrix), or not specified at all.
Normally, EggTextures have a 3-d matrix (but occasionally they use a 3-d matrix), and EggGroups always have a 3-d matrix.
Definition at line 210 of file eggTransform.I.
References EggTransform::has_transform().
Referenced by EggTransform::get_transform2d(), and EggPrimitive::r_apply_texmats().
bool EggObject::has_user_data | ( | ) | const [inherited] |
Returns true if a generic user data pointer has recently been set and not yet cleared, false otherwise.
Definition at line 130 of file eggObject.cxx.
Referenced by MayaNodeTree::get_egg_group().
bool EggObject::has_user_data | ( | TypeHandle | type | ) | const [inherited] |
Returns true if the user data pointer of the indicated type has been set, false otherwise.
Definition at line 141 of file eggObject.cxx.
bool EggTexture::has_uv_name | ( | ) | const [inline] |
Returns true if a texcoord name has been explicitly specified for this texture, false otherwise.
Definition at line 693 of file eggTexture.I.
Referenced by write().
bool ReferenceCount::has_weak_list | ( | ) | const [inline, inherited] |
Returns true if this particular ReferenceCount object has a WeakReferenceList created, false otherwise.
In general, this will be true if there was ever a WeakPointerTo created for this object (even if there is not any for it now).
Definition at line 294 of file referenceCount.I.
Referenced by ReferenceCount::weak_unref().
static void EggTexture::init_type | ( | ) | [inline, static] |
This function is declared non-inline to work around a compiler bug in g++ 2.96.
Making it inline seems to cause problems in the optimizer.
Reimplemented from EggFilenameNode.
Definition at line 364 of file eggTexture.h.
References EggFilenameNode::init_type().
void EggTransform::internal_add_matrix | ( | const LMatrix3d & | mat | ) | [protected, inherited] |
Appends an arbitrary 4x4 matrix to the current transform, without calling transform_changed().
Definition at line 331 of file eggTransform.cxx.
Referenced by EggTransform::add_matrix3(), EggTransform::add_matrix4(), and EggTransform::internal_set_transform().
void EggTransform::internal_add_matrix | ( | const LMatrix4d & | mat | ) | [protected, inherited] |
Appends an arbitrary 4x4 matrix to the current transform, without calling transform_changed().
Definition at line 348 of file eggTransform.cxx.
void EggTransform::internal_clear_transform | ( | ) | [protected, inherited] |
Resets the transform to empty without calling transform_changed().
Definition at line 318 of file eggTransform.cxx.
References LMatrix4d::ident_mat().
Referenced by EggTransform::clear_transform(), EggTransform::internal_set_transform(), and EggGroup::r_flatten_transforms().
void EggTransform::internal_set_transform | ( | const LMatrix4d & | mat | ) | [inline, protected, inherited] |
Sets the overall transform without calling transform_changed().
Definition at line 383 of file eggTransform.I.
References EggTransform::internal_add_matrix(), and EggTransform::internal_clear_transform().
void EggTransform::internal_set_transform | ( | const LMatrix3d & | mat | ) | [inline, protected, inherited] |
Sets the overall transform without calling transform_changed().
Definition at line 371 of file eggTransform.I.
References EggTransform::internal_add_matrix(), and EggTransform::internal_clear_transform().
Referenced by EggGroup::r_transform(), EggTransform::set_transform2d(), and EggTransform::set_transform3d().
bool EggNode::is_anim_matrix | ( | ) | const [virtual, inherited] |
Returns true if this node represents a table of animation transformation data, false otherwise.
Reimplemented in EggXfmAnimData, and EggXfmSAnim.
Definition at line 85 of file eggNode.cxx.
Referenced by EggTable::has_transform(), and EggTable::r_transform().
bool EggTexture::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.
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 335 of file eggTexture.cxx.
References LMatrix4d::almost_equal(), Filename::get_basename_wo_extension(), Filename::get_dirname(), Filename::get_extension(), EggFilenameNode::get_filename(), EggTransform::get_transform3d(), EggTransform::has_transform(), and EggTransform::transform_is_identity().
Referenced by EggTextureCollection::create_unique_texture().
bool TypedObject::is_exact_type | ( | TypeHandle | handle | ) | const [inline, inherited] |
Returns true if the current object is the indicated type exactly.
Definition at line 74 of file typedObject.I.
References TypeHandle::get_name().
Referenced by GraphicsStateGuardian::async_reload_texture(), PortalNode::combine_with(), PandaNode::combine_with(), GeomNode::combine_with(), CollisionNode::combine_with(), Character::combine_with(), PGItem::cull_callback(), FactoryParams::get_param_of_type(), CollisionHandlerPusher::handle_entries(), SceneGraphReducer::r_flatten(), ConnectionWriter::send(), FltToEggLevelState::set_transform(), and VirtualFileSystem::unmount().
bool EggNode::is_joint | ( | ) | const [virtual, inherited] |
Returns true if this particular node represents a <Joint> entry or not.
This is a handy thing to know since Joints are sorted to the end of their sibling list when writing an egg file. See EggGroupNode::write().
Reimplemented in EggGroup.
Definition at line 74 of file eggNode.cxx.
Referenced by EggGroupNode::joint_has_primitives().
bool EggNode::is_local_coord | ( | ) | const [inline, inherited] |
Returns true if this node's vertices are not in the global coordinate space.
This will be the case if there was an <Instance> node under a transform at or above this node.
Definition at line 109 of file eggNode.I.
Referenced by EggVertex::get_num_global_coord(), EggVertex::get_num_local_coord(), EggPrimitive::r_flatten_transforms(), and EggGroup::r_flatten_transforms().
bool TypedObject::is_of_type | ( | TypeHandle | handle | ) | const [inline, inherited] |
Returns true if the current object is or derives from the indicated type.
Definition at line 63 of file typedObject.I.
References TypeHandle::is_derived_from().
Referenced by EggSliderData::add_back_pointer(), EggJointData::add_back_pointer(), CIntervalManager::add_c_interval(), XFileNode::add_child(), CollisionTraverser::add_collider(), CollisionHandlerPhysical::add_collider(), EggXfmSAnim::add_data(), CharacterJointBundle::add_node(), NonlinearImager::add_screen(), EggGroupNode::apply_first_attribute(), EggGroupNode::apply_last_attribute(), DeferredNodeProperty::apply_to_node(), RecorderController::begin_playback(), NodePath::clear_clip_plane(), EggGroupNode::clear_connected_shading(), NodePath::clear_light(), EggBase::convert_paths(), NodePath::decode_from_bam_stream(), VrpnClient::disconnect_device(), PhysicsManager::do_physics(), GraphicsStateGuardian::fetch_specified_part(), EggRenderState::fill_state(), AnimBundleNode::find_anim_bundle(), EggGroupNode::find_coordsys_entry(), XFile::find_data_object(), Character::find_joint(), EggGroupNode::find_materials(), Character::find_slider(), XFile::find_template(), EggGroupNode::find_textures(), EggMaterialCollection::find_used_materials(), EggTextureCollection::find_used_textures(), EggGroupNode::force_filenames(), EggJointData::force_initial_rest_frame(), WindowFramework::get_aspect_2d(), EggPoolUniquifier::get_category(), EggGroupUniquifier::get_category(), EggGroupNode::get_connected_shading(), PandaFramework::get_mouse(), FactoryParams::get_param_of_type(), EggGroupNode::has_absolute_pathnames(), NodePath::has_clip_plane(), NodePath::has_clip_plane_off(), NodePath::has_light(), PandaFramework::hide_collision_solids(), x11GraphicsWindow::open_window(), eglGraphicsWindow::open_window(), EggNode::parse_egg(), CharacterMaker::part_to_node(), EggGroupNode::post_apply_flat_attribute(), EggBinner::prepare_node(), PortalClipper::prepare_portal(), NodePath::project_texture(), EggMatrixTablePointer::quantize_channels(), ParametricCurveCollection::r_add_curves(), SceneGraphReducer::r_collect_vertex_data(), EggGroupNode::r_load_externals(), EggGroupNode::rebuild_vertex_pools(), EggGroupNode::recompute_polygon_normals(), EggGroupNode::remove_invalid_primitives(), EggGroupNode::remove_unused_vertices(), EggLoader::reparent_decals(), EggMaterialCollection::replace_materials(), EggTextureCollection::replace_textures(), EggGroupNode::resolve_filenames(), EggGroupNode::reverse_vertex_ordering(), NodePath::set_clip_plane(), NodePath::set_clip_plane_off(), NodePath::set_light(), ProjectionScreen::set_projector(), NonlinearImager::set_source_camera(), EggXfmSAnim::set_value(), NonlinearImager::set_viewer_camera(), PandaFramework::show_collision_solids(), BamCache::store(), XFileToEggConverter::strip_nodes(), EggGroupNode::strip_normals(), DataGraphTraverser::traverse(), DataGraphTraverser::traverse_below(), EggGroupNode::triangulate_polygons(), EggGroupNode::unify_attributes(), EggNameUniquifier::uniquify(), NodeCullCallbackData::upcall(), PhysicsCollisionHandler::validate_target(), EggXfmSAnim::write(), EggGroup::write(), EggToDXFLayer::write_3d_face(), and EggToDXFLayer::write_entities().
bool EggNode::is_under_instance | ( | ) | const [inline, inherited] |
bool EggNode::is_under_transform | ( | ) | const [inline, inherited] |
bool EggNode::joint_has_primitives | ( | ) | const [protected, virtual, inherited] |
Returns true if there are any primitives (e.g.
polygons) defined within this group or below, but the search does not include nested joints.
Reimplemented in EggGroupNode, and EggPrimitive.
Definition at line 424 of file eggNode.cxx.
Referenced by EggGroupNode::joint_has_primitives().
void ReferenceCount::local_object | ( | ) | [inline, inherited] |
This function should be called, once, immediately after creating a new instance of some ReferenceCount-derived object on the stack.
This allows the object to be passed to functions that will increment and decrement the object's reference count temporarily, and it will prevent the object from being deleted (inappropriately), when the reference count returns to zero. It actually achieves this by setting a large positive value in the reference count field.
Definition at line 276 of file referenceCount.I.
Referenced by PGTop::cull_callback(), BoundingSphere::extend_by_hexahedron(), AsyncTaskManager::find_task(), AsyncTaskManager::find_tasks(), and AsyncTaskManager::find_tasks_matching().
bool EggTexture::multitexture_over | ( | EggTexture * | other | ) |
Indicates that this texture should be layered on top of the other texture.
This will guarantee that this->get_multitexture_sort() > other->get_multitexture_sort(), at least until clear_multitexture() is called on either one.
The return value is true if successful, or false if there is a failure because the other texture was already layered on top of this one (or there is a three- or more-way cycle).
Definition at line 657 of file eggTexture.cxx.
References get_multitexture_sort().
Referenced by EggTextureCollection::find_used_textures().
void EggNamedObject::output | ( | ostream & | out | ) | const [inherited] |
Outputs the Namable.
This function simply writes the name to the output stream; most Namable derivatives will probably redefine this.
Reimplemented from Namable.
Definition at line 28 of file eggNamedObject.cxx.
References Namable::has_name().
bool EggNode::parse_egg | ( | const string & | egg_syntax | ) | [inherited] |
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 267 of file eggNode.cxx.
References EggNode::egg_start_parse_body(), and TypedObject::is_of_type().
void EggNode::r_apply_texmats | ( | EggTextureCollection & | textures | ) | [protected, virtual, inherited] |
The recursive implementation of apply_texmats().
Reimplemented in EggGroupNode, EggNurbsSurface, and EggPrimitive.
Definition at line 499 of file eggNode.cxx.
Referenced by EggNode::apply_texmats().
void EggNode::r_flatten_transforms | ( | ) | [protected, virtual, inherited] |
The recursive implementation of flatten_transforms().
Reimplemented in EggGroup, EggGroupNode, and EggPrimitive.
Definition at line 490 of file eggNode.cxx.
Referenced by EggNode::flatten_transforms().
void EggNode::r_mark_coordsys | ( | CoordinateSystem | cs | ) | [protected, virtual, inherited] |
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 481 of file eggNode.cxx.
void EggNode::r_transform | ( | const LMatrix4d & | mat, |
const LMatrix4d & | inv, | ||
CoordinateSystem | to_cs | ||
) | [protected, virtual, inherited] |
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, EggTable, EggVertexPool, EggXfmAnimData, and EggXfmSAnim.
Definition at line 455 of file eggNode.cxx.
Referenced by EggTable::r_transform(), and EggNode::transform().
void EggNode::r_transform_vertices | ( | const LMatrix4d & | mat | ) | [protected, virtual, inherited] |
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 468 of file eggNode.cxx.
Referenced by EggNode::transform(), and EggNode::transform_vertices_only().
void ReferenceCount::ref | ( | ) | const [inline, inherited] |
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.
Definition at line 179 of file referenceCount.I.
References ReferenceCount::test_ref_count_integrity().
Referenced by CachedTypedWritableReferenceCount::cache_ref(), TypedWritable::decode_raw_from_bam_stream(), NodeCachedReferenceCount::node_ref(), NodeReferenceCount::node_ref(), BamCacheRecord::set_data(), CullableObject::set_draw_callback(), and ModelRoot::set_reference().
int EggNode::rename_node | ( | vector_string | strip_prefix | ) | [inherited] |
Rename by stripping out the prefix.
Definition at line 36 of file eggNode.cxx.
Referenced by EggGroupNode::rename_nodes().
void EggTexture::set_alpha_file_channel | ( | int | alpha_file_channel | ) | [inline] |
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 907 of file eggTexture.I.
Referenced by ImageFile::update_egg_tex().
void EggTexture::set_alpha_filename | ( | const Filename & | alpha_filename | ) | [inline] |
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 820 of file eggTexture.I.
Referenced by EggBase::convert_paths(), EggGroupNode::force_filenames(), EggGroupNode::resolve_filenames(), and ImageFile::update_egg_tex().
void EggTexture::set_alpha_fullpath | ( | const Filename & | fullpath | ) | [inline] |
Records the full pathname to the file, for the benefit of get_alpha_fullpath().
Definition at line 890 of file eggTexture.I.
Referenced by EggBase::convert_paths().
void EggRenderMode::set_alpha_mode | ( | AlphaMode | mode | ) | [inline, inherited] |
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 118 of file eggRenderMode.I.
Referenced by TextureReference::update_egg().
void EggTexture::set_alpha_scale | ( | int | alpha_scale | ) | [inline] |
Sets an additional factor that will scale the alpha component after the texture has been applied.
This is used only when a combine mode is in effect.
The only legal values are 1, 2, or 4.
Definition at line 770 of file eggTexture.I.
void EggTexture::set_anisotropic_degree | ( | int | anisotropic_degree | ) | [inline] |
Sets the degree of anisotropic filtering for this texture.
1 is off; higher levels indicate filtering in effect.
Definition at line 252 of file eggTexture.I.
Referenced by TextureProperties::update_egg_tex().
void EggRenderMode::set_bin | ( | const string & | bin | ) | [inline, inherited] |
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 244 of file eggRenderMode.I.
void EggRenderMode::set_depth_offset | ( | int | order | ) | [inline, inherited] |
Sets the "depth-offset" flag associated with this object.
This adds or subtracts an offset bias into the depth buffer. See also DepthOffsetAttrib and NodePath::set_depth_offset().
Definition at line 143 of file eggRenderMode.I.
void EggRenderMode::set_depth_test_mode | ( | DepthTestMode | mode | ) | [inline, inherited] |
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 61 of file eggRenderMode.I.
void EggRenderMode::set_depth_write_mode | ( | DepthWriteMode | mode | ) | [inline, inherited] |
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 35 of file eggRenderMode.I.
void EggRenderMode::set_draw_order | ( | int | order | ) | [inline, inherited] |
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 193 of file eggRenderMode.I.
void EggFilenameNode::set_fullpath | ( | const Filename & | fullpath | ) | [inline, inherited] |
Records the full pathname to the file, for the benefit of get_fullpath().
Definition at line 112 of file eggFilenameNode.I.
Referenced by EggBase::convert_paths().
void EggTexture::set_priority | ( | int | priority | ) | [inline] |
Sets the importance of this texture with respect to other textures also applied on the same geometry.
This is only meaningful in the presence of multitexturing.
Definition at line 523 of file eggTexture.I.
void EggTexture::set_read_mipmaps | ( | bool | read_mipmaps | ) | [inline] |
Sets the read_mipmaps flag.
If read_mipmaps is true, the filename should contain a hash mark ('#'), which will be filled in with the mipmap level number; and the texture will be defined with a series of images, one for each mipmap level.
If the filename is of a type that already requires a hash mark, such as a cube map or a 3-d texture, then the filename should now require two hash marks, and the first one indicates the mipmap level number, while the second indicates the face number or 3-d level number.
Definition at line 966 of file eggTexture.I.
void EggTexture::set_rgb_scale | ( | int | rgb_scale | ) | [inline] |
Sets an additional factor that will scale all three r, g, b components after the texture has been applied.
This is used only when a combine mode is in effect.
The only legal values are 1, 2, or 4.
Definition at line 720 of file eggTexture.I.
void EggTexture::set_saved_result | ( | bool | saved_result | ) | [inline] |
Sets the saved_result flag.
When this is true, the output of this stage is not part of the normal pipeline--that is, it will not be supplied as the "previous" source for the next texture stage--but it will instead be supplied as the "last_saved_result" source for any future stages, until the next TextureStage with a saved_result set true is encountered.
This can be used to reuse the results of this texture stage as input to more than one stage later in the pipeline.
The last texture in the pipeline (the one with the highest sort value) should not have this flag set.
Definition at line 405 of file eggTexture.I.
void EggTexture::set_stage_name | ( | const string & | stage_name | ) | [inline] |
Specifies the particular TextureStage this texture will be rendered on by name.
If this is omitted, the texture will be rendered on the default TextureStage, unless some other stage-specific property is specificied, in which case the texture will be rendered on a TextureStage with the same name as the tref. This is in support of multitexturing.
Each different TextureStage in the world must be uniquely named.
Definition at line 475 of file eggTexture.I.
void EggTransform::set_transform2d | ( | const LMatrix3d & | mat | ) | [inline, inherited] |
Sets the overall transform as a 3x3 matrix.
This completely replaces whatever componentwise transform may have been defined.
Definition at line 192 of file eggTransform.I.
References EggTransform::internal_set_transform(), and EggTransform::transform_changed().
Referenced by TextureReference::update_egg().
void EggTransform::set_transform3d | ( | const LMatrix4d & | mat | ) | [inline, inherited] |
Sets the overall transform as a 4x4 matrix.
This completely replaces whatever componentwise transform may have been defined.
Definition at line 222 of file eggTransform.I.
References EggTransform::internal_set_transform(), and EggTransform::transform_changed().
Referenced by SoftNodeDesc::get_transform(), and FltToEggLevelState::set_transform().
void EggObject::set_user_data | ( | EggUserData * | user_data | ) | [inherited] |
Sets the user data associated with this object.
This may be any EggUserData-derived object. The egg library will do nothing with this pointer, except to hold its reference count and return the pointer on request.
The EggObject maintains multiple different EggUserData pointers, one for each unique type (as reported by get_type()). If you know that only one type of EggUserData object will be added in your application, you may use the query functions that accept no parameters, but it is recommended that in general you pass in the type of your particular user data, to allow multiple applications to coexist in the same egg data.
This pointer is also copied by the copy assignment operator and copy constructor.
Definition at line 89 of file eggObject.cxx.
Referenced by MayaNodeTree::get_egg_group(), and EggBinner::prepare_node().
void EggTexture::set_uv_name | ( | const string & | uv_name | ) | [inline] |
Specifies the named set of texture coordinates that this texture will use when it is applied to geometry.
Geometry may have multiple sets of texture coordinates defined, by name.
If this is not specified for a particular texture, the default set of texture coordinates will be used.
Definition at line 664 of file eggTexture.I.
References clear_uv_name().
void EggRenderMode::set_visibility_mode | ( | VisibilityMode | mode | ) | [inline, inherited] |
Specifies whether this geometry is to be considered normally visible, or hidden.
If it is hidden, it is either not loaded into the scene graph at all, or loaded as a "stashed" node, according to the setting of egg-suppress-hidden.
Definition at line 87 of file eggRenderMode.I.
Referenced by MayaNodeTree::get_egg_group().
bool EggTexture::sorts_less_than | ( | const EggTexture & | other, |
int | eq | ||
) | const |
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 415 of file eggTexture.cxx.
References LMatrix4d::compare_to(), Filename::get_basename_wo_extension(), Filename::get_dirname(), Filename::get_extension(), EggFilenameNode::get_filename(), EggTransform::get_transform3d(), EggTransform::has_transform(), and EggTransform::transform_is_identity().
Referenced by EggPolysetMaker::sorts_less().
EggRenderMode::AlphaMode EggRenderMode::string_alpha_mode | ( | const string & | string | ) | [static, inherited] |
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 183 of file eggRenderMode.cxx.
Referenced by TxaLine::parse().
EggTexture::CombineMode EggTexture::string_combine_mode | ( | const string & | string | ) | [static] |
Returns the CombineMode value associated with the given string representation, or CM_unspecified if the string does not match any known CombineMode value.
Definition at line 927 of file eggTexture.cxx.
EggTexture::CombineOperand EggTexture::string_combine_operand | ( | const string & | string | ) | [static] |
Returns the CombineOperand value associated with the given string representation, or CO_unspecified if the string does not match any known CombineOperand value.
Definition at line 997 of file eggTexture.cxx.
EggTexture::CombineSource EggTexture::string_combine_source | ( | const string & | string | ) | [static] |
Returns the CombineSource value associated with the given string representation, or CS_unspecified if the string does not match any known CombineSource value.
Definition at line 965 of file eggTexture.cxx.
EggTexture::CompressionMode EggTexture::string_compression_mode | ( | const string & | string | ) | [static] |
Returns the CompressionMode value associated with the given string representation, or CM_default if the string does not match any known CompressionMode value.
Definition at line 769 of file eggTexture.cxx.
EggRenderMode::DepthTestMode EggRenderMode::string_depth_test_mode | ( | const string & | string | ) | [static, inherited] |
Returns the DepthTestMode value associated with the given string representation, or DTM_unspecified if the string does not match any known DepthTestMode value.
Definition at line 233 of file eggRenderMode.cxx.
EggRenderMode::DepthWriteMode EggRenderMode::string_depth_write_mode | ( | const string & | string | ) | [static, inherited] |
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 214 of file eggRenderMode.cxx.
EggTexture::EnvType EggTexture::string_env_type | ( | const string & | string | ) | [static] |
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 871 of file eggTexture.cxx.
EggTexture::FilterType EggTexture::string_filter_type | ( | const string & | string | ) | [static] |
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 823 of file eggTexture.cxx.
Referenced by EggTextureCards::dispatch_filter_type().
EggTexture::Format EggTexture::string_format | ( | const string & | string | ) | [static] |
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 718 of file eggTexture.cxx.
Referenced by EggTextureCards::dispatch_format(), and TxaLine::parse().
EggTexture::QualityLevel EggTexture::string_quality_level | ( | const string & | string | ) | [static] |
Returns the TexGen value associated with the given string representation, or ET_unspecified if the string does not match any known TexGen value.
Definition at line 1066 of file eggTexture.cxx.
Referenced by EggTextureCards::dispatch_quality_level(), and TxaLine::parse().
EggTexture::TexGen EggTexture::string_tex_gen | ( | const string & | string | ) | [static] |
Returns the TexGen value associated with the given string representation, or ET_unspecified if the string does not match any known TexGen value.
Definition at line 1023 of file eggTexture.cxx.
EggTexture::TextureType EggTexture::string_texture_type | ( | const string & | string | ) | [static] |
Returns the Texture_ype value associated with the given string representation, or TT_unspecified if the string does not match any known TextureType value.
Definition at line 684 of file eggTexture.cxx.
EggRenderMode::VisibilityMode EggRenderMode::string_visibility_mode | ( | const string & | string | ) | [static, inherited] |
Returns the HiddenMode value associated with the given string representation, or VM_unspecified if the string does not match any known HiddenMode value.
Definition at line 252 of file eggRenderMode.cxx.
EggTexture::WrapMode EggTexture::string_wrap_mode | ( | const string & | string | ) | [static] |
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 799 of file eggTexture.cxx.
Referenced by EggTextureCards::dispatch_wrap_mode(), and TxaLine::parse().
bool ReferenceCount::test_ref_count_integrity | ( | ) | const [inline, inherited] |
Does some easy checks to make sure that the reference count isn't completely bogus.
Returns true if ok, false otherwise.
Reimplemented in NodeReferenceCount, CachedTypedWritableReferenceCount, and NodeCachedReferenceCount.
Definition at line 236 of file referenceCount.I.
References ReferenceCount::do_test_ref_count_integrity().
Referenced by EggGroupNode::add_child(), InternalName::find_ancestor(), InternalName::get_ancestor(), ReferenceCount::get_ref_count(), InternalName::get_top(), ReferenceCount::ref(), EggVertex::test_gref_integrity(), EggVertex::test_pref_integrity(), EggNode::test_under_integrity(), EggPrimitive::test_vref_integrity(), EggGroup::test_vref_integrity(), MouseWatcher::throw_event_pattern(), ReferenceCount::unref(), and EggNode::update_under().
bool ReferenceCount::test_ref_count_nonzero | ( | ) | const [inline, inherited] |
Does some easy checks to make sure that the reference count isn't zero, or completely bogus.
Returns true if ok, false otherwise.
Definition at line 252 of file referenceCount.I.
References ReferenceCount::do_test_ref_count_nonzero().
Referenced by CopyOnWritePointer::test_ref_count_nonzero().
void EggNode::test_under_integrity | ( | ) | const [inherited] |
Recursively checks the integrity of the _under_flags, _parent, and _depth members of this node and all of its ancestors.
Definition at line 300 of file eggNode.cxx.
References ReferenceCount::test_ref_count_integrity(), and EggNode::test_under_integrity().
Referenced by EggNode::test_under_integrity(), EggGroup::write(), EggAnimPreload::write(), EggTable::write(), and EggXfmSAnim::write().
void EggNode::transform | ( | const LMatrix4d & | mat | ) | [inline, inherited] |
Applies the indicated transformation to the node and all of its descendants.
Reimplemented in EggVertexPool.
Definition at line 313 of file eggNode.I.
References EggNode::r_transform(), EggNode::r_transform_vertices(), and EggNode::update_under().
Referenced by SomethingToEgg::apply_units_scale(), EggToSomething::apply_units_scale(), and EggGroup::set_default_pose().
void EggTransform::transform_changed | ( | ) | [protected, virtual, inherited] |
This virtual method is called whenever the transform is changed; it is intended to provide a hook for derived classes (e.g.
EggGroup) to update their internal cache appropriately.
Reimplemented in EggGroup.
Definition at line 364 of file eggTransform.cxx.
Referenced by EggTransform::add_matrix3(), EggTransform::add_matrix4(), EggTransform::add_rotate2d(), EggTransform::add_rotate3d(), EggTransform::add_rotx(), EggTransform::add_roty(), EggTransform::add_rotz(), EggTransform::add_scale2d(), EggTransform::add_scale3d(), EggTransform::add_translate2d(), EggTransform::add_translate3d(), EggTransform::add_uniform_scale(), EggTransform::clear_transform(), EggTransform::set_transform2d(), and EggTransform::set_transform3d().
bool EggTransform::transform_is_identity | ( | ) | const [inline, inherited] |
Returns true if the described transform is identity, false otherwise.
Definition at line 262 of file eggTransform.I.
References LMatrix4d::almost_equal(), and LMatrix4d::ident_mat().
Referenced by is_equivalent_to(), EggPrimitive::r_apply_texmats(), and sorts_less_than().
void EggNode::transform_vertices_only | ( | const LMatrix4d & | mat | ) | [inline, inherited] |
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.
Definition at line 333 of file eggNode.I.
References EggNode::r_transform_vertices().
Referenced by EggTopstrip::strip_anim_vertices().
bool ReferenceCount::unref | ( | ) | const [inline, virtual, inherited] |
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.) 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 true if the new reference count is nonzero, false if it is zero.
Reimplemented in GeomVertexArrayFormat, GeomVertexFormat, InternalName, RenderAttrib, RenderEffects, RenderState, and TransformState.
Definition at line 214 of file referenceCount.I.
References ReferenceCount::test_ref_count_integrity().
Referenced by CachedTypedWritableReferenceCount::cache_unref(), TypedWritable::decode_raw_from_bam_stream(), RenderEffect::finalize(), NodeCachedReferenceCount::node_unref(), NodeReferenceCount::node_unref(), TransformState::unref(), RenderState::unref(), RenderEffects::unref(), RenderAttrib::unref(), InternalName::unref(), GeomVertexFormat::unref(), and GeomVertexArrayFormat::unref().
void EggNode::update_under | ( | int | depth_offset | ) | [protected, virtual, inherited] |
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 358 of file eggNode.cxx.
References EggNode::adjust_under(), and ReferenceCount::test_ref_count_integrity().
Referenced by EggNode::flatten_transforms(), and EggNode::transform().
void ReferenceCount::weak_ref | ( | WeakPointerToVoid * | ptv | ) | [inline, inherited] |
Adds the indicated PointerToVoid as a weak reference to this object.
Definition at line 321 of file referenceCount.I.
References WeakReferenceList::add_reference(), and ReferenceCount::get_weak_list().
void ReferenceCount::weak_unref | ( | WeakPointerToVoid * | ptv | ) | [inline, inherited] |
Removes the indicated PointerToVoid as a weak reference to this object.
It must have previously been added via a call to weak_ref().
Definition at line 334 of file referenceCount.I.
References WeakReferenceList::clear_reference(), and ReferenceCount::has_weak_list().
void EggTransform::write | ( | ostream & | out, |
int | indent_level, | ||
const string & | label | ||
) | const [inherited] |
Writes the transform to the indicated stream in Egg format.
Definition at line 233 of file eggTransform.cxx.
References EggTransform::get_component_mat3(), EggTransform::get_component_mat4(), EggTransform::get_component_number(), EggTransform::get_component_type(), EggTransform::get_component_vec2(), EggTransform::get_component_vec3(), and EggTransform::get_num_components().
Referenced by EggGroup::write().
void EggTexture::write | ( | ostream & | out, |
int | indent_level | ||
) | const [virtual] |
Writes the texture definition to the indicated output stream in Egg format.
Reimplemented from EggRenderMode.
Definition at line 130 of file eggTexture.cxx.
References get_alpha_file_channel(), get_alpha_filename(), get_alpha_scale(), get_anisotropic_degree(), EggFilenameNode::get_filename(), get_priority(), get_read_mipmaps(), get_rgb_scale(), get_saved_result(), get_stage_name(), get_uv_name(), get_wrap_u(), get_wrap_v(), get_wrap_w(), has_alpha_file_channel(), has_alpha_filename(), has_alpha_scale(), has_anisotropic_degree(), has_border_color(), has_color(), has_priority(), has_rgb_scale(), has_stage_name(), EggTransform::has_transform(), has_uv_name(), and EggNamedObject::write_header().
void EggNamedObject::write_header | ( | ostream & | out, |
int | indent_level, | ||
const char * | egg_keyword | ||
) | const [inherited] |
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 45 of file eggNamedObject.cxx.
References Namable::has_name().
Referenced by EggXfmSAnim::write(), EggXfmAnimData::write(), EggVertexPool::write(), EggTriangleStrip::write(), EggTriangleFan::write(), write(), EggTable::write(), EggSAnimData::write(), EggPoint::write(), EggNurbsSurface::write(), EggNurbsCurve::write(), EggMaterial::write(), EggLine::write(), EggGroup::write(), EggExternalReference::write(), EggComment::write(), and EggAnimPreload::write().