#include <textNode.h>
Inheritance diagram for TextNode:
Public Types | |
enum | Alignment { A_left, A_right, A_center } |
enum | BoundingVolumeType { BVT_static, BVT_dynamic_sphere } |
enum | Encoding { E_iso8859, E_utf8, E_unicode } |
Public Member Functions | |
TextNode (const string &name) | |
~TextNode () | |
int | freeze () |
This method is deprecated and no longer does anything. | |
int | thaw () |
This method is deprecated and no longer does anything. | |
void | set_font (TextFont *font) |
Sets the font that will be used when making text. | |
TextFont * | get_font () const |
Returns the font currently in use, if any. | |
float | get_line_height () const |
Returns the number of units high each line of text is. | |
void | set_small_caps (bool small_caps) |
Sets the small_caps flag. | |
bool | get_small_caps () const |
Returns 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. | |
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. | |
void | set_slant (float slant) |
float | get_slant () const |
void | set_align (Alignment align_type) |
Alignment | get_align () const |
void | set_wordwrap (float width) |
Sets the TextNode up to automatically wordwrap text that exceeds the indicated width. | |
void | clear_wordwrap () |
Removes the wordwrap setting from the TextNode. | |
bool | has_wordwrap () const |
float | get_wordwrap () const |
void | set_text_color (float r, float g, float b, float a) |
void | set_text_color (const Colorf &text_color) |
void | clear_text_color () |
Removes the text color specification; the text will be colored whatever it was in the source font file. | |
bool | has_text_color () const |
Colorf | get_text_color () const |
void | set_frame_color (float r, float g, float b, float a) |
void | set_frame_color (const Colorf &frame_color) |
Colorf | get_frame_color () const |
void | set_card_border (float size, float uv_portion) |
void | clear_card_border () |
float | get_card_border_size () const |
float | get_card_border_uv_portion () const |
bool | has_card_border () const |
void | set_card_color (float r, float g, float b, float a) |
void | set_card_color (const Colorf &card_color) |
Colorf | get_card_color () const |
void | set_card_texture (Texture *card_texture) |
void | clear_card_texture () |
bool | has_card_texture () const |
Texture * | get_card_texture () const |
void | set_shadow_color (float r, float g, float b, float a) |
void | set_shadow_color (const Colorf &shadow_color) |
Colorf | get_shadow_color () const |
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_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 | clear_frame () |
Specifies that a border will not be drawn around the text. | |
bool | has_frame () const |
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. | |
LVecBase4f | get_frame_as_set () const |
Returns the dimensions of the frame as set by set_frame_as_margin() or set_frame_actual(). | |
LVecBase4f | get_frame_actual () const |
Returns the actual dimensions of the frame around the text. | |
void | set_frame_line_width (float line_width) |
Specifies the thickness of the lines that will be used to draw the frame. | |
float | get_frame_line_width () const |
Returns the thickness of the lines that will be used to draw the frame. | |
void | set_frame_corners (bool corners) |
Enables or disables the drawing of corners for the frame. | |
bool | get_frame_corners () const |
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_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 | clear_card () |
Specifies that a card will not be drawn behind the text. | |
bool | has_card () const |
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. | |
LVecBase4f | get_card_as_set () const |
Returns the dimensions of the card as set by set_card_as_margin() or set_card_actual(). | |
LVecBase4f | get_card_actual () const |
Returns the actual dimensions of the card around the text. | |
LVecBase4f | get_card_transformed () const |
Returns the actual card dimensions, transformed by the matrix set by set_transform(). | |
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 | clear_shadow () |
Specifies that a shadow will not be drawn behind the text. | |
bool | has_shadow () const |
LVecBase2f | get_shadow () const |
Returns the offset of the shadow as set by set_shadow(). | |
void | set_bin (const string &bin) |
Names the GeomBin that the TextNode geometry should be assigned to. | |
void | clear_bin () |
Removes the effect of a previous call to set_bin(). | |
bool | has_bin () const |
Returns true if an explicit drawing bin has been set via set_bin(), false otherwise. | |
const string & | get_bin () const |
Returns the drawing bin set with set_bin(), or empty string if no bin has been set. | |
int | set_draw_order (int draw_order) |
Sets the drawing order of text created by the TextMaker. | |
int | get_draw_order () const |
Returns the drawing order set with set_draw_order(). | |
void | set_transform (const LMatrix4f &transform) |
Sets an additional transform that is applied to the entire text paragraph. | |
LMatrix4f | get_transform () const |
Returns the transform that has been set on this particular node. | |
void | set_coordinate_system (CoordinateSystem cs) |
Specifies the coordinate system in which the text will be generated. | |
CoordinateSystem | get_coordinate_system () const |
void | set_text (const string &text) |
Changes the text that is displayed under the TextNode. | |
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 | clear_text () |
Removes the text from the TextNode. | |
void | append_text (const string &text) |
Appends the indicates string to the end of the stored text. | |
void | append_unicode_char (int character) |
Appends a single character to the end of the stored text. | |
float | calc_width (int 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. | |
string | wordwrap_to (const string &text, float wordwrap_width, bool preserve_trailing_whitespace) const |
Inserts newlines into the given text at the appropriate places in order to make each line be the longest possible line that is not longer than wordwrap_width (and does not break any words, if possible). | |
virtual void | write (ostream &out, int indent_level=0) const |
float | get_left () const |
Returns the leftmost extent of the text in local 2-d coordinates, unmodified by the set_transform() matrix. | |
float | get_right () const |
Returns the rightmost extent of the text in local 2-d coordinates, unmodified by the set_transform() matrix. | |
float | get_bottom () const |
Returns the bottommost extent of the text in local 2-d coordinates, unmodified by the set_transform() matrix. | |
float | get_top () const |
Returns the topmost extent of the text in local 2-d coordinates, unmodified by the set_transform() matrix. | |
float | get_height () const |
Returns the net height of the text in local 2-d coordinates. | |
float | get_width () const |
Returns the net width of the text in local 2-d coordinates. | |
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. | |
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_num_rows () const |
Returns the number of rows of text that were generated. | |
PointerTo< PandaNode > | generate () |
Generates the text, according to the parameters indicated within the TextNode, and returns a Node that may be parented within the tree to represent it. | |
void | update () |
Can be called after the TextNode has been fully configured, to force the node to recompute its text immediately, rather than waiting for it to be drawn. | |
void | force_update () |
Forces the TextNode to recompute itself now, even if it believes nothing has changed. | |
void | set_wtext (const wstring &wtext) |
Changes the text that is displayed under the TextNode, with a wide text. | |
void | append_wtext (const wstring &text) |
Appends the indicates string to the end of the stored wide-character text. | |
float | calc_width (const wstring &line) const |
Returns the width of a line of text of arbitrary characters. | |
wstring | wordwrap_to (const wstring &wtext, float wordwrap_width, bool preserve_trailing_whitespace) const |
Inserts newlines into the given text at the appropriate places in order to make each line be the longest possible line that is not longer than wordwrap_width (and does not break any words, if possible). | |
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. | |
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 ConstPointerTo< TransformState > | calc_tight_bounds (LPoint3f &min_point, LPoint3f &max_point, bool &found_any, const TransformState *transform) const |
This is used to support NodePath::calc_tight_bounds(). | |
virtual bool | has_cull_callback () const |
Should be overridden by derived classes to return true if cull_callback() has been defined. | |
virtual bool | cull_callback (CullTraverser *trav, CullTraverserData &data) |
If has_cull_callback() returns true, this function will be called during the cull traversal to perform any additional operations that should be performed at cull time. | |
virtual BoundingVolume * | recompute_internal_bound () |
Called when needed to recompute the node's _internal_bound object. | |
virtual TypeHandle | get_type () const |
virtual TypeHandle | force_init_type () |
virtual PandaNode * | make_copy () const |
Returns a newly-allocated PandaNode that is a shallow copy of this one. | |
virtual bool | safe_to_flatten () const |
Returns true if it is generally safe to flatten out this particular kind of PandaNode by duplicating instances, false otherwise (for instance, a Camera cannot be safely flattened, because the Camera pointer itself is meaningful). | |
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. | |
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_combine () const |
Returns true if it is generally safe to combine this particular kind of PandaNode with other kinds of PandaNodes, adding children or whatever. | |
virtual bool | safe_to_flatten_below () const |
Returns true if a flatten operation may safely continue past this node, or false if it should drop all attributes here and stop. | |
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. | |
virtual void | xform (const LMatrix4f &mat) |
Transforms the contents of this PandaNode by the indicated matrix, if it means anything to do so. | |
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. | |
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. | |
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. | |
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. | |
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). | |
virtual int | get_visible_child () const |
Returns the index number of the currently visible child of this node. | |
PointerTo< PandaNode > | copy_subgraph () const |
Allocates and returns a complete copy of this PandaNode and the entire scene graph rooted at this PandaNode. | |
int | get_num_parents () const |
Returns the number of parent nodes this node has. | |
PandaNode * | get_parent (int n) const |
Returns the nth parent node of this node. | |
int | find_parent (PandaNode *node) const |
Returns the index of the indicated parent node, if it is a parent, or -1 if it is not. | |
int | get_num_children () const |
Returns the number of child nodes this node has. | |
PandaNode * | get_child (int n) const |
Returns the nth child node of this node. | |
int | get_child_sort (int n) const |
Returns the sort index of the nth child node of this node (that is, the number that was passed to add_child()). | |
int | find_child (PandaNode *node) const |
Returns the index of the indicated child node, if it is a child, or -1 if it is not. | |
void | add_child (PandaNode *child_node, int sort=0) |
Adds a new child to the node. | |
void | remove_child (int n) |
Removes the nth child from the node. | |
bool | remove_child (PandaNode *child_node) |
Removes the indicated child from the node. | |
bool | replace_child (PandaNode *orig_child, PandaNode *new_child) |
Searches for the orig_child node in the node's list of children, and replaces it with the new_child instead. | |
bool | stash_child (PandaNode *child_node) |
Stashes the indicated child node. | |
void | stash_child (int child_index) |
Stashes the indicated child node. | |
bool | unstash_child (PandaNode *child_node) |
Returns the indicated stashed node to normal child status. | |
void | unstash_child (int stashed_index) |
Returns the indicated stashed node to normal child status. | |
int | get_num_stashed () const |
Returns the number of stashed nodes this node has. | |
PandaNode * | get_stashed (int n) const |
Returns the nth stashed node of this node. | |
int | get_stashed_sort (int n) const |
Returns the sort index of the nth stashed node of this node (that is, the number that was passed to add_child()). | |
int | find_stashed (PandaNode *node) const |
Returns the index of the indicated stashed node, if it is a stashed child, or -1 if it is not. | |
void | add_stashed (PandaNode *child_node, int sort=0) |
Adds a new child to the node, directly as a stashed child. | |
void | remove_stashed (int n) |
Removes the nth stashed child from the node. | |
void | remove_all_children () |
Removes all the children from the node at once, including stashed children. | |
void | steal_children (PandaNode *other) |
Moves all the children from the other node onto this node. | |
void | copy_children (PandaNode *other) |
Makes another instance of all the children of the other node, copying them to this node. | |
void | set_attrib (const RenderAttrib *attrib, int override=0) |
Adds the indicated render attribute to the scene graph on this node. | |
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. | |
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. | |
void | clear_attrib (TypeHandle type) |
Removes the render attribute of the given type from this node. | |
void | set_effect (const RenderEffect *effect) |
Adds the indicated render effect to the scene graph on this 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. | |
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. | |
void | clear_effect (TypeHandle type) |
Removes the render effect of the given type from this node. | |
void | set_state (const RenderState *state) |
Sets the complete RenderState that will be applied to all nodes at this level and below. | |
const RenderState * | get_state () const |
Returns the complete RenderState that will be applied to all nodes at this level and below, as set on this node. | |
void | clear_state () |
Resets this node to leave the render state alone. | |
void | set_effects (const RenderEffects *effects) |
Sets the complete RenderEffects that will be applied this node. | |
const RenderEffects * | get_effects () const |
Returns the complete RenderEffects that will be applied to this node. | |
void | clear_effects () |
Resets this node to have no render effects. | |
void | set_transform (const TransformState *transform) |
Sets the transform that will be applied to this node and below. | |
void | clear_transform () |
Resets the transform on this node to the identity transform. | |
void | set_draw_mask (DrawMask mask) |
Sets the hide/show bits of this particular node. | |
DrawMask | get_draw_mask () const |
Returns the hide/show bits of this particular node. | |
CollideMask | get_net_collide_mask () const |
Returns the union of all into_collide_mask() values set at CollisionNodes at this level and below. | |
virtual void | output (ostream &out) const |
Outputs the Namable. | |
void | ls (ostream &out, int indent_level) const |
Lists all the nodes at and below the current path hierarchically. | |
void | set_bound (BoundingVolumeType type) |
Sets the type of the external bounding volume that is placed around this node and all of its children. | |
void | set_bound (const BoundingVolume &volume) |
Resets the internal bounding volume so that it is the indicated volume. | |
void | set_bound (BoundingVolumeType type) |
Sets the type of the bounding volume that will be dynamically computed for this particular node. | |
const BoundingVolume & | get_bound () const |
Returns the node's external bounding volume. | |
const BoundingVolume & | get_internal_bound () const |
Returns the node's internal bounding volume. | |
virtual bool | is_geom_node () const |
A simple downcast check. | |
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 void | set_velocity (const LVector3f &vel) |
Indicates the instantaneous velocity of this node. | |
Children | get_children () const |
Returns an object that can be used to walk through the list of children of the node. | |
ChildrenCopy | get_children_copy () const |
Returns an object that can be used to walk through the list of children of the node. | |
virtual void | write_datagram (BamWriter *manager, Datagram &dg) |
Writes the contents of this object to the datagram for shipping out to a Bam file. | |
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 | finalize () |
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 | get_type_index () const |
Returns the internal index number associated with this object's TypeHandle, a unique number for each different type. | |
bool | is_of_type (TypeHandle handle) const |
Returns true if the current object is or derives from the indicated type. | |
bool | is_exact_type (TypeHandle handle) const |
Returns true if the current object is the indicated type exactly. | |
void | set_name (const string &name) |
void | clear_name () |
Resets the Namable's name to empty. | |
bool | has_name () const |
Returns true if the Namable has a nonempty name set, false if the name is empty. | |
const string & | get_name () const |
bool | mark_bound_stale () |
Marks the current bounding volume as stale, so that it will be recomputed later. | |
void | force_bound_stale () |
Marks the current volume as stale and propagates the effect at least one level, even if it had already been marked stale. | |
bool | is_bound_stale () const |
Returns true if the bound is currently marked stale and will be recomputed the next time get_bound() is called. | |
void | set_final (bool flag) |
Sets the "final" flag on this BoundedObject. | |
bool | is_final () const |
Returns the current state of the "final" flag. | |
int | get_ref_count () const |
Returns the current reference count. | |
int | ref () const |
Explicitly increments the reference count. | |
int | unref () const |
Explicitly decrements the reference count. | |
void | test_ref_count_integrity () const |
Does some easy checks to make sure that the reference count isn't completely bogus. | |
void | set_encoding (Encoding encoding) |
Specifies how the string set via set_text() is to be interpreted. | |
Encoding | get_encoding () const |
Returns the encoding by which the string set via set_text() is to be interpreted. | |
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. | |
bool | has_text () const |
void | make_upper () |
Adjusts the text stored within the encoder to all uppercase letters (preserving accent marks correctly). | |
void | make_lower () |
Adjusts the text stored within the encoder to all lowercase letters (preserving accent marks correctly). | |
string | get_text () const |
Returns the current text, as encoded via the current encoding system. | |
string | get_text (Encoding encoding) const |
Returns the current text, as encoded via the indicated encoding system. | |
int | get_num_chars () const |
Returns the number of characters in the stored text. | |
int | get_unicode_char (int index) const |
Returns the Unicode value of the nth character in the stored text. | |
void | set_unicode_char (int index, int character) |
Sets the Unicode value of the nth character in the stored text. | |
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. | |
string | get_text_as_ascii () const |
Returns the text associated with the node, converted as nearly as possible to a fully-ASCII representation. | |
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. | |
string | encode_wtext (const wstring &wtext) const |
Encodes a wide-text string into a single-char string, according to the current encoding. | |
wstring | decode_text (const string &text) const |
Returns the given wstring decoded to a single-byte string, via the current encoding system. | |
Static Public Member Functions | |
void | set_default_font (TextFont *) |
Specifies the default font to be used for any TextNode whose font is uninitialized or NULL. | |
TextFont * | get_default_font () |
Specifies the default font to be used for any TextNode whose font is uninitialized or NULL. | |
TypeHandle | get_class_type () |
void | init_type () |
void | register_with_read_factory () |
Tells the BamReader how to create objects of type PandaNode. | |
void | set_default_encoding (Encoding encoding) |
Specifies the default encoding to be used for all subsequently created TextEncoder objects. | |
Encoding | get_default_encoding () |
Specifies the default encoding to be used for all subsequently created TextEncoder objects. | |
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. | |
bool | unicode_isalpha (int character) |
Returns true if the indicated character is an alphabetic letter, false otherwise. | |
bool | unicode_isdigit (int character) |
Returns true if the indicated character is a numeric digit, false otherwise. | |
bool | unicode_ispunct (int character) |
Returns true if the indicated character is a punctuation mark, false otherwise. | |
bool | unicode_islower (int character) |
Returns true if the indicated character is a lowercase letter, false otherwise. | |
bool | unicode_isupper (int character) |
Returns true if the indicated character is an uppercase letter, false otherwise. | |
int | unicode_toupper (int character) |
Returns the uppercase equivalent of the given Unicode character. | |
int | unicode_tolower (int character) |
Returns the uppercase equivalent of the given Unicode character. | |
string | upper (const string &source) |
Converts the string to uppercase, assuming the string is encoded in the default encoding. | |
string | upper (const string &source, Encoding encoding) |
Converts the string to uppercase, assuming the string is encoded in the indicated encoding. | |
string | lower (const string &source) |
Converts the string to lowercase, assuming the string is encoded in the default encoding. | |
string | lower (const string &source, Encoding encoding) |
Converts the string to lowercase, assuming the string is encoded in the indicated encoding. | |
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. | |
string | encode_wtext (const wstring &wtext, Encoding encoding) |
Encodes a wide-text string into a single-char string, according to the given encoding. | |
wstring | decode_text (const string &text, Encoding encoding) |
Returns the given wstring decoded to a single-byte string, via the given encoding system. | |
Static Public Attributes | |
TypedWritable *const | Null = (TypedWritable*)0L |
Protected Types | |
typedef pmap< PandaNode *, PandaNode * > | InstanceMap |
Protected Member Functions | |
virtual void | propagate_stale_bound () |
Called by BoundedObject::mark_bound_stale(), this should make sure that all bounding volumes that depend on this one are marked stale also. | |
virtual BoundingVolume * | recompute_bound () |
Recomputes the dynamic bounding volume for this object. | |
void | changed_internal_bound () |
Should be called whenever you adjust the _internal_bound member, to force the external bounding volume to be recomputed. | |
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 | 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 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. | |
void | add_net_collide_mask (CollideMask mask) |
Adds the indicated bits into the net_collide_mask for this node. | |
virtual PointerTo< PandaNode > | r_copy_subgraph (InstanceMap &inst_map) const |
This is the recursive implementation of copy_subgraph(). | |
virtual void | r_copy_children (const PandaNode *from, InstanceMap &inst_map) |
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. | |
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. | |
const BoundingVolume * | get_bound_ptr () const |
Returns the state of the _bound pointer. | |
BoundingVolume * | set_bound_ptr (BoundingVolume *bound) |
Changes the _bound pointer. | |
Static Protected Member Functions | |
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 | |
BoundedObject | _internal_bound |
Private Types | |
enum | CheesyPlacement { CP_above, CP_below, CP_top, CP_bottom, CP_within } |
enum | CheesyTransform { CT_none, CT_mirror_x, CT_mirror_y, CT_rotate_90, CT_rotate_180, CT_rotate_270, CT_squash, CT_squash_mirror_y, CT_squash_mirror_diag, CT_small_squash, CT_small_squash_mirror_y, CT_small, CT_small_rotate_270, CT_tiny, CT_tiny_mirror_x, CT_tiny_rotate_270 } |
enum | Flags { F_has_text_color = 0x00000001, F_has_wordwrap = 0x00000002, F_has_frame = 0x00000004, F_frame_as_margin = 0x00000008, F_has_card = 0x00000010, F_card_as_margin = 0x00000020, F_has_card_texture = 0x00000040, F_has_shadow = 0x00000080, F_frame_corners = 0x00000100, F_card_transp = 0x00000200, F_has_card_border = 0x00000400, F_needs_rebuild = 0x00004000, F_needs_measure = 0x00008000, F_small_caps = 0x00010000 } |
Private Member Functions | |
void | invalidate_no_measure () |
Called internally whenever some state on the TextNode changes, requiring the internal geometry to be recomputed, but which will not result in a change in the size or shape of the text (for instance, the text color changes). | |
void | invalidate_with_measure () |
Called internally whenever some state on the TextNode changes, requiring the internal geometry to be recomputed, and which will may result in a change in the size or shape of the text (for instance, the text scale changes). | |
void | check_rebuild () const |
Called internally to call do_rebuild() if necessary (that is, if the internal geometry has changed recently). | |
void | check_measure () const |
Called internally to call do_measure() if necessary; this will remeasure the text without necessarily rebuilding it. | |
void | do_rebuild () |
Removes any existing children of the TextNode, and adds the newly generated text instead. | |
void | do_measure () |
Can be called in lieu of do_rebuild() to measure the text and set up the bounding boxes properly without actually assembling it. | |
float | assemble_row (wstring::iterator &si, const wstring::iterator &send, TextFont *font, GeomNode *dest, const LMatrix4f &mat) |
Assembles the letters in the source string, up until the first newline or the end of the string into a single row (which is parented to 'dest'), and returns the length of the row. | |
PointerTo< PandaNode > | assemble_text (wstring::iterator si, const wstring::iterator &send, TextFont *font, LVector2f &ul, LVector2f &lr, int &num_rows) |
Constructs a hierarchy of nodes that contain the geometry representing the indicated source text, and returns it. | |
float | measure_row (wstring::iterator &si, const wstring::iterator &send, TextFont *font) |
Returns the length of the row in units, as it would be if it were assembled, without actually assembling it. | |
void | measure_text (wstring::iterator si, const wstring::iterator &send, TextFont *font, LVector2f &ul, LVector2f &lr, int &num_rows) |
Sets the ul, lr corners to fit the text, without actually assembling it. | |
void | get_character_glyphs (int character, TextFont *font, bool &got_glyph, const TextGlyph *&glyph, const TextGlyph *&second_glyph, UnicodeLatinMap::AccentType &accent_type, int &additional_flags, float &glyph_scale, float &advance_scale) |
Looks up the glyph(s) from the font for the appropriate character. | |
void | tack_on_accent (UnicodeLatinMap::AccentType accent_type, const LPoint3f &min_vert, const LPoint3f &max_vert, const LPoint3f ¢roid, TextFont *font, GeomNode *dest, Geom *geom_array[], int &num_geoms) |
This is a cheesy attempt to tack on an accent to an ASCII letter for which we don't have the appropriate already-accented glyph in the font. | |
bool | tack_on_accent (char accent_mark, CheesyPlacement placement, CheesyTransform transform, const LPoint3f &min_vert, const LPoint3f &max_vert, const LPoint3f ¢roid, TextFont *font, GeomNode *dest, Geom *geom_array[], int &num_geoms) |
Generates a cheesy accent mark above (or below, etc.) the character. | |
PointerTo< PandaNode > | make_frame () |
Creates a frame around the text. | |
PointerTo< PandaNode > | make_card () |
Creates a card behind the text. | |
PointerTo< PandaNode > | make_card_with_border () |
Creates a card behind the text with a specified border for button edge or what have you. | |
Static Private Member Functions | |
void | load_default_font () |
This functin is called once (or never), the first time someone attempts to render a TextNode using the default font. | |
Private Attributes | |
PointerTo< TextFont > | _font |
PointerTo< PandaNode > | _internal_geom |
float | _slant |
PointerTo< Texture > | _card_texture |
Colorf | _text_color |
Colorf | _shadow_color |
Colorf | _frame_color |
Colorf | _card_color |
int | _flags |
Alignment | _align |
float | _wordwrap_width |
float | _frame_width |
float | _card_border_size |
float | _card_border_uv_portion |
float | _small_caps_scale |
LVector2f | _frame_ul |
LVector2f | _frame_lr |
LVector2f | _card_ul |
LVector2f | _card_lr |
LVector2f | _shadow_offset |
string | _bin |
int | _draw_order |
LMatrix4f | _transform |
CoordinateSystem | _coordinate_system |
LPoint2f | _ul2d |
LPoint2f | _lr2d |
LPoint3f | _ul3d |
LPoint3f | _lr3d |
int | _num_rows |
Static Private Attributes | |
PointerTo< TextFont > | _default_font |
bool | _loaded_default_font = false |
TypeHandle | _type_handle |
Friends | |
class | PandaNode::Children |
This class does basic text assembly; given a string of text and a TextFont object, it creates a piece of geometry that may be placed in the 3-d or 2-d world to represent the indicated text.
The TextNode may be used in one of two ways. Naively, it may simply be parented directly into the scene graph and rendered as if it were a GeomNode; in this mode, the actual polygon geometry that renders the text is not directly visible or accessible, but remains hidden within the TextNode.
The second way TextNode may be used is as a text generator. To use it in this way, do not parent the TextNode to the scene graph; instead, set the properties of the text and call generate() to return an ordinary node, containing ordinary geometry, which you may use however you like. Each time you call generate() a new node is returned.
Definition at line 81 of file textNode.h.
|
Definition at line 206 of file pandaNode.h. |
|
Definition at line 86 of file textNode.h. |
|
Definition at line 58 of file boundedObject.h. |
|
Definition at line 273 of file textNode.h. |
|
Definition at line 280 of file textNode.h. |
|
Definition at line 55 of file textEncoder.h. Referenced by TextEncoder::get_encoding(). |
|
Reimplemented from TextEncoder. Definition at line 335 of file textNode.h. |
|
Definition at line 88 of file textNode.cxx. |
|
Definition at line 133 of file textNode.cxx. References _font, TextEncoder::decode_text(), TextEncoder::encode_wtext(), nassertr, NULL, and wstring. |
|
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 1090 of file pandaNode.cxx. References PandaNode::_cycler, PandaNode::children_changed(), PandaNode::new_connection(), PT, and PandaNode::remove_child(). Referenced by PandaNode::replace_child(), and PandaNode::steal_children(). |
|
Adds the indicated bits into the net_collide_mask for this node. This is normally called only by CollisionNode::recompute_bound(). Definition at line 1071 of file pandaNode.I. |
|
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. Definition at line 1406 of file pandaNode.cxx. |
|
Appends the indicates string to the end of the stored text.
Reimplemented from TextEncoder. Definition at line 1420 of file textNode.I. |
|
Appends a single character to the end of the stored text. This may be a wide character, up to 16 bits in Unicode. Reimplemented from TextEncoder. Definition at line 1438 of file textNode.I. |
|
Appends the indicates string to the end of the stored wide-character text.
Reimplemented from TextEncoder. Definition at line 1709 of file textNode.I. |
|
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 495 of file textNode.cxx. References _card_color, and _shadow_color. |
|
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 1641 of file pandaNode.cxx. |
|
Assembles the letters in the source string, up until the first newline or the end of the string into a single row (which is parented to 'dest'), and returns the length of the row. The source pointer is moved to the terminating character. Definition at line 806 of file textNode.cxx. |
|
Constructs a hierarchy of nodes that contain the geometry representing the indicated source text, and returns it. Also sets the ul, lr corners. Definition at line 942 of file textNode.cxx. |
|
This is used to support NodePath::calc_tight_bounds(). It is not intended to be called directly, and it has nothing to do with the normal Panda bounding-volume computation. If the node contains any geometry, this updates min_point and max_point to enclose its bounding box. found_any is to be set true if the node has any geometry at all, or left alone if it has none. This method may be called over several nodes, so it may enter with min_point, max_point, and found_any already set. Reimplemented from PandaNode. Definition at line 587 of file textNode.cxx. |
|
Returns the width of a line of text of arbitrary characters. The line should not include the newline character. Definition at line 1727 of file textNode.I. |
|
Returns the width of a line of text of arbitrary characters. The line should not include the newline character. Definition at line 1474 of file textNode.I. |
|
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 1456 of file textNode.I. Referenced by PGEntry::get_display_wtext(). |
|
Should be called whenever you adjust the _internal_bound member, to force the external bounding volume to be recomputed.
Definition at line 1054 of file pandaNode.I. |
|
Called internally to call do_measure() if necessary; this will remeasure the text without necessarily rebuilding it.
Definition at line 1830 of file textNode.I. Referenced by clear_shadow(), get_card_texture(), get_frame_as_set(), has_shadow(), set_bin(), and set_shadow(). |
|
Called internally to call do_rebuild() if necessary (that is, if the internal geometry has changed recently).
Definition at line 1811 of file textNode.I. Referenced by get_bin(). |
|
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 1840 of file pandaNode.cxx. Referenced by PandaNode::add_child(), and PandaNode::remove_child(). |
|
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 630 of file pandaNode.I. Referenced by NodePath::clear_bin(), NodePath::clear_render_mode(), NodePath::has_texture(), and NodePath::set_texture_off(). |
|
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. Definition at line 1217 of file textNode.I. References _lr3d. |
|
Specifies that a card will not be drawn behind the text.
Definition at line 974 of file textNode.I. References _draw_order, and INLINE. |
|
Definition at line 505 of file textNode.I. References _card_texture, and INLINE. |
|
Definition at line 615 of file textNode.I. References _flags, F_frame_as_margin, has_frame(), INLINE, and nassertr. Referenced by set_frame_color(). |
|
Removes the render effect of the given type from this node.
Definition at line 703 of file pandaNode.I. References PandaNode::_cycler, BoundedObject::get_bound(), and INLINE. |
|
Resets this node to have no render effects.
Definition at line 819 of file pandaNode.I. References PandaNode::_cycler, and INLINE. |
|
Specifies that a border will not be drawn around the text.
Definition at line 748 of file textNode.I. References _flags, F_has_card, INLINE, and invalidate_no_measure(). |
|
Resets the Namable's name to empty.
Definition at line 82 of file namable.I. References Namable::_name, and INLINE. |
|
Specifies that a shadow will not be drawn behind the text.
Definition at line 1137 of file textNode.I. References _lr2d, check_measure(), and INLINE. |
|
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 769 of file pandaNode.I. References PandaNode::_internal_bound. |
|
Removes the text from the TextNode.
Reimplemented from TextEncoder. Definition at line 1404 of file textNode.I. |
|
Removes the text color specification; the text will be colored whatever it was in the source font file.
Definition at line 410 of file textNode.I. References _card_border_uv_portion, and INLINE. |
|
Resets the transform on this node to the identity transform.
Definition at line 875 of file pandaNode.I. Referenced by NodePath::get_transform(). |
|
Removes the wordwrap setting from the TextNode. Text will be as wide as it is. Definition at line 340 of file textNode.I. References Colorf, INLINE, and set_frame_color(). |
|
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 CollisionNode, and GeomNode. Definition at line 741 of file pandaNode.cxx. Referenced by CollisionNode::xform(). |
|
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 AnimBundleNode, AnimGroup, PartBundleNode, PartGroup, Character, CharacterJoint, CollisionNode, GeomSprite, PiecewiseCurve, ClipPlaneAttrib, FogAttrib, LensNode, LightAttrib, MaterialAttrib, RenderEffects, RenderState, TextureAttrib, Person, and Child. Definition at line 94 of file typedWritable.cxx. Referenced by RenderState::do_invert_compose(). |
|
Makes another instance of all the children of the other node, copying them to this node.
Definition at line 1546 of file pandaNode.cxx. References NULL. |
|
Allocates and returns a complete copy of this PandaNode and the entire scene graph rooted at this PandaNode. Some data may still be shared from the original (e.g. vertex index tables), but nothing that will impede normal use of the PandaNode. Definition at line 1037 of file pandaNode.cxx. References PandaNode::_cycler, PandaNode::get_num_stashed(), PandaNode::get_stashed(), PandaNode::get_stashed_sort(), nassertv, PT, and PandaNode::remove_stashed(). |
|
If has_cull_callback() returns true, 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. 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 PandaNode. Definition at line 660 of file textNode.cxx. |
|
Returns the given wstring decoded to a single-byte string, via the given encoding system.
Definition at line 226 of file textEncoder.cxx. |
|
Returns the given wstring decoded to a single-byte string, via the current encoding system.
Definition at line 725 of file textEncoder.I. Referenced by TextEncoder::get_default_encoding(), TextEncoder::get_unicode_char(), and ~TextNode(). |
|
Can be called in lieu of do_rebuild() to measure the text and set up the bounding boxes properly without actually assembling it.
Definition at line 744 of file textNode.cxx. References GeomNode::add_geom(), TextGlyph::get_advance(), TextGlyph::get_geom(), TextGlyph::get_state(), NULL, and PT. |
|
Removes any existing children of the TextNode, and adds the newly generated text instead.
Definition at line 725 of file textNode.cxx. |
|
Encodes a single wide char into a one-, two-, or three-byte string, according to the given encoding system.
Definition at line 146 of file textEncoder.cxx. |
|
Encodes a wide-text string into a single-char string, according to the given encoding.
Definition at line 205 of file textEncoder.cxx. References StringDecoder::get_next_character(), StringDecoder::is_eof(), and wstring. |
|
Encodes a wide-text string into a single-char string, according to the current encoding.
Definition at line 710 of file textEncoder.I. Referenced by TextEncoder::get_num_chars(), TextEncoder::get_unicode_char(), PGEntry::set_text(), TextEncoder::set_text(), TextEncoder::unicode_islower(), and ~TextNode(). |
|
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, ClassicNurbsCurve, CubicCurveseg, HermiteCurve, ParametricCurve, PiecewiseCurve, RopeNode, AmbientLight, Camera, DirectionalLight, Fog, GeomNode, LensNode, LightLensNode, LightNode, LODNode, ModelNode, ModelRoot, PlaneNode, PointLight, SequenceNode, Spotlight, and SwitchNode. Definition at line 2580 of file pandaNode.cxx. Referenced by SequenceNode::has_single_child_visibility(), GeomNode::output(), PlaneNode::register_with_read_factory(), LightNode::write(), and Fog::write_datagram(). |
|
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, RenderAttrib, RenderEffect, RenderEffects, RenderState, and TransformState. Definition at line 112 of file typedWritable.cxx. Referenced by BamReader::skip_pointer(). |
|
Returns the index of the indicated child node, if it is a child, or -1 if it is not.
Definition at line 1053 of file pandaNode.cxx. Referenced by PandaNode::cull_callback(), PandaFramework::event_i(), PandaFramework::event_l(), and PandaNode::get_parent(). |
|
Returns the index of the indicated parent node, if it is a parent, or -1 if it is not.
Definition at line 350 of file pandaNode.I. Referenced by PandaNode::cull_callback(), and PandaNode::has_selective_visibility(). |
|
Returns the index of the indicated stashed node, if it is a stashed child, or -1 if it is not.
Definition at line 1370 of file pandaNode.cxx. Referenced by NodePath::clear_two_sided(), and PandaNode::cull_callback(). |
|
Marks the current volume as stale and propagates the effect at least one level, even if it had already been marked stale.
Definition at line 188 of file boundedObject.I. References BoundedObject::_cycler, BoundedObject::F_final, and INLINE. Referenced by PandaNode::remove_child(). |
|
Reimplemented from PandaNode. Definition at line 390 of file textNode.h. |
|
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 1673 of file textNode.I. |
|
This method is deprecated and no longer does anything. It is included for historical purposes only and will shortly be removed. Definition at line 36 of file textNode.I. References INLINE. |
|
Generates the text, according to the parameters indicated within the TextNode, and returns a Node that may be parented within the tree to represent it.
Definition at line 280 of file textNode.cxx. References root. Referenced by PGButton::release(). |
|
Definition at line 306 of file textNode.I. References _flags, F_has_text_color, has_text_color(), INLINE, and invalidate_no_measure(). Referenced by PGEntry::get_text_def(). |
|
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 587 of file pandaNode.I. References PandaNode::_cycler, and INLINE. Referenced by NodePath::get_bin_draw_order(), NodePath::get_bin_name(), NodePath::get_color(), NodePath::get_quat(), NodePath::has_bin(), NodePath::has_material(), NodePath::has_texture_off(), NodePath::set_mat(), and NodePath::set_material(). |
|
Returns the drawing bin set with set_bin(), or empty string if no bin has been set.
Definition at line 1247 of file textNode.I. References check_rebuild(), INLINE, and invalidate_with_measure(). |
|
Returns the bottommost extent of the text in local 2-d coordinates, unmodified by the set_transform() matrix.
Definition at line 1528 of file textNode.I. |
|
Returns the node's external bounding volume. This is the bounding volume around the node and all of its children. Reimplemented from BoundedObject. Definition at line 1015 of file pandaNode.I. |
|
Returns the state of the _bound pointer. To be used only internally by derived classes. This returns a const pointer only; the bounding volume should not be modified directly, because that might interfere with pipelining. Instead, create a new copy with make_copy(), modify the copy, and set_bound_ptr() with the copy. Alternatively, if you have just called recompute_bound(), which is guaranteed to reset the pointer, just use the return value from that as a non-const BoundingVolume pointer. Definition at line 318 of file boundedObject.I. |
|
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 1066 of file textNode.I. Referenced by get_frame_actual(), and PGButton::release(). |
|
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 1034 of file textNode.I. References INLINE, invalidate_with_measure(), and TextEncoder::set_text(). Referenced by get_frame_as_set(). |
|
Definition at line 520 of file textNode.I. References Colorf, and set_shadow_color(). |
|
Definition at line 532 of file textNode.I. References _shadow_color. |
|
Definition at line 583 of file textNode.I. References _flags, F_has_frame, INLINE, and invalidate_no_measure(). |
|
Definition at line 643 of file textNode.I. References _frame_lr, _frame_ul, _lr2d, _ul2d, check_measure(), has_frame(), INLINE, is_frame_as_margin(), and nassertr. |
|
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 1099 of file textNode.I. |
|
Looks up the glyph(s) from the font for the appropriate character. If the desired glyph isn't available (especially in the case of an accented letter), tries to find a suitable replacement. Normally, only one glyph is returned per character, but in the case we have to simulate a missing ligature in the font, two glyphs might be returned. All parameters except the first two are output parameters. got_glyph is set true if the glyph (or an acceptable substitute) is successfully found, false otherwise; but even if it is false, glyph might still be non-NULL, indicating a stand-in glyph for a missing character. Definition at line 1138 of file textNode.cxx. References UnicodeLatinMap::AT_cedilla, UnicodeLatinMap::AT_comma_below, UnicodeLatinMap::AT_diaeresis, UnicodeLatinMap::AT_diaeresis_below, UnicodeLatinMap::AT_dot_above, UnicodeLatinMap::AT_dot_below, UnicodeLatinMap::AT_line_below, UnicodeLatinMap::AT_macron, UnicodeLatinMap::AT_ogonek, UnicodeLatinMap::AT_ring_above, UnicodeLatinMap::AT_ring_below, UnicodeLatinMap::AT_stroke, UnicodeLatinMap::AT_tilde, and UnicodeLatinMap::AT_tilde_below. |
|
Returns the nth child node of this node. See get_num_children(). Definition at line 390 of file pandaNode.I. References PandaNode::_cycler, INLINE, nassertr, and NULL. Referenced by PandaFramework::event_i(), PandaFramework::event_l(), PandaNode::has_single_child_visibility(), PT(), and PandaNode::replace_child(). |
|
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 409 of file pandaNode.I. References PandaNode::_cycler, INLINE, and nassertr. Referenced by PandaNode::has_single_child_visibility(), and PandaNode::replace_child(). |
|
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 keeps the PipelineCycler open the whole time. However, this object does not protect you from self-modifying loops (e.g. adding or removing children during traversal). Definition at line 1103 of file pandaNode.I. Referenced by CullTraverser::get_bounds_inner_viz_state(), NodePath::get_top_node(), SortByState::operator()(), PandaNode::preserve_name(), NodePath::set_transparency(), and DataGraphTraverser::traverse(). |
|
Returns an object that can be used to walk through the list of children of the node. Unlike get_children(), this function actually returns an object that protects you from self-modifying loops, because it makes and returns a copy of the complete children list. Definition at line 1127 of file pandaNode.I. |
|
Reimplemented from TextEncoder. Definition at line 378 of file textNode.h. |
|
Definition at line 1351 of file textNode.I. References _flags, F_needs_rebuild, and INLINE. |
|
Specifies the default encoding to be used for all subsequently created TextEncoder objects. See set_encoding(). Definition at line 117 of file textEncoder.I. References TextEncoder::decode_text(), INLINE, and TextEncoder::set_wtext(). |
|
Specifies the default font to be used for any TextNode whose font is uninitialized or NULL. See set_font(). Definition at line 127 of file textNode.I. References _flags, F_small_caps, and INLINE. Referenced by set_default_font(). |
|
Returns the hide/show bits of this particular node. See set_draw_mask(). Definition at line 938 of file pandaNode.I. Referenced by CullTraverserData::~CullTraverserData(). |
|
Returns the drawing order set with set_draw_order().
Definition at line 1295 of file textNode.I. |
|
Returns the render effect of the indicated type, if it is defined on the node, or NULL if it is not.
Definition at line 664 of file pandaNode.I. References INLINE, and PandaNode::r_list_descendants(). |
|
Returns the complete RenderEffects that will be applied to this node.
Definition at line 805 of file pandaNode.I. References PandaNode::_cycler, and INLINE. Referenced by CullTraverser::traverse(). |
|
Returns the nth char of the stored text, as a one-, two-, or three-byte encoded string.
Definition at line 355 of file textEncoder.I. References UnicodeLatinMap::CT_punct. |
|
Returns the nth char of the stored text, as a one-, two-, or three-byte encoded string.
Definition at line 340 of file textEncoder.I. References INLINE, UnicodeLatinMap::look_up(), and NULL. Referenced by TextEncoder::append_text(). |
|
Returns the encoding by which the string set via set_text() is to be interpreted. See set_encoding(). Definition at line 83 of file textEncoder.I. References TextEncoder::_default_encoding, TextEncoder::Encoding, and INLINE. Referenced by TextEncoder::append_text(). |
|
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. Definition at line 941 of file pandaNode.cxx. Referenced by CullTraverser::get_bounds_inner_viz_state(). |
|
Returns the font currently in use, if any. If this returns NULL, the default font will be used, which can be retrieved via get_default_font(). Definition at line 90 of file textNode.I. References _default_font, _loaded_default_font, INLINE, and load_default_font(). |
|
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. Definition at line 832 of file textNode.I. References _transform, get_card_actual(), and INLINE. |
|
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 808 of file textNode.I. References _card_lr, _card_ul, _lr2d, _ul2d, check_measure(), get_card_as_set(), has_card(), INLINE, and is_card_as_margin(). |
|
Definition at line 476 of file textNode.I. |
|
Definition at line 906 of file textNode.I. References _bin, INLINE, and invalidate_no_measure(). |
|
Returns the thickness of the lines that will be used to draw the frame.
Definition at line 871 of file textNode.I. References _flags, F_has_shadow, and invalidate_no_measure(). |
|
Returns the net height of the text in local 2-d coordinates.
Definition at line 1562 of file textNode.I. |
|
Returns the node's internal bounding volume. This is the bounding volume around the node alone, without including children. Definition at line 1032 of file pandaNode.I. |
|
Returns the leftmost extent of the text in local 2-d coordinates, unmodified by the set_transform() matrix.
Definition at line 1492 of file textNode.I. Referenced by PGEntry::get_text_def(). |
|
Returns the number of units high each line of text is. This is based on the font. Definition at line 145 of file textNode.I. Referenced by PGEntry::accept(), and PGEntry::get_display_wtext(). |
|
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 1614 of file textNode.I. |
|
|
Returns the union of all into_collide_mask() values set at CollisionNodes at this level and below.
Definition at line 954 of file pandaNode.I. |
|
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 964 of file pandaNode.cxx. |
|
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 282 of file textEncoder.I. References TextEncoder::encode_wtext(), TextEncoder::get_wtext_as_ascii(), and INLINE. |
|
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 374 of file pandaNode.I. Referenced by PandaFramework::event_l(), SelectiveChildNode::has_selective_visibility(), PandaNode::has_single_child_visibility(), PT(), and LODNode::xform(). |
|
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 317 of file pandaNode.I. References PandaNode::_cycler, INLINE, and nassertr. Referenced by ParticleSystem::birth_litter(), DataNode::define_output(), Fog::output(), PandaNode::transform_changed(), and DataGraphTraverser::traverse(). |
|
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 1632 of file textNode.I. |
|
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 508 of file pandaNode.I. References PandaNode::_cycler, and INLINE. Referenced by PandaNode::copy_subgraph(). |
|
Returns the nth parent node of this node. See get_num_parents(). Definition at line 333 of file pandaNode.I. References PandaNode::find_child(), INLINE, and PandaNode::stash_child(). Referenced by ParticleSystem::birth_litter(), and DataNode::define_output(). |
|
Returns the current reference count.
Definition at line 183 of file referenceCount.I. Referenced by RenderState::determine_bin_index(), RenderEffects::determine_show_bounds(), FontPool::ns_garbage_collect(), TexturePool::ns_garbage_collect(), MaterialPool::ns_get_material(), and TexturePool::ns_release_texture(). |
|
Returns the rightmost extent of the text in local 2-d coordinates, unmodified by the set_transform() matrix.
Definition at line 1510 of file textNode.I. |
|
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 1167 of file textNode.I. References _ul2d. |
|
Definition at line 682 of file textNode.I. References _flags, F_frame_corners, and INLINE. |
|
Definition at line 279 of file textNode.I. References Colorf, INLINE, and set_text_color(). |
|
Returns the small_caps flag. See set_small_caps(). Definition at line 213 of file textNode.I. References _align, INLINE, and invalidate_with_measure(). |
|
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 252 of file textNode.I. References _flags, F_has_wordwrap, has_wordwrap(), INLINE, and invalidate_with_measure(). |
|
Returns the nth stashed node of this node. See get_num_stashed(). Definition at line 524 of file pandaNode.I. References PandaNode::_cycler, and INLINE. Referenced by PandaNode::copy_subgraph(). |
|
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 543 of file pandaNode.I. References PandaNode::_cycler, and INLINE. Referenced by PandaNode::copy_subgraph(). |
|
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. Reimplemented in PGItem. Definition at line 749 of file pandaNode.I. References BoundedObject::get_bound(), and INLINE. Referenced by NodePath::do_billboard_point_eye(). |
|
Returns the current text, as encoded via the indicated encoding system.
Definition at line 231 of file textEncoder.I. References TextEncoder::_flags, TextEncoder::_wtext, TextEncoder::F_got_text, TextEncoder::get_wtext(), INLINE, and nassertv. |
|
Returns the current text, as encoded via the current encoding system.
Definition at line 212 of file textEncoder.I. References TextEncoder::_wtext, TextEncoder::get_wtext(), INLINE, and nassertr. Referenced by TextEncoder::clear_text(), TextEncoder::unicode_isalpha(), and TextEncoder::unicode_isdigit(). |
|
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 397 of file textEncoder.I. References UnicodeLatinMap::Entry::_toupper_character, INLINE, UnicodeLatinMap::look_up(), and NULL. |
|
Definition at line 437 of file textNode.I. |
|
Returns the topmost extent of the text in local 2-d coordinates, unmodified by the set_transform() matrix.
Definition at line 1546 of file textNode.I. |
|
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. Reimplemented from PandaNode. Definition at line 1323 of file textNode.I. References _flags, F_needs_rebuild, and INLINE. |
|
Reimplemented from PandaNode. Definition at line 387 of file textNode.h. |
|
Returns the internal index number associated with this object's TypeHandle, a unique number for each different type. This is equivalent to get_type().get_index(). Definition at line 71 of file typedObject.I. References TypeHandle::get_name(), TypedObject::get_type(), and INLINE. |
|
Returns the 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 301 of file textEncoder.I. References TextEncoder::decode_text(), and TextEncoder::encode_wtext(). |
|
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 463 of file textNode.cxx. |
|
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 1596 of file textNode.I. |
|
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 1016 of file pandaNode.cxx. |
|
Returns the net width of the text in local 2-d coordinates.
Definition at line 1578 of file textNode.I. |
|
Definition at line 367 of file textNode.I. References _frame_color. |
|
Returns the text associated with the TextEncoder, as a wide-character string.
Definition at line 675 of file textEncoder.I. Referenced by TextEncoder::get_text(), TextEncoder::has_text(), TextEncoder::make_lower(), TextEncoder::make_upper(), and TextEncoder::set_text(). |
|
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 110 of file textEncoder.cxx. References UnicodeLatinMap::Entry::_ascii_additional, UnicodeLatinMap::Entry::_ascii_equiv, TextEncoder::E_iso8859, TextEncoder::E_utf8, UnicodeLatinMap::look_up(), and NULL. Referenced by TextEncoder::get_num_chars(). |
|
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 609 of file pandaNode.I. References PandaNode::_cycler, INLINE, and RenderEffects::make_empty(). Referenced by NodePath::clear_material(), NodePath::get_hpr(), NodePath::set_hpr_scale(), and NodePath::set_sz(). |
|
Returns true if an explicit drawing bin has been set via set_bin(), false otherwise.
Definition at line 1232 of file textNode.I. |
|
Definition at line 987 of file textNode.I. References _transform, INLINE, and invalidate_with_measure(). Referenced by get_frame_as_set(), and is_frame_as_margin(). |
|
Definition at line 544 of file textNode.I. References _shadow_color. Referenced by set_text_color(). |
|
Definition at line 631 of file textNode.I. References _frame_lr, _frame_ul, has_frame(), INLINE, and nassertr. Referenced by set_frame_color(). |
|
Should be overridden by derived classes to return true if cull_callback() has been defined. Otherwise, returns false to indicate cull_callback() does not need to be called for this node during the cull traversal. Reimplemented from PandaNode. Definition at line 619 of file textNode.cxx. |
|
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 686 of file pandaNode.I. Referenced by NodePath::set_render_mode_wireframe(). |
|
Definition at line 761 of file textNode.I. References _flags, F_has_card, and INLINE. Referenced by clear_card_texture(), get_card_texture(), and has_card_texture(). |
|
Returns true if the Namable has a nonempty name set, false if the name is empty.
Definition at line 97 of file namable.I. References Namable::get_name(), and INLINE. Referenced by EggGroupUniquifier::EggGroupUniquifier(), Texture::read(), and Texture::Texture(). |
|
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 918 of file pandaNode.cxx. References PandaNode::find_parent(), nassertr, and NULL. Referenced by CullTraverser::get_bounds_inner_viz_state(). |
|
Definition at line 1150 of file textNode.I. References _lr2d, check_measure(), and INLINE. Referenced by set_frame_corners(). |
|
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 999 of file pandaNode.cxx. References PandaNode::_cycler, PandaNode::get_child(), PandaNode::get_child_sort(), PandaNode::get_num_children(), nassertv, PT, and PandaNode::remove_child(). |
|
Definition at line 193 of file textEncoder.I. References TextEncoder::_flags, TextEncoder::_wtext, TextEncoder::F_got_text, TextEncoder::F_got_wtext, TextEncoder::get_wtext(), INLINE, and wstring. Referenced by TextEncoder::set_default_encoding(), and TextEncoder::unicode_ispunct(). |
|
Definition at line 425 of file textNode.I. References _flags, and F_has_card_border. Referenced by get_align(), set_align(), and wordwrap_to(). |
|
Definition at line 355 of file textNode.I. References _frame_color, and invalidate_no_measure(). Referenced by get_small_caps_scale(), and set_small_caps_scale(). |
|
Reimplemented from TextEncoder. Definition at line 381 of file textNode.h. |
|
Called internally whenever some state on the TextNode changes, requiring the internal geometry to be recomputed, but which will not result in a change in the size or shape of the text (for instance, the text color changes).
Definition at line 1772 of file textNode.I. Referenced by clear_frame(), get_align(), get_card_color(), get_frame_corners(), get_frame_line_width(), has_wordwrap(), set_align(), set_card_actual(), set_card_color(), set_frame_actual(), set_frame_color(), set_frame_line_width(), and set_text_color(). |
|
Called internally whenever some state on the TextNode changes, requiring the internal geometry to be recomputed, and which will may result in a change in the size or shape of the text (for instance, the text scale changes).
Definition at line 1793 of file textNode.I. Referenced by get_bin(), get_card_as_set(), get_small_caps(), get_small_caps_scale(), has_card(), is_card_as_margin(), set_draw_order(), set_small_caps_scale(), and thaw(). |
|
Returns true if the bound is currently marked stale and will be recomputed the next time get_bound() is called. This function is defined up at the top of this file, because several of the inline functions below reference it. Definition at line 217 of file boundedObject.I. References BoundedObject::_cycler, and INLINE. Referenced by BoundedObject::~BoundedObject(). |
|
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 1012 of file textNode.I. References _coordinate_system, INLINE, and invalidate_with_measure(). Referenced by get_frame_as_set(). |
|
Returns true if the current object is the indicated type exactly.
Definition at line 101 of file typedObject.I. Referenced by PT(), and CollisionNode::xform(). |
|
Returns 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 280 of file boundedObject.I. |
|
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 786 of file textNode.I. References _card_lr, _card_ul, has_card(), INLINE, and nassertr. Referenced by get_card_texture(). |
|
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 1624 of file pandaNode.cxx. References PandaNode::detach(), NodePathComponent::get_node(), NodePathComponent::is_top_node(), nassertv, NULL, and NodePathComponent::set_next(). Referenced by CullTraverser::get_bounds_inner_viz_state(), NodePath::get_transparency(), PT(), and NodePath::set_transparency(). |
|
|
This functin is called once (or never), the first time someone attempts to render a TextNode using the default font. It should attempt to load the default font, using the compiled-in version if it is available, or whatever system file may be named in Configrc. Definition at line 1858 of file textNode.cxx. Referenced by get_font(). |
|
Converts the string to lowercase, assuming the string is encoded in the indicated encoding.
Definition at line 634 of file textEncoder.I. |
|
Converts the string to lowercase, assuming the string is encoded in the default encoding.
Definition at line 619 of file textEncoder.I. |
|
Lists all the nodes at and below the current path hierarchically.
Definition at line 893 of file pandaNode.I. Referenced by PGEntry::erase(). |
|
Creates a card behind the text.
Definition at line 1672 of file textNode.cxx. |
|
Creates a card behind the text with a specified border for button edge or what have you.
Definition at line 1723 of file textNode.cxx. References _default_font. |
|
Returns a newly-allocated PandaNode that is a shallow copy of this one. It will be a different pointer, but its internal data may or may not be shared with that of the original PandaNode. No children will be copied. Reimplemented in Character, CollisionNode, DataNode, ProjectionScreen, RopeNode, AmbientLight, Camera, DirectionalLight, Fog, GeomNode, LensNode, LODNode, ModelNode, ModelRoot, PlaneNode, PointLight, SequenceNode, Spotlight, SwitchNode, PGButton, PGEntry, PGItem, PGTop, PGWaitBar, ForceNode, and PhysicalNode. Definition at line 511 of file pandaNode.cxx. Referenced by Character::r_copy_char(), and PandaNode::remove_all_children(). |
|
Creates a frame around the text.
Definition at line 1625 of file textNode.cxx. |
|
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, AmbientLight, Camera, DirectionalLight, Fog, GeomNode, LensNode, LODNode, ModelNode, ModelRoot, PlaneNode, PointLight, SequenceNode, Spotlight, and SwitchNode. Definition at line 2556 of file pandaNode.cxx. |
|
Adjusts the text stored within the encoder to all lowercase letters (preserving accent marks correctly).
Definition at line 64 of file textEncoder.cxx. References UnicodeLatinMap::Entry::_ascii_additional, UnicodeLatinMap::Entry::_ascii_equiv, TextEncoder::_wtext, TextEncoder::get_wtext(), UnicodeLatinMap::look_up(), NULL, and wstring. Referenced by TextEncoder::unicode_isdigit(). |
|
Adjusts the text stored within the encoder to all uppercase letters (preserving accent marks correctly).
Definition at line 42 of file textEncoder.cxx. References TextEncoder::_flags, TextEncoder::_wtext, TextEncoder::F_got_text, TextEncoder::get_wtext(), and TextEncoder::unicode_tolower(). Referenced by TextEncoder::unicode_isalpha(). |
|
Marks the current bounding volume as stale, so that it will be recomputed later. This may have a cascading effect up to the root of all graphs of which the node is a part. Returns true if the setting was changed, or false if it was already marked stale (or if it is a static bounding volume). Definition at line 162 of file boundedObject.I. References BoundedObject::_cycler, BoundedObject::F_bound_stale, and INLINE. Referenced by CollisionSphere::CollisionSphere(), GeomNode::combine_with(), CollisionPlane::get_normal(), PGItem::instance_to_state_def(), CollisionPlane::make_copy(), PGItem::set_active(), CollisionSphere::set_center(), set_coordinate_system(), PandaNode::set_effect(), CollisionNode::set_from_collide_mask(), GeomNode::set_geom_state(), CollisionRay::set_origin(), CollisionSegment::set_point_a(), CollisionSphere::test_intersection(), CollisionSegment::test_intersection(), CollisionRay::test_intersection(), and CollisionNode::xform(). |
|
Returns the length of the row in units, as it would be if it were assembled, without actually assembling it.
Definition at line 1016 of file textNode.cxx. References UnicodeLatinMap::AT_none, and NULL. |
|
Sets the ul, lr corners to fit the text, without actually assembling it.
Definition at line 1067 of file textNode.cxx. |
|
Outputs the Namable. This function simply writes the name to the output stream; most Namable derivatives will probably redefine this. Reimplemented from Namable. Reimplemented in CollisionNode, ButtonNode, HermiteCurve, RopeNode, Fog, GeomNode, LensNode, LightLensNode, LightNode, LODNode, PlaneNode, and MouseWatcher. Definition at line 1575 of file pandaNode.cxx. Referenced by PlaneNode::make_copy(), HermiteCurve::set_cv_name(), DriveInterface::set_mat(), and ButtonNode::~ButtonNode(). |
|
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 1820 of file pandaNode.cxx. References PandaNode::_cycler, PandaNode::CData::_paths, PipelineCyclerBase::get_num_stages(), PipelineCyclerBase::is_stage_unique(), PipelineCyclerBase::release_write_stage(), and PipelineCycler< CData >::write_stage(). |
|
Returns true if the node's name has extrinsic meaning and must be preserved across a flatten operation, false otherwise.
Reimplemented in CollisionNode, and ModelNode. Definition at line 635 of file pandaNode.cxx. References TransformState::compose(), CPT, PandaNode::get_children(), and PandaNode::get_transform(). Referenced by SceneGraphReducer::do_flatten_siblings(). |
|
Called by BoundedObject::mark_bound_stale(), this should make sure that all bounding volumes that depend on this one are marked stale also.
Reimplemented from BoundedObject. Definition at line 1690 of file pandaNode.cxx. References PandaNode::_cycler, PandaNode::NodePathComponent, and PT. |
|
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. Definition at line 1925 of file pandaNode.cxx. References PandaNode::_cycler, PandaNode::fix_path_lengths(), and PandaNode::get_generic_component(). |
|
This is the recursive implementation of copy_subgraph(). It returns a copy of the entire subgraph rooted at this node. 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. Definition at line 1884 of file pandaNode.cxx. Referenced by PandaNode::steal_children(). |
|
Recomputes the dynamic bounding volume for this object. The default behavior is the compute an empty bounding volume; this may be overridden to extend it to create a nonempty bounding volume. However, after calling this function, it is guaranteed that the _bound pointer will not be shared with any other stage of the pipeline, and this new pointer is returned. Reimplemented from BoundedObject. Reimplemented in CollisionNode. Definition at line 1723 of file pandaNode.cxx. |
|
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 687 of file textNode.cxx. |
|
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 418 of file textEncoder.I. |
|
Explicitly increments the reference count. User code should avoid using ref() and unref() directly, which can result in missed reference counts. Instead, let a PointerTo object manage the reference counting automatically. This function is const, even though it changes the object, because generally fiddling with an object's reference count isn't considered part of fiddling with the object. An object might be const in other ways, but we still need to accurately count the number of references to it. The return value is the new reference count. Definition at line 225 of file referenceCount.I. Referenced by ClientDevice::ClientDevice(), EggGroupNode::find_textures(), EggGroupNode::r_apply_texmats(), EggGroupNode::r_flatten_transforms(), and EggGroupNode::reverse_vertex_ordering(). |
|
Tells the BamReader how to create objects of type PandaNode.
Reimplemented in AnimBundleNode, Character, CollisionNode, ClassicNurbsCurve, CubicCurveseg, HermiteCurve, RopeNode, AmbientLight, Camera, DirectionalLight, Fog, GeomNode, LensNode, LODNode, ModelNode, ModelRoot, PlaneNode, PointLight, SequenceNode, Spotlight, and SwitchNode. Definition at line 2519 of file pandaNode.cxx. |
|
Removes all the children from the node at once, including stashed children.
Definition at line 1465 of file pandaNode.cxx. References PandaNode::get_type(), PandaNode::make_copy(), nassertr, NULL, and PT. |
|
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 1157 of file pandaNode.cxx. |
|
Removes the nth child from the node.
Definition at line 1121 of file pandaNode.cxx. References PandaNode::_cycler, PandaNode::children_changed(), BoundedObject::force_bound_stale(), nassertv, PT, and PandaNode::sever_connection(). Referenced by PandaNode::add_child(), PandaNode::cull_callback(), and PandaNode::has_single_child_visibility(). |
|
Removes the nth stashed child from the node.
Definition at line 1433 of file pandaNode.cxx. Referenced by PandaNode::copy_subgraph(), and PandaNode::cull_callback(). |
|
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. Definition at line 1203 of file pandaNode.cxx. References PandaNode::add_child(), PandaNode::get_child(), and PandaNode::get_child_sort(). Referenced by SceneGraphReducer::consider_siblings(). |
|
Returns true if it is generally safe to combine this particular kind of PandaNode with other kinds of PandaNodes, 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 LODNode, ModelNode, SequenceNode, and SwitchNode. Definition at line 601 of file pandaNode.cxx. Referenced by SortByState::operator()(). |
|
Returns true if it is generally safe to flatten out this particular kind of PandaNode by duplicating instances, false otherwise (for instance, a Camera cannot be safely flattened, because the Camera pointer itself is meaningful).
Reimplemented in AnimBundleNode, PartBundleNode, ParametricCurve, Camera, ModelNode, ForceNode, and PhysicalNode. Definition at line 532 of file pandaNode.cxx. |
|
Returns true if a flatten operation may safely continue past this node, or false if it should drop all attributes here and stop.
Definition at line 618 of file pandaNode.cxx. References NULL. |
|
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 578 of file pandaNode.cxx. |
|
Returns true if it is generally safe to transform this particular kind of PandaNode by calling the xform() method, false otherwise. For instance, it's usually a bad idea to attempt to xform a Character. Reimplemented in Character, ParametricCurve, RopeNode, Camera, and ModelNode. Definition at line 551 of file pandaNode.cxx. References AccumulatedAttribs::_transform, SceneGraphReducer::TT_transform, and PandaNode::xform(). |
|
Definition at line 291 of file textNode.I. References _flags, _text_color, F_has_text_color, has_text_color(), INLINE, and invalidate_no_measure(). |
|
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 565 of file pandaNode.I. References PandaNode::_cycler, INLINE, and RenderState::make_empty(). Referenced by NodePath::clear_texture(), NodePath::get_mat(), NodePath::set_bin(), NodePath::set_color_off(), NodePath::set_pos_hpr(), NodePath::set_render_mode_filled(), and NodePath::set_scale(). |
|
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". Definition at line 1197 of file textNode.I. References _ul3d, check_measure(), and INLINE. |
|
Sets the type of the bounding volume that will be dynamically computed for this particular node. Presently, this should only be BVT_dynamic_sphere. Definition at line 115 of file boundedObject.I. |
|
Resets the internal bounding volume so that it is the indicated volume. The external bounding volume as returned by get_bound() (which includes all of the node's children) will be adjusted to include this internal volume. Reimplemented from BoundedObject. Definition at line 995 of file pandaNode.I. |
|
Sets the type of the external bounding volume that is placed around this node and all of its children.
Definition at line 972 of file pandaNode.I. |
|
Changes the _bound pointer. To be used only internally by derived classes, usually in recompute_bound(). The return value is the same pointer passed in, as a convenience (it will now be reference counted). Definition at line 340 of file boundedObject.I. |
|
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 955 of file textNode.I. References _draw_order, INLINE, and invalidate_no_measure(). |
|
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 929 of file textNode.I. |
|
Definition at line 488 of file textNode.I. References _card_texture, _flags, F_has_card_texture, and NULL. |
|
Definition at line 568 of file textNode.I. References _flags, _frame_lr, _frame_ul, F_frame_as_margin, F_has_frame, INLINE, and invalidate_no_measure(). |
|
Definition at line 556 of file textNode.I. References _flags, _frame_lr, _frame_ul, F_frame_as_margin, F_has_frame, INLINE, and invalidate_no_measure(). |
|
Definition at line 595 of file textNode.I. References _flags, F_has_frame, and INLINE. |
|
Specifies the coordinate system in which the text will be generated.
Definition at line 1338 of file textNode.I. References _flags, F_needs_measure, F_needs_rebuild, INLINE, and BoundedObject::mark_bound_stale(). |
|
Specifies the default encoding to be used for all subsequently created TextEncoder objects. See set_encoding(). Definition at line 100 of file textEncoder.I. References TextEncoder::_flags, TextEncoder::_text, TextEncoder::F_got_text, TextEncoder::F_got_wtext, TextEncoder::has_text(), and INLINE. |
|
Specifies the default font to be used for any TextNode whose font is uninitialized or NULL. See set_font(). Definition at line 107 of file textNode.I. References _default_font, _font, get_default_font(), INLINE, and NULL. |
|
Sets the hide/show bits of this particular node. During the cull traversal, a node is not visited if none of its draw mask bits intersect with the camera's draw mask bits. These masks can be used to selectively hide and show different parts of the scene graph from different cameras that are otherwise viewing the same scene. See Camera::set_camera_mask(). Definition at line 922 of file pandaNode.I. Referenced by CollisionNode::CollisionNode(), NodePath::get_z(), NodePath::heads_up(), EggLoader::make_node(), and NodePath::set_pos(). |
|
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. Definition at line 1280 of file textNode.I. References TextEncoder::append_wtext(), INLINE, and invalidate_with_measure(). |
|
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 648 of file pandaNode.I. References PandaNode::_cycler, INLINE, TransformState::make_identity(), BoundedObject::mark_bound_stale(), and PandaNode::transform_changed(). Referenced by NodePath::get_fog(), and NodePath::has_fog(). |
|
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 789 of file pandaNode.I. References PandaNode::_cycler, and INLINE. |
|
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 65 of file textEncoder.I. Referenced by TextEncoder::unicode_isalpha(), and TextEncoder::unicode_isdigit(). |
|
Sets the "final" flag on this BoundedObject. If this is true, than no bounding volume need be tested below it; a positive intersection with this 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 256 of file boundedObject.I. |
|
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(). Definition at line 70 of file textNode.I. References _default_font, _loaded_default_font, and INLINE. |
|
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 729 of file textNode.I. References _card_lr, _card_ul, _flags, F_card_as_margin, F_has_card, INLINE, and invalidate_no_measure(). |
|
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 703 of file textNode.I. References _flags, F_frame_corners, and INLINE. |
|
Definition at line 461 of file textNode.I. References _card_texture, _flags, clear_card_texture(), F_has_card_texture, has_card_texture(), INLINE, invalidate_no_measure(), and NULL. |
|
Definition at line 449 of file textNode.I. Referenced by clear_wordwrap(). |
|
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 890 of file textNode.I. References _shadow_offset, has_shadow(), INLINE, and nassertr. |
|
Specifies the thickness of the lines that will be used to draw the frame.
Definition at line 856 of file textNode.I. References _flags, _shadow_offset, F_has_shadow, INLINE, and invalidate_no_measure(). |
|
Definition at line 69 of file namable.I. References Namable::_name. Referenced by BuilderBucket::BuilderBucket(), SceneGraphReducer::do_flatten_siblings(), Texture::read(), PandaNode::reparent(), and Texture::Texture(). |
|
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.
Definition at line 1120 of file textNode.I. References _ul2d, check_measure(), and INLINE. |
|
Definition at line 667 of file textNode.I. References _frame_width, and INLINE. |
|
Definition at line 655 of file textNode.I. Referenced by get_card_border_size(). |
|
Definition at line 264 of file textNode.I. References _flags, F_has_wordwrap, and INLINE. |
|
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(). Definition at line 195 of file textNode.I. |
|
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. Definition at line 232 of file textNode.I. References _flags, _wordwrap_width, F_has_wordwrap, has_wordwrap(), INLINE, and invalidate_with_measure(). |
|
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 727 of file pandaNode.I. Referenced by NodePath::get_key(), and GeomParticleRenderer::kill_particle(). |
|
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(). Definition at line 166 of file textEncoder.I. References TextEncoder::encode_wtext(), TextEncoder::get_wtext(), and INLINE. |
|
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(). Definition at line 1390 of file textNode.I. |
|
Changes the text that is displayed under the TextNode.
Reimplemented from TextEncoder. Definition at line 1366 of file textNode.I. References _flags, F_needs_measure, and INLINE. Referenced by PGButton::release(). |
|
Definition at line 391 of file textNode.I. References _flags, F_has_card_border, has_card_border(), INLINE, and invalidate_no_measure(). |
|
Definition at line 379 of file textNode.I. References _card_border_size, _card_border_uv_portion, _flags, and F_has_card_border. Referenced by get_slant(). |
|
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 837 of file pandaNode.I. Referenced by NodePath::get_child(). |
|
Sets an additional transform that is applied to the entire text paragraph.
Definition at line 1310 of file textNode.I. |
|
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 322 of file textEncoder.I. References UnicodeLatinMap::Entry::_ascii_equiv, INLINE, UnicodeLatinMap::look_up(), and NULL. |
|
Indicates the instantaneous velocity of this node. This function is meaningless to most kinds of nodes; it is implemented only for CollisionNodes and is intended to inform the collision system of velocity. It is defined at this level only as an abstract interface to allow setting the velocity of a collision node without having to link with, or know anything about, the collision system. See CollisionNode::set_velocity(). Reimplemented in CollisionNode. Definition at line 1674 of file pandaNode.cxx. |
|
Sets the TextNode up to automatically wordwrap text that exceeds the indicated width.
Definition at line 321 of file textNode.I. References _flags, F_has_text_color, and INLINE. |
|
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 1693 of file textNode.I. Referenced by PGEntry::get_text_def(). |
|
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(). Definition at line 1292 of file pandaNode.cxx. References NULL. |
|
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 446 of file pandaNode.I. Referenced by PandaNode::get_parent(). |
|
Moves all the children from the other node onto this node.
Definition at line 1504 of file pandaNode.cxx. References PandaNode::_cycler, PandaNode::add_child(), PT, and PandaNode::r_copy_subgraph(). |
|
Generates a cheesy accent mark above (or below, etc.) the character. Returns true if successful, or false if the named accent character doesn't exist in the font. Definition at line 1372 of file textNode.cxx. References CT_tiny, CT_tiny_mirror_x, CT_tiny_rotate_270, small_accent_scale, t, and tiny_accent_scale. |
|
This is a cheesy attempt to tack on an accent to an ASCII letter for which we don't have the appropriate already-accented glyph in the font.
Definition at line 1221 of file textNode.cxx. References CT_mirror_x, CT_mirror_y, CT_none, CT_rotate_180, CT_rotate_270, CT_rotate_90, CT_small, CT_small_rotate_270, CT_small_squash, CT_small_squash_mirror_y, CT_squash, CT_squash_mirror_diag, CT_squash_mirror_y, TextGlyph::get_geom(), TextFont::get_glyph(), NULL, PT, small_accent_scale, small_squash_accent_scale_x, small_squash_accent_scale_y, squash_accent_scale_x, squash_accent_scale_y, and t. |
|
Does some easy checks to make sure that the reference count isn't completely bogus.
Definition at line 328 of file referenceCount.I. References INLINE. Referenced by EggNode::determine_bin(), and ReferenceCount::~ReferenceCount(). |
|
This method is deprecated and no longer does anything. It is included for historical purposes only and will shortly be removed. Definition at line 53 of file textNode.I. References _font, and invalidate_with_measure(). |
|
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 ActorNode. Definition at line 1856 of file pandaNode.cxx. References PandaNode::_cycler, PandaNode::get_num_parents(), PandaNode::get_top_component(), NULL, and PT. Referenced by PandaNode::set_effect(). |
|
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 436 of file textEncoder.I. References TextEncoder::get_text(), INLINE, TextEncoder::make_upper(), TextEncoder::set_encoding(), and TextEncoder::set_text(). |
|
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 458 of file textEncoder.I. References TextEncoder::get_text(), INLINE, TextEncoder::make_lower(), TextEncoder::set_encoding(), and TextEncoder::set_text(). |
|
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 524 of file textEncoder.I. References TextEncoder::_encoding, and TextEncoder::encode_wtext(). |
|
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 481 of file textEncoder.I. References TextEncoder::_flags, TextEncoder::_wtext, TextEncoder::F_got_text, TextEncoder::F_got_wtext, TextEncoder::has_text(), and INLINE. |
|
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 503 of file textEncoder.I. |
|
Returns the uppercase equivalent of the given Unicode character. This is akin to ctype's tolower(), extended to Unicode. Definition at line 566 of file textEncoder.I. Referenced by TextEncoder::make_upper(). |
|
Returns the uppercase equivalent of the given Unicode character. This is akin to ctype's toupper(), extended to Unicode. Definition at line 545 of file textEncoder.I. |
|
Explicitly decrements the reference count. Note that the object will not be implicitly deleted by unref() simply because the reference count drops to zero. (Having a member function delete itself is problematic; plus, we don't have a virtual destructor anyway.) However, see the helper function unref_delete(). User code should avoid using ref() and unref() directly, which can result in missed reference counts. Instead, let a PointerTo object manage the reference counting automatically. This function is const, even though it changes the object, because generally fiddling with an object's reference count isn't considered part of fiddling with the object. An object might be const in other ways, but we still need to accurately count the number of references to it. The return value is the new reference count. Definition at line 293 of file referenceCount.I. References INLINE. Referenced by RenderState::determine_bin_index(), and RenderEffects::determine_show_bounds(). |
|
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. Definition at line 1336 of file pandaNode.cxx. |
|
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 486 of file pandaNode.I. References PandaNode::_cycler, and INLINE. |
|
Can be called after the TextNode has been fully configured, to force the node to recompute its text immediately, rather than waiting for it to be drawn. This call is optional. Definition at line 1652 of file textNode.I. |
|
Converts the string to uppercase, assuming the string is encoded in the indicated encoding.
Definition at line 600 of file textEncoder.I. |
|
Converts the string to uppercase, assuming the string is encoded in the default encoding.
Definition at line 585 of file textEncoder.I. |
|
Inserts newlines into the given text at the appropriate places in order to make each line be the longest possible line that is not longer than wordwrap_width (and does not break any words, if possible). Returns the new string. Definition at line 1749 of file textNode.I. |
|
Inserts newlines into the given text at the appropriate places in order to make each line be the longest possible line that is not longer than wordwrap_width (and does not break any words, if possible). Returns the new string. Definition at line 153 of file textNode.cxx. References _font, _text_color, Namable::get_name(), has_text_color(), indent(), and NULL. Referenced by PGEntry::get_text_def(). |
|
Reimplemented from PandaNode. Definition at line 171 of file textNode.cxx. |
|
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, ClassicNurbsCurve, CubicCurveseg, HermiteCurve, ParametricCurve, PiecewiseCurve, RopeNode, AmbientLight, Camera, DirectionalLight, Fog, GeomNode, LensNode, LightLensNode, LightNode, LODNode, ModelNode, ModelRoot, PlaneNode, PointLight, SequenceNode, Spotlight, and SwitchNode. Definition at line 2534 of file pandaNode.cxx. Referenced by SwitchNode::cull_callback(), SequenceNode::cull_callback(), PlaneNode::output(), LightNode::output(), and PartBundleNode::safe_to_flatten(). |
|
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 CollisionNode, DirectionalLight, Fog, GeomNode, LensNode, LODNode, PlaneNode, PointLight, Spotlight, and PGItem. Definition at line 707 of file pandaNode.cxx. Referenced by DirectionalLight::DirectionalLight(), LensNode::LensNode(), PlaneNode::PlaneNode(), PointLight::PointLight(), and PandaNode::safe_to_transform(). |
|
Reimplemented in GeomNode. Definition at line 392 of file pandaNode.h. |
|
Definition at line 353 of file textNode.h. Referenced by get_small_caps(). |
|
Definition at line 364 of file textNode.h. Referenced by get_frame_corners(). |
|
Definition at line 356 of file textNode.h. Referenced by set_text_color(). |
|
Definition at line 357 of file textNode.h. Referenced by clear_text_color(), and set_text_color(). |
|
Definition at line 333 of file textNode.h. Referenced by apply_attribs_to_vertices(). |
|
Definition at line 361 of file textNode.h. Referenced by get_frame_as_set(), is_frame_as_margin(), and set_frame_actual(). |
|
Definition at line 329 of file textNode.h. Referenced by clear_card_border(), set_card_border(), and set_frame_color(). |
|
Definition at line 361 of file textNode.h. Referenced by get_frame_as_set(), is_frame_as_margin(), and set_frame_actual(). |
|
Definition at line 368 of file textNode.h. Referenced by is_card_as_margin(). |
|
Definition at line 59 of file textNode.cxx. Referenced by get_font(), make_card_with_border(), set_default_font(), and set_font(). |
|
Definition at line 365 of file textNode.h. Referenced by clear_card(), and set_card_actual(). |
|
Reimplemented from TextEncoder. Definition at line 352 of file textNode.h. Referenced by clear_card_texture(), clear_frame(), get_align(), get_card_color(), get_coordinate_system(), get_default_font(), get_frame_line_width(), get_shadow_color(), get_small_caps_scale(), get_transform(), has_frame(), has_text_color(), set_align(), set_card_border(), set_card_color(), set_card_texture(), set_coordinate_system(), set_frame_actual(), set_frame_as_margin(), set_frame_color(), set_frame_line_width(), set_slant(), set_small_caps_scale(), set_text(), set_text_color(), and set_wordwrap(). |
|
Definition at line 324 of file textNode.h. Referenced by get_card_transformed(), get_draw_order(), set_default_font(), set_transform(), thaw(), wordwrap_to(), and ~TextNode(). |
|
Definition at line 332 of file textNode.h. Referenced by get_wordwrap(), and has_wordwrap(). |
|
Definition at line 360 of file textNode.h. Referenced by get_card_texture(), has_card_texture(), and set_card_color(). |
|
Definition at line 360 of file textNode.h. Referenced by get_card_texture(), has_card_texture(), and set_card_color(). |
|
Definition at line 355 of file textNode.h. Referenced by set_shadow_color(). |
|
Definition at line 213 of file pandaNode.h. Referenced by PandaNode::clear_state(). |
|
Definition at line 325 of file textNode.h. |
|
Definition at line 60 of file textNode.cxx. Referenced by get_font(), and set_font(). |
|
Definition at line 370 of file textNode.h. Referenced by clear_shadow(), get_card_texture(), get_frame_as_set(), and has_shadow(). |
|
Definition at line 371 of file textNode.h. Referenced by clear_bin(), get_unsafe_to_apply_attribs(), and recompute_internal_bound(). |
|
Definition at line 372 of file textNode.h. |
|
Definition at line 331 of file textNode.h. Referenced by apply_attribs_to_vertices(), get_card_border_uv_portion(), and has_card_border(). |
|
Definition at line 362 of file textNode.h. Referenced by set_frame_corners(), and set_frame_line_width(). |
|
Definition at line 327 of file textNode.h. |
|
Definition at line 358 of file textNode.h. |
|
Definition at line 330 of file textNode.h. Referenced by set_align(), and wordwrap_to(). |
|
Definition at line 367 of file textNode.h. Referenced by get_frame_actual(), and has_card(). |
|
Reimplemented from TextEncoder. Definition at line 57 of file textNode.cxx. |
|
Definition at line 370 of file textNode.h. Referenced by get_card_texture(), get_frame_as_set(), get_shadow(), and set_shadow(). |
|
Definition at line 371 of file textNode.h. Referenced by get_unsafe_to_apply_attribs(), recompute_internal_bound(), and set_bin(). |
|
Definition at line 354 of file textNode.h. Referenced by set_small_caps_scale(). |
|
Definition at line 25 of file typedWritable.cxx. Referenced by Child::complete_pointers(), Parent::complete_pointers(), Person::complete_pointers(), LoaderFileTypeBam::get_extension(), PartGroup::pick_channel_index(), BamReader::read_pointer(), and AnimGroup::write_datagram(). |