VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtProjectedTextModelInstance.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2008 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
9 
10 #ifndef DtAttachableProjectedTextModelInstance_H_
11 #define DtAttachableProjectedTextModelInstance_H_
12 
13 #include <vrvOsg/vrvOsg.h>
15 
16 #include <osg/Group>
17 #include <osg/Geode>
18 #include <osg/Geometry>
19 #include <osg/Switch>
20 #include <osgText/Text>
21 
22 namespace makVrv
23 {
24  class DtDe;
25  class DtChannel;
26 
31  : public DtOsgModelInstance
32  {
33  public:
35  DtProjectedTextModelInstance(DtDe& de, const std::string& uniqueName);
36 
39 
42  virtual void addToConnector( DtOsgSceneConnector* connector );
43 
46  virtual bool removeFromConnector( DtOsgSceneConnector* connector );
47 
48  virtual void setColor( const osg::Vec4& color );
49  virtual void setFontName( const std::string& fontName );
50  virtual void setFontSize( double size );
51  virtual void setText( const std::string& text );
52 
53  virtual void setPosition( int vtx, const DtVector& position );
54 
56  virtual void setVisible(bool visible) {}
57 
58  protected:
59 
60  DtChannel* findChannelWithLocation( const osg::Vec3d& location ) const;
61  bool locationInChannel( DtChannel* channel, const osg::Vec3d& location ) const;
62  void getChannelDimensions( DtChannel* channel, double& startX, double& startY,
63  double& endX, double& endY ) const;
64 
65  protected:
66 
69 
70  std::string myFontName;
71  osg::Vec4 myColor;
72  double mySize;
73 
74  std::string myUniqueName;
75  };
76 }
77 
78 #endif
79 
osg::Vec4 myColor
Definition: DtProjectedTextModelInstance.h:71
#define DT_DLL_VRVOSG
Definition: vrvOsg.h:23
std::string myUniqueName
Definition: DtProjectedTextModelInstance.h:74
voidpf void uLong size
Definition: ioapi.h:39
osg::ref_ptr< osgText::Text > myTextDrawable
Definition: DtProjectedTextModelInstance.h:67
Contains makVrv::DtOsgModelInstance class.
DtOsgSceneConnector is used by models to create an OSG position/orientation transform so that it can ...
Definition: DtOsgSceneConnector.h:77
std::string myFontName
Definition: DtProjectedTextModelInstance.h:70
The abstract Channel Class.
Definition: DtChannel.h:35
The base class for simple OSG based model instances. This call can&#39;t be instantiated itself...
Definition: DtOsgModelInstance.h:77
double mySize
Definition: DtProjectedTextModelInstance.h:72
Contains DLL export macros.
The DtDe is the core component of any VR-Vantage application. It owns a DtRenderer, DtDeCommunicator, as well as a DtDisplay and other things.
Definition: DtDe.h:72
virtual void setVisible(bool visible)
no-op
Definition: DtProjectedTextModelInstance.h:56
OSG-specific instance of an attachable, projected text model (as used for HAT lines) ...
Definition: DtProjectedTextModelInstance.h:30
osg::ref_ptr< osg::Geode > myTextGeode
Definition: DtProjectedTextModelInstance.h:68

Document ID: Generated on Tue Sep 24 19:28:17 EDT 2024 from SVN revision 269799
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)