18 TextGlyph(
int character, PN_stdfloat advance) :
19 _character(character),
32 _character(character),
38 if (geom !=
nullptr) {
41 if (_state ==
nullptr) {
42 _state = RenderState::make_empty();
51 _character(copy._character),
54 _advance(copy._advance),
55 _has_quad(copy._has_quad),
56 _quad_dimensions(copy._quad_dimensions),
57 _quad_texcoords(copy._quad_texcoords)
64 INLINE
void TextGlyph::
66 _character = copy._character;
69 _advance = copy._advance;
70 _has_quad = copy._has_quad;
71 _quad_dimensions = copy._quad_dimensions;
72 _quad_texcoords = copy._quad_texcoords;
104 get_quad(LVecBase4 &dimensions, LVecBase4 &texcoords)
const {
109 dimensions = _quad_dimensions;
110 texcoords = _quad_texcoords;
A container for geometry primitives.
This represents a unique collection of RenderAttrib objects that correspond to a particular renderabl...
A representation of a single glyph (character) from a font.
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.
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; ...
bool get_quad(LVecBase4 &dimensions, LVecBase4 &texcoords) const
Assuming that this glyph is representable as a textured quad, returns its dimensions and UV range.