Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

TextNode Class Reference

The primary interface to this module. More...

#include <textNode.h>

Inheritance diagram for TextNode:

PandaNode TextEncoder TypedWritable Namable BoundedObject ReferenceCount TypedObject List of all members.

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.

TextFontget_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
Textureget_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< PandaNodegenerate ()
 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< TransformStatecalc_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 BoundingVolumerecompute_internal_bound ()
 Called when needed to recompute the node's _internal_bound object.

virtual TypeHandle get_type () const
virtual TypeHandle force_init_type ()
virtual PandaNodemake_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 PandaNodecombine_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< PandaNodecopy_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.

PandaNodeget_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.

PandaNodeget_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.

PandaNodeget_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 RenderAttribget_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 RenderEffectget_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 RenderStateget_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 RenderEffectsget_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 BoundingVolumeget_bound () const
 Returns the node's external bounding volume.

const BoundingVolumeget_internal_bound () const
 Returns the node's internal bounding volume.

virtual bool is_geom_node () const
 A simple downcast check.

virtual Lightas_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 wstringget_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.

TextFontget_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 BoundingVolumerecompute_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< PandaNoder_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 BoundingVolumeget_bound_ptr () const
 Returns the state of the _bound pointer.

BoundingVolumeset_bound_ptr (BoundingVolume *bound)
 Changes the _bound pointer.


Static Protected Member Functions

TypedWritablemake_from_bam (const FactoryParams &params)
 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< PandaNodeassemble_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 &centroid, 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 &centroid, TextFont *font, GeomNode *dest, Geom *geom_array[], int &num_geoms)
 Generates a cheesy accent mark above (or below, etc.) the character.

PointerTo< PandaNodemake_frame ()
 Creates a frame around the text.

PointerTo< PandaNodemake_card ()
 Creates a card behind the text.

PointerTo< PandaNodemake_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

Detailed Description

The primary interface to this module.

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.


Member Typedef Documentation

typedef pmap<PandaNode *, PandaNode *> PandaNode::InstanceMap [protected, inherited]
 

Definition at line 206 of file pandaNode.h.


Member Enumeration Documentation

enum TextNode::Alignment
 

Enumeration values:
A_left 
A_right 
A_center 

Definition at line 86 of file textNode.h.

enum BoundedObject::BoundingVolumeType [inherited]
 

Enumeration values:
BVT_static 
BVT_dynamic_sphere 

Definition at line 58 of file boundedObject.h.

enum TextNode::CheesyPlacement [private]
 

Enumeration values:
CP_above 
CP_below 
CP_top 
CP_bottom 
CP_within 

Definition at line 273 of file textNode.h.

enum TextNode::CheesyTransform [private]
 

Enumeration values:
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 

Definition at line 280 of file textNode.h.

enum TextEncoder::Encoding [inherited]
 

Enumeration values:
E_iso8859 
E_utf8 
E_unicode 

Definition at line 55 of file textEncoder.h.

Referenced by TextEncoder::get_encoding().

enum TextNode::Flags [private]
 

Enumeration values:
F_has_text_color 
F_has_wordwrap 
F_has_frame 
F_frame_as_margin 
F_has_card 
F_card_as_margin 
F_has_card_texture 
F_has_shadow 
F_frame_corners 
F_card_transp 
F_has_card_border 
F_needs_rebuild 
F_needs_measure 
F_small_caps 

Reimplemented from TextEncoder.

Definition at line 335 of file textNode.h.


Constructor & Destructor Documentation

TextNode::TextNode const string &  name  ) 
 

Definition at line 88 of file textNode.cxx.

TextNode::~TextNode  ) 
 

Definition at line 133 of file textNode.cxx.

References _font, TextEncoder::decode_text(), TextEncoder::encode_wtext(), nassertr, NULL, and wstring.


Member Function Documentation

void PandaNode::add_child PandaNode child_node,
int  sort = 0
[inherited]
 

Adds a new child to the node.

The child is added in the relative position indicated by sort; if all children have the same sort index, the child is added at the end.

If the same child is added to a node more than once, the previous instance is first removed.

Definition at line 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().

void PandaNode::add_net_collide_mask CollideMask  mask  )  [inline, protected, inherited]
 

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.

void PandaNode::add_stashed PandaNode child_node,
int  sort = 0
[inherited]
 

Adds a new child to the node, directly as a stashed child.

The child is not added in the normal sense, but will be revealed if unstash_child() is called on it later.

If the same child is added to a node more than once, the previous instance is first removed.

Definition at line 1406 of file pandaNode.cxx.

void TextNode::append_text const string &  text  )  [inline]
 

Appends the indicates string to the end of the stored text.

Reimplemented from TextEncoder.

Definition at line 1420 of file textNode.I.

void TextNode::append_unicode_char int  character  )  [inline]
 

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.

void TextNode::append_wtext const wstring text  )  [inline]
 

Appends the indicates string to the end of the stored wide-character text.

Reimplemented from TextEncoder.

Definition at line 1709 of file textNode.I.

void TextNode::apply_attribs_to_vertices const AccumulatedAttribs attribs,
int  attrib_types,
GeomTransformer transformer
[virtual]
 

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.

Light * PandaNode::as_light  )  [virtual, inherited]
 

Cross-casts the node to a Light pointer, if it is one of the four kinds of Light nodes, or returns NULL if it is not.

Reimplemented in LightLensNode, and LightNode.

Definition at line 1641 of file pandaNode.cxx.

float TextNode::assemble_row wstring::iterator &  si,
const wstring::iterator &  send,
TextFont font,
GeomNode dest,
const LMatrix4f &  mat
[private]
 

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.

PointerTo< PandaNode > TextNode::assemble_text wstring::iterator  si,
const wstring::iterator &  send,
TextFont font,
LVector2f &  ul,
LVector2f &  lr,
int &  num_rows
[private]
 

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.

ConstPointerTo< TransformState > TextNode::calc_tight_bounds LPoint3f &  min_point,
LPoint3f &  max_point,
bool &  found_any,
const TransformState transform
const [virtual]
 

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.

float TextNode::calc_width const wstring line  )  const [inline]
 

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.

float TextNode::calc_width const string &  line  )  const [inline]
 

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.

float TextNode::calc_width int  character  )  const [inline]
 

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().

void PandaNode::changed_internal_bound  )  [inline, protected, inherited]
 

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.

void TextNode::check_measure  )  const [inline, private]
 

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().

void TextNode::check_rebuild  )  const [inline, private]
 

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().

void PandaNode::children_changed  )  [protected, virtual, inherited]
 

Called after a scene graph update that either adds or remove children from this node, this just provides a hook for derived PandaNode objects that need to update themselves based on the set of children the node has.

Definition at line 1840 of file pandaNode.cxx.

Referenced by PandaNode::add_child(), and PandaNode::remove_child().

void PandaNode::clear_attrib TypeHandle  type  )  [inline, inherited]
 

Removes the render attribute of the given type from this node.

This node, and the subgraph below, will now inherit the indicated render attribute from the nodes above this one.

Definition at line 630 of file pandaNode.I.

Referenced by NodePath::clear_bin(), NodePath::clear_render_mode(), NodePath::has_texture(), and NodePath::set_texture_off().

void TextNode::clear_bin  )  [inline]
 

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.

void TextNode::clear_card  )  [inline]
 

Specifies that a card will not be drawn behind the text.

Definition at line 974 of file textNode.I.

References _draw_order, and INLINE.

void TextNode::clear_card_border  )  [inline]
 

Definition at line 505 of file textNode.I.

References _card_texture, and INLINE.

void TextNode::clear_card_texture  )  [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().

void PandaNode::clear_effect TypeHandle  type  )  [inline, inherited]
 

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.

void PandaNode::clear_effects  )  [inline, inherited]
 

Resets this node to have no render effects.

Definition at line 819 of file pandaNode.I.

References PandaNode::_cycler, and INLINE.

void TextNode::clear_frame  )  [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().

void Namable::clear_name  )  [inline, inherited]
 

Resets the Namable's name to empty.

Definition at line 82 of file namable.I.

References Namable::_name, and INLINE.

void TextNode::clear_shadow  )  [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.

void PandaNode::clear_state  )  [inline, inherited]
 

Resets this node to leave the render state alone.

Nodes at this level and below will once again inherit their render state unchanged from the nodes above this level.

Definition at line 769 of file pandaNode.I.

References PandaNode::_internal_bound.

void TextNode::clear_text  )  [inline]
 

Removes the text from the TextNode.

Reimplemented from TextEncoder.

Definition at line 1404 of file textNode.I.

void TextNode::clear_text_color  )  [inline]
 

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.

void PandaNode::clear_transform  )  [inline, inherited]
 

Resets the transform on this node to the identity transform.

Definition at line 875 of file pandaNode.I.

Referenced by NodePath::get_transform().

void TextNode::clear_wordwrap  )  [inline]
 

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().

PandaNode * PandaNode::combine_with PandaNode other  )  [virtual, inherited]
 

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().

int TypedWritable::complete_pointers TypedWritable **  p_list,
BamReader manager
[virtual, inherited]
 

Receives an array of pointers, one for each time manager->read_pointer() was called in fillin().

Returns the number of pointers processed.

This is the callback function that is made by the BamReader at some later point, after all of the required pointers have been filled in. It is necessary because there might be forward references in a bam file; when we call read_pointer() in fillin(), the object may not have been read from the file yet, so we do not have a pointer available at that time. Thus, instead of returning a pointer, read_pointer() simply reserves a later callback. This function provides that callback. The calling object is responsible for keeping track of the number of times it called read_pointer() and extracting the same number of pointers out of the supplied vector, and storing them appropriately within the object.

Reimplemented in 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().

void PandaNode::copy_children PandaNode other  )  [inherited]
 

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.

PointerTo< PandaNode > PandaNode::copy_subgraph  )  const [inherited]
 

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().

bool TextNode::cull_callback CullTraverser trav,
CullTraverserData data
[virtual]
 

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.

wstring TextEncoder::decode_text const string &  text,
TextEncoder::Encoding  encoding
[static, inherited]
 

Returns the given wstring decoded to a single-byte string, via the given encoding system.

Definition at line 226 of file textEncoder.cxx.

wstring TextEncoder::decode_text const string &  text  )  const [inline, inherited]
 

Returns the given wstring decoded to a single-byte string, via the current encoding system.

Definition at line 725 of file textEncoder.I.

Referenced by TextEncoder::get_default_encoding(), TextEncoder::get_unicode_char(), and ~TextNode().

void TextNode::do_measure  )  [private]
 

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.

void TextNode::do_rebuild  )  [private]
 

Removes any existing children of the TextNode, and adds the newly generated text instead.

Definition at line 725 of file textNode.cxx.

string TextEncoder::encode_wchar wchar_t  ch,
TextEncoder::Encoding  encoding
[static, inherited]
 

Encodes a single wide char into a one-, two-, or three-byte string, according to the given encoding system.

Definition at line 146 of file textEncoder.cxx.

string TextEncoder::encode_wtext const wstring wtext,
TextEncoder::Encoding  encoding
[static, inherited]
 

Encodes a wide-text string into a single-char string, according to the given encoding.

Definition at line 205 of file textEncoder.cxx.

References StringDecoder::get_next_character(), StringDecoder::is_eof(), and wstring.

string TextEncoder::encode_wtext const wstring wtext  )  const [inline, inherited]
 

Encodes a wide-text string into a single-char string, according to the current encoding.

Definition at line 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().

void PandaNode::fillin DatagramIterator scan,
BamReader manager
[protected, inherited]
 

This internal function is called by make_from_bam to read in all of the relevant data from the BamFile for the new PandaNode.

Reimplemented from TypedWritable.

Reimplemented in AnimBundleNode, PartBundleNode, Character, CollisionNode, 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().

void TypedWritable::finalize void   )  [virtual, inherited]
 

Called by the BamReader to perform any final actions needed for setting up the object after all objects have been read and all pointers have been completed.

Reimplemented in PartBundle, RenderAttrib, RenderEffect, RenderEffects, RenderState, and TransformState.

Definition at line 112 of file typedWritable.cxx.

Referenced by BamReader::skip_pointer().

int PandaNode::find_child PandaNode node  )  const [inherited]
 

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().

int PandaNode::find_parent PandaNode node  )  const [inline, inherited]
 

Returns the index of the indicated parent node, if it is a parent, or -1 if it is not.

Definition at line 350 of file pandaNode.I.

Referenced by PandaNode::cull_callback(), and PandaNode::has_selective_visibility().

int PandaNode::find_stashed PandaNode node  )  const [inherited]
 

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().

void BoundedObject::force_bound_stale  )  [inline, inherited]
 

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().

virtual TypeHandle TextNode::force_init_type void   )  [inline, virtual]
 

Reimplemented from PandaNode.

Definition at line 390 of file textNode.h.

void TextNode::force_update  )  [inline]
 

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.

int TextNode::freeze  )  [inline]
 

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.

PointerTo< PandaNode > TextNode::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.

Definition at line 280 of file textNode.cxx.

References root.

Referenced by PGButton::release().

TextNode::Alignment TextNode::get_align  )  const [inline]
 

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().

const RenderAttrib * PandaNode::get_attrib TypeHandle  type  )  const [inline, inherited]
 

Returns the render attribute of the indicated type, if it is defined on the node, or NULL if it is not.

This checks only what is set on this particular node level, and has nothing to do with what render attributes may be inherited from parent nodes.

Definition at line 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().

const string & TextNode::get_bin  )  const [inline]
 

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().

float TextNode::get_bottom  )  const [inline]
 

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.

const BoundingVolume & PandaNode::get_bound  )  const [inline, inherited]
 

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.

const BoundingVolume * BoundedObject::get_bound_ptr  )  const [inline, protected, inherited]
 

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.

LVecBase4f TextNode::get_card_actual  )  const [inline]
 

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().

LVecBase4f TextNode::get_card_as_set  )  const [inline]
 

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().

float TextNode::get_card_border_size  )  const [inline]
 

Definition at line 520 of file textNode.I.

References Colorf, and set_shadow_color().

float TextNode::get_card_border_uv_portion  )  const [inline]
 

Definition at line 532 of file textNode.I.

References _shadow_color.

Colorf TextNode::get_card_color  )  const [inline]
 

Definition at line 583 of file textNode.I.

References _flags, F_has_frame, INLINE, and invalidate_no_measure().

Texture * TextNode::get_card_texture  )  const [inline]
 

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.

LVecBase4f TextNode::get_card_transformed  )  const [inline]
 

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.

References _font, INLINE, nassertr, and NULL.

void TextNode::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
[private]
 

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.

PandaNode * PandaNode::get_child int  n  )  const [inline, inherited]
 

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().

int PandaNode::get_child_sort int  n  )  const [inline, inherited]
 

Returns the sort index of the nth child node of this node (that is, the number that was passed to add_child()).

See get_num_children().

Definition at line 409 of file pandaNode.I.

References PandaNode::_cycler, INLINE, and nassertr.

Referenced by PandaNode::has_single_child_visibility(), and PandaNode::replace_child().

PandaNode::Children PandaNode::get_children  )  const [inline, inherited]
 

Returns an object that can be used to walk through the list of children of the node.

When you intend to visit multiple children, using this is slightly faster than calling get_child() directly on the PandaNode, since this object 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().

PandaNode::ChildrenCopy PandaNode::get_children_copy  )  const [inline, inherited]
 

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.

TypeHandle TextNode::get_class_type void   )  [inline, static]
 

Reimplemented from TextEncoder.

Definition at line 378 of file textNode.h.

CoordinateSystem TextNode::get_coordinate_system  )  const [inline]
 

Definition at line 1351 of file textNode.I.

References _flags, F_needs_rebuild, and INLINE.

TextEncoder::Encoding TextEncoder::get_default_encoding  )  [inline, static, inherited]
 

Specifies the default encoding to be used for all subsequently created TextEncoder objects.

See set_encoding().

Definition at line 117 of file textEncoder.I.

References TextEncoder::decode_text(), INLINE, and TextEncoder::set_wtext().

TextFont * TextNode::get_default_font  )  [inline, static]
 

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().

DrawMask PandaNode::get_draw_mask  )  const [inline, inherited]
 

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().

int TextNode::get_draw_order  )  const [inline]
 

Returns the drawing order set with set_draw_order().

Definition at line 1295 of file textNode.I.

References _font, INLINE, nassertr, and NULL.

const RenderEffect * PandaNode::get_effect TypeHandle  type  )  const [inline, inherited]
 

Returns the render effect of the indicated type, if it is defined on the node, or NULL if it is not.

Definition at line 664 of file pandaNode.I.

References INLINE, and PandaNode::r_list_descendants().

const RenderEffects * PandaNode::get_effects  )  const [inline, inherited]
 

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().

string TextEncoder::get_encoded_char int  index,
TextEncoder::Encoding  encoding
const [inline, inherited]
 

Returns the nth char of the stored text, as a one-, two-, or three-byte encoded string.

Definition at line 355 of file textEncoder.I.

References UnicodeLatinMap::CT_punct.

string TextEncoder::get_encoded_char int  index  )  const [inline, inherited]
 

Returns the nth char of the stored text, as a one-, two-, or three-byte encoded string.

Definition at line 340 of file textEncoder.I.

References INLINE, UnicodeLatinMap::look_up(), and NULL.

Referenced by TextEncoder::append_text().

TextEncoder::Encoding TextEncoder::get_encoding  )  const [inline, inherited]
 

Returns the encoding by which the string set via set_text() is to be interpreted.

See set_encoding().

Definition at line 83 of file textEncoder.I.

References TextEncoder::_default_encoding, TextEncoder::Encoding, and INLINE.

Referenced by TextEncoder::append_text().

int PandaNode::get_first_visible_child  )  const [virtual, inherited]
 

Returns the index number of the first visible child of this node, or a number >= get_num_children() if there are no visible children of this node.

This is called during the cull traversal, but only if has_selective_visibility() has already returned true. See has_selective_visibility().

Reimplemented in SelectiveChildNode.

Definition at line 941 of file pandaNode.cxx.

Referenced by CullTraverser::get_bounds_inner_viz_state().

TextFont * TextNode::get_font  )  const [inline]
 

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().

LVecBase4f TextNode::get_frame_actual  )  const [inline]
 

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.

LVecBase4f TextNode::get_frame_as_set  )  const [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().

Colorf TextNode::get_frame_color  )  const [inline]
 

Definition at line 476 of file textNode.I.

bool TextNode::get_frame_corners  )  const [inline]
 

Definition at line 906 of file textNode.I.

References _bin, INLINE, and invalidate_no_measure().

float TextNode::get_frame_line_width  )  const [inline]
 

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().

float TextNode::get_height  )  const [inline]
 

Returns the net height of the text in local 2-d coordinates.

Definition at line 1562 of file textNode.I.

const BoundingVolume & PandaNode::get_internal_bound  )  const [inline, inherited]
 

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.

float TextNode::get_left  )  const [inline]
 

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().

float TextNode::get_line_height  )  const [inline]
 

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().

LPoint3f TextNode::get_lower_right_3d  )  const [inline]
 

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.

const string & Namable::get_name  )  const [inline, inherited]
 

Definition at line 109 of file namable.I.

Referenced by ComputedVerticesMaker::add_normal(), GLGraphicsStateGuardian::begin_bind_clip_planes(), GLGraphicsStateGuardian::begin_bind_lights(), BuilderBucket::BuilderBucket(), EggVertex::clear_grefs(), AnimBundleMaker::create_xfm_channel(), SceneGraphReducer::do_flatten_siblings(), BuilderBucket::done_geom(), DXTextureContext8::DXTextureContext8(), PartGroup::find_child(), EggLoader::find_collision_geometry(), EggGroupUniquifier::get_category(), PartBundle::get_control_effect(), PartGroup::get_num_children(), EggMorph< Parameter >::get_offset(), AnimChannelBase::has_changed(), Namable::has_name(), EggMaterial::is_equivalent_to(), Texture::load(), EggLoader::make_node(), AnimBundleMaker::make_node(), FindApproxPath::Component::matches(), LineSegs::move_to(), MovingPartBase::MovingPartBase(), NodeMap::NodeMap(), EggMorph< Parameter >::operator<(), operator<<(), MouseWatcherRegion::output(), AnimGroup::output(), EggXfmSAnim::r_transform(), Texture::read(), MouseWatcherGroup::remove_region(), EggLoader::reparent_decals(), CRGraphicsStateGuardian::set_blend_mode(), NodePath::set_color(), GLGraphicsStateGuardian::set_draw_buffer(), AnimChannelScalarTable::set_table(), NodePath::set_transparency(), NodePathComponent::uncollapse(), Texture::unprepare(), wordwrap_to(), MovingPartBase::write(), CollisionNode::xform(), and EggVertex::~EggVertex().

CollideMask PandaNode::get_net_collide_mask  )  const [inline, inherited]
 

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.

int PandaNode::get_next_visible_child int  n  )  const [virtual, inherited]
 

Returns the index number of the next visible child of this node following the indicated child, or a number >= get_num_children() if there are no more visible children of this node.

See has_selective_visibility() and get_first_visible_child().

Reimplemented in SelectiveChildNode.

Definition at line 964 of file pandaNode.cxx.

int TextEncoder::get_num_chars  )  const [inline, inherited]
 

Returns the number of characters in the stored text.

This is a count of wide characters, after the string has been decoded according to set_encoding().

Definition at line 282 of file textEncoder.I.

References TextEncoder::encode_wtext(), TextEncoder::get_wtext_as_ascii(), and INLINE.

int PandaNode::get_num_children  )  const [inline, inherited]
 

Returns the number of child nodes this node has.

The order of the child nodes *is* meaningful and is based on the sort number that was passed to add_child(), and also on the order in which the nodes were added.

Definition at line 374 of file pandaNode.I.

Referenced by PandaFramework::event_l(), SelectiveChildNode::has_selective_visibility(), PandaNode::has_single_child_visibility(), PT(), and LODNode::xform().

int PandaNode::get_num_parents  )  const [inline, inherited]
 

Returns the number of parent nodes this node has.

If this number is greater than 1, the node has been multiply instanced. The order of the parent nodes is not meaningful and is not related to the order in which the node was instanced to them.

Definition at line 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().

int TextNode::get_num_rows  )  const [inline]
 

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.

int PandaNode::get_num_stashed  )  const [inline, inherited]
 

Returns the number of stashed nodes this node has.

These are former children of the node that have been moved to the special stashed list via stash_child().

Definition at line 508 of file pandaNode.I.

References PandaNode::_cycler, and INLINE.

Referenced by PandaNode::copy_subgraph().

PandaNode * PandaNode::get_parent int  n  )  const [inline, inherited]
 

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().

int ReferenceCount::get_ref_count  )  const [inline, inherited]
 

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().

float TextNode::get_right  )  const [inline]
 

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.

LVecBase2f TextNode::get_shadow  )  const [inline]
 

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.

Colorf TextNode::get_shadow_color  )  const [inline]
 

Definition at line 682 of file textNode.I.

References _flags, F_frame_corners, and INLINE.

float TextNode::get_slant  )  const [inline]
 

Definition at line 279 of file textNode.I.

References Colorf, INLINE, and set_text_color().

bool TextNode::get_small_caps  )  const [inline]
 

Returns the small_caps flag.

See set_small_caps().

Definition at line 213 of file textNode.I.

References _align, INLINE, and invalidate_with_measure().

float TextNode::get_small_caps_scale  )  const [inline]
 

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().

PandaNode * PandaNode::get_stashed int  n  )  const [inline, inherited]
 

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().

int PandaNode::get_stashed_sort int  n  )  const [inline, inherited]
 

Returns the sort index of the nth stashed node of this node (that is, the number that was passed to add_child()).

See get_num_stashed().

Definition at line 543 of file pandaNode.I.

References PandaNode::_cycler, and INLINE.

Referenced by PandaNode::copy_subgraph().

const RenderState * PandaNode::get_state  )  const [inline, inherited]
 

Returns the complete RenderState that will be applied to all nodes at this level and below, as set on this node.

This returns only the RenderState set on this particular node, and has nothing to do with state that might be inherited from above.

Reimplemented in PGItem.

Definition at line 749 of file pandaNode.I.

References BoundedObject::get_bound(), and INLINE.

Referenced by NodePath::do_billboard_point_eye().

string TextEncoder::get_text TextEncoder::Encoding  encoding  )  const [inline, inherited]
 

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.

string TextEncoder::get_text  )  const [inline, inherited]
 

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().

string TextEncoder::get_text_as_ascii  )  const [inline, inherited]
 

Returns the text associated with the node, converted as nearly as possible to a fully-ASCII representation.

This means replacing accented letters with their unaccented ASCII equivalents.

It is possible that some characters in the string cannot be converted to ASCII. (The string may involve symbols like the copyright symbol, for instance, or it might involve letters in some other alphabet such as Greek or Cyrillic, or even Latin letters like thorn or eth that are not part of the ASCII character set.) In this case, as much of the string as possible will be converted to ASCII, and the nonconvertible characters will remain encoded in the encoding specified by set_encoding().

Definition at line 397 of file textEncoder.I.

References UnicodeLatinMap::Entry::_toupper_character, INLINE, UnicodeLatinMap::look_up(), and NULL.

Colorf TextNode::get_text_color  )  const [inline]
 

Definition at line 437 of file textNode.I.

float TextNode::get_top  )  const [inline]
 

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.

LMatrix4f TextNode::get_transform  )  const [inline]
 

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.

virtual TypeHandle TextNode::get_type void   )  const [inline, virtual]
 

Reimplemented from PandaNode.

Definition at line 387 of file textNode.h.

int TypedObject::get_type_index  )  const [inline, inherited]
 

Returns the internal index number associated with this object's TypeHandle, a unique number for each different type.

This is equivalent to get_type().get_index().

Definition at line 71 of file typedObject.I.

References TypeHandle::get_name(), TypedObject::get_type(), and INLINE.

int TextEncoder::get_unicode_char int  index  )  const [inline, inherited]
 

Returns the Unicode value of the nth character in the stored text.

This may be a wide character (greater than 255), after the string has been decoded according to set_encoding().

Definition at line 301 of file textEncoder.I.

References TextEncoder::decode_text(), and TextEncoder::encode_wtext().

int TextNode::get_unsafe_to_apply_attribs  )  const [virtual]
 

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.

References _lr3d, and _ul3d.

LPoint3f TextNode::get_upper_left_3d  )  const [inline]
 

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.

int PandaNode::get_visible_child  )  const [virtual, inherited]
 

Returns the index number of the currently visible child of this node.

This is only meaningful if has_single_child_visibility() has returned true.

Reimplemented in SequenceNode, and SwitchNode.

Definition at line 1016 of file pandaNode.cxx.

float TextNode::get_width void   )  const [inline]
 

Returns the net width of the text in local 2-d coordinates.

Definition at line 1578 of file textNode.I.

float TextNode::get_wordwrap  )  const [inline]
 

Definition at line 367 of file textNode.I.

References _frame_color.

const wstring & TextEncoder::get_wtext  )  const [inline, inherited]
 

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().

wstring TextEncoder::get_wtext_as_ascii  )  const [inherited]
 

Returns the text associated with the node, converted as nearly as possible to a fully-ASCII representation.

This means replacing accented letters with their unaccented ASCII equivalents.

It is possible that some characters in the string cannot be converted to ASCII. (The string may involve symbols like the copyright symbol, for instance, or it might involve letters in some other alphabet such as Greek or Cyrillic, or even Latin letters like thorn or eth that are not part of the ASCII character set.) In this case, as much of the string as possible will be converted to ASCII, and the nonconvertible characters will remain in their original form.

Definition at line 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().

bool PandaNode::has_attrib TypeHandle  type  )  const [inline, inherited]
 

Returns true if there is a render attribute of the indicated type defined on this node, or false if there is not.

Definition at line 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().

bool TextNode::has_bin  )  const [inline]
 

Returns true if an explicit drawing bin has been set via set_bin(), false otherwise.

Definition at line 1232 of file textNode.I.

bool TextNode::has_card  )  const [inline]
 

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().

bool TextNode::has_card_border  )  const [inline]
 

Definition at line 544 of file textNode.I.

References _shadow_color.

Referenced by set_text_color().

bool TextNode::has_card_texture  )  const [inline]
 

Definition at line 631 of file textNode.I.

References _frame_lr, _frame_ul, has_frame(), INLINE, and nassertr.

Referenced by set_frame_color().

bool TextNode::has_cull_callback  )  const [virtual]
 

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.

bool PandaNode::has_effect TypeHandle  type  )  const [inline, inherited]
 

Returns true if there is a render effect of the indicated type defined on this node, or false if there is not.

Definition at line 686 of file pandaNode.I.

Referenced by NodePath::set_render_mode_wireframe().

bool TextNode::has_frame  )  const [inline]
 

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().

bool Namable::has_name  )  const [inline, inherited]
 

Returns true if the Namable has a nonempty name set, false if the name is empty.

Definition at line 97 of file namable.I.

References Namable::get_name(), and INLINE.

Referenced by EggGroupUniquifier::EggGroupUniquifier(), Texture::read(), and Texture::Texture().

bool PandaNode::has_selective_visibility  )  const [virtual, inherited]
 

Should be overridden by derived classes to return true if this kind of node has some restrictions on the set of children that should be rendered.

Node with this property include LODNodes, SwitchNodes, and SequenceNodes.

If this function returns true, get_first_visible_child() and get_next_visible_child() will be called to walk through the list of children during cull, instead of iterating through the entire list. This method is called after cull_callback(), so cull_callback() may be responsible for the decisions as to which children are visible at the moment.

Reimplemented in SelectiveChildNode.

Definition at line 918 of file pandaNode.cxx.

References PandaNode::find_parent(), nassertr, and NULL.

Referenced by CullTraverser::get_bounds_inner_viz_state().

bool TextNode::has_shadow  )  const [inline]
 

Definition at line 1150 of file textNode.I.

References _lr2d, check_measure(), and INLINE.

Referenced by set_frame_corners().

bool PandaNode::has_single_child_visibility  )  const [virtual, inherited]
 

Should be overridden by derived classes to return true if this kind of node has the special property that just one of its children is visible at any given time, and furthermore that the particular visible child can be determined without reference to any external information (such as a camera).

At present, only SequenceNodes and SwitchNodes fall into this category.

If this function returns true, get_visible_child() can be called to return the index of the currently-visible child.

Reimplemented in SequenceNode, and SwitchNode.

Definition at line 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().

bool TextEncoder::has_text  )  const [inline, inherited]
 

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().

bool TextNode::has_text_color  )  const [inline]
 

Definition at line 425 of file textNode.I.

References _flags, and F_has_card_border.

Referenced by get_align(), set_align(), and wordwrap_to().

bool TextNode::has_wordwrap  )  const [inline]
 

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().

void TextNode::init_type void   )  [inline, static]
 

Reimplemented from TextEncoder.

Definition at line 381 of file textNode.h.

void TextNode::invalidate_no_measure  )  [inline, private]
 

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().

void TextNode::invalidate_with_measure  )  [inline, private]
 

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().

bool BoundedObject::is_bound_stale  )  const [inline, inherited]
 

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().

bool TextNode::is_card_as_margin  )  const [inline]
 

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().

bool TypedObject::is_exact_type TypeHandle  handle  )  const [inline, inherited]
 

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().

bool BoundedObject::is_final  )  const [inline, inherited]
 

Returns the current state of the "final" flag.

Initially, this flag is off (false), but it may be changed by an explicit call to set_final(). See set_final().

Definition at line 280 of file boundedObject.I.

bool TextNode::is_frame_as_margin  )  const [inline]
 

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().

bool PandaNode::is_geom_node  )  const [virtual, inherited]
 

A simple downcast check.

Returns true if this kind of node happens to inherit from GeomNode, false otherwise.

This is provided as a a faster alternative to calling is_of_type(GeomNode::get_class_type()), since this test is so important to rendering.

Reimplemented in GeomNode.

Definition at line 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().

bool TypedObject::is_of_type TypeHandle  handle  )  const [inline, inherited]
 

Returns true if the current object is or derives from the indicated type.

Definition at line 86 of file typedObject.I.

Referenced by EggMaterialCollection::collapse_equivalent_materials(), EggTextureCollection::collapse_equivalent_textures(), DeferredNodeProperty::compose(), AnimBundleMaker::create_s_channel(), CharacterMaker::create_slider(), ProjectionScreen::cull_callback(), DataNode::define_output(), EggNode::determine_draw_order(), CharacterMaker::egg_to_index(), EggGroupUniquifier::EggGroupUniquifier(), EggPoolUniquifier::EggPoolUniquifier(), EggGroupNode::find_textures(), StaticTextFont::get_glyph(), EggMaterialCollection::insert_materials(), EggTextureCollection::insert_textures(), CharacterJoint::make_copy(), PT(), EggGroupNode::r_flatten_transforms(), EggGroupNode::r_transform_vertices(), EggGroupNode::recompute_polygon_normals(), CollisionLevelState::reserve(), PandaFramework::reset_frame_rate(), PandaFramework::set_texture(), EggGroupNode::steal_children(), and DataGraphTraverser::traverse().

void TextNode::load_default_font  )  [static, private]
 

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().

string TextEncoder::lower const string &  source,
TextEncoder::Encoding  encoding
[inline, static, inherited]
 

Converts the string to lowercase, assuming the string is encoded in the indicated encoding.

Definition at line 634 of file textEncoder.I.

string TextEncoder::lower const string &  source  )  [inline, static, inherited]
 

Converts the string to lowercase, assuming the string is encoded in the default encoding.

Definition at line 619 of file textEncoder.I.

void PandaNode::ls ostream &  out,
int  indent_level
const [inline, inherited]
 

Lists all the nodes at and below the current path hierarchically.

Definition at line 893 of file pandaNode.I.

Referenced by PGEntry::erase().

PointerTo< PandaNode > TextNode::make_card  )  [private]
 

Creates a card behind the text.

Definition at line 1672 of file textNode.cxx.

PointerTo< PandaNode > TextNode::make_card_with_border  )  [private]
 

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.

PandaNode * PandaNode::make_copy void   )  const [virtual, inherited]
 

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().

PointerTo< PandaNode > TextNode::make_frame  )  [private]
 

Creates a frame around the text.

Definition at line 1625 of file textNode.cxx.

TypedWritable * PandaNode::make_from_bam const FactoryParams params  )  [static, protected, inherited]
 

This function is called by the BamReader's factory when a new object of type PandaNode is encountered in the Bam file.

It should create the PandaNode and extract its information from the file.

Reimplemented in AnimBundleNode, Character, CollisionNode, RopeNode, AmbientLight, Camera, DirectionalLight, Fog, GeomNode, LensNode, LODNode, ModelNode, ModelRoot, PlaneNode, PointLight, SequenceNode, Spotlight, and SwitchNode.

Definition at line 2556 of file pandaNode.cxx.

void TextEncoder::make_lower  )  [inherited]
 

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().

void TextEncoder::make_upper  )  [inherited]
 

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().

bool BoundedObject::mark_bound_stale  )  [inline, inherited]
 

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().

float TextNode::measure_row wstring::iterator &  si,
const wstring::iterator &  send,
TextFont font
[private]
 

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.

void TextNode::measure_text wstring::iterator  si,
const wstring::iterator &  send,
TextFont font,
LVector2f &  ul,
LVector2f &  lr,
int &  num_rows
[private]
 

Sets the ul, lr corners to fit the text, without actually assembling it.

Definition at line 1067 of file textNode.cxx.

void PandaNode::output ostream &  out  )  const [virtual, inherited]
 

Outputs the Namable.

This function simply writes the name to the output stream; most Namable derivatives will probably redefine this.

Reimplemented from 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().

void PandaNode::parents_changed  )  [protected, virtual, inherited]
 

Called after a scene graph update that either adds or remove parents from this node, this just provides a hook for derived PandaNode objects that need to update themselves based on the set of parents the node has.

Reimplemented in DataNode.

Definition at line 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().

bool PandaNode::preserve_name  )  const [virtual, inherited]
 

Returns true if the node's name has extrinsic meaning and must be preserved across a flatten operation, false otherwise.

Reimplemented in CollisionNode, 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().

void PandaNode::propagate_stale_bound  )  [protected, virtual, inherited]
 

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.

void PandaNode::r_copy_children const PandaNode from,
PandaNode::InstanceMap inst_map
[protected, virtual, inherited]
 

This is called by r_copy_subgraph(); the copy has already been made of this particular node (and this is the copy); this function's job is to copy all of the children from the original.

Note that it includes the parameter inst_map, which is a map type, and is not (and cannot be) exported from PANDA.DLL. Thus, any derivative of PandaNode that is not also a member of PANDA.DLL *cannot* access this map, and probably should not even override this function.

Reimplemented in Character.

Definition at line 1925 of file pandaNode.cxx.

References PandaNode::_cycler, PandaNode::fix_path_lengths(), and PandaNode::get_generic_component().

PointerTo< PandaNode > PandaNode::r_copy_subgraph PandaNode::InstanceMap inst_map  )  const [protected, virtual, inherited]
 

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().

BoundingVolume * PandaNode::recompute_bound  )  [protected, virtual, inherited]
 

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.

BoundingVolume * TextNode::recompute_internal_bound  )  [virtual]
 

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.

References _lr3d, and _ul3d.

string TextEncoder::reencode_text const string &  text,
TextEncoder::Encoding  from,
TextEncoder::Encoding  to
[inline, static, inherited]
 

Given the indicated text string, which is assumed to be encoded via the encoding "from", decodes it and then reencodes it into the encoding "to", and returns the newly encoded string.

This does not change or affect any properties on the TextEncoder itself.

Definition at line 418 of file textEncoder.I.

int ReferenceCount::ref  )  const [inline, inherited]
 

Explicitly increments the reference count.

User code should avoid using ref() and unref() directly, which can result in missed reference counts. Instead, let a PointerTo object manage the reference counting automatically.

This function is const, even though it changes the object, because generally fiddling with an object's reference count isn't considered part of fiddling with the object. An object might be const in other ways, but we still need to accurately count the number of references to it.

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().

void PandaNode::register_with_read_factory void   )  [static, inherited]
 

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.

void PandaNode::remove_all_children  )  [inherited]
 

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.

bool PandaNode::remove_child PandaNode child_node  )  [inherited]
 

Removes the indicated child from the node.

Returns true if the child was removed, false if it was not already a child of the node. This will also successfully remove the child if it had been stashed.

Definition at line 1157 of file pandaNode.cxx.

void PandaNode::remove_child int  n  )  [inherited]
 

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().

void PandaNode::remove_stashed int  n  )  [inherited]
 

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().

bool PandaNode::replace_child PandaNode orig_child,
PandaNode new_child
[inherited]
 

Searches for the orig_child node in the node's list of children, and replaces it with the new_child instead.

Returns true if the replacement is made, or false if the node is not a child.

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().

bool PandaNode::safe_to_combine  )  const [virtual, inherited]
 

Returns true if it is generally safe to combine this particular kind of PandaNode with other kinds of PandaNodes, 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()().

bool PandaNode::safe_to_flatten void   )  const [virtual, inherited]
 

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.

bool PandaNode::safe_to_flatten_below  )  const [virtual, inherited]
 

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.

bool PandaNode::safe_to_modify_transform  )  const [virtual, inherited]
 

Returns true if it is safe to automatically adjust the transform on this kind of node.

Usually, this is only a bad idea if the user expects to find a particular transform on the node.

ModelNodes with the preserve_transform flag set are presently the only kinds of nodes that should not have their transform even adjusted.

Reimplemented in ModelNode.

Definition at line 578 of file pandaNode.cxx.

bool PandaNode::safe_to_transform  )  const [virtual, inherited]
 

Returns true if it is generally safe to transform this particular kind of PandaNode by calling the xform() method, false otherwise.

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().

void TextNode::set_align TextNode::Alignment  align_type  )  [inline]
 

Definition at line 291 of file textNode.I.

References _flags, _text_color, F_has_text_color, has_text_color(), INLINE, and invalidate_no_measure().

void PandaNode::set_attrib const RenderAttrib attrib,
int  override = 0
[inline, inherited]
 

Adds the indicated render attribute to the scene graph on this node.

This attribute will now apply to this node and everything below. If there was already an attribute of the same type, it is replaced.

Definition at line 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().

void TextNode::set_bin const string &  bin  )  [inline]
 

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.

void BoundedObject::set_bound BoundedObject::BoundingVolumeType  type  )  [inline, inherited]
 

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.

void PandaNode::set_bound const BoundingVolume volume  )  [inline, inherited]
 

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.

void PandaNode::set_bound BoundingVolumeType  type  )  [inline, inherited]
 

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.

BoundingVolume * BoundedObject::set_bound_ptr BoundingVolume bound  )  [inline, protected, inherited]
 

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.

void TextNode::set_card_actual float  left,
float  right,
float  bottom,
float  top
[inline]
 

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().

void TextNode::set_card_as_margin float  left,
float  right,
float  bottom,
float  top
[inline]
 

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.

void TextNode::set_card_border float  size,
float  uv_portion
[inline]
 

Definition at line 488 of file textNode.I.

References _card_texture, _flags, F_has_card_texture, and NULL.

void TextNode::set_card_color const Colorf card_color  )  [inline]
 

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().

void TextNode::set_card_color float  r,
float  g,
float  b,
float  a
[inline]
 

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().

void TextNode::set_card_texture Texture card_texture  )  [inline]
 

Definition at line 595 of file textNode.I.

References _flags, F_has_frame, and INLINE.

void TextNode::set_coordinate_system CoordinateSystem  cs  )  [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().

void TextEncoder::set_default_encoding TextEncoder::Encoding  encoding  )  [inline, static, inherited]
 

Specifies the default encoding to be used for all subsequently created TextEncoder objects.

See set_encoding().

Definition at line 100 of file textEncoder.I.

References TextEncoder::_flags, TextEncoder::_text, TextEncoder::F_got_text, TextEncoder::F_got_wtext, TextEncoder::has_text(), and INLINE.

void TextNode::set_default_font TextFont font  )  [inline, static]
 

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.

void PandaNode::set_draw_mask DrawMask  mask  )  [inline, inherited]
 

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().

int TextNode::set_draw_order int  draw_order  )  [inline]
 

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().

void PandaNode::set_effect const RenderEffect effect  )  [inline, inherited]
 

Adds the indicated render effect to the scene graph on this node.

If there was already an effect of the same type, it is replaced.

Definition at line 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().

void PandaNode::set_effects const RenderEffects effects  )  [inline, inherited]
 

Sets the complete RenderEffects that will be applied this node.

This completely replaces whatever has been set on this node via repeated calls to set_attrib().

Definition at line 789 of file pandaNode.I.

References PandaNode::_cycler, and INLINE.

void TextEncoder::set_encoding TextEncoder::Encoding  encoding  )  [inline, inherited]
 

Specifies how the string set via set_text() is to be interpreted.

The default, E_iso8859, means a standard string with one-byte characters (i.e. ASCII). Other encodings are possible to take advantage of character sets with more than 256 characters.

This affects only future calls to set_text(); it does not change text that was set previously.

Definition at line 65 of file textEncoder.I.

Referenced by TextEncoder::unicode_isalpha(), and TextEncoder::unicode_isdigit().

void BoundedObject::set_final bool  flag  )  [inline, inherited]
 

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.

void TextNode::set_font TextFont font  )  [inline]
 

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.

void TextNode::set_frame_actual float  left,
float  right,
float  bottom,
float  top
[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().

void TextNode::set_frame_as_margin float  left,
float  right,
float  bottom,
float  top
[inline]
 

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.

void TextNode::set_frame_color const Colorf frame_color  )  [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.

void TextNode::set_frame_color float  r,
float  g,
float  b,
float  a
[inline]
 

Definition at line 449 of file textNode.I.

Referenced by clear_wordwrap().

void TextNode::set_frame_corners bool  corners  )  [inline]
 

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.

void TextNode::set_frame_line_width float  line_width  )  [inline]
 

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().

void Namable::set_name const string &  name  )  [inline, inherited]
 

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().

void TextNode::set_shadow float  xoffset,
float  yoffset
[inline]
 

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.

void TextNode::set_shadow_color const Colorf shadow_color  )  [inline]
 

Definition at line 667 of file textNode.I.

References _frame_width, and INLINE.

void TextNode::set_shadow_color float  r,
float  g,
float  b,
float  a
[inline]
 

Definition at line 655 of file textNode.I.

Referenced by get_card_border_size().

void TextNode::set_slant float  slant  )  [inline]
 

Definition at line 264 of file textNode.I.

References _flags, F_has_wordwrap, and INLINE.

void TextNode::set_small_caps bool  small_caps  )  [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.

void TextNode::set_small_caps_scale float  small_caps_scale  )  [inline]
 

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().

void PandaNode::set_state const RenderState state  )  [inline, inherited]
 

Sets the complete RenderState that will be applied to all nodes at this level and below.

(The actual state that will be applied to lower nodes is based on the composition of RenderStates from above this node as well). This completely replaces whatever has been set on this node via repeated calls to set_attrib().

Definition at line 727 of file pandaNode.I.

Referenced by NodePath::get_key(), and GeomParticleRenderer::kill_particle().

void TextEncoder::set_text const string &  text,
TextEncoder::Encoding  encoding
[inline, inherited]
 

The two-parameter version of set_text() accepts an explicit encoding; the text is immediately decoded and stored as a wide-character string.

Subsequent calls to get_text() will return the same text re-encoded using whichever encoding is specified by set_encoding().

Definition at line 166 of file textEncoder.I.

References TextEncoder::encode_wtext(), TextEncoder::get_wtext(), and INLINE.

void TextNode::set_text const string &  text,
TextNode::Encoding  encoding
[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.

void TextNode::set_text const string &  text  )  [inline]
 

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().

void TextNode::set_text_color const Colorf text_color  )  [inline]
 

Definition at line 391 of file textNode.I.

References _flags, F_has_card_border, has_card_border(), INLINE, and invalidate_no_measure().

void TextNode::set_text_color float  r,
float  g,
float  b,
float  a
[inline]
 

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().

void PandaNode::set_transform const TransformState transform  )  [inline, inherited]
 

Sets the transform that will be applied to this node and below.

This defines a new coordinate space at this point in the scene graph and below.

Definition at line 837 of file pandaNode.I.

Referenced by NodePath::get_child().

void TextNode::set_transform const LMatrix4f &  transform  )  [inline]
 

Sets an additional transform that is applied to the entire text paragraph.

Definition at line 1310 of file textNode.I.

References _font, INLINE, nassertr, NULL, and wstring.

void TextEncoder::set_unicode_char int  index,
int  character
[inline, inherited]
 

Sets the Unicode value of the nth character in the stored text.

This may be a wide character (greater than 255), after the string has been decoded according to set_encoding().

Definition at line 322 of file textEncoder.I.

References UnicodeLatinMap::Entry::_ascii_equiv, INLINE, UnicodeLatinMap::look_up(), and NULL.

void PandaNode::set_velocity const LVector3f &  vel  )  [virtual, inherited]
 

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.

void TextNode::set_wordwrap float  width  )  [inline]
 

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.

void TextNode::set_wtext const wstring wtext  )  [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().

void PandaNode::stash_child int  child_index  )  [inherited]
 

Stashes the indicated child node.

This removes the child from the list of active children and puts it on a special list of stashed children. This child node no longer contributes to the bounding volume of the PandaNode, and is not visited in normal traversals. It is invisible and uncollidable. The child may later be restored by calling unstash_child().

Definition at line 1292 of file pandaNode.cxx.

References NULL.

bool PandaNode::stash_child PandaNode child_node  )  [inline, inherited]
 

Stashes the indicated child node.

This removes the child from the list of active children and puts it on a special list of stashed children. This child node no longer contributes to the bounding volume of the PandaNode, and is not visited in normal traversals. It is invisible and uncollidable. The child may later be restored by calling unstash_child().

This function returns true if the child node was successfully stashed, or false if it was not a child of the node in the first place (e.g. it was previously stashed).

Definition at line 446 of file pandaNode.I.

Referenced by PandaNode::get_parent().

void PandaNode::steal_children PandaNode other  )  [inherited]
 

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().

bool TextNode::tack_on_accent char  accent_mark,
TextNode::CheesyPlacement  placement,
TextNode::CheesyTransform  transform,
const LPoint3f &  min_vert,
const LPoint3f &  max_vert,
const LPoint3f &  centroid,
TextFont font,
GeomNode dest,
Geom geom_array[],
int &  num_geoms
[private]
 

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.

void TextNode::tack_on_accent UnicodeLatinMap::AccentType  accent_type,
const LPoint3f &  min_vert,
const LPoint3f &  max_vert,
const LPoint3f &  centroid,
TextFont font,
GeomNode dest,
Geom geom_array[],
int &  num_geoms
[private]
 

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.

void ReferenceCount::test_ref_count_integrity  )  const [inline, inherited]
 

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().

int TextNode::thaw  )  [inline]
 

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().

void PandaNode::transform_changed  )  [protected, virtual, inherited]
 

Called after the node's transform has been changed for any reason, this just provides a hook so derived classes can do something special in this case.

Reimplemented in 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().

bool TextEncoder::unicode_isalpha int  character  )  [inline, static, inherited]
 

Returns true if the indicated character is an alphabetic letter, false otherwise.

This is akin to ctype's isalpha(), extended to Unicode.

Definition at line 436 of file textEncoder.I.

References TextEncoder::get_text(), INLINE, TextEncoder::make_upper(), TextEncoder::set_encoding(), and TextEncoder::set_text().

bool TextEncoder::unicode_isdigit int  character  )  [inline, static, inherited]
 

Returns true if the indicated character is a numeric digit, false otherwise.

This is akin to ctype's isdigit(), extended to Unicode.

Definition at line 458 of file textEncoder.I.

References TextEncoder::get_text(), INLINE, TextEncoder::make_lower(), TextEncoder::set_encoding(), and TextEncoder::set_text().

bool TextEncoder::unicode_islower int  character  )  [inline, static, inherited]
 

Returns true if the indicated character is a lowercase letter, false otherwise.

This is akin to ctype's islower(), extended to Unicode.

Definition at line 524 of file textEncoder.I.

References TextEncoder::_encoding, and TextEncoder::encode_wtext().

bool TextEncoder::unicode_ispunct int  character  )  [inline, static, inherited]
 

Returns true if the indicated character is a punctuation mark, false otherwise.

This is akin to ctype's ispunct(), extended to Unicode.

Definition at line 481 of file textEncoder.I.

References TextEncoder::_flags, TextEncoder::_wtext, TextEncoder::F_got_text, TextEncoder::F_got_wtext, TextEncoder::has_text(), and INLINE.

bool TextEncoder::unicode_isupper int  character  )  [inline, static, inherited]
 

Returns true if the indicated character is an uppercase letter, false otherwise.

This is akin to ctype's isupper(), extended to Unicode.

Definition at line 503 of file textEncoder.I.

int TextEncoder::unicode_tolower int  character  )  [inline, static, inherited]
 

Returns the uppercase equivalent of the given Unicode character.

This is akin to ctype's tolower(), extended to Unicode.

Definition at line 566 of file textEncoder.I.

Referenced by TextEncoder::make_upper().

int TextEncoder::unicode_toupper int  character  )  [inline, static, inherited]
 

Returns the uppercase equivalent of the given Unicode character.

This is akin to ctype's toupper(), extended to Unicode.

Definition at line 545 of file textEncoder.I.

int ReferenceCount::unref  )  const [inline, inherited]
 

Explicitly decrements the reference count.

Note that the object will not be implicitly deleted by unref() simply because the reference count drops to zero. (Having a member function delete itself is problematic; 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().

void PandaNode::unstash_child int  stashed_index  )  [inherited]
 

Returns the indicated stashed node to normal child status.

This removes the child from the list of stashed children and puts it on the normal list of active children. This child node once again contributes to the bounding volume of the PandaNode, and will be visited in normal traversals. It is visible and collidable.

Definition at line 1336 of file pandaNode.cxx.

bool PandaNode::unstash_child PandaNode child_node  )  [inline, inherited]
 

Returns the indicated stashed node to normal child status.

This removes the child from the list of stashed children and puts it on the normal list of active children. This child node once again contributes to the bounding volume of the PandaNode, and will be visited in normal traversals. It is visible and collidable.

This function returns true if the child node was successfully stashed, or false if it was not a child of the node in the first place (e.g. it was previously stashed).

Definition at line 486 of file pandaNode.I.

References PandaNode::_cycler, and INLINE.

void TextNode::update void   )  [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.

string TextEncoder::upper const string &  source,
TextEncoder::Encoding  encoding
[inline, static, inherited]
 

Converts the string to uppercase, assuming the string is encoded in the indicated encoding.

Definition at line 600 of file textEncoder.I.

string TextEncoder::upper const string &  source  )  [inline, static, inherited]
 

Converts the string to uppercase, assuming the string is encoded in the default encoding.

Definition at line 585 of file textEncoder.I.

wstring TextNode::wordwrap_to const wstring wtext,
float  wordwrap_width,
bool  preserve_trailing_whitespace
const [inline]
 

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.

string TextNode::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).

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().

void TextNode::write ostream &  out,
int  indent_level = 0
const [virtual]
 

Reimplemented from PandaNode.

Definition at line 171 of file textNode.cxx.

References A_center, A_left, and A_right.

void PandaNode::write_datagram BamWriter manager,
Datagram dg
[virtual, inherited]
 

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().

void PandaNode::xform const LMatrix4f &  mat  )  [virtual, inherited]
 

Transforms the contents of this PandaNode by the indicated matrix, if it means anything to do so.

For most kinds of PandaNodes, this does nothing.

Reimplemented in 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().


Friends And Related Function Documentation

friend class PandaNode::Children [friend, inherited]
 

Reimplemented in GeomNode.

Definition at line 392 of file pandaNode.h.


Member Data Documentation

Alignment TextNode::_align [private]
 

Definition at line 353 of file textNode.h.

Referenced by get_small_caps().

string TextNode::_bin [private]
 

Definition at line 364 of file textNode.h.

Referenced by get_frame_corners().

float TextNode::_card_border_size [private]
 

Definition at line 356 of file textNode.h.

Referenced by set_text_color().

float TextNode::_card_border_uv_portion [private]
 

Definition at line 357 of file textNode.h.

Referenced by clear_text_color(), and set_text_color().

Colorf TextNode::_card_color [private]
 

Definition at line 333 of file textNode.h.

Referenced by apply_attribs_to_vertices().

LVector2f TextNode::_card_lr [private]
 

Definition at line 361 of file textNode.h.

Referenced by get_frame_as_set(), is_frame_as_margin(), and set_frame_actual().

PointerTo< Texture > TextNode::_card_texture [private]
 

Definition at line 329 of file textNode.h.

Referenced by clear_card_border(), set_card_border(), and set_frame_color().

LVector2f TextNode::_card_ul [private]
 

Definition at line 361 of file textNode.h.

Referenced by get_frame_as_set(), is_frame_as_margin(), and set_frame_actual().

CoordinateSystem TextNode::_coordinate_system [private]
 

Definition at line 368 of file textNode.h.

Referenced by is_card_as_margin().

PointerTo< TextFont > TextNode::_default_font [static, private]
 

Definition at line 59 of file textNode.cxx.

Referenced by get_font(), make_card_with_border(), set_default_font(), and set_font().

int TextNode::_draw_order [private]
 

Definition at line 365 of file textNode.h.

Referenced by clear_card(), and set_card_actual().

int TextNode::_flags [private]
 

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().

PointerTo< TextFont > TextNode::_font [private]
 

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().

Colorf TextNode::_frame_color [private]
 

Definition at line 332 of file textNode.h.

Referenced by get_wordwrap(), and has_wordwrap().

LVector2f TextNode::_frame_lr [private]
 

Definition at line 360 of file textNode.h.

Referenced by get_card_texture(), has_card_texture(), and set_card_color().

LVector2f TextNode::_frame_ul [private]
 

Definition at line 360 of file textNode.h.

Referenced by get_card_texture(), has_card_texture(), and set_card_color().

float TextNode::_frame_width [private]
 

Definition at line 355 of file textNode.h.

Referenced by set_shadow_color().

BoundedObject PandaNode::_internal_bound [protected, inherited]
 

Definition at line 213 of file pandaNode.h.

Referenced by PandaNode::clear_state().

PointerTo< PandaNode > TextNode::_internal_geom [private]
 

Definition at line 325 of file textNode.h.

bool TextNode::_loaded_default_font = false [static, private]
 

Definition at line 60 of file textNode.cxx.

Referenced by get_font(), and set_font().

LPoint2f TextNode::_lr2d [private]
 

Definition at line 370 of file textNode.h.

Referenced by clear_shadow(), get_card_texture(), get_frame_as_set(), and has_shadow().

LPoint3f TextNode::_lr3d [private]
 

Definition at line 371 of file textNode.h.

Referenced by clear_bin(), get_unsafe_to_apply_attribs(), and recompute_internal_bound().

int TextNode::_num_rows [private]
 

Definition at line 372 of file textNode.h.

Colorf TextNode::_shadow_color [private]
 

Definition at line 331 of file textNode.h.

Referenced by apply_attribs_to_vertices(), get_card_border_uv_portion(), and has_card_border().

LVector2f TextNode::_shadow_offset [private]
 

Definition at line 362 of file textNode.h.

Referenced by set_frame_corners(), and set_frame_line_width().

float TextNode::_slant [private]
 

Definition at line 327 of file textNode.h.

float TextNode::_small_caps_scale [private]
 

Definition at line 358 of file textNode.h.

Colorf TextNode::_text_color [private]
 

Definition at line 330 of file textNode.h.

Referenced by set_align(), and wordwrap_to().

LMatrix4f TextNode::_transform [private]
 

Definition at line 367 of file textNode.h.

Referenced by get_frame_actual(), and has_card().

TypeHandle TextNode::_type_handle [static, private]
 

Reimplemented from TextEncoder.

Definition at line 57 of file textNode.cxx.

LPoint2f TextNode::_ul2d [private]
 

Definition at line 370 of file textNode.h.

Referenced by get_card_texture(), get_frame_as_set(), get_shadow(), and set_shadow().

LPoint3f TextNode::_ul3d [private]
 

Definition at line 371 of file textNode.h.

Referenced by get_unsafe_to_apply_attribs(), recompute_internal_bound(), and set_bin().

float TextNode::_wordwrap_width [private]
 

Definition at line 354 of file textNode.h.

Referenced by set_small_caps_scale().

TypedWritable *const TypedWritable::Null = (TypedWritable*)0L [static, inherited]
 

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().


The documentation for this class was generated from the following files:
Generated on Fri May 2 00:55:32 2003 for Panda by doxygen1.3