28class EXPCL_PANDA_TEXT
TextGlyph :
public TypedReferenceCount {
30 INLINE
TextGlyph(
int character, PN_stdfloat advance=0);
34 INLINE
void operator = (
const TextGlyph ©);
40 INLINE
bool get_quad(LVecBase4 &dimensions, LVecBase4 &texcoords)
const;
50 PT(
Geom) get_geom(Geom::UsageHint usage_hint)
const;
53 void calc_tight_bounds(LPoint3 &min_point, LPoint3 &max_point,
54 bool &found_any,
Thread *current_thread)
const;
56 void set_quad(
const LVecBase4 &dimensions,
const LVecBase4 &texcoords,
63 void check_quad_geom();
64 void make_quad_geom();
74 LVecBase4 _quad_dimensions;
75 LVecBase4 _quad_texcoords;
77 friend class GeomTextGlyph;
83 static void init_type() {
84 TypedReferenceCount::init_type();
86 TypedReferenceCount::get_class_type());
88 virtual TypeHandle get_type()
const {
89 return get_class_type();
91 virtual TypeHandle force_init_type() {init_type();
return get_class_type();}
94 static TypeHandle _type_handle;
This is an abstract base class for a family of classes that represent the fundamental geometry primit...
This defines the actual numeric vertex data stored in a Geom, in the structure defined by a particula...
A container for geometry primitives.
This represents a unique collection of RenderAttrib objects that correspond to a particular renderabl...
get_character
Returns the Unicode value that corresponds to the character this glyph represents.
TextGlyph(int character, PN_stdfloat advance=0)
This constructor makes an empty glyph.
void set_geom(GeomVertexData *vdata, GeomPrimitive *prim, const RenderState *state)
Sets the geom from a pre-built Geom object.
get_state
Returns the state in which the glyph should be rendered.
bool has_quad() const
Returns true if this glyph contains the definition for a simple quad, rather than a more complex piec...
get_advance
Returns the distance by which the character pointer should be advanced after placing this character; ...
virtual bool is_whitespace() const
Returns true if this glyph represents invisible whitespace, or false if it corresponds to some visibl...
bool get_quad(LVecBase4 &dimensions, LVecBase4 &texcoords) const
Assuming that this glyph is representable as a textured quad, returns its dimensions and UV range.
A thread; that is, a lightweight process.
TypeHandle is the identifier used to differentiate C++ class types.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
void register_type(TypeHandle &type_handle, const std::string &name)
This inline function is just a convenient way to call TypeRegistry::register_type(),...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.