VR-Forces 4.0.4 Class Documentation
include/vrvGraphics/DtPickableWidget.h
Go to the documentation of this file.
00001 /*****************************************************************************
00002  * Copyright (c) 2011 MAK Technologies, Inc.
00003  * All rights reserved.
00004  *****************************************************************************/
00005 
00009 
00010 #pragma once
00011 
00012 #include <vrvGraphics/vrvGraphics.h>
00013 
00014 #include <boost/signal.hpp>
00015 
00016 namespace makVrv
00017 {
00018 
00019    class DtQuad;
00020    class DtBoundingBox;
00021    class DtLineSegment;
00022    class DtWidgetPicker;
00023    class DtTriangleProxy;
00024 
00027    class DT_DLL_VRVGRAPHICS DtPickableWidget
00028    {
00029    public:
00030 
00031       friend class DtWidgetPicker;
00032 
00034       virtual ~DtPickableWidget();
00035 
00037       static unsigned int idFromColor( unsigned int );
00038 
00040       void setUserData( unsigned long long data );
00041 
00043       unsigned long long userData() const;
00044 
00046       boost::signal<void (int x, int y)> signal_mouseEnter;
00047 
00050       boost::signal<void ()>  signal_mouseLeave;
00051 
00053       boost::signal<void (int x, int y)>  signal_mouseMove;
00054 
00056       boost::signal<void (int x, int y, int button)> signal_mousePress;
00057 
00059       boost::signal<void (int x, int y, int button)> signal_mouseRelease;
00060 
00062       boost::signal<void (int x, int y, int button)> signal_mouseDoubleClick;
00063 
00065       boost::signal<void (int x, int y, int wheel)> signal_mouseWheel;
00066 
00067    protected:
00068 
00070       DtPickableWidget( DtWidgetPicker& picker );
00071 
00072    protected:
00073 
00074       DtWidgetPicker& myPicker;
00075       unsigned int myId;
00076       unsigned long long myUserData;
00077 
00078    };
00079 
00080 
00083    class DT_DLL_VRVGRAPHICS DtPickableQuad : public DtPickableWidget
00084    {
00085    public:
00086 
00087       friend class DtWidgetPicker;
00088 
00090       virtual ~DtPickableQuad();
00091 
00096       void setPosition( float x, float y, float z, float w );
00097 
00099       void setRotation( float angle );
00100 
00103       void setPoints( const float points[8] );
00104 
00106       void setGroup( float group );
00107 
00108    protected:
00109 
00111       DtPickableQuad( DtWidgetPicker& picker );
00112 
00113    protected:
00114 
00115       DtQuad* myQuad;
00116 
00117    };
00118 
00119 
00123    class DT_DLL_VRVGRAPHICS DtPickableLine : public DtPickableWidget
00124    {
00125    public:
00126 
00127       friend class DtWidgetPicker;
00128 
00130       virtual ~DtPickableLine();
00131 
00136       void set3DPosition( int index0or1, float x, float y, float z, float w );
00137 
00139       void set2DPosition( int index0or1, float x, float y );
00140 
00142       void set3DDirection( unsigned int vertexIndex, float x, float y, float z );
00143 
00145       void setDirection2DLength( unsigned int vertexIndex, float length );
00146 
00148       void setGroup( float group );
00149 
00151       void setWidth( float w );
00152 
00153    protected:
00154 
00156       DtPickableLine( DtWidgetPicker& picker );
00157 
00158    protected:
00159 
00160       DtLineSegment* myLine;
00161 
00162    };
00163 
00164 
00168    class DT_DLL_VRVGRAPHICS DtPickableTriangle : public DtPickableWidget
00169    {
00170    public:
00171 
00172       friend class DtWidgetPicker;
00173 
00175       virtual ~DtPickableTriangle();
00176 
00178       void set3DPosition( float x, float y, float z, float w );
00179 
00181       void set3DPosition( unsigned int index, float x, float y, float z, float w );
00182 
00185       void set2DPosition( unsigned int index, float x, float y );
00186 
00188       void setGroup( float order );
00189 
00190    protected:
00191 
00193       DtPickableTriangle( DtWidgetPicker& picker );
00194 
00195    protected:
00196 
00197       DtTriangleProxy* myProxy;
00198 
00199    };
00200 
00201 }

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)