VR-Forces 4.0.4 Class Documentation
include/vrvGraphics/DtOutlinedPolygon.h
Go to the documentation of this file.
00001 /*****************************************************************************
00002  * Copyright (c) 2010 MAK Technologies, Inc.
00003  * All rights reserved.
00004  *****************************************************************************/
00005 /*****************************************************************************
00006  * $RCSfile: DtOutlinedPolygon.h,v $ $Revision: 1.0 $ $State: Exp $
00007  *****************************************************************************/
00008 
00012 
00013 #pragma once
00014 
00015 #include <vrvGraphics/vrvGraphics.h>
00016 #include <vrvGraphics/DtPolygon.h>
00017 
00018 namespace makVrv
00019 {
00020 
00021    class DtOverlayRenderer;
00022    class DtWidgetPicker;
00023    class DtLineRenderer;
00024    class DtLineSegment;
00025    class DtPickableLine;
00026 
00029    class DT_DLL_VRVGRAPHICS DtOutlinedPolygon : public DtPolygon
00030    {
00031    public:
00032 
00034       DtOutlinedPolygon(DtOverlayRenderer& renderer,DtWidgetPicker& picker);
00035 
00037       DtOutlinedPolygon(DtLineRenderer& renderer,DtWidgetPicker& picker);
00038 
00040       virtual ~DtOutlinedPolygon();
00041 
00046       virtual void setEventsEnabled(bool enabled,
00047          unsigned long long userData = 0);
00048 
00050       bool eventsEnabled() const;
00051 
00054       virtual void setVertexCount(unsigned int vertexCount);
00055 
00057       virtual unsigned int vertexCount() const;
00058 
00061       virtual void set2DPositions(const std::vector<float>& vertices);
00062 
00064       virtual void set2DPosition(unsigned int vertexIndex, float x1, float y1);
00065 
00067       virtual void get2DPosition(unsigned int vertexIndex, float& x,
00068          float& y) const;
00069 
00073       virtual void set3DPosition(unsigned int vertexIndex, float x, float y, 
00074          float z, float w);
00075 
00077       virtual void get3DPosition(unsigned int vertexIndex, float& x, float& y,
00078          float& z, float& w) const;
00079 
00080       virtual void set3DDirectionAndLength(unsigned int index,
00081          float x, float y, float z, float l);
00082 
00084       virtual void setVertexColor( unsigned int index, float r, float g,
00085          float b, float a );
00086 
00088       virtual void getVertexColor( unsigned int index, float& r, float& g,
00089          float& b, float& a );
00090 
00092       virtual void setColor( float r, float g, float b, float a );
00093 
00095       virtual void getColor( float& r, float& g, float& b, float& a ) const;
00096 
00104       void setStippleParameters(unsigned int scale,unsigned short pattern);
00105 
00110       virtual void setStipple(unsigned int stipplePattern);
00111 
00113       virtual void setOutlineWidth(float);
00114 
00118       virtual void setEventOutlineWidth(float);
00119 
00120    protected:
00121 
00122       typedef std::vector<DtLineSegment*> LineSegmentList;
00123       typedef std::vector<DtPickableLine*> PickableSegmentList;
00124 
00125       DtLineRenderer& myRenderer;
00126       DtWidgetPicker& myPicker;
00127       LineSegmentList myLineSegments;
00128       PickableSegmentList myPickableSegments;
00129       bool myEventsEnabled;     
00130       unsigned long long myUserData;
00131 
00132       float myWidth;
00133       float myEventWidth;
00134    };
00135 
00136 }

Document ID: Generated on Fri Jun 29 16:33:32 EDT 2012 from SVN revision 116588
Copyright © 2005-2012 VT MÄK Inc. All Rights Reserved (www.mak.com)