VR-Forces 4.8 Class Documentation
 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 /******************************************************************************
6 ** $RCSfile: DtProjectedTextModelInstance.h,v $ $Revision: 1.10 $ $State: Exp $
7 ******************************************************************************/
8 
12 
13 #ifndef DtAttachableProjectedTextModelInstance_H_
14 #define DtAttachableProjectedTextModelInstance_H_
15 
16 #include <vrvOsg/vrvOsg.h>
18 
19 #include <osg/Group>
20 #include <osg/Geode>
21 #include <osg/Geometry>
22 #include <osg/Switch>
23 #include <osgText/Text>
24 
25 namespace makVrv
26 {
27  class DtDe;
28  class DtChannel;
29 
34  : public DtOsgModelInstance
35  {
36  public:
38  DtProjectedTextModelInstance(DtDe& de, const std::string& uniqueName);
39 
42 
45  virtual void addToConnector( DtOsgSceneConnector* connector );
46 
49  virtual bool removeFromConnector( DtOsgSceneConnector* connector );
50 
51  virtual void setColor( const osg::Vec4& color );
52  virtual void setFontName( const std::string& fontName );
53  virtual void setFontSize( double size );
54  virtual void setText( const std::string& text );
55 
56  virtual void setPosition( int vtx, const DtVector& position );
57 
59  virtual void setVisible(bool visible) {}
60 
61  protected:
62 
63  DtChannel* findChannelWithLocation( const osg::Vec3d& location ) const;
64  bool locationInChannel( DtChannel* channel, const osg::Vec3d& location ) const;
65  void getChannelDimensions( DtChannel* channel, double& startX, double& startY,
66  double& endX, double& endY ) const;
67 
68  protected:
69 
72 
73  std::string myFontName;
74  osg::Vec4 myColor;
75  double mySize;
76 
77  std::string myUniqueName;
78  };
79 }
80 
81 #endif
82 
osg::Vec4 myColor
Definition: DtProjectedTextModelInstance.h:74
#define DT_DLL_VRVOSG
Definition: vrvOsg.h:23
std::string myUniqueName
Definition: DtProjectedTextModelInstance.h:77
voidpf void uLong size
Definition: ioapi.h:39
osg::ref_ptr< osgText::Text > myTextDrawable
Definition: DtProjectedTextModelInstance.h:70
Contains makVrv::DtOsgModelInstance class.
DtOsgSceneConnector is used by models to create an OSG position/orientation transform so that it can ...
Definition: DtOsgSceneConnector.h:76
std::string myFontName
Definition: DtProjectedTextModelInstance.h:73
The abstract Channel Class.
Definition: DtChannel.h:29
The base class for simple OSG based model instances.
Definition: DtOsgModelInstance.h:72
double mySize
Definition: DtProjectedTextModelInstance.h:75
Contains DLL export macros.
The DtDe is the core component of any VR-Vantage application.
Definition: DtDe.h:69
virtual void setVisible(bool visible)
no-op
Definition: DtProjectedTextModelInstance.h:59
OSG-specific instance of an attachable, projected text model (as used for HAT lines) ...
Definition: DtProjectedTextModelInstance.h:33
osg::ref_ptr< osg::Geode > myTextGeode
Definition: DtProjectedTextModelInstance.h:71

Document ID: Generated on Thu Aug 27 10:56:05 EDT 2020 from SVN revision 217100
Copyright © 2005-2020 MAK Technologies. All Rights Reserved (www.mak.com)