00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef __DISPLACEDTEXTURETEXT_H__
00020 #define __DISPLACEDTEXTURETEXT_H__
00021
00022
00023 #include <string>
00024 #include <set>
00025 #include <map>
00026
00027 #include <vrs/polygonset.h>
00028 #include <vrs/container/iterator.h>
00029 #include <vrs/sg/canvas.h>
00030
00031 #include <vrs/text/vrs_textprerequisites.h>
00032 #include <vrs/text/fontdefinition.h>
00033 #include <vrs/text/texturetext.h>
00034 #include <vrs/text/baselinemodifier.h>
00035
00036
00038 namespace VRS
00039 {
00040 class Engine;
00041
00042 namespace TEXT
00043 {
00044 typedef std::set< SO<FontTexture> > FontTextureSet;
00045
00060 class VRS_CORE_API DisplacedTextureText : public TextureText
00061 {
00062 public:
00063 #ifdef VRS_HAS_WSTRING // Has Unicode support
00065 DisplacedTextureText( SO<FontDefinition> fd, const std::wstring& text );
00066 #endif
00068 DisplacedTextureText( SO<FontDefinition> fd, const std::string& text );
00070 DisplacedTextureText( SO<FontDefinition> fd, DisplacedTextureText* bt );
00072 DisplacedTextureText( SO<FontDefinition> fd, TextureText* bt );
00074 virtual ~DisplacedTextureText();
00075
00077 void setBaseLineModifier( SO<BaseLineModifier> mod, bool rotationToUpPlane=false );
00079 SO<BaseLineModifier> getBaseLineModifier( ) const;
00080
00081
00083 inline void setUniformScaleValue (const double value) { m_uniformScaleValue = value; modified (); };
00084
00086 inline double getUniformScaleValue () const { return m_uniformScaleValue; } ;
00087
00089 inline void setRoationToUpPlaneFlag (const bool flag) { m_rotationToUpPlane = flag; modified (); };
00090
00092 inline bool getRoationToUpPlaneFlag () const { return m_rotationToUpPlane; } ;
00093
00095 virtual void updateCachedPolygons();
00096
00098 virtual Bounds boundingBox() const;
00099
00100 VRS_TYPEINFO(DisplacedTextureText, BaseText);
00101 VRS_SERIALIZABLE(DisplacedTextureText);
00102 protected:
00104 DisplacedTextureText();
00106 SO<BaseLineModifier> m_BaseLineModifier;
00108 Bounds m_ModCachedBounds;
00109
00110 double m_uniformScaleValue;
00111 bool m_rotationToUpPlane;
00112 };
00113 }
00114 }
00115
00116 #endif