00001 // Filename: textGlyph.h 00002 // Created by: drose (08Feb02) 00003 // 00004 //////////////////////////////////////////////////////////////////// 00005 // 00006 // PANDA 3D SOFTWARE 00007 // Copyright (c) 2001, Disney Enterprises, Inc. All rights reserved 00008 // 00009 // All use of this software is subject to the terms of the Panda 3d 00010 // Software license. You should have received a copy of this license 00011 // along with this source code; you will also find a current copy of 00012 // the license at http://www.panda3d.org/license.txt . 00013 // 00014 // To contact the maintainers of this program write to 00015 // panda3d@yahoogroups.com . 00016 // 00017 //////////////////////////////////////////////////////////////////// 00018 00019 #ifndef TEXTGLYPH_H 00020 #define TEXTGLYPH_H 00021 00022 #include "pandabase.h" 00023 #include "renderState.h" 00024 #include "referenceCount.h" 00025 #include "geom.h" 00026 #include "pointerTo.h" 00027 00028 //////////////////////////////////////////////////////////////////// 00029 // Class : TextGlyph 00030 // Description : A representation of a single glyph (character) from a 00031 // font. This is a piece of renderable geometry of some 00032 // kind. 00033 //////////////////////////////////////////////////////////////////// 00034 class EXPCL_PANDA TextGlyph : public ReferenceCount { 00035 public: 00036 INLINE TextGlyph(); 00037 INLINE TextGlyph(Geom *geom, const RenderState *state, float advance); 00038 INLINE TextGlyph(const TextGlyph ©); 00039 INLINE void operator = (const TextGlyph ©); 00040 virtual ~TextGlyph(); 00041 00042 INLINE PT(Geom) get_geom() const; 00043 INLINE const RenderState *get_state() const; 00044 INLINE float get_advance() const; 00045 00046 protected: 00047 PT(Geom) _geom; 00048 CPT(RenderState) _state; 00049 float _advance; 00050 }; 00051 00052 #include "textGlyph.I" 00053 00054 #endif