Panda3D
|
This is a special TextNode that automatically updates itself with the current frame rate. More...
#include "frameRateMeter.h"
Public Types | |
enum | Alignment { A_left, A_right, A_center, A_boxed_left, A_boxed_right, A_boxed_center } |
enum | Encoding { E_iso8859, E_utf8, E_unicode } |
enum | FancyBits { FB_transform = 0x0001, FB_state = 0x0002, FB_effects = 0x0004, FB_tag = 0x0010, FB_draw_mask = 0x0020, FB_cull_callback = 0x0040 } |
enum | FlattenFlags { FF_none = 0x0000, FF_light = 0x0001, FF_medium = 0x0002, FF_strong = 0x0004, FF_dynamic_merge = 0x0008 } |
typedef bool | SceneRootFunc (const PandaNode *) |
enum | UnexpectedChange { UC_parents = 0x001, UC_children = 0x002, UC_transform = 0x004, UC_state = 0x008, UC_draw_mask = 0x010 } |
Public Member Functions | |
FrameRateMeter (const string &name) | |
void | add_child (PandaNode *child_node, int sort=0, Thread *current_thread=Thread::get_current_thread()) |
Adds a new child to the node. | |
virtual void | add_for_draw (CullTraverser *trav, CullTraverserData &data) |
Adds the node's contents to the CullResult we are building up during the cull traversal, so that it will be drawn at render time. | |
void | add_properties (const TextProperties &other) |
Sets any properties that are explicitly specified in other on this object. | |
void | add_stashed (PandaNode *child_node, int sort=0, Thread *current_thread=Thread::get_current_thread()) |
Adds a new child to the node, directly as a stashed child. | |
void | adjust_draw_mask (DrawMask show_mask, DrawMask hide_mask, DrawMask clear_mask) |
Adjusts the hide/show bits of this particular node. | |
void | append_text (const string &text) |
Appends the indicates string to the end of the stored text. | |
void | append_unicode_char (wchar_t character) |
Appends a single character to the end of the stored text. | |
void | append_unicode_char (int character) |
Appends a single character to the end of the stored text. | |
void | append_wtext (const wstring &text) |
Appends the indicates string to the end of the stored wide-character text. | |
virtual void | apply_attribs_to_vertices (const AccumulatedAttribs &attribs, int attrib_types, GeomTransformer &transformer) |
Applies whatever attributes are specified in the AccumulatedAttribs object (and by the attrib_types bitmask) to the vertices on this node, if appropriate. | |
virtual Light * | as_light () |
Cross-casts the node to a Light pointer, if it is one of the four kinds of Light nodes, or returns NULL if it is not. | |
virtual ReferenceCount * | as_reference_count () |
Returns the pointer cast to a ReferenceCount pointer, if it is in fact of that type. | |
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. | |
float | calc_width (wchar_t character) const |
Returns the width of a single character of the font, or 0.0 if the character is not known. | |
float | calc_width (const string &line) const |
Returns the width of a line of text of arbitrary characters. | |
float | calc_width (const wstring &line) const |
Returns the width of a line of text of arbitrary characters. | |
void | clear () |
Unsets all properties that have been specified so far, and resets the TextProperties structure to its initial empty state. | |
void | clear_align () |
Restores the default alignment of the text. | |
void | clear_attrib (TypeHandle type) |
Removes the render attribute of the given type from this node. | |
void | clear_attrib (int slot) |
Removes the render attribute of the given type from this node. | |
void | clear_bin () |
Removes the effect of a previous call to set_bin(). | |
void | clear_bounds () |
Reverses the effect of a previous call to set_bounds(), and allows the node's bounding volume to be automatically computed once more based on the contents of the node. | |
void | clear_card () |
Specifies that a card will not be drawn behind the text. | |
void | clear_card_border () |
void | clear_card_texture () |
void | clear_draw_order () |
void | clear_effect (TypeHandle type) |
Removes the render effect of the given type from this node. | |
void | clear_effects (Thread *current_thread=Thread::get_current_thread()) |
Resets this node to have no render effects. | |
void | clear_font () |
Resets the font to the default font. | |
void | clear_frame () |
Specifies that a border will not be drawn around the text. | |
void | clear_glyph_scale () |
void | clear_glyph_shift () |
void | clear_indent () |
Removes the indent setting from the text. | |
void | clear_max_rows () |
Resets the TextNode's default behavior of not limiting the number of rows of text. | |
void | clear_name () |
Resets the Namable's name to empty. | |
void | clear_preserve_trailing_whitespace () |
void | clear_shadow () |
Specifies that a shadow will not be drawn behind the text. | |
void | clear_shadow_color () |
Removes the shadow color specification. | |
void | clear_slant () |
void | clear_small_caps () |
void | clear_small_caps_scale () |
void | clear_state (Thread *current_thread=Thread::get_current_thread()) |
Resets this node to leave the render state alone. | |
void | clear_tab_width () |
void | clear_tag (const string &key, Thread *current_thread=Thread::get_current_thread()) |
Removes the value defined for this key on this particular node. | |
void | clear_text () |
Removes the text from the TextNode. | |
void | clear_text_color () |
Removes the text color specification; the text will be colored whatever it was in the source font file. | |
void | clear_text_scale () |
void | clear_transform (Thread *current_thread=Thread::get_current_thread()) |
Resets the transform on this node to the identity transform. | |
void | clear_underscore () |
void | clear_underscore_height () |
void | clear_unexpected_change (unsigned int flags) |
Sets one or more of the PandaNode::UnexpectedChange bits off, indicating that the corresponding property may once again change on this node. | |
void | clear_window () |
Undoes the effect of a previous call to setup_window(). | |
void | clear_wordwrap () |
Removes the wordwrap setting from the TextNode. | |
virtual PandaNode * | combine_with (PandaNode *other) |
Collapses this PandaNode with the other PandaNode, if possible, and returns a pointer to the combined PandaNode, or NULL if the two PandaNodes cannot safely be combined. | |
int | compare_tags (const PandaNode *other) const |
Returns a number less than 0, 0, or greater than 0, to indicate the similarity of tags between this node and the other one. | |
virtual int | complete_pointers (TypedWritable **p_list, BamReader *manager) |
Receives an array of pointers, one for each time manager->read_pointer() was called in fillin(). | |
virtual void | compute_internal_bounds (CPT(BoundingVolume)&internal_bounds, int &internal_vertices, int pipeline_stage, Thread *current_thread) const |
Called when needed to recompute the node's _internal_bound object. | |
void | copy_all_properties (PandaNode *other) |
Copies the TransformState, RenderState, RenderEffects, tags, Python tags, and the show/hide state from the other node onto this one. | |
void | copy_children (PandaNode *other, Thread *current_thread=Thread::get_current_thread()) |
Makes another instance of all the children of the other node, copying them to this node. | |
void | copy_tags (PandaNode *other) |
Copies all of the tags stored on the other node onto this node. | |
int | count_num_descendants () const |
Returns the number of nodes at and below this level. | |
virtual | CPT (TransformState) calc_tight_bounds(LPoint3f &min_point |
CPT (RenderAttrib) get_off_clip_planes(Thread *current_thread | |
CPT (BoundingVolume) get_bounds(Thread *current_thread | |
wstring | decode_text (const string &text) const |
Returns the given wstring decoded to a single-byte string, via the current encoding system. | |
virtual PandaNode * | dupe_for_flatten () const |
This is similar to make_copy(), but it makes a copy for the specific purpose of flatten. | |
string | encode_to_bam_stream () const |
Converts the TypedWritable object into a single stream of data using a BamWriter, and returns that data as a string string. | |
bool | encode_to_bam_stream (string &data, BamWriter *writer=NULL) const |
Converts the TypedWritable object into a single stream of data using a BamWriter, and stores that data in the indicated string. | |
string | encode_wtext (const wstring &wtext) const |
Encodes a wide-text string into a single-char string, according to the current encoding. | |
virtual void | finalize (BamReader *manager) |
Called by the BamReader to perform any final actions needed for setting up the object after all objects have been read and all pointers have been completed. | |
int | find_child (PandaNode *node, Thread *current_thread=Thread::get_current_thread()) const |
Returns the index of the indicated child node, if it is a child, or -1 if it is not. | |
int | find_parent (PandaNode *node, Thread *current_thread=Thread::get_current_thread()) const |
Returns the index of the indicated parent node, if it is a parent, or -1 if it is not. | |
int | find_stashed (PandaNode *node, Thread *current_thread=Thread::get_current_thread()) const |
Returns the index of the indicated stashed node, if it is a stashed child, or -1 if it is not. | |
virtual TypeHandle | force_init_type () |
void | force_update () |
Forces the TextNode to recompute itself now, even if it believes nothing has changed. | |
Alignment | get_align () const |
const RenderAttrib * | get_attrib (TypeHandle type) const |
Returns the render attribute of the indicated type, if it is defined on the node, or NULL if it is not. | |
const RenderAttrib * | get_attrib (int slot) const |
Returns the render attribute of the indicated type, if it is defined on the node, or NULL if it is not. | |
UpdateSeq | get_bam_modified () const |
Returns the current bam_modified counter. | |
int | get_best_parent_from_Set (const std::set< int > &) const |
const string & | get_bin () const |
Returns the drawing bin set with set_bin(), or empty string if no bin has been set. | |
float | get_bottom () const |
Returns the bottommost extent of the text in local 2-d coordinates, unmodified by the set_transform() matrix. | |
BoundingVolume::BoundsType | get_bounds_type () const |
Returns the bounding volume type set with set_bounds_type(). | |
LVecBase4f | get_card_actual () const |
Returns the actual dimensions of the card around the text. | |
LVecBase4f | get_card_as_set () const |
Returns the dimensions of the card as set by set_card_as_margin() or set_card_actual(). | |
float | get_card_border_size () const |
float | get_card_border_uv_portion () const |
Colorf | get_card_color () const |
bool | get_card_decal () const |
Returns the card_decal flag. | |
Texture * | get_card_texture () const |
LVecBase4f | get_card_transformed () const |
Returns the actual card dimensions, transformed by the matrix set by set_transform(). | |
PandaNode * | get_child (int n, Thread *current_thread=Thread::get_current_thread()) const |
Returns the nth child node of this node. | |
int | get_child_sort (int n, Thread *current_thread=Thread::get_current_thread()) const |
Returns the sort index of the nth child node of this node (that is, the number that was passed to add_child()). | |
Children | get_children (Thread *current_thread=Thread::get_current_thread()) const |
Returns an object that can be used to walk through the list of children of the node. | |
ClockObject * | get_clock_object () const |
Returns the clock that is used to determine the frame rate. | |
CoordinateSystem | get_coordinate_system () const |
DisplayRegion * | get_display_region () const |
Returns the DisplayRegion that the meter has created to render itself into the window to setup_window(), or NULL if setup_window() has not been called. | |
DrawMask | get_draw_control_mask () const |
Returns the set of bits in draw_show_mask that are considered meaningful. | |
int | get_draw_order () const |
Returns the drawing order set with set_draw_order(). | |
DrawMask | get_draw_show_mask () const |
Returns the hide/show bits of this particular node. | |
const RenderEffect * | get_effect (TypeHandle type) const |
Returns the render effect of the indicated type, if it is defined on the node, or NULL if it is not. | |
const RenderEffects * | get_effects (Thread *current_thread=Thread::get_current_thread()) const |
Returns the complete RenderEffects that will be applied to this node. | |
string | get_encoded_char (int index) const |
Returns the nth char of the stored text, as a one-, two-, or three-byte encoded string. | |
string | get_encoded_char (int index, Encoding encoding) const |
Returns the nth char of the stored text, as a one-, two-, or three-byte encoded string. | |
Encoding | get_encoding () const |
Returns the encoding by which the string set via set_text() is to be interpreted. | |
int | get_fancy_bits (Thread *current_thread=Thread::get_current_thread()) const |
Returns the union of all of the enum FancyBits values corresponding to the various "fancy" attributes that are set on the node. | |
virtual int | get_first_visible_child () const |
Returns the index number of the first visible child of this node, or a number >= get_num_children() if there are no visible children of this node. | |
int | get_flatten_flags () const |
Returns the flatten flags. | |
TextFont * | get_font () const |
Returns the font currently in use, if any. | |
LVecBase4f | get_frame_actual () const |
Returns the actual dimensions of the frame around the text. | |
LVecBase4f | get_frame_as_set () const |
Returns the dimensions of the frame as set by set_frame_as_margin() or set_frame_actual(). | |
Colorf | get_frame_color () const |
bool | get_frame_corners () const |
float | get_frame_line_width () const |
Returns the thickness of the lines that will be used to draw the frame. | |
float | get_glyph_scale () const |
Returns the scale factor of each letter as specified by set_glyph_scale(). | |
float | get_glyph_shift () const |
Returns the vertical shift of each letter as specified by set_glyph_shift(). | |
float | get_height () const |
Returns the net height of the text in local 2-d coordinates. | |
float | get_indent () const |
PandaNode * | get_internal_geom () const |
Returns the actual node that is used internally to render the text, if the TextNode is parented within the scene graph. | |
int | get_internal_vertices (Thread *current_thread=Thread::get_current_thread()) const |
Returns the total number of vertices that will be rendered by this particular node alone, not accounting for its children. | |
CollideMask | get_into_collide_mask () const |
Returns the "into" collide mask for this node. | |
float | get_left () const |
Returns the leftmost extent of the text in local 2-d coordinates, unmodified by the set_transform() matrix. | |
virtual CollideMask | get_legal_collide_mask () const |
Returns the subset of CollideMask bits that may be set for this particular type of PandaNode. | |
float | get_line_height () const |
Returns the number of units high each line of text is. | |
LPoint3f | get_lower_right_3d () const |
Returns the lower-right extent of the text object, after it has been transformed into 3-d space by applying the set_transform() matrix. | |
int | get_max_rows () const |
Returns the limit on the height of the TextNode specified by set_max_rows(). | |
const string & | get_name () const |
int | get_nested_vertices (Thread *current_thread=Thread::get_current_thread()) const |
Returns the total number of vertices that will be rendered by this node and all of its descendents. | |
CollideMask | get_net_collide_mask (Thread *current_thread=Thread::get_current_thread()) const |
Returns the union of all into_collide_mask() values set at CollisionNodes at this level and below. | |
DrawMask | get_net_draw_control_mask () const |
Returns the set of bits in get_net_draw_show_mask() that have been explicitly set via adjust_draw_mask(), rather than implicitly inherited. | |
DrawMask | get_net_draw_show_mask () const |
Returns the union of all draw_show_mask values--of renderable nodes only--at this level and below. | |
virtual int | get_next_visible_child (int n) const |
Returns the index number of the next visible child of this node following the indicated child, or a number >= get_num_children() if there are no more visible children of this node. | |
int | get_num_chars () const |
Returns the number of characters in the stored text. | |
int | get_num_children (Thread *current_thread=Thread::get_current_thread()) const |
Returns the number of child nodes this node has. | |
int | get_num_parents (Thread *current_thread=Thread::get_current_thread()) const |
Returns the number of parent nodes this node has. | |
int | get_num_rows () const |
Returns the number of rows of text that were generated. | |
int | get_num_stashed (Thread *current_thread=Thread::get_current_thread()) const |
Returns the number of stashed nodes this node has. | |
PandaNode * | get_parent (int n, Thread *current_thread=Thread::get_current_thread()) const |
Returns the nth parent node of this node. | |
Parents | get_parents (Thread *current_thread=Thread::get_current_thread()) const |
Returns an object that can be used to walk through the list of parents of the node, similar to get_children() and get_stashed(). | |
bool | get_preserve_trailing_whitespace () const |
Returns the preserve_trailing_whitespace flag. | |
const TransformState * | get_prev_transform (Thread *current_thread=Thread::get_current_thread()) const |
Returns the transform that has been set as this node's "previous" position. | |
int | get_ref_count () const |
Returns the current reference count. | |
float | get_right () const |
Returns the rightmost extent of the text in local 2-d coordinates, unmodified by the set_transform() matrix. | |
LVector2f | get_shadow () const |
Returns the offset of the shadow as set by set_shadow(). | |
Colorf | get_shadow_color () const |
float | get_slant () const |
Returns the factor by which the text is specified to slant to the right. | |
bool | get_small_caps () const |
Returns the small_caps flag. | |
float | get_small_caps_scale () const |
Returns the scale factor applied to lowercase letters from their uppercase equivalents, when the small_caps flag is in effect. | |
PandaNode * | get_stashed (int n, Thread *current_thread=Thread::get_current_thread()) const |
Returns the nth stashed child of this node. | |
Stashed | get_stashed (Thread *current_thread=Thread::get_current_thread()) const |
Returns an object that can be used to walk through the list of children of the node. | |
int | get_stashed_sort (int n, Thread *current_thread=Thread::get_current_thread()) const |
Returns the sort index of the nth stashed node of this node (that is, the number that was passed to add_child()). | |
const RenderState * | get_state (Thread *current_thread=Thread::get_current_thread()) const |
Returns the complete RenderState that will be applied to all nodes at this level and below, as set on this node. | |
float | get_tab_width () const |
Returns the width set via set_tab_width(). | |
string | get_tag (const string &key, Thread *current_thread=Thread::get_current_thread()) const |
Retrieves the user-defined value that was previously set on this node for the particular key, if any. | |
string | get_text (Encoding encoding) const |
Returns the current text, as encoded via the indicated encoding system. | |
string | get_text () const |
Returns the current text, as encoded via the current encoding system. | |
string | get_text_as_ascii () const |
Returns the text associated with the node, converted as nearly as possible to a fully-ASCII representation. | |
Colorf | get_text_color () const |
const string & | get_text_pattern () const |
Returns the sprintf() pattern that is used to format the text. | |
float | get_text_scale () const |
Returns the scale factor of the text as specified by set_text_scale(). | |
float | get_top () const |
Returns the topmost extent of the text in local 2-d coordinates, unmodified by the set_transform() matrix. | |
const TransformState * | get_transform (Thread *current_thread=Thread::get_current_thread()) const |
Returns the transform that has been set on this particular node. | |
LMatrix4f | get_transform () const |
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. | |
bool | get_underscore () const |
Returns the underscore flag. | |
float | get_underscore_height () const |
Returns the vertical height of the underscore; see set_underscore_height(). | |
unsigned int | get_unexpected_change (unsigned int flags) const |
Returns nonzero if any of the bits in the input parameter are set on this node, or zero if none of them are set. | |
int | get_unicode_char (int index) const |
Returns the Unicode value of the nth character in the stored text. | |
virtual int | get_unsafe_to_apply_attribs () const |
Returns the union of all attributes from SceneGraphReducer::AttribTypes that may not safely be applied to the vertices of this node. | |
double | get_update_interval () const |
Returns the number of seconds that will elapse between updates to the frame rate indication. | |
LPoint3f | get_upper_left_3d () const |
Returns the upper-left extent of the text object, after it has been transformed into 3-d space by applying the set_transform() matrix. | |
Geom::UsageHint | get_usage_hint () const |
Returns the UsageHint that will be applied to generated geometry. | |
virtual int | get_visible_child () const |
Returns the index number of the currently visible child of this node. | |
WeakReferenceList * | get_weak_list () const |
Returns the WeakReferenceList associated with this ReferenceCount object. | |
float | get_width () const |
Returns the net width of the text in local 2-d coordinates. | |
GraphicsOutput * | get_window () const |
Returns the GraphicsOutput that was passed to setup_window(), or NULL if setup_window() has not been called. | |
float | get_wordwrap () const |
string | get_wordwrapped_text () const |
Returns a string that represents the contents of the text, as it has been formatted by wordwrap rules. | |
wstring | get_wordwrapped_wtext () const |
Returns a wstring that represents the contents of the text, as it has been formatted by wordwrap rules. | |
const wstring & | get_wtext () const |
Returns the text associated with the TextEncoder, as a wide-character string. | |
wstring | get_wtext_as_ascii () const |
Returns the text associated with the node, converted as nearly as possible to a fully-ASCII representation. | |
bool | has_align () const |
bool | has_attrib (TypeHandle type) const |
Returns true if there is a render attribute of the indicated type defined on this node, or false if there is not. | |
bool | has_attrib (int slot) const |
Returns true if there is a render attribute of the indicated type defined on this node, or false if there is not. | |
bool | has_bin () const |
Returns true if an explicit drawing bin has been set via set_bin(), false otherwise. | |
bool | has_card () const |
bool | has_card_border () const |
bool | has_card_texture () const |
bool | has_character (wchar_t character) const |
Returns true if the named character exists in the font or can be synthesized by Panda, false otherwise. | |
bool | has_dirty_prev_transform () const |
Returns true if this node has the _dirty_prev_transform flag set, which indicates its _prev_transform is different from its _transform value (in pipeline stage 0). | |
bool | has_draw_order () const |
bool | has_effect (TypeHandle type) const |
Returns true if there is a render effect of the indicated type defined on this node, or false if there is not. | |
bool | has_exact_character (wchar_t character) const |
Returns true if the named character exists in the font exactly as named, false otherwise. | |
bool | has_font () const |
bool | has_frame () const |
bool | has_glyph_scale () const |
bool | has_glyph_shift () const |
bool | has_indent () const |
bool | has_max_rows () const |
Returns true if a limit on the height of the TextNode has been set via set_max_rows(), false otherwise. | |
bool | has_name () const |
Returns true if the Namable has a nonempty name set, false if the name is empty. | |
bool | has_overflow () const |
Returns true if the last text set on the text node exceeded the max_rows constraint, or false if it all fit. | |
bool | has_preserve_trailing_whitespace () const |
virtual bool | has_selective_visibility () const |
Should be overridden by derived classes to return true if this kind of node has some restrictions on the set of children that should be rendered. | |
bool | has_shadow () const |
bool | has_shadow_color () const |
virtual bool | has_single_child_visibility () const |
Should be overridden by derived classes to return true if this kind of node has the special property that just one of its children is visible at any given time, and furthermore that the particular visible child can be determined without reference to any external information (such as a camera). | |
bool | has_slant () const |
bool | has_small_caps () const |
bool | has_small_caps_scale () const |
bool | has_tab_width () const |
bool | has_tag (const string &key, Thread *current_thread=Thread::get_current_thread()) const |
Returns true if a value has been defined on this node for the particular key (even if that value is the empty string), or false if no value has been set. | |
bool | has_tags () const |
Returns true if the node has any tags (or any Python tags) at all, false if it has none. | |
bool | has_text () const |
bool | has_text_color () const |
bool | has_text_scale () const |
bool | has_underscore () const |
bool | has_underscore_height () const |
bool | has_weak_list () const |
Returns true if this particular ReferenceCount object has a WeakReferenceList created, false otherwise. | |
bool | has_wordwrap () const |
virtual bool | is_ambient_light () const |
Returns true if this is an AmbientLight, false if it is not a light, or it is some other kind of light. | |
bool | is_any_specified () const |
Returns true if any properties have been specified, false otherwise. | |
bool | is_bounds_stale () const |
Returns true if the bounding volume of this node is stale and will be implicitly recomputed at the next call to get_bounds(), or false if it is fresh and need not be recomputed. | |
bool | is_card_as_margin () const |
If this is true, the card was set via a call to set_card_as_margin(), and the dimension of the card as returned by get_card_as_set() represent a margin all around the text. | |
bool | is_exact_type (TypeHandle handle) const |
Returns true if the current object is the indicated type exactly. | |
bool | is_final (Thread *current_thread=Thread::get_current_thread()) const |
Returns the current state of the "final" flag. | |
bool | is_frame_as_margin () const |
If this is true, the frame was set via a call to set_frame_as_margin(), and the dimension of the frame as returned by get_frame_as_set() represent a margin all around the text. | |
virtual bool | is_geom_node () const |
A simple downcast check. | |
virtual bool | is_lod_node () const |
A simple downcast check. | |
bool | is_of_type (TypeHandle handle) const |
Returns true if the current object is or derives from the indicated type. | |
bool | is_overall_hidden () const |
Returns true if the node has been hidden to all cameras by clearing its overall bit. | |
virtual bool | is_renderable () const |
Returns true if there is some value to visiting this particular node during the cull traversal for any camera, false otherwise. | |
bool | is_scene_root () const |
Returns true if this particular node is known to be the render root of some active DisplayRegion associated with the global GraphicsEngine, false otherwise. | |
bool | is_under_scene_root () const |
Returns true if this particular node is in a live scene graph: that is, it is a child or descendent of a node that is itself a scene root. | |
bool | is_whitespace (wchar_t character) const |
Returns true if the indicated character represents whitespace in the font, or false if anything visible will be rendered for it. | |
bool | is_wtext () const |
Returns true if any of the characters in the string returned by get_wtext() are out of the range of an ASCII character (and, therefore, get_wtext() should be called in preference to get_text()). | |
void | list_tags (ostream &out, const string &separator="\n") const |
Writes a list of all the tag keys assigned to the node to the indicated stream. | |
void | local_object () |
This function should be called, once, immediately after creating a new instance of some ReferenceCount-derived object on the stack. | |
void | ls (ostream &out, int indent_level) const |
Lists all the nodes at and below the current path hierarchically. | |
void | make_lower () |
Adjusts the text stored within the encoder to all lowercase letters (preserving accent marks correctly). | |
void | make_upper () |
Adjusts the text stored within the encoder to all uppercase letters (preserving accent marks correctly). | |
void | mark_bam_modified () |
Increments the bam_modified counter, so that this object will be invalidated and retransmitted on any open bam streams. | |
void | mark_bounds_stale (Thread *current_thread=Thread::get_current_thread()) const |
Indicates that the bounding volume, or something that influences the bounding volume (or any of the other things stored in CData, like net_collide_mask), may have changed for this node, and that it must be recomputed. | |
void | mark_internal_bounds_stale (Thread *current_thread=Thread::get_current_thread()) |
Should be called by a derived class to mark the internal bounding volume stale, so that compute_internal_bounds() will be called when the bounding volume is next requested. | |
void | operator delete (void *ptr, void *) |
void | operator delete (void *ptr, void *) |
void | operator delete (void *ptr) |
void | operator delete (void *ptr) |
void | operator delete[] (void *ptr) |
void | operator delete[] (void *, void *) |
void | operator delete[] (void *, void *) |
void | operator delete[] (void *ptr) |
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 *ptr) |
void * | operator new[] (size_t size) |
void * | operator new[] (size_t size, void *ptr) |
void * | operator new[] (size_t size) |
bool | operator!= (const TextProperties &other) const |
bool | operator== (const TextProperties &other) const |
virtual void | output (ostream &out) const |
Outputs the Namable. | |
void | prepare_scene (GraphicsStateGuardianBase *gsg, const RenderState *net_state) |
Walks through the scene graph beginning at this node, and does whatever initialization is required to render the scene properly with the indicated GSG. | |
virtual bool | preserve_name () const |
Returns true if the node's name has extrinsic meaning and must be preserved across a flatten operation, false otherwise. | |
PT (PandaNode) generate() | |
virtual void | r_prepare_scene (const RenderState *state, PreparedGraphicsObjects *prepared_objects, Thread *current_thread) |
The recursive implementation of prepare_scene(). | |
void | ref () const |
Explicitly increments the reference count. | |
void | remove_all_children (Thread *current_thread=Thread::get_current_thread()) |
Removes all the children from the node at once, including stashed children. | |
void | remove_child (int child_index, Thread *current_thread=Thread::get_current_thread()) |
Removes the nth child from the node. | |
bool | remove_child (PandaNode *child_node, Thread *current_thread=Thread::get_current_thread()) |
Removes the indicated child from the node. | |
void | remove_stashed (int child_index, Thread *current_thread=Thread::get_current_thread()) |
Removes the nth stashed child from the node. | |
bool | replace_child (PandaNode *orig_child, PandaNode *new_child, Thread *current_thread=Thread::get_current_thread()) |
Searches for the orig_child node in the node's list of children, and replaces it with the new_child instead. | |
void | replace_node (PandaNode *other) |
Inserts this node into the scene graph in place of the other one, and removes the other node. | |
virtual bool | require_fully_complete () const |
Some objects require all of their nested pointers to have been completed before the objects themselves can be completed. | |
void | reset_prev_transform (Thread *current_thread=Thread::get_current_thread()) |
Resets the transform that represents this node's "previous" position to the same as the current transform. | |
virtual bool | safe_to_combine () const |
Returns true if it is generally safe to combine this particular kind of PandaNode with other kinds of PandaNodes of compatible type, adding children or whatever. | |
virtual bool | safe_to_combine_children () const |
Returns true if it is generally safe to combine the children of this PandaNode with each other. | |
virtual bool | safe_to_flatten () const |
Returns true if it is generally safe to flatten out this particular kind of PandaNode by duplicating instances (by calling dupe_for_flatten()), false otherwise (for instance, a Camera cannot be safely flattened, because the Camera pointer itself is meaningful). | |
virtual bool | safe_to_flatten_below () const |
Returns true if a flatten operation may safely continue past this node, or false if nodes below this node may not be molested. | |
virtual bool | safe_to_modify_transform () const |
Returns true if it is safe to automatically adjust the transform on this kind of node. | |
virtual bool | safe_to_transform () const |
Returns true if it is generally safe to transform this particular kind of PandaNode by calling the xform() method, false otherwise. | |
void | set_align (Alignment align_type) |
Specifies the alignment of the text within its margins. | |
void | set_attrib (const RenderAttrib *attrib, int override=0) |
Adds the indicated render attribute to the scene graph on this node. | |
void | set_bin (const string &bin) |
Names the GeomBin that the TextNode geometry should be assigned to. | |
void | set_bound (const BoundingVolume *volume) |
Deprecated. | |
void | set_bounds (const BoundingVolume *volume) |
Resets the bounding volume so that it is the indicated volume. | |
void | set_bounds_type (BoundingVolume::BoundsType bounds_type) |
Specifies the desired type of bounding volume that will be created for this node. | |
void | set_card_actual (float left, float right, float bottom, float top) |
Similar to set_card_as_margin, except the card is specified in actual coordinate units (relative to the text's origin), irrespective of the size of the text. | |
void | set_card_as_margin (float left, float right, float bottom, float top) |
Specifies that a (possibly opaque or semitransparent) card will be held behind the text when it is next created. | |
void | set_card_border (float size, float uv_portion) |
void | set_card_color (float r, float g, float b, float a) |
void | set_card_color (const Colorf &card_color) |
void | set_card_decal (bool card_decal) |
Sets the card_decal flag. | |
void | set_card_texture (Texture *card_texture) |
void | set_clock_object (ClockObject *clock_object) |
Sets the clock that is used to determine the frame rate. | |
void | set_coordinate_system (CoordinateSystem cs) |
Specifies the coordinate system in which the text will be generated. | |
int | set_draw_order (int draw_order) |
Sets the drawing order of text created by the TextMaker. | |
void | set_effect (const RenderEffect *effect) |
Adds the indicated render effect to the scene graph on this node. | |
void | set_effects (const RenderEffects *effects, Thread *current_thread=Thread::get_current_thread()) |
Sets the complete RenderEffects that will be applied this node. | |
void | set_encoding (Encoding encoding) |
Specifies how the string set via set_text() is to be interpreted. | |
void | set_final (bool flag) |
Sets the "final" flag on this PandaNode. | |
void | set_flatten_flags (int flatten_flags) |
Sets the flatten flags. | |
void | set_font (TextFont *font) |
Sets the font that will be used when making text. | |
void | set_frame_actual (float left, float right, float bottom, float top) |
Similar to set_frame_as_margin, except the frame is specified in actual coordinate units (relative to the text's origin), irrespective of the size of the text. | |
void | set_frame_as_margin (float left, float right, float bottom, float top) |
Specifies that a border will be drawn around the text when it is next created. | |
void | set_frame_color (const Colorf &frame_color) |
void | set_frame_color (float r, float g, float b, float a) |
void | set_frame_corners (bool corners) |
Enables or disables the drawing of corners for the frame. | |
void | set_frame_line_width (float line_width) |
Specifies the thickness of the lines that will be used to draw the frame. | |
void | set_glyph_scale (float glyph_scale) |
Specifies the factor by which to scale each letter of the text as it is placed. | |
void | set_glyph_shift (float glyph_shift) |
Specifies a vertical amount to shift each letter of the text as it is placed. | |
void | set_indent (float indent) |
Specifies the amount of extra space that is inserted before the first character of each line. | |
void | set_into_collide_mask (CollideMask mask) |
Sets the "into" CollideMask. | |
void | set_max_rows (int max_rows) |
Sets the maximum number of rows that may be formatted by the TextNode. | |
void | set_name (const string &name) |
void | set_overall_hidden (bool overall_hidden) |
Sets or clears the hidden flag. | |
void | set_preserve_trailing_whitespace (bool preserve_trailing_whitespace) |
Sets the preserve_trailing_whitespace flag. | |
void | set_prev_transform (const TransformState *transform, Thread *current_thread=Thread::get_current_thread()) |
Sets the transform that represents this node's "previous" position, one frame ago, for the purposes of detecting motion for accurate collision calculations. | |
void | set_shadow (float xoffset, float yoffset) |
Specifies that the text should be drawn with a shadow, by creating a second copy of the text and offsetting it slightly behind the first. | |
void | set_shadow (const LVecBase2f &shadow_offset) |
Specifies that the text should be drawn with a shadow, by creating a second copy of the text and offsetting it slightly behind the first. | |
void | set_shadow_color (const Colorf &shadow_color) |
void | set_shadow_color (float r, float g, float b, float a) |
void | set_slant (float slant) |
Specifies the factor by which the text slants to the right. | |
void | set_small_caps (bool small_caps) |
Sets the small_caps flag. | |
void | set_small_caps_scale (float small_caps_scale) |
Sets the scale factor applied to lowercase letters from their uppercase equivalents, when the small_caps flag is in effect. | |
void | set_state (const RenderState *state, Thread *current_thread=Thread::get_current_thread()) |
Sets the complete RenderState that will be applied to all nodes at this level and below. | |
void | set_tab_width (float tab_width) |
Sets the width of each tab stop, in screen units. | |
void | set_tag (const string &key, const string &value, Thread *current_thread=Thread::get_current_thread()) |
Associates a user-defined value with a user-defined key which is stored on the node. | |
void | set_text (const string &text, Encoding encoding) |
The two-parameter version of set_text() accepts an explicit encoding; the text is immediately decoded and stored as a wide-character string. | |
void | set_text (const string &text) |
Changes the text that is displayed under the TextNode. | |
void | set_text_color (const Colorf &text_color) |
void | set_text_color (float r, float g, float b, float a) |
void | set_text_pattern (const string &text_pattern) |
Sets the sprintf() pattern that is used to format the text. | |
void | set_text_scale (float text_scale) |
Specifies the factor by which to scale the text, in addition to any scalings imposed by the node, as well as in addition to the glyph scale. | |
void | set_transform (const LMatrix4f &transform) |
Sets an additional transform that is applied to the entire text paragraph. | |
void | set_transform (const TransformState *transform, Thread *current_thread=Thread::get_current_thread()) |
Sets the transform that will be applied to this node and below. | |
void | set_underscore (bool underscore) |
Sets the underscore flag. | |
void | set_underscore_height (float underscore_height) |
Specifies the vertical height of the underscore, relative to the text baseline. | |
void | set_unexpected_change (unsigned int flags) |
Sets one or more of the PandaNode::UnexpectedChange bits on, indicating that the corresponding property should not change again on this node. | |
void | set_unicode_char (int index, int character) |
Sets the Unicode value of the nth character in the stored text. | |
void | set_update_interval (double update_interval) |
Specifies the number of seconds that should elapse between updates to the frame rate indication. | |
void | set_usage_hint (Geom::UsageHint usage_hint) |
Specifies the UsageHint that will be applied to generated geometry. | |
void | set_wordwrap (float wordwrap) |
Sets the text up to automatically wordwrap when it exceeds the indicated width. | |
void | set_wtext (const wstring &wtext) |
Changes the text that is displayed under the TextNode, with a wide text. | |
void | setup_window (GraphicsOutput *window) |
Sets up the frame rate meter to create a DisplayRegion to render itself into the indicated window. | |
void | stash_child (int child_index, Thread *current_thread=Thread::get_current_thread()) |
Stashes the indicated child node. | |
bool | stash_child (PandaNode *child_node, Thread *current_thread=Thread::get_current_thread()) |
Stashes the indicated child node. | |
void | steal_children (PandaNode *other, Thread *current_thread=Thread::get_current_thread()) |
Moves all the children from the other node onto this node. | |
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. | |
virtual bool | unref () const |
Explicitly decrements the reference count. | |
void | unstash_child (int stashed_index, Thread *current_thread=Thread::get_current_thread()) |
Returns the indicated stashed node to normal child status. | |
bool | unstash_child (PandaNode *child_node, Thread *current_thread=Thread::get_current_thread()) |
Returns the indicated stashed node to normal child status. | |
void | update () |
You can call this to explicitly force the FrameRateMeter to update itself with the latest frame rate information. | |
virtual void | update_bam_nested (BamWriter *manager) |
Called by the BamWriter when this object has not itself been modified recently, but it should check its nested objects for updates. | |
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=0) const |
virtual void | write_datagram (BamWriter *manager, Datagram &dg) |
Writes the contents of this object to the datagram for shipping out to a Bam file. | |
void | write_recorder (BamWriter *manager, Datagram &dg) |
This method is provided for the benefit of classes (like MouseRecorder) that inherit from PandaMode and also RecorderBase. | |
virtual void | xform (const LMatrix4f &mat) |
Transforms the contents of this PandaNode by the indicated matrix, if it means anything to do so. | |
Static Public Member Functions | |
static bool | decode_raw_from_bam_stream (TypedWritable *&ptr, ReferenceCount *&ref_ptr, const string &data, BamReader *reader=NULL) |
Reads the string created by a previous call to encode_to_bam_stream(), and extracts the single object on that string. | |
static wstring | decode_text (const string &text, Encoding encoding) |
Returns the given wstring decoded to a single-byte string, via the given encoding system. | |
static string | encode_wchar (wchar_t ch, Encoding encoding) |
Encodes a single wide char into a one-, two-, or three-byte string, according to the given encoding system. | |
static string | encode_wtext (const wstring &wtext, Encoding encoding) |
Encodes a wide-text string into a single-char string, according to the given encoding. | |
static DrawMask | get_all_camera_mask () |
Returns a DrawMask that is appropriate for rendering to all cameras. | |
static TypeHandle | get_class_type () |
static Encoding | get_default_encoding () |
Specifies the default encoding to be used for all subsequently created TextEncoder objects. | |
static TextFont * | get_default_font () |
Specifies the default font to be used for any TextNode whose font is uninitialized or NULL. | |
static DrawMask | get_overall_bit () |
Returns the special bit that, when specifically cleared in the node's DrawMask, indicates that the node is hidden to all cameras, regardless of the remaining DrawMask bits. | |
static void | init_type () |
static string | lower (const string &source) |
Converts the string to lowercase, assuming the string is encoded in the default encoding. | |
static string | lower (const string &source, Encoding encoding) |
Converts the string to lowercase, assuming the string is encoded in the indicated encoding. | |
static | PT (PandaNode) decode_from_bam_stream(const string &data |
static string | reencode_text (const string &text, Encoding from, Encoding to) |
Given the indicated text string, which is assumed to be encoded via the encoding "from", decodes it and then reencodes it into the encoding "to", and returns the newly encoded string. | |
static void | register_with_read_factory () |
Tells the BamReader how to create objects of type PandaNode. | |
static void | reset_all_prev_transform (Thread *current_thread=Thread::get_current_thread()) |
Visits all nodes in the world with the _dirty_prev_transform flag--that is, all nodes whose _prev_transform is different from the _transform in pipeline stage 0--and resets the _prev_transform to be the same as _transform. | |
static void | set_default_encoding (Encoding encoding) |
Specifies the default encoding to be used for all subsequently created TextEncoder objects. | |
static void | set_default_font (TextFont *) |
Specifies the default font to be used for any TextNode whose font is uninitialized or NULL. | |
static void | set_scene_root_func (SceneRootFunc *func) |
This is used by the GraphicsEngine to hook in a pointer to the scene_root_func(), the function to determine whether the node is an active scene root. | |
static bool | unicode_isalpha (int character) |
Returns true if the indicated character is an alphabetic letter, false otherwise. | |
static bool | unicode_isdigit (int character) |
Returns true if the indicated character is a numeric digit, false otherwise. | |
static bool | unicode_islower (int character) |
Returns true if the indicated character is a lowercase letter, false otherwise. | |
static bool | unicode_ispunct (int character) |
Returns true if the indicated character is a punctuation mark, false otherwise. | |
static bool | unicode_isspace (int character) |
Returns true if the indicated character is a whitespace letter, false otherwise. | |
static bool | unicode_isupper (int character) |
Returns true if the indicated character is an uppercase letter, false otherwise. | |
static int | unicode_tolower (int character) |
Returns the uppercase equivalent of the given Unicode character. | |
static int | unicode_toupper (int character) |
Returns the uppercase equivalent of the given Unicode character. | |
static string | upper (const string &source) |
Converts the string to uppercase, assuming the string is encoded in the default encoding. | |
static string | upper (const string &source, Encoding encoding) |
Converts the string to uppercase, assuming the string is encoded in the indicated encoding. | |
Public Attributes | |
virtual LPoint3f bool const TransformState Thread *current_thread | const |
virtual LPoint3f bool const TransformState Thread * | current_thread = Thread::get_current_thread()) const |
Thread * | current_thread = Thread::get_current_thread()) const |
virtual LPoint3f bool & | found_any |
virtual LPoint3f & | max_point |
static BamReader * | reader = NULL) |
virtual LPoint3f bool const TransformState * | transform |
Static Public Attributes | |
static TypedWritable *const | Null = (TypedWritable*)0L |
Protected Types | |
typedef pmap< PandaNode *, PandaNode * > | InstanceMap |
Protected Member Functions | |
virtual void | children_changed () |
Called after a scene graph update that either adds or remove children from this node, this just provides a hook for derived PandaNode objects that need to update themselves based on the set of children the node has. | |
virtual bool | cull_callback (CullTraverser *trav, CullTraverserData &data) |
This function will be called during the cull traversal to perform any additional operations that should be performed at cull time. | |
void | disable_cull_callback () |
disables the call back | |
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 void | draw_mask_changed () |
Called after the node's DrawMask has been changed for any reason, this just provides a hook so derived classes can do something special in this case. | |
void | fillin (DatagramIterator &scan, BamReader *manager) |
This internal function is called by make_from_bam to read in all of the relevant data from the BamFile for the new PandaNode. | |
void | fillin_recorder (DatagramIterator &scan, BamReader *manager) |
This internal function is called by make_recorder (in classes derived from RecorderBase, such as MouseRecorder) to read in all of the relevant data from the session file. | |
void | force_bounds_stale (int pipeline_stage, Thread *current_thread) |
Similar to mark_bounds_stale(), except that the parents of this node marked stale even if this node was already considered stale. | |
void | force_bounds_stale (Thread *current_thread=Thread::get_current_thread()) |
Similar to mark_bounds_stale(), except that the parents of this node marked stale even if this node was already considered stale. | |
int | get_internal_vertices (int pipeline_stage, Thread *current_thread) const |
Returns the total number of vertices that will be rendered by this particular node alone, not accounting for its children. | |
void | insert_after (LinkedListNode *node) |
Adds a LinkedListNode record after the indicated node in the doubly-linked list. | |
void | insert_before (LinkedListNode *node) |
Adds a LinkedListNode record before the indicated node in the doubly-linked list. | |
bool | is_on_list () const |
Returns true if the node is member of any list, false if it has been removed or never added. | |
virtual PandaNode * | make_copy () const |
Returns a newly-allocated Node that is a shallow copy of this one. | |
void | mark_bounds_stale (int pipeline_stage, Thread *current_thread) const |
Indicates that the bounding volume, or something that influences the bounding volume (or any of the other things stored in CData, like net_collide_mask), may have changed for this node, and that it must be recomputed. | |
void | mark_internal_bounds_stale (int pipeline_stage, Thread *current_thread) |
Should be called by a derived class to mark the internal bounding volume stale, so that recompute_internal_bounds() will be called when the bounding volume is next requested. | |
virtual void | parents_changed () |
Called after a scene graph update that either adds or remove parents from this node, this just provides a hook for derived PandaNode objects that need to update themselves based on the set of parents the node has. | |
virtual void | r_copy_children (const PandaNode *from, InstanceMap &inst_map, Thread *current_thread) |
This is called by r_copy_subgraph(); the copy has already been made of this particular node (and this is the copy); this function's job is to copy all of the children from the original. | |
virtual void | r_mark_geom_bounds_stale (Thread *current_thread) |
Recursively calls Geom::mark_bounds_stale() on every Geom at this node and below. | |
void | remove_from_list () |
Removes a LinkedListNode record from the doubly-linked list. | |
void | set_cull_callback () |
Intended to be called in the constructor by any subclass that defines cull_callback(), this sets up the flags to indicate that the cullback needs to be called. | |
void | set_internal_bounds (const BoundingVolume *volume) |
This is provided as an alternate way for a node to set its own internal bounds, rather than overloading compute_internal_bounds(). | |
virtual void | state_changed () |
Called after the node's RenderState has been changed for any reason, this just provides a hook so derived classes can do something special in this case. | |
void | take_list_from (LinkedListNode *other_root) |
Given that this LinkedListNode represents the root of a list, and the other pointer represents the root of a different list, move all of the nodes (except the root itself) from other_root onto this list. | |
virtual void | transform_changed () |
Called after the node's transform has been changed for any reason, this just provides a hook so derived classes can do something special in this case. | |
Static Protected Member Functions | |
static TypedWritable * | make_from_bam (const FactoryParams ¶ms) |
This function is called by the BamReader's factory when a new object of type PandaNode is encountered in the Bam file. | |
Protected Attributes | |
LinkedListNode * | _next |
LinkedListNode * | _prev |
Friends | |
class | PandaNode::Children |
class | PandaNode::Stashed |
This is a special TextNode that automatically updates itself with the current frame rate.
It can be placed anywhere in the world where you'd like to see the frame rate.
It also has a special mode in which it may be attached directly to a channel or window. If this is done, it creates a DisplayRegion for itself and renders itself in the upper-right-hand corner.
Definition at line 41 of file frameRateMeter.h.
void PandaNode::add_child | ( | PandaNode * | child_node, |
int | sort = 0 , |
||
Thread * | current_thread = Thread::get_current_thread() |
||
) | [inherited] |
Adds a new child to the node.
The child is added in the relative position indicated by sort; if all children have the same sort index, the child is added at the end.
If the same child is added to a node more than once, the previous instance is first removed.
Definition at line 726 of file pandaNode.cxx.
References PandaNode::children_changed(), PandaNode::force_bounds_stale(), TypedWritable::mark_bam_modified(), PandaNode::parents_changed(), and PandaNode::remove_child().
Referenced by PandaNode::copy_children(), EggLoader::make_polyset(), CharacterMaker::part_to_node(), SceneGraphReducer::r_flatten(), PGScrollFrame::setup(), PGSliderBar::setup_scroll_bar(), PGSliderBar::setup_slider(), LensNode::show_frustum(), PandaNode::steal_children(), and PathFind::trace_path().
void PandaNode::add_for_draw | ( | CullTraverser * | trav, |
CullTraverserData & | data | ||
) | [virtual, inherited] |
Adds the node's contents to the CullResult we are building up during the cull traversal, so that it will be drawn at render time.
For most nodes other than GeomNodes, this is a do-nothing operation.
Reimplemented in GeomNode, and CallbackNode.
Definition at line 595 of file pandaNode.cxx.
Referenced by CullTraverser::traverse_below().
void TextProperties::add_properties | ( | const TextProperties & | other | ) | [inherited] |
Sets any properties that are explicitly specified in other on this object.
Leaves other properties unchanged.
Definition at line 190 of file textProperties.cxx.
References TextProperties::get_bin(), TextProperties::get_draw_order(), TextProperties::get_font(), TextProperties::get_glyph_scale(), TextProperties::get_glyph_shift(), TextProperties::get_shadow(), TextProperties::get_slant(), TextProperties::get_small_caps(), TextProperties::get_small_caps_scale(), TextProperties::get_tab_width(), TextProperties::get_text_scale(), TextProperties::get_underscore(), TextProperties::get_underscore_height(), TextProperties::has_bin(), TextProperties::set_align(), TextProperties::set_bin(), TextProperties::set_draw_order(), TextProperties::set_font(), TextProperties::set_glyph_scale(), TextProperties::set_glyph_shift(), TextProperties::set_indent(), TextProperties::set_shadow(), TextProperties::set_slant(), TextProperties::set_small_caps(), TextProperties::set_small_caps_scale(), TextProperties::set_tab_width(), TextProperties::set_text_scale(), TextProperties::set_underscore(), TextProperties::set_underscore_height(), and TextProperties::set_wordwrap().
void PandaNode::add_stashed | ( | PandaNode * | child_node, |
int | sort = 0 , |
||
Thread * | current_thread = Thread::get_current_thread() |
||
) | [inherited] |
Adds a new child to the node, directly as a stashed child.
The child is not added in the normal sense, but will be revealed if unstash_child() is called on it later.
If the same child is added to a node more than once, the previous instance is first removed.
This can only be called from the top pipeline stage (i.e. from App).
Definition at line 991 of file pandaNode.cxx.
References PandaNode::children_changed(), Thread::get_pipeline_stage(), TypedWritable::mark_bam_modified(), PandaNode::parents_changed(), and PandaNode::remove_child().
Referenced by PandaNode::copy_children(), EggLoader::make_polyset(), and PandaNode::steal_children().
void PandaNode::adjust_draw_mask | ( | DrawMask | show_mask, |
DrawMask | hide_mask, | ||
DrawMask | clear_mask | ||
) | [inherited] |
Adjusts the hide/show bits of this particular node.
These three parameters can be used to adjust the _draw_control_mask and _draw_show_mask independently, which work together to provide per-camera visibility for the node and its descendents.
_draw_control_mask indicates the bits in _draw_show_mask that are significant. Each different bit corresponds to a different camera (and these bits are assigned via Camera::set_camera_mask()).
Where _draw_control_mask has a 1 bit, a 1 bit in _draw_show_mask indicates the node is visible to that camera, and a 0 bit indicates the node is hidden to that camera. Where _draw_control_mask is 0, the node is hidden only if a parent node is hidden.
The meaning of the three parameters is as follows:
Wherever show_mask is 1, _draw_show_mask and _draw_control_mask will be set 1. Thus, show_mask indicates the set of cameras to which the node should be shown.
Wherever hide_mask is 1, _draw_show_mask will be set 0 and _draw_control_mask will be set 1. Thus, hide_mask indicates the set of cameras from which the node should be hidden.
Wherever clear_mask is 1, _draw_control_mask will be set 0. Thus, clear_mask indicates the set of cameras from which the hidden state should be inherited from a parent.
Definition at line 2072 of file pandaNode.cxx.
References PandaNode::draw_mask_changed(), Thread::get_current_thread(), BitMask< WType, nbits >::is_zero(), TypedWritable::mark_bam_modified(), and PandaNode::mark_bounds_stale().
Referenced by NodePath::hide(), PandaNode::set_overall_hidden(), NodePath::show(), and NodePath::show_through().
void TextNode::append_text | ( | const string & | text | ) | [inline, inherited] |
Appends the indicates string to the end of the stored text.
Reimplemented from TextEncoder.
Definition at line 1210 of file textNode.I.
void TextEncoder::append_unicode_char | ( | int | character | ) | [inline, inherited] |
Appends a single character to the end of the stored text.
This may be a wide character, up to 16 bits in Unicode.
Definition at line 206 of file textEncoder.I.
References TextEncoder::get_wtext().
void TextNode::append_unicode_char | ( | wchar_t | character | ) | [inline, inherited] |
Appends a single character to the end of the stored text.
This may be a wide character, up to 16 bits in Unicode.
Definition at line 1223 of file textNode.I.
void TextNode::append_wtext | ( | const wstring & | text | ) | [inline, inherited] |
Appends the indicates string to the end of the stored wide-character text.
Reimplemented from TextEncoder.
Definition at line 1276 of file textNode.I.
void TextNode::apply_attribs_to_vertices | ( | const AccumulatedAttribs & | attribs, |
int | attrib_types, | ||
GeomTransformer & | transformer | ||
) | [virtual, inherited] |
Applies whatever attributes are specified in the AccumulatedAttribs object (and by the attrib_types bitmask) to the vertices on this node, if appropriate.
If this node uses geom arrays like a GeomNode, the supplied GeomTransformer may be used to unify shared arrays across multiple different nodes.
This is a generalization of xform().
Reimplemented from PandaNode.
Definition at line 558 of file textNode.cxx.
References SceneGraphReducer::apply_attribs(), ColorAttrib::get_color(), ColorAttrib::get_color_type(), and ColorScaleAttrib::get_scale().
Light * PandaNode::as_light | ( | ) | [virtual, inherited] |
Cross-casts the node to a Light pointer, if it is one of the four kinds of Light nodes, or returns NULL if it is not.
Reimplemented in LightLensNode, and LightNode.
Definition at line 2653 of file pandaNode.cxx.
Referenced by NodePath::clear_light(), TinyGraphicsStateGuardian::do_issue_light(), GraphicsStateGuardian::do_issue_light(), LightAttrib::get_light(), LightAttrib::get_most_important_light(), NodePath::has_light(), NodePath::has_light_off(), NodePath::set_light(), and NodePath::set_light_off().
ReferenceCount * PandaNode::as_reference_count | ( | ) | [virtual, inherited] |
Returns the pointer cast to a ReferenceCount pointer, if it is in fact of that type.
Reimplemented from TypedWritable.
Definition at line 211 of file pandaNode.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.
float TextNode::calc_width | ( | wchar_t | character | ) | const [inherited] |
Returns the width of a single character of the font, or 0.0 if the character is not known.
This may be a wide character (greater than 255).
Definition at line 191 of file textNode.cxx.
References TextProperties::get_font().
Referenced by TextNode::calc_width().
float TextNode::calc_width | ( | const string & | line | ) | const [inline, inherited] |
Returns the width of a line of text of arbitrary characters.
The line should not include the newline character.
Definition at line 1251 of file textNode.I.
References TextNode::calc_width(), and TextEncoder::decode_text().
float TextNode::calc_width | ( | const wstring & | line | ) | const [inherited] |
Returns the width of a line of text of arbitrary characters.
The line should not include the newline character or any embedded control characters like \1 or \3.
Definition at line 291 of file textNode.cxx.
References TextNode::calc_width().
void PandaNode::children_changed | ( | ) | [protected, virtual, inherited] |
Called after a scene graph update that either adds or remove children from this node, this just provides a hook for derived PandaNode objects that need to update themselves based on the set of children the node has.
Definition at line 2928 of file pandaNode.cxx.
Referenced by PandaNode::add_child(), PandaNode::add_stashed(), PandaNode::remove_all_children(), PandaNode::remove_child(), PandaNode::remove_stashed(), PandaNode::replace_child(), PandaNode::stash_child(), and PandaNode::unstash_child().
void TextProperties::clear | ( | ) | [inherited] |
Unsets all properties that have been specified so far, and resets the TextProperties structure to its initial empty state.
Definition at line 178 of file textProperties.cxx.
void TextNode::clear_align | ( | ) | [inline, inherited] |
Restores the default alignment of the text.
Reimplemented from TextProperties.
Definition at line 868 of file textNode.I.
void PandaNode::clear_attrib | ( | TypeHandle | type | ) | [inline, inherited] |
Removes the render attribute of the given type from this node.
This node, and the subgraph below, will now inherit the indicated render attribute from the nodes above this one.
Definition at line 290 of file pandaNode.I.
References RenderAttribRegistry::get_slot(), and RenderAttribRegistry::quick_get_global_ptr().
Referenced by NodePath::clear_antialias(), NodePath::clear_attrib(), NodePath::clear_audio_volume(), NodePath::clear_bin(), NodePath::clear_clip_plane(), NodePath::clear_color(), NodePath::clear_color_scale(), NodePath::clear_depth_offset(), NodePath::clear_depth_test(), NodePath::clear_depth_write(), NodePath::clear_fog(), NodePath::clear_light(), NodePath::clear_material(), NodePath::clear_render_mode(), NodePath::clear_tex_gen(), NodePath::clear_tex_transform(), NodePath::clear_texture(), NodePath::clear_transparency(), and NodePath::clear_two_sided().
void PandaNode::clear_attrib | ( | int | slot | ) | [inherited] |
Removes the render attribute of the given type from this node.
This node, and the subgraph below, will now inherit the indicated render attribute from the nodes above this one.
Definition at line 1213 of file pandaNode.cxx.
References Thread::get_current_thread(), TypedWritable::mark_bam_modified(), PandaNode::mark_bounds_stale(), and PandaNode::state_changed().
void TextNode::clear_bin | ( | ) | [inline, inherited] |
Removes the effect of a previous call to set_bin().
Text will be drawn in whatever bin it would like to be drawn in, with no explicit ordering.
Reimplemented from TextProperties.
Definition at line 1052 of file textNode.I.
void PandaNode::clear_bounds | ( | ) | [inline, inherited] |
Reverses the effect of a previous call to set_bounds(), and allows the node's bounding volume to be automatically computed once more based on the contents of the node.
Definition at line 596 of file pandaNode.I.
References PandaNode::set_bounds().
void TextNode::clear_card | ( | ) | [inline, inherited] |
Specifies that a card will not be drawn behind the text.
Definition at line 506 of file textNode.I.
void PandaNode::clear_effect | ( | TypeHandle | type | ) | [inherited] |
Removes the render effect of the given type from this node.
Definition at line 1266 of file pandaNode.cxx.
References Thread::get_current_thread(), and TypedWritable::mark_bam_modified().
Referenced by NodePath::clear_billboard(), NodePath::clear_compass(), NodePath::clear_effect(), NodePath::clear_light(), CharacterJoint::clear_local_transforms(), CharacterJoint::clear_net_transforms(), NodePath::clear_tex_projector(), NodePath::hide_bounds(), CharacterJoint::remove_local_transform(), CharacterJoint::remove_net_transform(), and NodePath::set_light_off().
void PandaNode::clear_effects | ( | Thread * | current_thread = Thread::get_current_thread() | ) | [inline, inherited] |
Resets this node to have no render effects.
Definition at line 372 of file pandaNode.I.
References PandaNode::set_effects().
Referenced by NodePath::clear_effects().
void TextNode::clear_font | ( | ) | [inline, inherited] |
Resets the font to the default font.
Reimplemented from TextProperties.
Definition at line 761 of file textNode.I.
void TextNode::clear_frame | ( | ) | [inline, inherited] |
Specifies that a border will not be drawn around the text.
Definition at line 315 of file textNode.I.
void TextNode::clear_indent | ( | ) | [inline, inherited] |
Removes the indent setting from the text.
Text will be as wide as it is.
Reimplemented from TextProperties.
Definition at line 892 of file textNode.I.
void TextNode::clear_max_rows | ( | ) | [inline, inherited] |
Resets the TextNode's default behavior of not limiting the number of rows of text.
Definition at line 56 of file textNode.I.
void Namable::clear_name | ( | ) | [inline, inherited] |
void TextNode::clear_shadow | ( | ) | [inline, inherited] |
Specifies that a shadow will not be drawn behind the text.
Reimplemented from TextProperties.
Definition at line 1019 of file textNode.I.
void TextNode::clear_shadow_color | ( | ) | [inline, inherited] |
Removes the shadow color specification.
Reimplemented from TextProperties.
Definition at line 982 of file textNode.I.
void PandaNode::clear_state | ( | Thread * | current_thread = Thread::get_current_thread() | ) | [inline, inherited] |
Resets this node to leave the render state alone.
Nodes at this level and below will once again inherit their render state unchanged from the nodes above this level.
Definition at line 350 of file pandaNode.I.
References PandaNode::set_state().
void PandaNode::clear_tag | ( | const string & | key, |
Thread * | current_thread = Thread::get_current_thread() |
||
) | [inherited] |
Removes the value defined for this key on this particular node.
After a call to clear_tag(), has_tag() will return false for the indicated key.
Definition at line 1486 of file pandaNode.cxx.
References TypedWritable::mark_bam_modified().
Referenced by NodePath::clear_tag().
void TextNode::clear_text | ( | ) | [inline, inherited] |
Removes the text from the TextNode.
Reimplemented from TextEncoder.
Definition at line 1198 of file textNode.I.
void TextNode::clear_text_color | ( | ) | [inline, inherited] |
Removes the text color specification; the text will be colored whatever it was in the source font file.
Reimplemented from TextProperties.
Definition at line 950 of file textNode.I.
void PandaNode::clear_transform | ( | Thread * | current_thread = Thread::get_current_thread() | ) | [inline, inherited] |
Resets the transform on this node to the identity transform.
Definition at line 397 of file pandaNode.I.
References PandaNode::set_transform().
Referenced by NodePath::clear_mat().
void PandaNode::clear_unexpected_change | ( | unsigned int | flags | ) | [inherited] |
Sets one or more of the PandaNode::UnexpectedChange bits off, indicating that the corresponding property may once again change on this node.
The input parameter is the union of bits that are to be cleared.
Since this is a developer debugging tool only, this function does nothing in a production (NDEBUG) build.
Definition at line 2027 of file pandaNode.cxx.
void FrameRateMeter::clear_window | ( | ) |
Undoes the effect of a previous call to setup_window().
Definition at line 127 of file frameRateMeter.cxx.
Referenced by setup_window().
void TextNode::clear_wordwrap | ( | ) | [inline, inherited] |
Removes the wordwrap setting from the TextNode.
Text will be as wide as it is.
Reimplemented from TextProperties.
Definition at line 917 of file textNode.I.
Collapses this PandaNode with the other PandaNode, if possible, and returns a pointer to the combined PandaNode, or NULL if the two PandaNodes cannot safely be combined.
The return value may be this, other, or a new PandaNode altogether.
This function is called from GraphReducer::flatten(), and need not deal with children; its job is just to decide whether to collapse the two PandaNodes and what the collapsed PandaNode should look like.
Reimplemented in Character, CollisionNode, GeomNode, ModelNode, and PortalNode.
Definition at line 401 of file pandaNode.cxx.
References TypedObject::is_exact_type().
int PandaNode::compare_tags | ( | const PandaNode * | other | ) | const [inherited] |
Returns a number less than 0, 0, or greater than 0, to indicate the similarity of tags between this node and the other one.
If this returns 0, the tags are identical. If it returns other than 0, then the tags are different; and the nodes may be sorted into a consistent (but arbitrary) ordering based on this number.
Definition at line 1720 of file pandaNode.cxx.
Referenced by SceneGraphReducer::consider_child().
int TypedWritable::complete_pointers | ( | TypedWritable ** | p_list, |
BamReader * | manager | ||
) | [virtual, inherited] |
Receives an array of pointers, one for each time manager->read_pointer() was called in fillin().
Returns the number of pointers processed.
This is the callback function that is made by the BamReader at some later point, after all of the required pointers have been filled in. It is necessary because there might be forward references in a bam file; when we call read_pointer() in fillin(), the object may not have been read from the file yet, so we do not have a pointer available at that time. Thus, instead of returning a pointer, read_pointer() simply reserves a later callback. This function provides that callback. The calling object is responsible for keeping track of the number of times it called read_pointer() and extracting the same number of pointers out of the supplied vector, and storing them appropriately within the object.
Reimplemented in CFDoCullCommand, AnimBundleNode, AnimChannelMatrixDynamic, AnimChannelScalarDynamic, AnimGroup, MovingPartBase, PartBundle, PartBundleNode, PartGroup, Character, CharacterJoint, CharacterJointEffect, CharacterVertexSlider, JointVertexTransform, CollisionNode, DataNodeTransmit, GeomVertexArrayData, GeomVertexArrayFormat, GeomVertexData, GeomVertexFormat, SliderTable, TextureStage, TransformBlendTable, TransformTable, PiecewiseCurve, ClipPlaneAttrib, FogAttrib, LensNode, LightAttrib, MaterialAttrib, PortalNode, RenderEffects, RenderState, TexGenAttrib, TexMatrixAttrib, TexProjectorEffect, TextureAttrib, BamCacheIndex, RecorderFrame, EggFile, ImageFile, PaletteGroup, PaletteGroups, PaletteImage, PalettePage, Palettizer, SourceTextureImage, TextureImage, TexturePlacement, TextureProperties, and TextureReference.
Definition at line 103 of file typedWritable.cxx.
void TextNode::compute_internal_bounds | ( | CPT(BoundingVolume)& | internal_bounds, |
int & | internal_vertices, | ||
int | pipeline_stage, | ||
Thread * | current_thread | ||
) | const [virtual, inherited] |
Called when needed to recompute the node's _internal_bound object.
Nodes that contain anything of substance should redefine this to do the right thing.
Reimplemented from PandaNode.
Definition at line 721 of file textNode.cxx.
References GeometricBoundingVolume::around().
void PandaNode::copy_all_properties | ( | PandaNode * | other | ) | [inherited] |
Copies the TransformState, RenderState, RenderEffects, tags, Python tags, and the show/hide state from the other node onto this one.
Typically this is used to prepare a node to replace another node in the scene graph (also see replace_node()).
Definition at line 1798 of file pandaNode.cxx.
References PandaNode::draw_mask_changed(), Thread::get_current_thread(), TypedWritable::mark_bam_modified(), PandaNode::mark_bounds_stale(), PandaNode::state_changed(), and PandaNode::transform_changed().
Referenced by PandaNode::replace_node().
void PandaNode::copy_children | ( | PandaNode * | other, |
Thread * | current_thread = Thread::get_current_thread() |
||
) | [inherited] |
Makes another instance of all the children of the other node, copying them to this node.
Definition at line 1148 of file pandaNode.cxx.
References PandaNode::add_child(), PandaNode::add_stashed(), PandaNode::Children::get_child(), PandaNode::Children::get_child_sort(), PandaNode::get_children(), PandaNode::Children::get_num_children(), PandaNode::Stashed::get_num_stashed(), PandaNode::Stashed::get_stashed(), PandaNode::get_stashed(), and PandaNode::Stashed::get_stashed_sort().
Referenced by SceneGraphReducer::r_apply_attribs().
void PandaNode::copy_tags | ( | PandaNode * | other | ) | [inherited] |
Copies all of the tags stored on the other node onto this node.
If a particular tag exists on both nodes, the contents of this node's value is replaced by that of the other.
Definition at line 1617 of file pandaNode.cxx.
References Thread::get_current_thread(), and TypedWritable::mark_bam_modified().
int PandaNode::count_num_descendants | ( | ) | const [inherited] |
Returns the number of nodes at and below this level.
Definition at line 701 of file pandaNode.cxx.
References PandaNode::count_num_descendants(), PandaNode::Children::get_child(), PandaNode::get_children(), and PandaNode::Children::get_num_children().
Referenced by PandaNode::count_num_descendants().
bool FrameRateMeter::cull_callback | ( | CullTraverser * | trav, |
CullTraverserData & | data | ||
) | [protected, virtual] |
This function will be called during the cull traversal to perform any additional operations that should be performed at cull time.
This may include additional manipulation of render state or additional visible/invisible decisions, or any other arbitrary operation.
Note that this function will *not* be called unless set_cull_callback() is called in the constructor of the derived class. It is necessary to call set_cull_callback() to indicated that we require cull_callback() to be called.
By the time this function is called, the node has already passed the bounding-volume test for the viewing frustum, and the node's transform and state have already been applied to the indicated CullTraverserData object.
The return value is true if this node should be visible, or false if it should be culled.
Reimplemented from TextNode.
Definition at line 162 of file frameRateMeter.cxx.
References CullTraverser::get_current_thread(), and ClockObject::get_frame_time().
bool TypedWritable::decode_raw_from_bam_stream | ( | TypedWritable *& | ptr, |
ReferenceCount *& | ref_ptr, | ||
const string & | data, | ||
BamReader * | reader = NULL |
||
) | [static, inherited] |
Reads the string created by a previous call to encode_to_bam_stream(), and extracts the single object on that string.
Returns true on success, false on on error.
This variant sets the TypedWritable and ReferenceCount pointers separately; both are pointers to the same object. The reference count is not incremented; it is the caller's responsibility to manage the reference count.
Note that this method cannot be used to retrieve objects that do not inherit from ReferenceCount, because these objects cannot persist beyond the lifetime of the BamReader that reads them. To retrieve these objects from a bam stream, you must construct a BamReader directly.
If you happen to know that the particular object in question inherits from TypedWritableReferenceCount or PandaNode, consider calling the variant of decode_from_bam_stream() defined for those methods, which presents a simpler interface.
Definition at line 353 of file typedWritable.cxx.
References BamReader::init(), DatagramInputFile::open(), DatagramInputFile::read_header(), BamReader::read_object(), ReferenceCount::ref(), BamReader::resolve(), BamReader::set_source(), and ReferenceCount::unref().
wstring TextEncoder::decode_text | ( | const string & | text | ) | const [inline, inherited] |
Returns the given wstring decoded to a single-byte string, via the current encoding system.
Definition at line 565 of file textEncoder.I.
Referenced by TextNode::calc_width(), TextEncoder::get_wtext(), ButtonEvent::read_datagram(), TextEncoder::reencode_text(), PGEntry::set_text(), and TextEncoder::set_text().
wstring TextEncoder::decode_text | ( | const string & | text, |
TextEncoder::Encoding | encoding | ||
) | [static, inherited] |
Returns the given wstring decoded to a single-byte string, via the given encoding system.
Definition at line 204 of file textEncoder.cxx.
void PandaNode::disable_cull_callback | ( | ) | [protected, inherited] |
disables the call back
Definition at line 3096 of file pandaNode.cxx.
References Thread::get_current_thread(), and TypedWritable::mark_bam_modified().
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().
void PandaNode::draw_mask_changed | ( | ) | [protected, virtual, inherited] |
Called after the node's DrawMask has been changed for any reason, this just provides a hook so derived classes can do something special in this case.
Reimplemented in PGItem.
Definition at line 2964 of file pandaNode.cxx.
Referenced by PandaNode::adjust_draw_mask(), and PandaNode::copy_all_properties().
PandaNode * PandaNode::dupe_for_flatten | ( | ) | const [virtual, inherited] |
This is similar to make_copy(), but it makes a copy for the specific purpose of flatten.
Typically, this will be a new PandaNode with a new pointer, but all of the internal data will always be shared with the original; whereas the new node returned by make_copy() might not share the internal data.
Reimplemented in Character.
Definition at line 226 of file pandaNode.cxx.
References PandaNode::make_copy().
Referenced by SceneGraphReducer::r_apply_attribs().
string TypedWritable::encode_to_bam_stream | ( | ) | const [inline, inherited] |
Converts the TypedWritable object into a single stream of data using a BamWriter, and returns that data as a string string.
Returns empty string on failure.
This is a convenience method particularly useful for cases when you are only serializing a single object. If you have many objects to process, it is more efficient to use the same BamWriter to serialize all of them together.
Definition at line 86 of file typedWritable.I.
bool TypedWritable::encode_to_bam_stream | ( | string & | data, |
BamWriter * | writer = NULL |
||
) | const [inherited] |
Converts the TypedWritable object into a single stream of data using a BamWriter, and stores that data in the indicated string.
Returns true on success, false on failure.
This is a convenience method particularly useful for cases when you are only serializing a single object. If you have many objects to process, it is more efficient to use the same BamWriter to serialize all of them together.
Definition at line 283 of file typedWritable.cxx.
References BamWriter::init(), DatagramOutputFile::open(), BamWriter::set_target(), DatagramOutputFile::write_header(), and BamWriter::write_object().
string TextEncoder::encode_wchar | ( | wchar_t | ch, |
TextEncoder::Encoding | encoding | ||
) | [static, inherited] |
Encodes a single wide char into a one-, two-, or three-byte string, according to the given encoding system.
Definition at line 132 of file textEncoder.cxx.
References UnicodeLatinMap::look_up().
Referenced by TextEncoder::encode_wtext().
string TextEncoder::encode_wtext | ( | const wstring & | wtext | ) | const [inline, inherited] |
Encodes a wide-text string into a single-char string, according to the current encoding.
Definition at line 554 of file textEncoder.I.
Referenced by MouseWatcherParameter::get_candidate_string_encoded(), TextEncoder::get_encoded_char(), PGEntry::get_plain_text(), PGEntry::get_text(), TextEncoder::get_text(), TextEncoder::get_text_as_ascii(), TextNode::get_wordwrapped_text(), TextEncoder::reencode_text(), and ButtonEvent::write_datagram().
string TextEncoder::encode_wtext | ( | const wstring & | wtext, |
TextEncoder::Encoding | encoding | ||
) | [static, inherited] |
Encodes a wide-text string into a single-char string, according to the given encoding.
Definition at line 187 of file textEncoder.cxx.
References TextEncoder::encode_wchar().
void PandaNode::fillin | ( | DatagramIterator & | scan, |
BamReader * | manager | ||
) | [protected, virtual, inherited] |
This internal function is called by make_from_bam to read in all of the relevant data from the BamFile for the new PandaNode.
Reimplemented from TypedWritable.
Reimplemented in AnimBundleNode, PartBundleNode, Character, CollisionNode, DataNode, CubicCurveseg, HermiteCurve, NurbsCurve, ParametricCurve, PiecewiseCurve, RopeNode, SheetNode, Camera, Fog, GeomNode, LensNode, ModelNode, ModelRoot, PlaneNode, PolylightNode, PortalNode, UvScrollNode, AmbientLight, CallbackNode, DirectionalLight, FadeLODNode, LightLensNode, LightNode, LODNode, PointLight, SequenceNode, Spotlight, SwitchNode, and MouseRecorder.
Definition at line 4329 of file pandaNode.cxx.
References DatagramIterator::get_string(), and BamReader::read_cdata().
Referenced by PandaNode::make_from_bam().
void PandaNode::fillin_recorder | ( | DatagramIterator & | scan, |
BamReader * | manager | ||
) | [protected, inherited] |
This internal function is called by make_recorder (in classes derived from RecorderBase, such as MouseRecorder) to read in all of the relevant data from the session file.
It balances with write_recorder().
Reimplemented in MouseRecorder.
Definition at line 4348 of file pandaNode.cxx.
References DatagramIterator::get_string().
void TypedWritable::finalize | ( | BamReader * | manager | ) | [virtual, inherited] |
Called by the BamReader to perform any final actions needed for setting up the object after all objects have been read and all pointers have been completed.
Reimplemented in PartBundle, Geom, GeomPrimitive, GeomVertexArrayData, GeomVertexArrayFormat, GeomVertexData, InternalName, GeomNode, LightAttrib, RenderAttrib, RenderEffect, RenderEffects, RenderState, PaletteGroup, and Palettizer.
Definition at line 145 of file typedWritable.cxx.
Referenced by BamReader::finalize_now().
int PandaNode::find_child | ( | PandaNode * | node, |
Thread * | current_thread = Thread::get_current_thread() |
||
) | const [inline, inherited] |
Returns the index of the indicated child node, if it is a child, or -1 if it is not.
Definition at line 111 of file pandaNode.I.
Referenced by PandaFramework::event_arrow_left(), PandaFramework::event_arrow_right(), NodePath::get_sort(), and PandaNode::stash_child().
int PandaNode::find_parent | ( | PandaNode * | node, |
Thread * | current_thread = Thread::get_current_thread() |
||
) | const [inline, inherited] |
Returns the index of the indicated parent node, if it is a parent, or -1 if it is not.
Definition at line 54 of file pandaNode.I.
Referenced by NodePathComponent::output(), PandaNode::replace_node(), DataGraphTraverser::traverse_below(), and NodePath::verify_complete().
int PandaNode::find_stashed | ( | PandaNode * | node, |
Thread * | current_thread = Thread::get_current_thread() |
||
) | const [inline, inherited] |
Returns the index of the indicated stashed node, if it is a stashed child, or -1 if it is not.
Definition at line 220 of file pandaNode.I.
Referenced by NodePath::get_sort(), NodePath::get_stashed_ancestor(), PandaNode::is_under_scene_root(), NodePathComponent::output(), and PandaNode::unstash_child().
void PandaNode::force_bounds_stale | ( | Thread * | current_thread = Thread::get_current_thread() | ) | [protected, inherited] |
Similar to mark_bounds_stale(), except that the parents of this node marked stale even if this node was already considered stale.
With no parameters, this means to iterate through all stages including and upstream of the current pipeline stage.
Definition at line 2823 of file pandaNode.cxx.
Referenced by PandaNode::add_child(), PandaNode::remove_all_children(), PandaNode::remove_child(), PandaNode::remove_stashed(), PandaNode::stash_child(), and PandaNode::unstash_child().
void PandaNode::force_bounds_stale | ( | int | pipeline_stage, |
Thread * | current_thread | ||
) | [protected, inherited] |
Similar to mark_bounds_stale(), except that the parents of this node marked stale even if this node was already considered stale.
Definition at line 2838 of file pandaNode.cxx.
References PandaNode::Parents::get_num_parents(), PandaNode::Parents::get_parent(), TypedWritable::mark_bam_modified(), and PandaNode::mark_bounds_stale().
void TextNode::force_update | ( | ) | [inline, inherited] |
Forces the TextNode to recompute itself now, even if it believes nothing has changed.
Normally, this should not need to be called, but it may be useful if some properties change outside of the TextNode's knowledge (for instance, within the font).
Definition at line 1435 of file textNode.I.
DrawMask PandaNode::get_all_camera_mask | ( | ) | [inline, static, inherited] |
Returns a DrawMask that is appropriate for rendering to all cameras.
Definition at line 513 of file pandaNode.I.
const RenderAttrib * PandaNode::get_attrib | ( | TypeHandle | type | ) | const [inline, inherited] |
Returns the render attribute of the indicated type, if it is defined on the node, or NULL if it is not.
This checks only what is set on this particular node level, and has nothing to do with what render attributes may be inherited from parent nodes.
Definition at line 235 of file pandaNode.I.
Referenced by AccumulatedAttribs::apply_to_node(), NodePath::clear_clip_plane(), NodePath::clear_light(), NodePath::clear_tex_gen(), NodePath::clear_tex_transform(), NodePath::clear_texture(), NodePath::compose_color_scale(), NodePath::get_antialias(), NodePath::get_attrib(), NodePath::get_audio_volume(), NodePath::get_bin_draw_order(), NodePath::get_bin_name(), NodePath::get_color(), NodePath::get_color_scale(), PolylightNode::get_color_scenegraph(), NodePath::get_depth_offset(), NodePath::get_depth_test(), NodePath::get_depth_write(), NodePath::get_fog(), NodePath::get_instance_count(), NodePath::get_render_mode(), NodePath::get_render_mode_perspective(), NodePath::get_render_mode_thickness(), NodePath::get_tex_gen(), NodePath::get_tex_gen_light(), NodePath::get_texture(), NodePath::get_transparency(), NodePath::get_two_sided(), NodePath::has_clip_plane(), NodePath::has_clip_plane_off(), NodePath::has_fog(), NodePath::has_fog_off(), NodePath::has_light(), NodePath::has_light_off(), NodePath::has_material(), NodePath::has_tex_gen(), NodePath::has_tex_transform(), NodePath::has_texture(), NodePath::has_texture_off(), NodePath::set_all_color_scale(), NodePath::set_alpha_scale(), NodePath::set_audio_volume(), NodePath::set_clip_plane(), NodePath::set_clip_plane_off(), NodePath::set_color_scale(), NodePath::set_instance_count(), NodePath::set_light(), NodePath::set_light_off(), NodePath::set_tex_gen(), NodePath::set_tex_transform(), NodePath::set_texture(), and NodePath::set_texture_off().
const RenderAttrib * PandaNode::get_attrib | ( | int | slot | ) | const [inline, inherited] |
Returns the render attribute of the indicated type, if it is defined on the node, or NULL if it is not.
This checks only what is set on this particular node level, and has nothing to do with what render attributes may be inherited from parent nodes.
Definition at line 250 of file pandaNode.I.
UpdateSeq TypedWritable::get_bam_modified | ( | ) | const [inline, inherited] |
Returns the current bam_modified counter.
This counter is normally incremented automatically whenever the object is modified.
Definition at line 66 of file typedWritable.I.
Referenced by BamWriter::consider_update(), and BamWriter::write_pointer().
const string & TextProperties::get_bin | ( | ) | const [inline, inherited] |
Returns the drawing bin set with set_bin(), or empty string if no bin has been set.
Definition at line 748 of file textProperties.I.
Referenced by TextProperties::add_properties().
float TextNode::get_bottom | ( | ) | const [inline, inherited] |
Returns the bottommost extent of the text in local 2-d coordinates, unmodified by the set_transform() matrix.
Definition at line 1331 of file textNode.I.
BoundingVolume::BoundsType PandaNode::get_bounds_type | ( | ) | const [inherited] |
Returns the bounding volume type set with set_bounds_type().
Definition at line 2424 of file pandaNode.cxx.
Referenced by PGItem::compute_internal_bounds(), GeomNode::compute_internal_bounds(), and CollisionNode::compute_internal_bounds().
LVecBase4f TextNode::get_card_actual | ( | ) | const [inline, inherited] |
Returns the actual dimensions of the card around the text.
If the card was set via set_card_as_margin(), the result returned by this function reflects the size of the current text; if the card was set via set_card_actual(), this returns the values actually set.
If the text has no card at all, this returns the dimensions of the text itself, as if the card were set with a margin of 0, 0, 0, 0.
Definition at line 578 of file textNode.I.
References TextNode::get_card_as_set(), and TextNode::is_card_as_margin().
Referenced by TextNode::get_card_transformed(), and PGButton::setup().
LVecBase4f TextNode::get_card_as_set | ( | ) | const [inline, inherited] |
Returns the dimensions of the card as set by set_card_as_margin() or set_card_actual().
Use is_card_actual() to determine how to interpret the values returned by this function. It is an error to call this if has_card() is false.
Definition at line 558 of file textNode.I.
Referenced by TextNode::get_card_actual().
bool TextNode::get_card_decal | ( | ) | const [inline, inherited] |
LVecBase4f TextNode::get_card_transformed | ( | ) | const [inline, inherited] |
Returns the actual card dimensions, transformed by the matrix set by set_transform().
This returns the card dimensions in actual coordinates as seen by the rest of the world. Also see get_upper_left_3d() and get_lower_right_3d().
Definition at line 604 of file textNode.I.
References TextNode::get_card_actual().
PandaNode * PandaNode::get_child | ( | int | n, |
Thread * | current_thread = Thread::get_current_thread() |
||
) | const [inline, inherited] |
Returns the nth child node of this node.
See get_num_children(). Also see get_children(), if your intention is to iterate through the complete list of children; get_children() is preferable in this case.
Definition at line 82 of file pandaNode.I.
Referenced by LODNode::cull_callback(), FadeLODNode::cull_callback(), PandaFramework::event_arrow_left(), PandaFramework::event_arrow_right(), CharacterMaker::part_to_node(), ParametricCurveCollection::r_add_curves(), SceneGraphReducer::r_apply_attribs(), PandaNode::r_copy_children(), SceneGraphReducer::r_flatten(), LODNode::show_switches_cull_callback(), PandaNode::stash_child(), and PandaNode::steal_children().
int PandaNode::get_child_sort | ( | int | n, |
Thread * | current_thread = Thread::get_current_thread() |
||
) | const [inline, inherited] |
Returns the sort index of the nth child node of this node (that is, the number that was passed to add_child()).
See get_num_children().
Definition at line 97 of file pandaNode.I.
Referenced by NodePath::get_sort(), SceneGraphReducer::r_flatten(), PandaNode::stash_child(), and PandaNode::steal_children().
PandaNode::Children PandaNode::get_children | ( | Thread * | current_thread = Thread::get_current_thread() | ) | const [inline, inherited] |
Returns an object that can be used to walk through the list of children of the node.
When you intend to visit multiple children, using this is slightly faster than calling get_child() directly on the PandaNode, since this object avoids reopening the PipelineCycler each time.
This object also protects you from self-modifying loops (e.g. adding or removing children during traversal), since a virtual copy of the children is made ahead of time. The virtual copy is fast--it is a form of copy-on-write, so the list is not actually copied unless it is modified during the traversal.
Definition at line 772 of file pandaNode.I.
Referenced by RigidBodyCombiner::collect(), FindApproxLevelEntry::consider_node(), PandaNode::copy_children(), PandaNode::count_num_descendants(), AnimBundleNode::find_anim_bundle(), SceneGraphReducer::flatten(), SceneGraphReducer::flatten_siblings(), NodePath::get_children(), SceneGraphReducer::r_collect_vertex_data(), SceneGraphReducer::r_decompose(), SceneGraphReducer::r_flatten(), SceneGraphReducer::r_make_compatible_state(), SceneGraphReducer::r_make_nonindexed(), PandaNode::r_mark_geom_bounds_stale(), SceneGraphReducer::r_premunge(), PandaNode::r_prepare_scene(), SceneGraphReducer::r_register_vertices(), SceneGraphReducer::r_remove_column(), SceneGraphReducer::r_unify(), MultitexReducer::scan(), and DataGraphTraverser::traverse_below().
ClockObject * FrameRateMeter::get_clock_object | ( | ) | const [inline] |
Returns the clock that is used to determine the frame rate.
Definition at line 111 of file frameRateMeter.I.
TextEncoder::Encoding TextEncoder::get_default_encoding | ( | ) | [inline, static, inherited] |
Specifies the default encoding to be used for all subsequently created TextEncoder objects.
See set_encoding().
Definition at line 97 of file textEncoder.I.
Referenced by MouseWatcherParameter::get_candidate_string_encoded(), TextEncoder::lower(), ButtonEvent::read_datagram(), TextEncoder::upper(), and ButtonEvent::write_datagram().
TextFont * TextProperties::get_default_font | ( | ) | [inline, static, inherited] |
Specifies the default font to be used for any TextNode whose font is uninitialized or NULL.
See set_font().
Definition at line 60 of file textProperties.I.
Referenced by TextProperties::get_font().
DisplayRegion * FrameRateMeter::get_display_region | ( | ) | const [inline] |
Returns the DisplayRegion that the meter has created to render itself into the window to setup_window(), or NULL if setup_window() has not been called.
Definition at line 36 of file frameRateMeter.I.
DrawMask PandaNode::get_draw_control_mask | ( | ) | const [inline, inherited] |
Returns the set of bits in draw_show_mask that are considered meaningful.
See adjust_draw_mask().
Definition at line 559 of file pandaNode.I.
Referenced by SceneGraphReducer::consider_child(), and NodePath::get_hidden_ancestor().
int TextProperties::get_draw_order | ( | ) | const [inline, inherited] |
Returns the drawing order set with set_draw_order().
Definition at line 801 of file textProperties.I.
Referenced by TextProperties::add_properties().
DrawMask PandaNode::get_draw_show_mask | ( | ) | const [inline, inherited] |
Returns the hide/show bits of this particular node.
See adjust_draw_mask().
Definition at line 571 of file pandaNode.I.
Referenced by SceneGraphReducer::consider_child(), and NodePath::get_hidden_ancestor().
const RenderEffect * PandaNode::get_effect | ( | TypeHandle | type | ) | const [inline, inherited] |
Returns the render effect of the indicated type, if it is defined on the node, or NULL if it is not.
Definition at line 303 of file pandaNode.I.
Referenced by NodePath::clear_light(), CharacterJoint::clear_local_transforms(), CharacterJoint::clear_net_transforms(), NodePath::clear_tex_projector(), NodePath::get_effect(), NodePath::get_tex_projector_from(), NodePath::get_tex_projector_to(), NodePath::has_light(), NodePath::has_tex_projector(), CharacterJoint::remove_local_transform(), CharacterJoint::remove_net_transform(), NodePath::set_light(), and NodePath::set_tex_projector().
const RenderEffects * PandaNode::get_effects | ( | Thread * | current_thread = Thread::get_current_thread() | ) | const [inline, inherited] |
Returns the complete RenderEffects that will be applied to this node.
Definition at line 361 of file pandaNode.I.
Referenced by SceneGraphReducer::consider_child(), NodePath::get_effects(), SceneGraphReducer::r_apply_attribs(), and SceneGraphReducer::r_flatten().
string TextEncoder::get_encoded_char | ( | int | index | ) | const [inline, inherited] |
Returns the nth char of the stored text, as a one-, two-, or three-byte encoded string.
Definition at line 261 of file textEncoder.I.
References TextEncoder::get_encoding().
string TextEncoder::get_encoded_char | ( | int | index, |
TextEncoder::Encoding | encoding | ||
) | const [inline, inherited] |
Returns the nth char of the stored text, as a one-, two-, or three-byte encoded string.
Definition at line 272 of file textEncoder.I.
References TextEncoder::encode_wtext(), and TextEncoder::get_unicode_char().
TextEncoder::Encoding TextEncoder::get_encoding | ( | ) | const [inline, inherited] |
Returns the encoding by which the string set via set_text() is to be interpreted.
See set_encoding().
Definition at line 73 of file textEncoder.I.
Referenced by TextEncoder::get_encoded_char().
int PandaNode::get_fancy_bits | ( | Thread * | current_thread = Thread::get_current_thread() | ) | const [inline, inherited] |
Returns the union of all of the enum FancyBits values corresponding to the various "fancy" attributes that are set on the node.
If this returns 0, the node has nothing interesting about it. This is intended to speed traversal by quickly skipping past nodes that don't particularly affect the render state.
Definition at line 694 of file pandaNode.I.
int PandaNode::get_first_visible_child | ( | ) | const [virtual, inherited] |
Returns the index number of the first visible child of this node, or a number >= get_num_children() if there are no visible children of this node.
This is called during the cull traversal, but only if has_selective_visibility() has already returned true. See has_selective_visibility().
Reimplemented in SelectiveChildNode, SequenceNode, and SwitchNode.
Definition at line 519 of file pandaNode.cxx.
Referenced by CullTraverser::traverse_below().
int TextNode::get_flatten_flags | ( | ) | const [inline, inherited] |
TextFont * TextProperties::get_font | ( | ) | const [inline, inherited] |
Returns the font currently in use, if any.
If no font is in use, this returns the default font.
Definition at line 108 of file textProperties.I.
References TextProperties::get_default_font().
Referenced by TextProperties::add_properties(), TextNode::calc_width(), TextAssembler::calc_width(), TextNode::get_line_height(), TextNode::has_character(), TextNode::has_exact_character(), TextAssembler::has_exact_character(), TextNode::is_whitespace(), and TextAssembler::is_whitespace().
LVecBase4f TextNode::get_frame_actual | ( | ) | const [inline, inherited] |
Returns the actual dimensions of the frame around the text.
If the frame was set via set_frame_as_margin(), the result returned by this function reflects the size of the current text; if the frame was set via set_frame_actual(), this returns the values actually set.
If the text has no frame at all, this returns the dimensions of the text itself, as if the frame were set with a margin of 0, 0, 0, 0.
Definition at line 377 of file textNode.I.
References TextNode::get_frame_as_set(), and TextNode::is_frame_as_margin().
Referenced by PandaFramework::event_question().
LVecBase4f TextNode::get_frame_as_set | ( | ) | const [inline, inherited] |
Returns the dimensions of the frame as set by set_frame_as_margin() or set_frame_actual().
Use is_frame_actual() to determine how to interpret the values returned by this function. It is an error to call this if has_frame() is false.
Definition at line 357 of file textNode.I.
Referenced by TextNode::get_frame_actual().
float TextNode::get_frame_line_width | ( | ) | const [inline, inherited] |
Returns the thickness of the lines that will be used to draw the frame.
Definition at line 412 of file textNode.I.
float TextProperties::get_glyph_scale | ( | ) | const [inline, inherited] |
Returns the scale factor of each letter as specified by set_glyph_scale().
Definition at line 900 of file textProperties.I.
Referenced by TextProperties::add_properties(), and TextAssembler::calc_width().
float TextProperties::get_glyph_shift | ( | ) | const [inline, inherited] |
Returns the vertical shift of each letter as specified by set_glyph_shift().
Definition at line 946 of file textProperties.I.
Referenced by TextProperties::add_properties().
float TextNode::get_height | ( | ) | const [inline, inherited] |
Returns the net height of the text in local 2-d coordinates.
Definition at line 1356 of file textNode.I.
PandaNode * TextNode::get_internal_geom | ( | ) | const [inherited] |
Returns the actual node that is used internally to render the text, if the TextNode is parented within the scene graph.
In general, you should not call this method. Call generate() instead if you want to get a handle to geometry that represents the text. This method is provided as a debugging aid only.
Definition at line 515 of file textNode.cxx.
int PandaNode::get_internal_vertices | ( | Thread * | current_thread = Thread::get_current_thread() | ) | const [inline, inherited] |
Returns the total number of vertices that will be rendered by this particular node alone, not accounting for its children.
This may not include all vertices for certain dynamic effects.
Definition at line 626 of file pandaNode.I.
References Thread::get_pipeline_stage().
int PandaNode::get_internal_vertices | ( | int | pipeline_stage, |
Thread * | current_thread | ||
) | const [protected, inherited] |
Returns the total number of vertices that will be rendered by this particular node alone, not accounting for its children.
This may not include all vertices for certain dynamic effects.
Definition at line 2753 of file pandaNode.cxx.
References PandaNode::compute_internal_bounds().
CollideMask PandaNode::get_into_collide_mask | ( | ) | const [inline, inherited] |
Returns the "into" collide mask for this node.
Reimplemented in CollisionNode.
Definition at line 582 of file pandaNode.I.
float TextNode::get_left | ( | ) | const [inline, inherited] |
Returns the leftmost extent of the text in local 2-d coordinates, unmodified by the set_transform() matrix.
Definition at line 1305 of file textNode.I.
CollideMask PandaNode::get_legal_collide_mask | ( | ) | const [virtual, inherited] |
Returns the subset of CollideMask bits that may be set for this particular type of PandaNode.
For most nodes, this is 0; it doesn't make sense to set a CollideMask for most kinds of nodes.
For nodes that can be collided with, such as GeomNode and CollisionNode, this returns all bits on.
Reimplemented in CollisionNode, and GeomNode.
Definition at line 2209 of file pandaNode.cxx.
References BitMask< WType, nbits >::all_off().
Referenced by PandaNode::set_into_collide_mask().
float TextNode::get_line_height | ( | ) | const [inline, inherited] |
Returns the number of units high each line of text is.
This is based on the font. Note that it is possible for the text to include nested font change commands, in which case the value of this method is questionable.
Definition at line 26 of file textNode.I.
References TextProperties::get_font(), and TextFont::get_line_height().
Referenced by PGEntry::setup(), and PGEntry::setup_minimal().
LPoint3f TextNode::get_lower_right_3d | ( | ) | const [inline, inherited] |
Returns the lower-right extent of the text object, after it has been transformed into 3-d space by applying the set_transform() matrix.
Definition at line 1394 of file textNode.I.
int TextNode::get_max_rows | ( | ) | const [inline, inherited] |
Returns the limit on the height of the TextNode specified by set_max_rows().
Definition at line 79 of file textNode.I.
int PandaNode::get_nested_vertices | ( | Thread * | current_thread = Thread::get_current_thread() | ) | const [inherited] |
Returns the total number of vertices that will be rendered by this node and all of its descendents.
This is not necessarily an accurate count of vertices that will actually be rendered, since this will include all vertices of all LOD's, and it will also include hidden nodes. It may also omit or only approximate certain kinds of dynamic geometry. However, it will not include stashed nodes.
Definition at line 2547 of file pandaNode.cxx.
References Thread::get_pipeline_stage().
Referenced by PGItem::compute_internal_bounds().
CollideMask PandaNode::get_net_collide_mask | ( | Thread * | current_thread = Thread::get_current_thread() | ) | const [inherited] |
Returns the union of all into_collide_mask() values set at CollisionNodes at this level and below.
Definition at line 2220 of file pandaNode.cxx.
References Thread::get_pipeline_stage().
Referenced by NodePath::get_collide_mask().
DrawMask PandaNode::get_net_draw_control_mask | ( | ) | const [inherited] |
Returns the set of bits in get_net_draw_show_mask() that have been explicitly set via adjust_draw_mask(), rather than implicitly inherited.
A 1 bit in any position of this mask indicates that (a) this node has renderable children, and (b) some child of this node has made an explicit hide() or show_through() call for the corresponding bit.
Definition at line 2114 of file pandaNode.cxx.
References Thread::get_current_thread(), and Thread::get_pipeline_stage().
DrawMask PandaNode::get_net_draw_show_mask | ( | ) | const [inherited] |
Returns the union of all draw_show_mask values--of renderable nodes only--at this level and below.
If any bit in this mask is 0, there is no reason to traverse below this node for a camera with the corresponding camera_mask.
The bits in this mask that do not correspond to a 1 bit in the net_draw_control_mask are meaningless (and will be set to 1). For bits that *do* correspond to a 1 bit in the net_draw_control_mask, a 1 bit indicates that at least one child should be visible, while a 0 bit indicates that all children are hidden.
Definition at line 2145 of file pandaNode.cxx.
References Thread::get_current_thread(), and Thread::get_pipeline_stage().
int PandaNode::get_next_visible_child | ( | int | n | ) | const [virtual, inherited] |
Returns the index number of the next visible child of this node following the indicated child, or a number >= get_num_children() if there are no more visible children of this node.
See has_selective_visibility() and get_first_visible_child().
Reimplemented in SelectiveChildNode.
Definition at line 534 of file pandaNode.cxx.
Referenced by CullTraverser::traverse_below().
int TextEncoder::get_num_chars | ( | ) | const [inline, inherited] |
Returns the number of characters in the stored text.
This is a count of wide characters, after the string has been decoded according to set_encoding().
Definition at line 219 of file textEncoder.I.
References TextEncoder::get_wtext().
int PandaNode::get_num_children | ( | Thread * | current_thread = Thread::get_current_thread() | ) | const [inline, inherited] |
Returns the number of child nodes this node has.
The order of the child nodes *is* meaningful and is based on the sort number that was passed to add_child(), and also on the order in which the nodes were added.
Definition at line 68 of file pandaNode.I.
Referenced by LODNode::cull_callback(), FadeLODNode::cull_callback(), PandaFramework::event_arrow_right(), SceneGraphReducer::flatten(), SelectiveChildNode::get_next_visible_child(), SequenceNode::get_num_frames(), CharacterMaker::part_to_node(), ParametricCurveCollection::r_add_curves(), SceneGraphReducer::r_apply_attribs(), SceneGraphReducer::r_flatten(), LODNode::show_switches_cull_callback(), PandaNode::stash_child(), and PandaNode::steal_children().
int PandaNode::get_num_parents | ( | Thread * | current_thread = Thread::get_current_thread() | ) | const [inline, inherited] |
Returns the number of parent nodes this node has.
If this number is greater than 1, the node has been multiply instanced. The order of the parent nodes is not meaningful and is not related to the order in which the node was instanced to them.
Definition at line 26 of file pandaNode.I.
Referenced by Fog::adjust_to_camera(), SceneGraphReducer::r_apply_attribs(), DataGraphTraverser::traverse(), DataGraphTraverser::traverse_below(), and DataNode::write_connections().
int TextNode::get_num_rows | ( | ) | const [inline, inherited] |
Returns the number of rows of text that were generated.
This counts word-wrapped rows as well as rows generated due to embedded newlines.
Definition at line 1407 of file textNode.I.
int PandaNode::get_num_stashed | ( | Thread * | current_thread = Thread::get_current_thread() | ) | const [inline, inherited] |
Returns the number of stashed nodes this node has.
These are former children of the node that have been moved to the special stashed list via stash_child().
Definition at line 176 of file pandaNode.I.
Referenced by FindApproxLevelEntry::consider_node(), NodePath::get_stashed_children(), PandaNode::steal_children(), and PandaNode::unstash_child().
DrawMask PandaNode::get_overall_bit | ( | ) | [inline, static, inherited] |
Returns the special bit that, when specifically cleared in the node's DrawMask, indicates that the node is hidden to all cameras, regardless of the remaining DrawMask bits.
Definition at line 502 of file pandaNode.I.
Referenced by NodePath::hide(), CullTraverserData::is_this_node_hidden(), Camera::set_camera_mask(), NodePath::show(), and NodePath::show_through().
PandaNode * PandaNode::get_parent | ( | int | n, |
Thread * | current_thread = Thread::get_current_thread() |
||
) | const [inline, inherited] |
Returns the nth parent node of this node.
See get_num_parents(). Also see get_parents(), if your intention is to iterate through the complete list of parents; get_parents() is preferable in this case.
Definition at line 40 of file pandaNode.I.
Referenced by DataNode::write_connections().
PandaNode::Parents PandaNode::get_parents | ( | Thread * | current_thread = Thread::get_current_thread() | ) | const [inline, inherited] |
Returns an object that can be used to walk through the list of parents of the node, similar to get_children() and get_stashed().
Definition at line 808 of file pandaNode.I.
Referenced by PandaNode::is_under_scene_root(), and PandaNode::replace_node().
bool TextProperties::get_preserve_trailing_whitespace | ( | ) | const [inline, inherited] |
Returns the preserve_trailing_whitespace flag.
See set_preserve_trailing_whitespace().
Definition at line 530 of file textProperties.I.
const TransformState * PandaNode::get_prev_transform | ( | Thread * | current_thread = Thread::get_current_thread() | ) | const [inline, inherited] |
Returns the transform that has been set as this node's "previous" position.
See set_prev_transform().
Definition at line 409 of file pandaNode.I.
Referenced by NodePath::get_prev_transform().
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().
float TextNode::get_right | ( | ) | const [inline, inherited] |
Returns the rightmost extent of the text in local 2-d coordinates, unmodified by the set_transform() matrix.
Definition at line 1318 of file textNode.I.
LVector2f TextProperties::get_shadow | ( | ) | const [inline, inherited] |
Returns the offset of the shadow as set by set_shadow().
It is an error to call this if has_shadow() is false.
Definition at line 694 of file textProperties.I.
Referenced by TextProperties::add_properties().
float TextProperties::get_slant | ( | ) | const [inline, inherited] |
Returns the factor by which the text is specified to slant to the right.
Definition at line 257 of file textProperties.I.
Referenced by TextProperties::add_properties().
bool TextProperties::get_small_caps | ( | ) | const [inline, inherited] |
Returns the small_caps flag.
See set_small_caps().
Definition at line 166 of file textProperties.I.
Referenced by TextProperties::add_properties().
float TextProperties::get_small_caps_scale | ( | ) | const [inline, inherited] |
Returns the scale factor applied to lowercase letters from their uppercase equivalents, when the small_caps flag is in effect.
See set_small_caps() and set_small_caps_scale().
Definition at line 213 of file textProperties.I.
Referenced by TextProperties::add_properties().
PandaNode * PandaNode::get_stashed | ( | int | n, |
Thread * | current_thread = Thread::get_current_thread() |
||
) | const [inline, inherited] |
Returns the nth stashed child of this node.
See get_num_stashed(). Also see get_stashed(), if your intention is to iterate through the complete list of stashed children; get_stashed() is preferable in this case.
Definition at line 191 of file pandaNode.I.
Referenced by FindApproxLevelEntry::consider_node(), PandaNode::copy_children(), PandaNodePipelineReader::find_stashed(), NodePath::get_stashed_children(), PandaNode::r_mark_geom_bounds_stale(), SceneGraphReducer::r_premunge(), PandaNode::r_prepare_scene(), PandaNode::steal_children(), and PandaNode::unstash_child().
PandaNode::Stashed PandaNode::get_stashed | ( | Thread * | current_thread = Thread::get_current_thread() | ) | const [inline, inherited] |
Returns an object that can be used to walk through the list of children of the node.
When you intend to visit multiple children, using this is slightly faster than calling get_stashed() directly on the PandaNode, since this object avoids reopening the PipelineCycler each time.
This object also protects you from self-modifying loops (e.g. adding or removing children during traversal), since a virtual copy of the children is made ahead of time. The virtual copy is fast--it is a form of copy-on-write, so the list is not actually copied unless it is modified during the traversal.
Definition at line 795 of file pandaNode.I.
int PandaNode::get_stashed_sort | ( | int | n, |
Thread * | current_thread = Thread::get_current_thread() |
||
) | const [inline, inherited] |
Returns the sort index of the nth stashed node of this node (that is, the number that was passed to add_child()).
See get_num_stashed().
Definition at line 206 of file pandaNode.I.
Referenced by NodePath::get_sort(), PandaNode::steal_children(), and PandaNode::unstash_child().
const RenderState * PandaNode::get_state | ( | Thread * | current_thread = Thread::get_current_thread() | ) | const [inline, inherited] |
Returns the complete RenderState that will be applied to all nodes at this level and below, as set on this node.
This returns only the RenderState set on this particular node, and has nothing to do with state that might be inherited from above.
Definition at line 336 of file pandaNode.I.
Referenced by AccumulatedAttribs::apply_to_node(), NodePath::clear_clip_plane(), NodePath::clear_light(), NodePath::clear_texture(), AccumulatedAttribs::collect(), SceneGraphReducer::consider_child(), NodePath::get_state(), SceneGraphReducer::r_apply_attribs(), SceneGraphReducer::r_premunge(), TextNode::r_prepare_scene(), PGItem::r_prepare_scene(), PandaNode::r_prepare_scene(), MultitexReducer::scan(), NodePath::set_texture(), and NodePath::set_texture_off().
float TextProperties::get_tab_width | ( | ) | const [inline, inherited] |
Returns the width set via set_tab_width().
Definition at line 845 of file textProperties.I.
Referenced by TextProperties::add_properties().
string PandaNode::get_tag | ( | const string & | key, |
Thread * | current_thread = Thread::get_current_thread() |
||
) | const [inline, inherited] |
Retrieves the user-defined value that was previously set on this node for the particular key, if any.
If no value has been previously set, returns the empty string.
Definition at line 437 of file pandaNode.I.
Referenced by NodePath::get_tag().
string TextEncoder::get_text | ( | TextEncoder::Encoding | encoding | ) | const [inline, inherited] |
Returns the current text, as encoded via the indicated encoding system.
Definition at line 182 of file textEncoder.I.
References TextEncoder::encode_wtext(), and TextEncoder::get_wtext().
string TextEncoder::get_text | ( | ) | const [inline, inherited] |
Returns the current text, as encoded via the current encoding system.
Definition at line 167 of file textEncoder.I.
References TextEncoder::encode_wtext().
Referenced by TextEncoder::append_text(), TextEncoder::lower(), TextEncoder::set_encoding(), and TextEncoder::upper().
string TextEncoder::get_text_as_ascii | ( | ) | const [inline, inherited] |
Returns the text associated with the node, converted as nearly as possible to a fully-ASCII representation.
This means replacing accented letters with their unaccented ASCII equivalents.
It is possible that some characters in the string cannot be converted to ASCII. (The string may involve symbols like the copyright symbol, for instance, or it might involve letters in some other alphabet such as Greek or Cyrillic, or even Latin letters like thorn or eth that are not part of the ASCII character set.) In this case, as much of the string as possible will be converted to ASCII, and the nonconvertible characters will remain encoded in the encoding specified by set_encoding().
Definition at line 297 of file textEncoder.I.
References TextEncoder::encode_wtext(), and TextEncoder::get_wtext_as_ascii().
const string & FrameRateMeter::get_text_pattern | ( | ) | const [inline] |
Returns the sprintf() pattern that is used to format the text.
Definition at line 87 of file frameRateMeter.I.
float TextProperties::get_text_scale | ( | ) | const [inline, inherited] |
Returns the scale factor of the text as specified by set_text_scale().
Definition at line 995 of file textProperties.I.
Referenced by TextProperties::add_properties(), and TextAssembler::calc_width().
float TextNode::get_top | ( | ) | const [inline, inherited] |
Returns the topmost extent of the text in local 2-d coordinates, unmodified by the set_transform() matrix.
Definition at line 1344 of file textNode.I.
const TransformState * PandaNode::get_transform | ( | Thread * | current_thread = Thread::get_current_thread() | ) | const [inline, inherited] |
Returns the transform that has been set on this particular node.
This is not the net transform from the root, but simply the transform on this particular node.
Definition at line 385 of file pandaNode.I.
Referenced by CharacterJointEffect::adjust_transform(), AccumulatedAttribs::apply_to_node(), AccumulatedAttribs::collect(), SceneGraphReducer::consider_child(), GraphicsStateGuardian::fetch_specified_part(), NodePath::get_mat(), NodePath::get_transform(), NodePath::has_mat(), SceneGraphReducer::r_apply_attribs(), SceneGraphReducer::r_collect_vertex_data(), SceneGraphReducer::r_flatten(), MultitexReducer::scan(), AnimChannelScalarDynamic::set_value_node(), AnimChannelMatrixDynamic::set_value_node(), and ModelNode::transform_changed().
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().
bool TextProperties::get_underscore | ( | ) | const [inline, inherited] |
Returns the underscore flag.
See set_underscore().
Definition at line 302 of file textProperties.I.
Referenced by TextProperties::add_properties().
float TextProperties::get_underscore_height | ( | ) | const [inline, inherited] |
Returns the vertical height of the underscore; see set_underscore_height().
Definition at line 348 of file textProperties.I.
Referenced by TextProperties::add_properties().
unsigned int PandaNode::get_unexpected_change | ( | unsigned int | flags | ) | const [inherited] |
Returns nonzero if any of the bits in the input parameter are set on this node, or zero if none of them are set.
More specifically, this returns the particular set of bits (masked by the input parameter) that have been set on this node. See set_unexpected_change().
Since this is a developer debugging tool only, this function always returns zero in a production (NDEBUG) build.
Definition at line 2004 of file pandaNode.cxx.
int TextEncoder::get_unicode_char | ( | int | index | ) | const [inline, inherited] |
Returns the Unicode value of the nth character in the stored text.
This may be a wide character (greater than 255), after the string has been decoded according to set_encoding().
Definition at line 232 of file textEncoder.I.
References TextEncoder::get_wtext().
Referenced by TextEncoder::get_encoded_char().
int TextNode::get_unsafe_to_apply_attribs | ( | ) | const [virtual, inherited] |
Returns the union of all attributes from SceneGraphReducer::AttribTypes that may not safely be applied to the vertices of this node.
If this is nonzero, these attributes must be dropped at this node as a state change.
This is a generalization of safe_to_transform().
Reimplemented from PandaNode.
Definition at line 536 of file textNode.cxx.
double FrameRateMeter::get_update_interval | ( | ) | const [inline] |
Returns the number of seconds that will elapse between updates to the frame rate indication.
Definition at line 61 of file frameRateMeter.I.
LPoint3f TextNode::get_upper_left_3d | ( | ) | const [inline, inherited] |
Returns the upper-left extent of the text object, after it has been transformed into 3-d space by applying the set_transform() matrix.
Definition at line 1381 of file textNode.I.
Geom::UsageHint TextNode::get_usage_hint | ( | ) | const [inline, inherited] |
Returns the UsageHint that will be applied to generated geometry.
See set_usage_hint().
Definition at line 679 of file textNode.I.
int PandaNode::get_visible_child | ( | ) | const [virtual, inherited] |
Returns the index number of the currently visible child of this node.
This is only meaningful if has_single_child_visibility() has returned true.
Reimplemented in SequenceNode, and SwitchNode.
Definition at line 567 of file pandaNode.cxx.
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().
float TextNode::get_width | ( | ) | const [inline, inherited] |
Returns the net width of the text in local 2-d coordinates.
Definition at line 1368 of file textNode.I.
GraphicsOutput * FrameRateMeter::get_window | ( | ) | const [inline] |
Returns the GraphicsOutput that was passed to setup_window(), or NULL if setup_window() has not been called.
Definition at line 24 of file frameRateMeter.I.
string TextNode::get_wordwrapped_text | ( | ) | const [inline, inherited] |
Returns a string that represents the contents of the text, as it has been formatted by wordwrap rules.
In earlier versions, this did not contain any embedded special characters like \1 or \3; now it does.
Definition at line 1239 of file textNode.I.
References TextEncoder::encode_wtext(), and TextNode::get_wordwrapped_wtext().
wstring TextNode::get_wordwrapped_wtext | ( | ) | const [inline, inherited] |
Returns a wstring that represents the contents of the text, as it has been formatted by wordwrap rules.
In earlier versions, this did not contain any embedded special characters like \1 or \3; now it does.
Definition at line 1292 of file textNode.I.
Referenced by TextNode::get_wordwrapped_text().
const wstring & TextEncoder::get_wtext | ( | ) | const [inline, inherited] |
Returns the text associated with the TextEncoder, as a wide-character string.
Definition at line 527 of file textEncoder.I.
References TextEncoder::decode_text().
Referenced by TextEncoder::append_unicode_char(), TextEncoder::append_wtext(), PNMTextMaker::calc_width(), PNMTextMaker::generate_into(), TextEncoder::get_num_chars(), TextEncoder::get_text(), TextEncoder::get_unicode_char(), TextEncoder::get_wtext_as_ascii(), TextEncoder::is_wtext(), TextEncoder::make_lower(), TextEncoder::make_upper(), TextEncoder::set_encoding(), and TextEncoder::set_unicode_char().
wstring TextEncoder::get_wtext_as_ascii | ( | ) | const [inherited] |
Returns the text associated with the node, converted as nearly as possible to a fully-ASCII representation.
This means replacing accented letters with their unaccented ASCII equivalents.
It is possible that some characters in the string cannot be converted to ASCII. (The string may involve symbols like the copyright symbol, for instance, or it might involve letters in some other alphabet such as Greek or Cyrillic, or even Latin letters like thorn or eth that are not part of the ASCII character set.) In this case, as much of the string as possible will be converted to ASCII, and the nonconvertible characters will remain in their original form.
Definition at line 80 of file textEncoder.cxx.
References TextEncoder::get_wtext(), and UnicodeLatinMap::look_up().
Referenced by TextEncoder::get_text_as_ascii().
bool PandaNode::has_attrib | ( | int | slot | ) | const [inline, inherited] |
Returns true if there is a render attribute of the indicated type defined on this node, or false if there is not.
Definition at line 276 of file pandaNode.I.
bool PandaNode::has_attrib | ( | TypeHandle | type | ) | const [inline, inherited] |
Returns true if there is a render attribute of the indicated type defined on this node, or false if there is not.
Definition at line 263 of file pandaNode.I.
Referenced by NodePath::has_antialias(), NodePath::has_attrib(), NodePath::has_audio_volume(), NodePath::has_bin(), NodePath::has_color(), NodePath::has_color_scale(), NodePath::has_depth_offset(), NodePath::has_depth_test(), NodePath::has_depth_write(), NodePath::has_render_mode(), NodePath::has_transparency(), and NodePath::has_two_sided().
bool TextProperties::has_bin | ( | ) | const [inline, inherited] |
Returns true if an explicit drawing bin has been set via set_bin(), false otherwise.
Definition at line 737 of file textProperties.I.
Referenced by TextProperties::add_properties().
bool TextNode::has_character | ( | wchar_t | character | ) | const [inherited] |
Returns true if the named character exists in the font or can be synthesized by Panda, false otherwise.
(Panda can synthesize some accented characters by combining similar-looking glyphs from the font.)
This returns true for whitespace and Unicode whitespace characters (if they exist in the font), but returns false for characters that would render with the "invalid glyph".
Definition at line 242 of file textNode.cxx.
References TextProperties::get_font().
bool PandaNode::has_dirty_prev_transform | ( | ) | const [inline, inherited] |
Returns true if this node has the _dirty_prev_transform flag set, which indicates its _prev_transform is different from its _transform value (in pipeline stage 0).
In this case, the node will be visited by reset_prev_transform().
Definition at line 424 of file pandaNode.I.
bool PandaNode::has_effect | ( | TypeHandle | type | ) | const [inline, inherited] |
Returns true if there is a render effect of the indicated type defined on this node, or false if there is not.
Definition at line 320 of file pandaNode.I.
Referenced by NodePath::has_billboard(), NodePath::has_compass(), and NodePath::has_effect().
bool TextNode::has_exact_character | ( | wchar_t | character | ) | const [inherited] |
Returns true if the named character exists in the font exactly as named, false otherwise.
Note that because Panda can assemble glyphs together automatically using cheesy accent marks, this is not a reliable indicator of whether a suitable glyph can be rendered for the character. For that, use has_character() instead.
This returns true for whitespace and Unicode whitespace characters (if they exist in the font), but returns false for characters that would render with the "invalid glyph". It also returns false for characters that would be synthesized within Panda, but see has_character().
Definition at line 219 of file textNode.cxx.
References TextProperties::get_font().
bool TextNode::has_max_rows | ( | ) | const [inline, inherited] |
Returns true if a limit on the height of the TextNode has been set via set_max_rows(), false otherwise.
Definition at line 68 of file textNode.I.
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 TextNode::has_overflow | ( | ) | const [inline, inherited] |
Returns true if the last text set on the text node exceeded the max_rows constraint, or false if it all fit.
Definition at line 91 of file textNode.I.
bool PandaNode::has_selective_visibility | ( | ) | const [virtual, inherited] |
Should be overridden by derived classes to return true if this kind of node has some restrictions on the set of children that should be rendered.
Node with this property include LODNodes, SwitchNodes, and SequenceNodes.
If this function returns true, get_first_visible_child() and get_next_visible_child() will be called to walk through the list of children during cull, instead of iterating through the entire list. This method is called after cull_callback(), so cull_callback() may be responsible for the decisions as to which children are visible at the moment.
Reimplemented in SelectiveChildNode.
Definition at line 504 of file pandaNode.cxx.
Referenced by CullTraverser::traverse_below().
bool PandaNode::has_single_child_visibility | ( | ) | const [virtual, inherited] |
Should be overridden by derived classes to return true if this kind of node has the special property that just one of its children is visible at any given time, and furthermore that the particular visible child can be determined without reference to any external information (such as a camera).
At present, only SequenceNodes and SwitchNodes fall into this category.
If this function returns true, get_visible_child() can be called to return the index of the currently-visible child.
Reimplemented in SequenceNode, and SwitchNode.
Definition at line 555 of file pandaNode.cxx.
bool PandaNode::has_tag | ( | const string & | key, |
Thread * | current_thread = Thread::get_current_thread() |
||
) | const [inline, inherited] |
Returns true if a value has been defined on this node for the particular key (even if that value is the empty string), or false if no value has been set.
Definition at line 455 of file pandaNode.I.
Referenced by NodePath::has_tag().
bool PandaNode::has_tags | ( | ) | const [inline, inherited] |
Returns true if the node has any tags (or any Python tags) at all, false if it has none.
Definition at line 469 of file pandaNode.I.
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().
void LinkedListNode::insert_after | ( | LinkedListNode * | node | ) | [inline, protected, inherited] |
Adds a LinkedListNode record after the indicated node in the doubly-linked list.
Definition at line 108 of file linkedListNode.I.
void LinkedListNode::insert_before | ( | LinkedListNode * | node | ) | [inline, protected, inherited] |
Adds a LinkedListNode record before the indicated node in the doubly-linked list.
Definition at line 91 of file linkedListNode.I.
Referenced by SimpleAllocator::do_alloc(), AdaptiveLru::do_partial_lru_update(), and SimpleLruPage::enqueue_lru().
bool PandaNode::is_ambient_light | ( | ) | const [virtual, inherited] |
Returns true if this is an AmbientLight, false if it is not a light, or it is some other kind of light.
Reimplemented in AmbientLight.
Definition at line 2664 of file pandaNode.cxx.
Referenced by LightAttrib::get_most_important_light().
bool TextProperties::is_any_specified | ( | ) | const [inline, inherited] |
Returns true if any properties have been specified, false otherwise.
Definition at line 33 of file textProperties.I.
bool PandaNode::is_bounds_stale | ( | ) | const [inline, inherited] |
Returns true if the bounding volume of this node is stale and will be implicitly recomputed at the next call to get_bounds(), or false if it is fresh and need not be recomputed.
Definition at line 640 of file pandaNode.I.
bool TextNode::is_card_as_margin | ( | ) | const [inline, inherited] |
If this is true, the card was set via a call to set_card_as_margin(), and the dimension of the card as returned by get_card_as_set() represent a margin all around the text.
If false, then the card was set via a call to set_card_actual(), and the dimensions of the card as returned by get_card_as_set() are relative to the text's origin.
Definition at line 543 of file textNode.I.
Referenced by TextNode::get_card_actual().
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 PandaNode::is_final | ( | Thread * | current_thread = Thread::get_current_thread() | ) | const [inline, inherited] |
Returns the current state of the "final" flag.
Initially, this flag is off (false), but it may be changed by an explicit call to set_final(). See set_final().
Definition at line 678 of file pandaNode.I.
bool TextNode::is_frame_as_margin | ( | ) | const [inline, inherited] |
If this is true, the frame was set via a call to set_frame_as_margin(), and the dimension of the frame as returned by get_frame_as_set() represent a margin all around the text.
If false, then the frame was set via a call to set_frame_actual(), and the dimensions of the frame as returned by get_frame_as_set() are relative to the text's origin.
Definition at line 342 of file textNode.I.
Referenced by TextNode::get_frame_actual().
bool PandaNode::is_geom_node | ( | ) | const [virtual, inherited] |
A simple downcast check.
Returns true if this kind of node happens to inherit from GeomNode, false otherwise.
This is provided as a a faster alternative to calling is_of_type(GeomNode::get_class_type()), since this test is so important to rendering.
Reimplemented in GeomNode.
Definition at line 2626 of file pandaNode.cxx.
Referenced by SceneGraphReducer::flatten_siblings(), PipeOcclusionCullTraverser::is_in_view(), EggLoader::make_polyset(), CharacterMaker::part_to_node(), SceneGraphReducer::r_collect_vertex_data(), SceneGraphReducer::r_decompose(), SceneGraphReducer::r_make_compatible_state(), SceneGraphReducer::r_make_nonindexed(), SceneGraphReducer::r_premunge(), SceneGraphReducer::r_register_vertices(), SceneGraphReducer::r_remove_column(), SceneGraphReducer::r_unify(), MultitexReducer::scan(), and CullTraverser::traverse_below().
bool PandaNode::is_lod_node | ( | ) | const [virtual, inherited] |
A simple downcast check.
Returns true if this kind of node happens to inherit from LODNode, false otherwise.
This is provided as a a faster alternative to calling is_of_type(LODNode::get_class_type()).
Reimplemented in LODNode.
Definition at line 2641 of file pandaNode.cxx.
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 LinkedListNode::is_on_list | ( | ) | const [inline, protected, inherited] |
Returns true if the node is member of any list, false if it has been removed or never added.
The head of a list generally appears to to always be a member of itself.
Definition at line 62 of file linkedListNode.I.
bool PandaNode::is_overall_hidden | ( | ) | const [inline, inherited] |
Returns true if the node has been hidden to all cameras by clearing its overall bit.
Definition at line 524 of file pandaNode.I.
Referenced by FindApproxLevelEntry::consider_next_step(), NodePath::get_hidden_ancestor(), and PGItem::reduce_region().
bool TextNode::is_renderable | ( | ) | const [virtual, inherited] |
Returns true if there is some value to visiting this particular node during the cull traversal for any camera, false otherwise.
This will be used to optimize the result of get_net_draw_show_mask(), so that any subtrees that contain only nodes for which is_renderable() is false need not be visited.
Reimplemented from PandaNode.
Definition at line 708 of file textNode.cxx.
bool PandaNode::is_scene_root | ( | ) | const [inherited] |
Returns true if this particular node is known to be the render root of some active DisplayRegion associated with the global GraphicsEngine, false otherwise.
Definition at line 2285 of file pandaNode.cxx.
Referenced by PandaNode::is_under_scene_root().
bool PandaNode::is_under_scene_root | ( | ) | const [inherited] |
Returns true if this particular node is in a live scene graph: that is, it is a child or descendent of a node that is itself a scene root.
If this is true, this node may potentially be traversed by the render traverser. Stashed nodes don't count for this purpose, but hidden nodes do.
Definition at line 2306 of file pandaNode.cxx.
References PandaNode::find_stashed(), PandaNode::Parents::get_num_parents(), PandaNode::Parents::get_parent(), PandaNode::get_parents(), PandaNode::is_scene_root(), and PandaNode::is_under_scene_root().
Referenced by SceneGraphReducer::check_live_flatten(), and PandaNode::is_under_scene_root().
bool TextNode::is_whitespace | ( | wchar_t | character | ) | const [inherited] |
Returns true if the indicated character represents whitespace in the font, or false if anything visible will be rendered for it.
This returns true for whitespace and Unicode whitespace characters (if they exist in the font), and returns false for any other characters, including characters that do not exist in the font (these would be rendered with the "invalid glyph", which is visible).
Note that this function can be reliably used to identify Unicode whitespace characters only if the font has all of the whitespace characters defined. It will return false for any character not in the font, even if it is an official Unicode whitespace character.
Definition at line 273 of file textNode.cxx.
References TextProperties::get_font().
bool TextEncoder::is_wtext | ( | ) | const [inherited] |
Returns true if any of the characters in the string returned by get_wtext() are out of the range of an ASCII character (and, therefore, get_wtext() should be called in preference to get_text()).
Definition at line 112 of file textEncoder.cxx.
References TextEncoder::get_wtext().
void PandaNode::list_tags | ( | ostream & | out, |
const string & | separator = "\n" |
||
) | const [inherited] |
Writes a list of all the tag keys assigned to the node to the indicated stream.
Writes one instance of the separator following each key (but does not write a terminal separator). The value associated with each key is not written.
This is mainly for the benefit of the realtime user, to see the list of all of the associated tag keys.
Definition at line 1680 of file pandaNode.cxx.
Referenced by NodePath::list_tags().
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().
string TextEncoder::lower | ( | const string & | source, |
TextEncoder::Encoding | encoding | ||
) | [inline, static, inherited] |
Converts the string to lowercase, assuming the string is encoded in the indicated encoding.
Definition at line 496 of file textEncoder.I.
References TextEncoder::get_text(), TextEncoder::make_lower(), TextEncoder::set_encoding(), and TextEncoder::set_text().
string TextEncoder::lower | ( | const string & | source | ) | [inline, static, inherited] |
Converts the string to lowercase, assuming the string is encoded in the default encoding.
Definition at line 485 of file textEncoder.I.
References TextEncoder::get_default_encoding().
void PandaNode::ls | ( | ostream & | out, |
int | indent_level | ||
) | const [inline, inherited] |
Lists all the nodes at and below the current path hierarchically.
Definition at line 489 of file pandaNode.I.
Referenced by NodePath::ls(), and PGEntry::setup_minimal().
PandaNode * TextNode::make_copy | ( | ) | const [protected, virtual, inherited] |
TypedWritable * PandaNode::make_from_bam | ( | const FactoryParams & | params | ) | [static, protected, inherited] |
This function is called by the BamReader's factory when a new object of type PandaNode is encountered in the Bam file.
It should create the PandaNode and extract its information from the file.
Reimplemented in AnimBundleNode, Character, CollisionNode, RopeNode, SheetNode, Camera, Fog, GeomNode, LensNode, ModelNode, ModelRoot, PlaneNode, PolylightNode, PortalNode, UvScrollNode, AmbientLight, CallbackNode, DirectionalLight, FadeLODNode, LODNode, PointLight, SequenceNode, Spotlight, SwitchNode, and MouseRecorder.
Definition at line 4310 of file pandaNode.cxx.
References PandaNode::fillin().
Referenced by PandaNode::register_with_read_factory(), and RopeNode::register_with_read_factory().
void TextEncoder::make_lower | ( | ) | [inherited] |
Adjusts the text stored within the encoder to all lowercase letters (preserving accent marks correctly).
Definition at line 51 of file textEncoder.cxx.
References TextEncoder::get_wtext(), and TextEncoder::unicode_tolower().
Referenced by TextEncoder::lower().
void TextEncoder::make_upper | ( | ) | [inherited] |
Adjusts the text stored within the encoder to all uppercase letters (preserving accent marks correctly).
Definition at line 34 of file textEncoder.cxx.
References TextEncoder::get_wtext(), and TextEncoder::unicode_toupper().
Referenced by TextEncoder::upper().
void TypedWritable::mark_bam_modified | ( | ) | [inline, inherited] |
Increments the bam_modified counter, so that this object will be invalidated and retransmitted on any open bam streams.
This should normally not need to be called by user code; it should be called internally when the object has been changed in a way that legitimately requires its retransmission to any connected clients.
Definition at line 54 of file typedWritable.I.
Referenced by PandaNode::add_child(), PandaNode::add_stashed(), PandaNode::adjust_draw_mask(), PandaNode::apply_attribs_to_vertices(), PandaNode::clear_attrib(), PandaNode::clear_effect(), PandaNode::clear_tag(), PandaNode::copy_all_properties(), PandaNode::copy_tags(), PandaNode::disable_cull_callback(), PandaNode::force_bounds_stale(), PandaNode::remove_all_children(), PandaNode::remove_child(), PandaNode::remove_stashed(), PandaNode::reset_all_prev_transform(), PandaNode::reset_prev_transform(), PandaNode::set_attrib(), PandaNode::set_bounds(), PandaNode::set_bounds_type(), PandaNode::set_cull_callback(), PandaNode::set_effect(), PandaNode::set_effects(), PandaNode::set_final(), PandaNode::set_internal_bounds(), PandaNode::set_into_collide_mask(), PandaNode::set_prev_transform(), PandaNode::set_state(), PandaNode::set_tag(), PandaNode::set_transform(), PandaNode::stash_child(), and PandaNode::unstash_child().
void PandaNode::mark_bounds_stale | ( | Thread * | current_thread = Thread::get_current_thread() | ) | const [inherited] |
Indicates that the bounding volume, or something that influences the bounding volume (or any of the other things stored in CData, like net_collide_mask), may have changed for this node, and that it must be recomputed.
With no parameters, this means to iterate through all stages including and upstream of the current pipeline stage.
This method is intended for internal use; usually it is not necessary for a user to call this directly. It will be called automatically by derived classes when appropriate.
Definition at line 2583 of file pandaNode.cxx.
Referenced by PandaNode::adjust_draw_mask(), PandaNode::clear_attrib(), PandaNode::copy_all_properties(), PandaNode::force_bounds_stale(), PandaNode::mark_internal_bounds_stale(), PandaNode::set_attrib(), PandaNode::set_bounds(), PandaNode::set_bounds_type(), PandaNode::set_internal_bounds(), PandaNode::set_into_collide_mask(), PortalNode::set_into_portal_mask(), PandaNode::set_state(), and PandaNode::set_transform().
void PandaNode::mark_bounds_stale | ( | int | pipeline_stage, |
Thread * | current_thread | ||
) | const [inline, protected, inherited] |
Indicates that the bounding volume, or something that influences the bounding volume (or any of the other things stored in CData, like net_collide_mask), may have changed for this node, and that it must be recomputed.
Definition at line 723 of file pandaNode.I.
void PandaNode::mark_internal_bounds_stale | ( | int | pipeline_stage, |
Thread * | current_thread | ||
) | [inline, protected, inherited] |
Should be called by a derived class to mark the internal bounding volume stale, so that recompute_internal_bounds() will be called when the bounding volume is next requested.
Definition at line 746 of file pandaNode.I.
References PandaNode::mark_bounds_stale().
void PandaNode::mark_internal_bounds_stale | ( | Thread * | current_thread = Thread::get_current_thread() | ) | [inherited] |
Should be called by a derived class to mark the internal bounding volume stale, so that compute_internal_bounds() will be called when the bounding volume is next requested.
With no parameters, this means to iterate through all stages including and upstream of the current pipeline stage.
It is normally not necessary to call this method directly; each node should be responsible for calling it when its internals have changed.
Definition at line 2607 of file pandaNode.cxx.
Referenced by GeomNode::add_geom(), GeomNode::add_geoms_from(), CollisionNode::add_solid(), LODNode::add_switch(), CollisionNode::clear_solids(), PGItem::clear_state_def(), LODNode::clear_switches(), CollisionNode::combine_with(), LODNode::hide_all_switches(), LODNode::hide_switch(), PGItem::instance_to_state_def(), GeomNode::r_mark_geom_bounds_stale(), GeomNode::remove_all_geoms(), GeomNode::remove_geom(), CollisionNode::remove_solid(), SheetNode::reset_bound(), RopeNode::reset_bound(), PandaNode::set_bounds_type(), LODNode::set_center(), PGItem::set_frame_style(), GeomNode::set_geom(), CollisionNode::set_solid(), LODNode::set_switch(), LODNode::show_all_switches(), LODNode::show_switch(), GeomTransformer::transform_vertices(), GeomNode::unify(), PGItem::xform(), and CollisionNode::xform().
void TextNode::output | ( | ostream & | out | ) | const [virtual, inherited] |
Outputs the Namable.
This function simply writes the name to the output stream; most Namable derivatives will probably redefine this.
Reimplemented from PandaNode.
Definition at line 308 of file textNode.cxx.
void PandaNode::parents_changed | ( | ) | [protected, virtual, inherited] |
Called after a scene graph update that either adds or remove parents from this node, this just provides a hook for derived PandaNode objects that need to update themselves based on the set of parents the node has.
Reimplemented in DataNode.
Definition at line 2914 of file pandaNode.cxx.
Referenced by PandaNode::add_child(), PandaNode::add_stashed(), PandaNode::remove_child(), and PandaNode::replace_child().
void PandaNode::prepare_scene | ( | GraphicsStateGuardianBase * | gsg, |
const RenderState * | net_state | ||
) | [inherited] |
Walks through the scene graph beginning at this node, and does whatever initialization is required to render the scene properly with the indicated GSG.
It is not strictly necessary to call this, since the GSG will initialize itself when the scene is rendered, but this may take some of the overhead away from that process.
In particular, this will ensure that textures within the scene are loaded in texture memory, and display lists are built up from static geometry.
Definition at line 2270 of file pandaNode.cxx.
References Thread::get_current_thread(), and PandaNode::r_prepare_scene().
Referenced by NodePath::prepare_scene().
bool PandaNode::preserve_name | ( | ) | const [virtual, inherited] |
Returns true if the node's name has extrinsic meaning and must be preserved across a flatten operation, false otherwise.
Reimplemented in CollisionNode, ModelNode, and PortalNode.
Definition at line 323 of file pandaNode.cxx.
Referenced by SceneGraphReducer::choose_name().
void PandaNode::r_copy_children | ( | const PandaNode * | from, |
PandaNode::InstanceMap & | inst_map, | ||
Thread * | current_thread | ||
) | [protected, virtual, inherited] |
This is called by r_copy_subgraph(); the copy has already been made of this particular node (and this is the copy); this function's job is to copy all of the children from the original.
Note that it includes the parameter inst_map, which is a map type, and is not (and cannot be) exported from PANDA.DLL. Thus, any derivative of PandaNode that is not also a member of PANDA.DLL *cannot* access this map, and probably should not even override this function.
Reimplemented in Character, and PGVirtualFrame.
Definition at line 3014 of file pandaNode.cxx.
References PandaNode::get_child().
void PandaNode::r_mark_geom_bounds_stale | ( | Thread * | current_thread | ) | [protected, virtual, inherited] |
Recursively calls Geom::mark_bounds_stale() on every Geom at this node and below.
Reimplemented in GeomNode.
Definition at line 2871 of file pandaNode.cxx.
References PandaNode::Children::get_child(), PandaNode::get_children(), PandaNode::Children::get_num_children(), PandaNode::Stashed::get_num_stashed(), PandaNode::get_stashed(), PandaNode::Stashed::get_stashed(), and PandaNode::r_mark_geom_bounds_stale().
Referenced by PartBundleNode::apply_attribs_to_vertices(), and PandaNode::r_mark_geom_bounds_stale().
void TextNode::r_prepare_scene | ( | const RenderState * | state, |
PreparedGraphicsObjects * | prepared_objects, | ||
Thread * | current_thread | ||
) | [virtual, inherited] |
The recursive implementation of prepare_scene().
Don't call this directly; call PandaNode::prepare_scene() or NodePath::prepare_scene() instead.
Reimplemented from PandaNode.
Definition at line 760 of file textNode.cxx.
References PandaNode::get_state(), and PandaNode::r_prepare_scene().
string TextEncoder::reencode_text | ( | const string & | text, |
TextEncoder::Encoding | from, | ||
TextEncoder::Encoding | to | ||
) | [inline, static, inherited] |
Given the indicated text string, which is assumed to be encoded via the encoding "from", decodes it and then reencodes it into the encoding "to", and returns the newly encoded string.
This does not change or affect any properties on the TextEncoder itself.
Definition at line 311 of file textEncoder.I.
References TextEncoder::decode_text(), and TextEncoder::encode_wtext().
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().
void PandaNode::register_with_read_factory | ( | ) | [static, inherited] |
Tells the BamReader how to create objects of type PandaNode.
Reimplemented in AnimBundleNode, Character, CollisionNode, CubicCurveseg, HermiteCurve, NurbsCurve, RopeNode, SheetNode, Camera, Fog, GeomNode, LensNode, ModelNode, ModelRoot, PlaneNode, PolylightNode, PortalNode, UvScrollNode, AmbientLight, CallbackNode, DirectionalLight, FadeLODNode, LODNode, PointLight, SequenceNode, Spotlight, SwitchNode, and MouseRecorder.
Definition at line 4249 of file pandaNode.cxx.
References BamReader::get_factory(), PandaNode::make_from_bam(), and Factory< Type >::register_factory().
void PandaNode::remove_all_children | ( | Thread * | current_thread = Thread::get_current_thread() | ) | [inherited] |
Removes all the children from the node at once, including stashed children.
This can only be called from the top pipeline stage (i.e. from App).
Definition at line 1062 of file pandaNode.cxx.
References PandaNode::children_changed(), PandaNode::force_bounds_stale(), and TypedWritable::mark_bam_modified().
Referenced by MouseWatcherGroup::clear_regions(), MouseWatcherGroup::do_update_regions(), GeoMipTerrain::generate(), PandaNode::steal_children(), and GeoMipTerrain::update().
bool PandaNode::remove_child | ( | PandaNode * | child_node, |
Thread * | current_thread = Thread::get_current_thread() |
||
) | [inherited] |
Removes the indicated child from the node.
Returns true if the child was removed, false if it was not already a child of the node. This will also successfully remove the child if it had been stashed.
Definition at line 804 of file pandaNode.cxx.
References PandaNode::children_changed(), PandaNode::force_bounds_stale(), and PandaNode::parents_changed().
void PandaNode::remove_child | ( | int | child_index, |
Thread * | current_thread = Thread::get_current_thread() |
||
) | [inherited] |
Removes the nth child from the node.
Definition at line 769 of file pandaNode.cxx.
References PandaNode::children_changed(), PandaNode::force_bounds_stale(), Thread::get_pipeline_stage(), and TypedWritable::mark_bam_modified().
Referenced by PandaNode::add_child(), PandaNode::add_stashed(), MouseWatcherGroup::do_remove_region(), LensNode::hide_frustum(), PGVirtualFrame::r_copy_children(), SceneGraphReducer::r_flatten(), PandaNode::replace_node(), PGScrollFrame::setup(), PGSliderBar::setup_scroll_bar(), PGSliderBar::setup_slider(), and PandaNode::stash_child().
void LinkedListNode::remove_from_list | ( | ) | [inline, protected, inherited] |
Removes a LinkedListNode record from the doubly-linked list.
Definition at line 73 of file linkedListNode.I.
Referenced by SimpleLruPage::dequeue_lru(), SimpleAllocatorBlock::do_free(), AdaptiveLru::do_partial_lru_update(), and SimpleLruPage::enqueue_lru().
void PandaNode::remove_stashed | ( | int | child_index, |
Thread * | current_thread = Thread::get_current_thread() |
||
) | [inherited] |
Removes the nth stashed child from the node.
Definition at line 1028 of file pandaNode.cxx.
References PandaNode::children_changed(), PandaNode::force_bounds_stale(), Thread::get_pipeline_stage(), and TypedWritable::mark_bam_modified().
Referenced by PandaNode::unstash_child().
bool PandaNode::replace_child | ( | PandaNode * | orig_child, |
PandaNode * | new_child, | ||
Thread * | current_thread = Thread::get_current_thread() |
||
) | [inherited] |
Searches for the orig_child node in the node's list of children, and replaces it with the new_child instead.
Returns true if the replacement is made, or false if the node is not a child or if there is some other problem.
Definition at line 843 of file pandaNode.cxx.
References PandaNode::children_changed(), and PandaNode::parents_changed().
Referenced by SceneGraphReducer::r_apply_attribs(), and PandaNode::replace_node().
void PandaNode::replace_node | ( | PandaNode * | other | ) | [inherited] |
Inserts this node into the scene graph in place of the other one, and removes the other node.
All scene graph attributes (TransformState, RenderState, etc.) are copied to this node.
All children are moved to this node, and removed from the old node. The new node is left in the same place in the old node's parent's list of children.
Even NodePaths that reference the old node are updated in-place to reference the new node instead.
This method is intended to be used to replace a node of a given type in the scene graph with a node of a different type.
Definition at line 1917 of file pandaNode.cxx.
References PandaNode::copy_all_properties(), PandaNode::find_parent(), Thread::get_current_thread(), PandaNode::Parents::get_num_parents(), PandaNode::Parents::get_parent(), PandaNode::get_parents(), PandaNode::remove_child(), PandaNode::replace_child(), and PandaNode::steal_children().
Referenced by SceneGraphReducer::do_flatten_siblings().
bool TypedWritable::require_fully_complete | ( | ) | const [virtual, inherited] |
Some objects require all of their nested pointers to have been completed before the objects themselves can be completed.
If this is the case, override this method to return true, and be careful with circular references (which would make the object unreadable from a bam file).
Reimplemented in GeomVertexData, ClipPlaneAttrib, and RenderEffects.
Definition at line 118 of file typedWritable.cxx.
void PandaNode::reset_all_prev_transform | ( | Thread * | current_thread = Thread::get_current_thread() | ) | [static, inherited] |
Visits all nodes in the world with the _dirty_prev_transform flag--that is, all nodes whose _prev_transform is different from the _transform in pipeline stage 0--and resets the _prev_transform to be the same as _transform.
Definition at line 1425 of file pandaNode.cxx.
References Thread::get_pipeline_stage(), and TypedWritable::mark_bam_modified().
void PandaNode::reset_prev_transform | ( | Thread * | current_thread = Thread::get_current_thread() | ) | [inherited] |
Resets the transform that represents this node's "previous" position to the same as the current transform.
This is not the same thing as clearing it to identity.
Definition at line 1402 of file pandaNode.cxx.
References TypedWritable::mark_bam_modified().
Referenced by AccumulatedAttribs::apply_to_node(), NodePath::detach_node(), NodePath::remove_node(), NodePath::reparent_to(), NodePath::set_mat(), NodePath::set_pos(), NodePath::set_pos_hpr(), NodePath::set_pos_hpr_scale(), NodePath::set_pos_hpr_scale_shear(), NodePath::set_pos_quat(), NodePath::set_pos_quat_scale(), NodePath::set_pos_quat_scale_shear(), NodePath::stash_to(), and NodePath::wrt_reparent_to().
bool PandaNode::safe_to_combine | ( | ) | const [virtual, inherited] |
Returns true if it is generally safe to combine this particular kind of PandaNode with other kinds of PandaNodes of compatible type, adding children or whatever.
For instance, an LODNode should not be combined with any other PandaNode, because its set of children is meaningful.
Reimplemented in GeomNode, ModelNode, UvScrollNode, CallbackNode, LODNode, SequenceNode, and SwitchNode.
Definition at line 285 of file pandaNode.cxx.
Referenced by SceneGraphReducer::consider_child(), and SceneGraphReducer::flatten_siblings().
bool PandaNode::safe_to_combine_children | ( | ) | const [virtual, inherited] |
Returns true if it is generally safe to combine the children of this PandaNode with each other.
For instance, an LODNode's children should not be combined with each other, because the set of children is meaningful.
Reimplemented in LODNode, SequenceNode, and SwitchNode.
Definition at line 299 of file pandaNode.cxx.
Referenced by SceneGraphReducer::flatten(), and SceneGraphReducer::r_flatten().
bool PandaNode::safe_to_flatten | ( | ) | const [virtual, inherited] |
Returns true if it is generally safe to flatten out this particular kind of PandaNode by duplicating instances (by calling dupe_for_flatten()), false otherwise (for instance, a Camera cannot be safely flattened, because the Camera pointer itself is meaningful).
Reimplemented in AnimBundleNode, ParametricCurve, Camera, GeomNode, ModelNode, UvScrollNode, ForceNode, and PhysicalNode.
Definition at line 241 of file pandaNode.cxx.
Referenced by SceneGraphReducer::r_apply_attribs().
bool PandaNode::safe_to_flatten_below | ( | ) | const [virtual, inherited] |
Returns true if a flatten operation may safely continue past this node, or false if nodes below this node may not be molested.
Reimplemented in ModelNode.
Definition at line 311 of file pandaNode.cxx.
Referenced by SceneGraphReducer::r_apply_attribs(), and SceneGraphReducer::r_flatten().
bool PandaNode::safe_to_modify_transform | ( | ) | const [virtual, inherited] |
Returns true if it is safe to automatically adjust the transform on this kind of node.
Usually, this is only a bad idea if the user expects to find a particular transform on the node.
ModelNodes with the preserve_transform flag set are presently the only kinds of nodes that should not have their transform even adjusted.
Reimplemented in ModelNode.
Definition at line 270 of file pandaNode.cxx.
Referenced by SceneGraphReducer::r_apply_attribs().
bool PandaNode::safe_to_transform | ( | ) | const [virtual, inherited] |
Returns true if it is generally safe to transform this particular kind of PandaNode by calling the xform() method, false otherwise.
Reimplemented in ParametricCurve, RopeNode, SheetNode, Camera, and ModelNode.
Definition at line 253 of file pandaNode.cxx.
Referenced by SceneGraphReducer::r_apply_attribs().
void TextNode::set_align | ( | TextNode::Alignment | align_type | ) | [inline, inherited] |
Specifies the alignment of the text within its margins.
Reimplemented from TextProperties.
Definition at line 857 of file textNode.I.
Referenced by PandaFramework::event_f9(), and PandaFramework::event_question().
void PandaNode::set_attrib | ( | const RenderAttrib * | attrib, |
int | override = 0 |
||
) | [inherited] |
Adds the indicated render attribute to the scene graph on this node.
This attribute will now apply to this node and everything below. If there was already an attribute of the same type, it is replaced.
Definition at line 1179 of file pandaNode.cxx.
References Thread::get_current_thread(), TypedWritable::mark_bam_modified(), PandaNode::mark_bounds_stale(), and PandaNode::state_changed().
Referenced by AccumulatedAttribs::apply_to_node(), NodePath::clear_clip_plane(), NodePath::clear_light(), NodePath::clear_tex_gen(), NodePath::clear_tex_transform(), NodePath::clear_texture(), NodePath::compose_color_scale(), WindowFramework::get_render(), NodePath::set_all_color_scale(), NodePath::set_alpha_scale(), NodePath::set_antialias(), NodePath::set_attrib(), NodePath::set_audio_volume(), NodePath::set_audio_volume_off(), NodePath::set_bin(), NodePath::set_clip_plane(), NodePath::set_clip_plane_off(), NodePath::set_color(), NodePath::set_color_off(), NodePath::set_color_scale(), NodePath::set_color_scale_off(), NodePath::set_depth_offset(), NodePath::set_depth_test(), NodePath::set_depth_write(), NodePath::set_fog(), NodePath::set_fog_off(), NodePath::set_instance_count(), NodePath::set_light(), NodePath::set_light_off(), NodePath::set_material(), NodePath::set_material_off(), WindowFramework::set_one_sided_reverse(), NodePath::set_render_mode(), NodePath::set_render_mode_filled(), NodePath::set_render_mode_perspective(), NodePath::set_render_mode_thickness(), NodePath::set_render_mode_wireframe(), NodePath::set_tex_gen(), NodePath::set_tex_transform(), NodePath::set_texture(), NodePath::set_texture_off(), NodePath::set_transparency(), NodePath::set_two_sided(), WindowFramework::set_wireframe(), SceneGraphAnalyzerMeter::setup_window(), and setup_window().
void TextNode::set_bin | ( | const string & | bin | ) | [inline, inherited] |
Names the GeomBin that the TextNode geometry should be assigned to.
If this is set, then a GeomBinTransition will be created to explicitly place each component in the named bin.
The draw_order value will also be passed to each GeomBinTransition as appropriate; this is particularly useful if this names a GeomBinFixed, e.g. "fixed".
Reimplemented from TextProperties.
Definition at line 1038 of file textNode.I.
void PandaNode::set_bound | ( | const BoundingVolume * | volume | ) | [inherited] |
Deprecated.
Use set_bounds() instead.
Definition at line 2465 of file pandaNode.cxx.
References PandaNode::set_bounds().
void PandaNode::set_bounds | ( | const BoundingVolume * | volume | ) | [inherited] |
Resets the bounding volume so that it is the indicated volume.
When it is explicitly set, the bounding volume will no longer be automatically computed according to the contents of the node itself, for nodes like GeomNodes and TextNodes that contain substance (but the bounding volume will still be automatically expanded to include its children).
Call clear_bounds() if you would like to return the bounding volume to its default behavior later.
Definition at line 2444 of file pandaNode.cxx.
References Thread::get_current_thread(), TypedWritable::mark_bam_modified(), and PandaNode::mark_bounds_stale().
Referenced by PandaNode::clear_bounds(), and PandaNode::set_bound().
void PandaNode::set_bounds_type | ( | BoundingVolume::BoundsType | bounds_type | ) | [inherited] |
Specifies the desired type of bounding volume that will be created for this node.
This is normally BoundingVolume::BT_default, which means to set the type according to the config variable "bounds-type".
If this is BT_sphere or BT_box, a BoundingSphere or BoundingBox is explicitly created. If it is BT_best, the appropriate type to best enclose the node's children is created.
This affects the bounding volume returned by get_bounds(), which is not exactly the same bounding volume modified by set_bounds(), because a new bounding volume has to be created that includes this node and all of its children.
Definition at line 2401 of file pandaNode.cxx.
References Thread::get_current_thread(), TypedWritable::mark_bam_modified(), PandaNode::mark_bounds_stale(), and PandaNode::mark_internal_bounds_stale().
void TextNode::set_card_actual | ( | float | left, |
float | right, | ||
float | bottom, | ||
float | top | ||
) | [inline, inherited] |
Similar to set_card_as_margin, except the card is specified in actual coordinate units (relative to the text's origin), irrespective of the size of the text.
The left and bottom coordinates should generally be negative, while the right and top coordinates should generally be positive.
Definition at line 473 of file textNode.I.
void TextNode::set_card_as_margin | ( | float | left, |
float | right, | ||
float | bottom, | ||
float | top | ||
) | [inline, inherited] |
Specifies that a (possibly opaque or semitransparent) card will be held behind the text when it is next created.
Like set_frame_as_margin, the parameters are the amount of additional padding to insert around the text in each dimension, and all should generally be positive.
Definition at line 455 of file textNode.I.
void TextNode::set_card_decal | ( | bool | card_decal | ) | [inline, inherited] |
Sets the card_decal flag.
When this is true, the text is decalled onto the card, which is necessary if the TextNode is to be rendered in the 3-d world without putting it in a bin.
Definition at line 490 of file textNode.I.
void FrameRateMeter::set_clock_object | ( | ClockObject * | clock_object | ) | [inline] |
Sets the clock that is used to determine the frame rate.
The default is the application's global clock (ClockObject::get_global_clock()).
Definition at line 99 of file frameRateMeter.I.
void TextNode::set_coordinate_system | ( | CoordinateSystem | cs | ) | [inline, inherited] |
Specifies the coordinate system in which the text will be generated.
Definition at line 641 of file textNode.I.
void PandaNode::set_cull_callback | ( | ) | [protected, inherited] |
Intended to be called in the constructor by any subclass that defines cull_callback(), this sets up the flags to indicate that the cullback needs to be called.
Definition at line 3080 of file pandaNode.cxx.
References Thread::get_current_thread(), and TypedWritable::mark_bam_modified().
Referenced by Character::Character(), CallbackNode::clear_cull_callback(), and PortalNode::PortalNode().
void TextEncoder::set_default_encoding | ( | TextEncoder::Encoding | encoding | ) | [inline, static, inherited] |
Specifies the default encoding to be used for all subsequently created TextEncoder objects.
See set_encoding().
Definition at line 85 of file textEncoder.I.
void TextProperties::set_default_font | ( | TextFont * | font | ) | [inline, static, inherited] |
Specifies the default font to be used for any TextNode whose font is uninitialized or NULL.
See set_font().
Definition at line 45 of file textProperties.I.
int TextNode::set_draw_order | ( | int | draw_order | ) | [inline, inherited] |
Sets the drawing order of text created by the TextMaker.
This is actually the draw order of the card and frame. The shadow is drawn at _draw_order+1, and the text at _draw_order+2.
This affects the sorting order assigned to the arcs as they are created, and also is passed to whatever bin may be assigned via set_bin().
The return value is the first unused draw_order number, e.g. _draw_order + 3.
Reimplemented from TextProperties.
Definition at line 1073 of file textNode.I.
void PandaNode::set_effect | ( | const RenderEffect * | effect | ) | [inherited] |
Adds the indicated render effect to the scene graph on this node.
If there was already an effect of the same type, it is replaced.
Definition at line 1246 of file pandaNode.cxx.
References Thread::get_current_thread(), and TypedWritable::mark_bam_modified().
Referenced by CharacterJoint::add_local_transform(), CharacterJoint::add_net_transform(), NodePath::clear_light(), NodePath::clear_tex_projector(), GraphicsOutput::make_cube_map(), EggLoader::reparent_decals(), NodePath::set_billboard_axis(), NodePath::set_billboard_point_eye(), NodePath::set_billboard_point_world(), NodePath::set_compass(), NodePath::set_effect(), NodePath::set_light(), NodePath::set_tex_projector(), NodePath::show_bounds(), and NodePath::show_tight_bounds().
void PandaNode::set_effects | ( | const RenderEffects * | effects, |
Thread * | current_thread = Thread::get_current_thread() |
||
) | [inherited] |
Sets the complete RenderEffects that will be applied this node.
This completely replaces whatever has been set on this node via repeated calls to set_attrib().
Definition at line 1319 of file pandaNode.cxx.
References RenderEffects::is_empty(), and TypedWritable::mark_bam_modified().
Referenced by PandaNode::clear_effects(), and NodePath::set_effects().
void TextEncoder::set_encoding | ( | TextEncoder::Encoding | encoding | ) | [inline, inherited] |
Specifies how the string set via set_text() is to be interpreted.
The default, E_iso8859, means a standard string with one-byte characters (i.e. ASCII). Other encodings are possible to take advantage of character sets with more than 256 characters.
This affects only future calls to set_text(); it does not change text that was set previously.
Definition at line 59 of file textEncoder.I.
References TextEncoder::get_text(), and TextEncoder::get_wtext().
Referenced by TextEncoder::lower(), and TextEncoder::upper().
void PandaNode::set_final | ( | bool | flag | ) | [inline, inherited] |
Sets the "final" flag on this PandaNode.
If this is true, than no bounding volume need be tested below it; a positive intersection with this node's bounding volume is deemed to be a positive intersection with all geometry inside.
This is useful to quickly force a larger bounding volume around a node when the GeomNodes themselves are inaccurate for some reason, without forcing a recompute of every nested bounding volume. It's also helpful when the bounding volume is tricked by some special properties, like billboards, that may move geometry out of its bounding volume otherwise.
Definition at line 663 of file pandaNode.I.
References TypedWritable::mark_bam_modified().
void TextNode::set_flatten_flags | ( | int | flatten_flags | ) | [inline, inherited] |
Sets the flatten flags.
This should be a union of the TextNode::FlattenFlags options. This controls the degree of flattening performed on the TextNode's internal geometry (i.e. the scene graph returned by generate()) each time the text is changed. In general, more flattening means a more optimal result, but it will take more time to generate.
The choice may be any of these three:
FF_none - No flatten operation is called. The letters are left as independent Geoms.
FF_light - A flatten_light() operation is called. The attributes are applied to the vertices, but no nodes are removed.
FF_medium - A flatten_medium() operation is called. The attributes are applied to the vertices, and a few trivial nodes are removed.
FF_strong - A flatten_strong() operation is called. The attributes are applied to the vertices, and the resulting nodes are aggressively combined into as few nodes as possible.
In addition to the above choices, you may optionally include the following flag:
FF_dynamic_merge - Copy the geoms into a single GeomVertexData as we go, instead of relying on the flatten operation at the end. This pre-flattens the text considerably, and may obviate the need for flatten altogether; it also tends to improve performance considerably even if you do call flatten. However, it is not as fast as not calling flatten at all.
The default is taken from the text-flatten and text-dynamic-merge config variables.
Definition at line 728 of file textNode.I.
void TextNode::set_font | ( | TextFont * | font | ) | [inline, inherited] |
Sets the font that will be used when making text.
If this is set to NULL, the default font will be used, which can be set via set_default_font().
Reimplemented from TextProperties.
Definition at line 750 of file textNode.I.
void TextNode::set_frame_actual | ( | float | left, |
float | right, | ||
float | bottom, | ||
float | top | ||
) | [inline, inherited] |
Similar to set_frame_as_margin, except the frame is specified in actual coordinate units (relative to the text's origin), irrespective of the size of the text.
The left and bottom coordinates should generally be negative, while the right and top coordinates should generally be positive.
Definition at line 300 of file textNode.I.
void TextNode::set_frame_as_margin | ( | float | left, |
float | right, | ||
float | bottom, | ||
float | top | ||
) | [inline, inherited] |
Specifies that a border will be drawn around the text when it is next created.
The parameters are the amount of additional padding to insert between the frame and the text in each dimension, and all should generally be positive.
Definition at line 282 of file textNode.I.
void TextNode::set_frame_corners | ( | bool | corners | ) | [inline, inherited] |
Enables or disables the drawing of corners for the frame.
These are extra points drawn at each of the four corners, to soften the ugly edges generated when the line width is greater than one.
Definition at line 425 of file textNode.I.
void TextNode::set_frame_line_width | ( | float | line_width | ) | [inline, inherited] |
Specifies the thickness of the lines that will be used to draw the frame.
Definition at line 400 of file textNode.I.
void TextNode::set_glyph_scale | ( | float | glyph_scale | ) | [inline, inherited] |
Specifies the factor by which to scale each letter of the text as it is placed.
This can be used (possibly in conjunction with set_glyph_shift()) to implement superscripting or subscripting.
Reimplemented from TextProperties.
Definition at line 1122 of file textNode.I.
void TextNode::set_glyph_shift | ( | float | glyph_shift | ) | [inline, inherited] |
Specifies a vertical amount to shift each letter of the text as it is placed.
This can be used (possibly in conjunction with set_glyph_scale()) to implement superscripting or subscripting.
Reimplemented from TextProperties.
Definition at line 1147 of file textNode.I.
void TextNode::set_indent | ( | float | indent | ) | [inline, inherited] |
Specifies the amount of extra space that is inserted before the first character of each line.
This can be thought of as a left margin.
Reimplemented from TextProperties.
Definition at line 881 of file textNode.I.
void PandaNode::set_internal_bounds | ( | const BoundingVolume * | volume | ) | [protected, inherited] |
This is provided as an alternate way for a node to set its own internal bounds, rather than overloading compute_internal_bounds().
If this method is called, the internal bounding volume will immediately be set to the indicated pointer.
Definition at line 2799 of file pandaNode.cxx.
References Thread::get_current_thread(), TypedWritable::mark_bam_modified(), and PandaNode::mark_bounds_stale().
void PandaNode::set_into_collide_mask | ( | CollideMask | mask | ) | [inherited] |
Sets the "into" CollideMask.
This specifies the set of bits that must be shared with a CollisionNode's "from" CollideMask in order for the CollisionNode to detect a collision with this particular node.
The actual CollideMask that will be set is masked by the return value from get_legal_collide_mask(). Thus, the into_collide_mask cannot be set to anything other than nonzero except for those types of nodes that can be collided into, such as CollisionNodes and GeomNodes.
Reimplemented in CollisionNode.
Definition at line 2177 of file pandaNode.cxx.
References Thread::get_current_thread(), PandaNode::get_legal_collide_mask(), TypedWritable::mark_bam_modified(), and PandaNode::mark_bounds_stale().
void TextNode::set_max_rows | ( | int | max_rows | ) | [inline, inherited] |
Sets the maximum number of rows that may be formatted by the TextNode.
If more text than this is attempted, it will be truncated and has_overflow() will return true.
Definition at line 44 of file textNode.I.
void PandaNode::set_overall_hidden | ( | bool | hidden | ) | [inline, inherited] |
Sets or clears the hidden flag.
When the hidden flag is true, the node and all of its children are invisible to all cameras, regardless of the setting of any draw masks. Setting the hidden flag to false restores the previous visibility as established by the draw masks.
This actually works by twiddling the reserved _overall_bit in the node's draw mask, which has special meaning.
Definition at line 544 of file pandaNode.I.
References PandaNode::adjust_draw_mask(), and BitMask< PN_uint32, 32 >::all_off().
void TextProperties::set_preserve_trailing_whitespace | ( | bool | preserve_trailing_whitespace | ) | [inline, inherited] |
Sets the preserve_trailing_whitespace flag.
When this is set, trailing whitespace at the end of the line is not stripped when the text is wordwrapped (it is stripped by default). Since the trailing whitespace is invisible, this is important primarily for determining the proper width of a frame or card behind the text.
Definition at line 497 of file textProperties.I.
void PandaNode::set_prev_transform | ( | const TransformState * | transform, |
Thread * | current_thread = Thread::get_current_thread() |
||
) | [inherited] |
Sets the transform that represents this node's "previous" position, one frame ago, for the purposes of detecting motion for accurate collision calculations.
Definition at line 1375 of file pandaNode.cxx.
References TypedWritable::mark_bam_modified().
Referenced by AccumulatedAttribs::collect(), and NodePath::set_prev_transform().
void PandaNode::set_scene_root_func | ( | SceneRootFunc * | func | ) | [static, inherited] |
This is used by the GraphicsEngine to hook in a pointer to the scene_root_func(), the function to determine whether the node is an active scene root.
This back-pointer is necessary because we can't make calls directly into GraphicsEngine, which is in the display module.
Definition at line 4238 of file pandaNode.cxx.
void TextNode::set_shadow | ( | float | xoffset, |
float | yoffset | ||
) | [inline, inherited] |
Specifies that the text should be drawn with a shadow, by creating a second copy of the text and offsetting it slightly behind the first.
Reimplemented from TextProperties.
Definition at line 995 of file textNode.I.
Referenced by PandaFramework::event_f9(), PandaFramework::event_question(), and TextNode::set_shadow().
void TextNode::set_shadow | ( | const LVecBase2f & | shadow_offset | ) | [inline, inherited] |
Specifies that the text should be drawn with a shadow, by creating a second copy of the text and offsetting it slightly behind the first.
Reimplemented from TextProperties.
Definition at line 1007 of file textNode.I.
References TextNode::set_shadow().
void TextNode::set_slant | ( | float | slant | ) | [inline, inherited] |
Specifies the factor by which the text slants to the right.
Reimplemented from TextProperties.
Definition at line 835 of file textNode.I.
void TextNode::set_small_caps | ( | bool | small_caps | ) | [inline, inherited] |
Sets the small_caps flag.
When this is set, lowercase letters are generated as scaled-down versions of their uppercase equivalents. This is particularly useful to set for fonts that do not have lowercase letters.
It is also a good idea to set this for a (dynamic) font that has already implemented lowercase letters as scaled-down versions of their uppercase equivalents, since without this flag the texture memory may needlessly duplicate equivalent glyphs for upper and lowercase letters. Setting this flag causes the texture memory to share the mixed-case letters.
The amount by which the lowercase letters are scaled is specified by set_small_caps_scale().
Reimplemented from TextProperties.
Definition at line 788 of file textNode.I.
void TextNode::set_small_caps_scale | ( | float | small_caps_scale | ) | [inline, inherited] |
Sets the scale factor applied to lowercase letters from their uppercase equivalents, when the small_caps flag is in effect.
See set_small_caps(). Normally, this will be a number less than one.
Reimplemented from TextProperties.
Definition at line 813 of file textNode.I.
void PandaNode::set_state | ( | const RenderState * | state, |
Thread * | current_thread = Thread::get_current_thread() |
||
) | [inherited] |
Sets the complete RenderState that will be applied to all nodes at this level and below.
(The actual state that will be applied to lower nodes is based on the composition of RenderStates from above this node as well). This completely replaces whatever has been set on this node via repeated calls to set_attrib().
Definition at line 1288 of file pandaNode.cxx.
References RenderState::is_empty(), TypedWritable::mark_bam_modified(), PandaNode::mark_bounds_stale(), and PandaNode::state_changed().
Referenced by AccumulatedAttribs::apply_to_node(), PandaNode::clear_state(), AccumulatedAttribs::collect(), MultitexReducer::scan(), and NodePath::set_state().
void TextNode::set_tab_width | ( | float | tab_width | ) | [inline, inherited] |
Sets the width of each tab stop, in screen units.
A tab character embedded in the text will advance the horizontal position to the next tab stop.
Reimplemented from TextProperties.
Definition at line 1097 of file textNode.I.
void PandaNode::set_tag | ( | const string & | key, |
const string & | value, | ||
Thread * | current_thread = Thread::get_current_thread() |
||
) | [inherited] |
Associates a user-defined value with a user-defined key which is stored on the node.
This value has no meaning to Panda; but it is stored indefinitely on the node until it is requested again.
Each unique key stores a different string value. There is no effective limit on the number of different keys that may be stored or on the length of any one key's value.
Definition at line 1466 of file pandaNode.cxx.
References TypedWritable::mark_bam_modified().
Referenced by NodePath::set_tag().
void TextNode::set_text | ( | const string & | text, |
TextNode::Encoding | encoding | ||
) | [inline, inherited] |
The two-parameter version of set_text() accepts an explicit encoding; the text is immediately decoded and stored as a wide-character string.
Subsequent calls to get_text() will return the same text re-encoded using whichever encoding is specified by set_encoding().
Reimplemented from TextEncoder.
Definition at line 1187 of file textNode.I.
References TextNode::set_text().
void TextNode::set_text | ( | const string & | text | ) | [inline, inherited] |
Changes the text that is displayed under the TextNode.
Reimplemented from TextEncoder.
Definition at line 1171 of file textNode.I.
Referenced by PandaFramework::event_f9(), PandaFramework::event_question(), TextNode::set_text(), and PGButton::setup().
void FrameRateMeter::set_text_pattern | ( | const string & | text_pattern | ) | [inline] |
Sets the sprintf() pattern that is used to format the text.
The string "%f" or some variant will be replaced with the current frame rate in frames per second.
Definition at line 74 of file frameRateMeter.I.
References Thread::get_current_thread().
void TextProperties::set_text_scale | ( | float | text_scale | ) | [inline, inherited] |
Specifies the factor by which to scale the text, in addition to any scalings imposed by the node, as well as in addition to the glyph scale.
The text scale is not cumulative when applied to nested TextProperties. See also set_glyph_scale(), which is cumulative.
Definition at line 962 of file textProperties.I.
Referenced by TextProperties::add_properties().
void TextNode::set_transform | ( | const LMatrix4f & | transform | ) | [inline, inherited] |
Sets an additional transform that is applied to the entire text paragraph.
Definition at line 619 of file textNode.I.
void PandaNode::set_transform | ( | const TransformState * | transform, |
Thread * | current_thread = Thread::get_current_thread() |
||
) | [inherited] |
Sets the transform that will be applied to this node and below.
This defines a new coordinate space at this point in the scene graph and below.
Definition at line 1339 of file pandaNode.cxx.
References TransformState::is_identity(), TypedWritable::mark_bam_modified(), PandaNode::mark_bounds_stale(), and PandaNode::transform_changed().
Referenced by CharacterJoint::add_local_transform(), CharacterJoint::add_net_transform(), AccumulatedAttribs::apply_to_node(), PandaNode::clear_transform(), AccumulatedAttribs::collect(), NodePath::set_transform(), CharacterJoint::update_internals(), and ActorNode::update_transform().
void TextProperties::set_underscore | ( | bool | underscore | ) | [inline, inherited] |
Sets the underscore flag.
When this is set, the text is underscored with a one-pixel line the same color as the text foreground, drawn at the baseline.
Definition at line 270 of file textProperties.I.
Referenced by TextProperties::add_properties().
void TextProperties::set_underscore_height | ( | float | underscore_height | ) | [inline, inherited] |
Specifies the vertical height of the underscore, relative to the text baseline.
This only has meaning if the underscore mode is enabled with set_underscore().
Definition at line 315 of file textProperties.I.
Referenced by TextProperties::add_properties().
void PandaNode::set_unexpected_change | ( | unsigned int | flags | ) | [inherited] |
Sets one or more of the PandaNode::UnexpectedChange bits on, indicating that the corresponding property should not change again on this node.
Once one of these bits has been set, if the property changes, an assertion failure will be raised, which is designed to assist the developer in identifying the troublesome code that modified the property unexpectedly.
The input parameter is the union of bits that are to be set. To clear these bits later, use clear_unexpected_change().
Since this is a developer debugging tool only, this function does nothing in a production (NDEBUG) build.
Definition at line 1983 of file pandaNode.cxx.
void TextEncoder::set_unicode_char | ( | int | index, |
int | character | ||
) | [inline, inherited] |
Sets the Unicode value of the nth character in the stored text.
This may be a wide character (greater than 255), after the string has been decoded according to set_encoding().
Definition at line 247 of file textEncoder.I.
References TextEncoder::get_wtext().
void FrameRateMeter::set_update_interval | ( | double | update_interval | ) | [inline] |
Specifies the number of seconds that should elapse between updates to the frame rate indication.
This should be reasonably slow (e.g. 0.2 to 1.0) so that the calculation of the frame rate text does not itself dominate the frame rate.
Definition at line 50 of file frameRateMeter.I.
void TextNode::set_usage_hint | ( | Geom::UsageHint | usage_hint | ) | [inline, inherited] |
Specifies the UsageHint that will be applied to generated geometry.
The default is UH_static, which is probably the right setting, but if you know the TextNode's geometry will have a short lifespan, it may be better to set it to UH_stream. See geomEnums.h.
Definition at line 667 of file textNode.I.
void TextNode::set_wordwrap | ( | float | wordwrap | ) | [inline, inherited] |
Sets the text up to automatically wordwrap when it exceeds the indicated width.
This can be thought of as a right margin or margin width.
Reimplemented from TextProperties.
Definition at line 905 of file textNode.I.
void TextNode::set_wtext | ( | const wstring & | wtext | ) | [inline, inherited] |
Changes the text that is displayed under the TextNode, with a wide text.
This automatically sets the string reported by get_text() to the 8-bit encoded version of the same string.
Reimplemented from TextEncoder.
Definition at line 1264 of file textNode.I.
void FrameRateMeter::setup_window | ( | GraphicsOutput * | window | ) |
Sets up the frame rate meter to create a DisplayRegion to render itself into the indicated window.
Definition at line 82 of file frameRateMeter.cxx.
References NodePath::attach_new_node(), clear_window(), NodePath::node(), PandaNode::set_attrib(), Lens::set_film_size(), NodePath::set_material_off(), and NodePath::set_two_sided().
void PandaNode::stash_child | ( | int | child_index, |
Thread * | current_thread = Thread::get_current_thread() |
||
) | [inherited] |
Stashes the indicated child node.
This removes the child from the list of active children and puts it on a special list of stashed children. This child node no longer contributes to the bounding volume of the PandaNode, and is not visited in normal traversals. It is invisible and uncollidable. The child may later be restored by calling unstash_child().
This can only be called from the top pipeline stage (i.e. from App).
Definition at line 898 of file pandaNode.cxx.
References PandaNode::children_changed(), PandaNode::force_bounds_stale(), PandaNode::get_child(), PandaNode::get_child_sort(), PandaNode::get_num_children(), Thread::get_pipeline_stage(), TypedWritable::mark_bam_modified(), and PandaNode::remove_child().
bool PandaNode::stash_child | ( | PandaNode * | child_node, |
Thread * | current_thread = Thread::get_current_thread() |
||
) | [inline, inherited] |
Stashes the indicated child node.
This removes the child from the list of active children and puts it on a special list of stashed children. This child node no longer contributes to the bounding volume of the PandaNode, and is not visited in normal traversals. It is invisible and uncollidable. The child may later be restored by calling unstash_child().
This function returns true if the child node was successfully stashed, or false if it was not a child of the node in the first place (e.g. it was previously stashed).
Definition at line 133 of file pandaNode.I.
References PandaNode::find_child().
void PandaNode::state_changed | ( | ) | [protected, virtual, inherited] |
Called after the node's RenderState has been changed for any reason, this just provides a hook so derived classes can do something special in this case.
Definition at line 2952 of file pandaNode.cxx.
Referenced by PandaNode::clear_attrib(), PandaNode::copy_all_properties(), PandaNode::set_attrib(), and PandaNode::set_state().
void PandaNode::steal_children | ( | PandaNode * | other, |
Thread * | current_thread = Thread::get_current_thread() |
||
) | [inherited] |
Moves all the children from the other node onto this node.
Any NodePaths to child nodes of the other node are truncated, rather than moved to the new parent.
Definition at line 1110 of file pandaNode.cxx.
References PandaNode::add_child(), PandaNode::add_stashed(), PandaNode::get_child(), PandaNode::get_child_sort(), PandaNode::get_num_children(), PandaNode::get_num_stashed(), PandaNode::get_stashed(), PandaNode::get_stashed_sort(), and PandaNode::remove_all_children().
Referenced by PandaNode::replace_node().
void LinkedListNode::take_list_from | ( | LinkedListNode * | other_root | ) | [inline, protected, inherited] |
Given that this LinkedListNode represents the root of a list, and the other pointer represents the root of a different list, move all of the nodes (except the root itself) from other_root onto this list.
Definition at line 127 of file linkedListNode.I.
Referenced by BufferContextChain::take_from().
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 PandaNode::transform_changed | ( | ) | [protected, virtual, inherited] |
Called after the node's transform has been changed for any reason, this just provides a hook so derived classes can do something special in this case.
Reimplemented in ModelNode, and PGItem.
Definition at line 2940 of file pandaNode.cxx.
Referenced by PandaNode::copy_all_properties(), and PandaNode::set_transform().
bool TextEncoder::unicode_isalpha | ( | int | character | ) | [inline, static, inherited] |
Returns true if the indicated character is an alphabetic letter, false otherwise.
This is akin to ctype's isalpha(), extended to Unicode.
Definition at line 324 of file textEncoder.I.
References UnicodeLatinMap::look_up().
bool TextEncoder::unicode_isdigit | ( | int | character | ) | [inline, static, inherited] |
Returns true if the indicated character is a numeric digit, false otherwise.
This is akin to ctype's isdigit(), extended to Unicode.
Definition at line 341 of file textEncoder.I.
References UnicodeLatinMap::look_up().
bool TextEncoder::unicode_islower | ( | int | character | ) | [inline, static, inherited] |
Returns true if the indicated character is a lowercase letter, false otherwise.
This is akin to ctype's islower(), extended to Unicode.
Definition at line 412 of file textEncoder.I.
References UnicodeLatinMap::look_up().
bool TextEncoder::unicode_ispunct | ( | int | character | ) | [inline, static, inherited] |
Returns true if the indicated character is a punctuation mark, false otherwise.
This is akin to ctype's ispunct(), extended to Unicode.
Definition at line 359 of file textEncoder.I.
References UnicodeLatinMap::look_up().
bool TextEncoder::unicode_isspace | ( | int | character | ) | [inline, static, inherited] |
Returns true if the indicated character is a whitespace letter, false otherwise.
This is akin to ctype's isspace(), extended to Unicode.
Definition at line 392 of file textEncoder.I.
bool TextEncoder::unicode_isupper | ( | int | character | ) | [inline, static, inherited] |
Returns true if the indicated character is an uppercase letter, false otherwise.
This is akin to ctype's isupper(), extended to Unicode.
Definition at line 376 of file textEncoder.I.
References UnicodeLatinMap::look_up().
int TextEncoder::unicode_tolower | ( | int | character | ) | [inline, static, inherited] |
Returns the uppercase equivalent of the given Unicode character.
This is akin to ctype's tolower(), extended to Unicode.
Definition at line 444 of file textEncoder.I.
References UnicodeLatinMap::look_up().
Referenced by TextEncoder::make_lower().
int TextEncoder::unicode_toupper | ( | int | character | ) | [inline, static, inherited] |
Returns the uppercase equivalent of the given Unicode character.
This is akin to ctype's toupper(), extended to Unicode.
Definition at line 428 of file textEncoder.I.
References UnicodeLatinMap::look_up().
Referenced by TextEncoder::make_upper().
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 PandaNode::unstash_child | ( | int | stashed_index, |
Thread * | current_thread = Thread::get_current_thread() |
||
) | [inherited] |
Returns the indicated stashed node to normal child status.
This removes the child from the list of stashed children and puts it on the normal list of active children. This child node once again contributes to the bounding volume of the PandaNode, and will be visited in normal traversals. It is visible and collidable.
This can only be called from the top pipeline stage (i.e. from App).
Definition at line 943 of file pandaNode.cxx.
References PandaNode::children_changed(), PandaNode::force_bounds_stale(), PandaNode::get_num_stashed(), Thread::get_pipeline_stage(), PandaNode::get_stashed(), PandaNode::get_stashed_sort(), TypedWritable::mark_bam_modified(), and PandaNode::remove_stashed().
bool PandaNode::unstash_child | ( | PandaNode * | child_node, |
Thread * | current_thread = Thread::get_current_thread() |
||
) | [inline, inherited] |
Returns the indicated stashed node to normal child status.
This removes the child from the list of stashed children and puts it on the normal list of active children. This child node once again contributes to the bounding volume of the PandaNode, and will be visited in normal traversals. It is visible and collidable.
This function returns true if the child node was successfully stashed, or false if it was not a child of the node in the first place (e.g. it was previously stashed).
Definition at line 159 of file pandaNode.I.
References PandaNode::find_stashed().
void FrameRateMeter::update | ( | ) | [inline] |
You can call this to explicitly force the FrameRateMeter to update itself with the latest frame rate information.
Normally, it is not necessary to call this explicitly.
Reimplemented from TextNode.
Definition at line 124 of file frameRateMeter.I.
References Thread::get_current_thread().
void PandaNode::update_bam_nested | ( | BamWriter * | manager | ) | [virtual, inherited] |
Called by the BamWriter when this object has not itself been modified recently, but it should check its nested objects for updates.
Reimplemented from TypedWritable.
Definition at line 4275 of file pandaNode.cxx.
string TextEncoder::upper | ( | const string & | source | ) | [inline, static, inherited] |
Converts the string to uppercase, assuming the string is encoded in the default encoding.
Definition at line 459 of file textEncoder.I.
References TextEncoder::get_default_encoding().
string TextEncoder::upper | ( | const string & | source, |
TextEncoder::Encoding | encoding | ||
) | [inline, static, inherited] |
Converts the string to uppercase, assuming the string is encoded in the indicated encoding.
Definition at line 470 of file textEncoder.I.
References TextEncoder::get_text(), TextEncoder::make_upper(), TextEncoder::set_encoding(), and TextEncoder::set_text().
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().
Writes the contents of this object to the datagram for shipping out to a Bam file.
Reimplemented from TypedWritable.
Reimplemented in AnimBundleNode, PartBundleNode, Character, CollisionNode, DataNode, CubicCurveseg, HermiteCurve, NurbsCurve, ParametricCurve, PiecewiseCurve, RopeNode, SheetNode, Camera, Fog, GeomNode, LensNode, ModelNode, ModelRoot, PlaneNode, PolylightNode, PortalNode, UvScrollNode, AmbientLight, CallbackNode, DirectionalLight, FadeLODNode, LightLensNode, LightNode, LODNode, PointLight, SequenceNode, Spotlight, SwitchNode, and MouseRecorder.
Definition at line 4260 of file pandaNode.cxx.
References Datagram::add_string(), and BamWriter::write_cdata().
This method is provided for the benefit of classes (like MouseRecorder) that inherit from PandaMode and also RecorderBase.
It's not virtual at this level since it doesn't need to be (it's called up from the derived class).
This method acts very like write_datagram, but it writes the node as appropriate for writing a RecorderBase object as described in the beginning of a session file, meaning it doesn't need to write things such as children. It balances with fillin_recorder().
Reimplemented in MouseRecorder.
Definition at line 4297 of file pandaNode.cxx.
References Datagram::add_string().
void PandaNode::xform | ( | const LMatrix4f & | mat | ) | [virtual, inherited] |
Transforms the contents of this PandaNode by the indicated matrix, if it means anything to do so.
For most kinds of PandaNodes, this does nothing.
Reimplemented in PartBundleNode, CollisionNode, Fog, GeomNode, LensNode, PlaneNode, PortalNode, DirectionalLight, LODNode, PointLight, Spotlight, PGEntry, PGItem, PGScrollFrame, and PGSliderBar.
Definition at line 381 of file pandaNode.cxx.
Referenced by PandaNode::apply_attribs_to_vertices().