VR-Forces 4.6 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtOsgWindowPolygonInstance.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2009 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 /******************************************************************************
6 ** $RCSfile: DtOsgWindowPolygonInstance.h,v $ $Revision: 1.17 $ $State: Exp $
7 ******************************************************************************/
8 
12 
13 #ifndef DtOsgWindowPolygonInstance_H_
14 #define DtOsgWindowPolygonInstance_H_
15 
16 #include <vrvOsg/vrvOsg.h>
18 #include <osg/Vec2>
19 
20 namespace makVrv
21 {
22  class DtDe;
23  class DtPolygon;
24 
29  {
30  public:
33 
35  virtual ~DtOsgWindowPolygonInstance();
36 
38  virtual void setVisible(bool isVisible);
39 
41  virtual void setFillPattern(unsigned int fillPattern);
42 
44  virtual void setScale(double scale);
45 
47  virtual void setRotation(double rotation);
48 
50  virtual void setNumVertices(unsigned int numVertices);
51 
53  virtual void setVertex(int i, double x, double y);
54 
56  virtual void setColor(float r,float g,float b,float a);
57 
59  virtual void setFill(bool fill);
60 
62  virtual const VertexList& vertices() const;
63 
65  virtual bool visible() const;
66 
67  protected:
69  static osg::Vec2 rotate(const osg::Vec2& v, double rad);
70 
72  static osg::Vec2 translate( const osg::Vec2& v, const osg::Vec2& translation );
73 
75  static osg::Vec2 scale( const osg::Vec2& v, double s );
76 
78  virtual void updateVertices();
79 
82  void createPolygon();
83 
87  double myRotation;
88  double myScale;
89  unsigned int myFillPattern;
90  float myColorR, myColorG, myColorB, myColorA;
91  bool myFill;
92  };
93 }
94 
95 #endif

Document ID: Generated on Thu Apr 12 03:15:37 EDT 2018 from SVN revision 187986
Copyright © 2005-2018 VT MÄK. All Rights Reserved (www.mak.com)