![]() |
VR-Forces 4.0.4 Class Documentation
|
00001 /****************************************************************************** 00002 ** Copyright (c) 2009 MAK Technologies, Inc. 00003 ** All rights reserved. 00004 ******************************************************************************/ 00005 /****************************************************************************** 00006 ** $RCSfile: DtOsgWindowEllipseInstance.h,v $ $Revision: 1.17 $ $State: Exp $ 00007 ******************************************************************************/ 00008 00012 00013 #ifndef DtOsgWindowEllipseInstance_H_ 00014 #define DtOsgWindowEllipseInstance_H_ 00015 00016 #include <vrvOsg/vrvOsg.h> 00017 #include <vrvCore/DtWindowEllipseInstance.h> 00018 #include <osg/Vec2> 00019 00020 namespace makVrv 00021 { 00022 class DtDe; 00023 class DtPolygon; 00024 00028 class DT_DLL_VRVOSG DtOsgWindowEllipseInstance : public DtWindowEllipseInstance 00029 { 00030 public: 00032 DtOsgWindowEllipseInstance(DtDe& de); 00033 00035 virtual ~DtOsgWindowEllipseInstance(); 00036 00038 virtual void setVisible(bool isVisible); 00039 00041 virtual void setFillPattern(unsigned int fillPattern); 00042 00044 virtual void setFill(bool fill); 00045 00047 virtual void setScale(double scale); 00048 00050 virtual void setRotation(double rotation); 00051 00053 virtual void setNumVertices(unsigned int numVertices); 00054 00057 virtual void setDimensions(double xLength, double yLength); 00058 00061 virtual void setCenter(double x, double y); 00062 00064 virtual void setColor(float r,float g,float b,float a); 00065 00067 virtual bool visible(); 00068 00069 protected: 00071 static osg::Vec2 rotate(const osg::Vec2& v, double rad); 00072 00074 static osg::Vec2 translate( const osg::Vec2& v, const osg::Vec2& translation ); 00075 00077 static osg::Vec2 scale( const osg::Vec2& v, double s ); 00078 00080 virtual void updateVertices(); 00081 00084 virtual void createPolygon(); 00085 00086 DtDe& myDe; 00087 DtPolygon* myPolygon; 00088 00089 double myRotation; 00090 double myScale; 00091 unsigned int myFillPattern; 00092 float myColorR, myColorG, myColorB, myColorA; 00093 bool myFill; 00094 osg::Vec2 myDimensions; 00095 osg::Vec2 myCenter; 00096 int myNumVertices; 00097 }; 00098 } 00099 00100 #endif