INTRODUCTION
Overview
Download and Install
Quick Start
Documentation
Publications

NONFRAMEWORK CODE
Driver Interfaces
Drivers
Libraries
Utilities

FRAMEWORK CODE
Interfaces
Components
Libraries
Utilities

Full Software Listings

DEVELOPER
Tutorials
Examples
Dev Guide
Dashboard

PEOPLE
Contributors
Users

SourceForge.net Logo
Project
Download
Mailing lists

 

         

orcaqgui3dfactory/gridelement.h

00001 /*
00002  * Orca-Robotics Project: Components for robotics 
00003  *               http://orca-robotics.sf.net/
00004  * Copyright (c) 2004-2009 Alex Brooks
00005  *
00006  * This copy of Orca is licensed to you under the terms described in
00007  * the LICENSE file included in this distribution.
00008  *
00009  */
00010 
00011 #ifndef ORCAGUI3D_GRIDELEMENT3D_H
00012 #define ORCAGUI3D_GRIDELEMENT3D_H
00013 
00014 #include <orcaqgui3d/guielement3d.h>
00015 #include <GL/gl.h>
00016 #include <osg/Geometry>
00017 #include <osg/Geode>
00018 #include <osgText/Text>
00019 #include <osg/PositionAttitudeTransform>
00020 
00021 namespace orcaqgui3d
00022 {
00023 
00028 class GridElement : public GuiElement3d
00029 {
00030 public:
00031 
00032     GridElement( const hydroqguielementutil::GuiElementInfo &guiElementInfo,
00033                  double                                      wireGridSpacing          = 2,
00034                  double                                      groundPlaneSquareSpacing = 1 );
00035 
00036     virtual bool isInGlobalCS() { return true; }
00037     
00038     virtual void setCameraPose( const orcaqgui3d::CoordinateFrame &cameraPose );
00039     virtual QStringList contextMenu();
00040     virtual void execute( int action );
00041     
00042     osg::Node *osgNode() const { return root_.get(); }
00043 
00044 private:
00045 
00046     void drawGroundPlane();
00047     void drawWireGrid();
00048     // void drawLabels();
00049     void drawOrigin();
00050     
00051     double wireGridSpacing_;
00052     double groundPlaneSquareSpacing_;
00053 
00054     osg::ref_ptr<osg::PositionAttitudeTransform> viewOffset_;
00055     osg::ref_ptr<osg::Geode> groundPlaneGeode_;
00056     osg::ref_ptr<osg::Geode> wireGridGeode_;
00057 
00058     osg::ref_ptr<osg::Geode> originGeode_;
00059 
00060     osg::ref_ptr<osg::Group> root_;
00061 };
00062 
00063 } // namespace
00064 
00065 #endif
 

Webmaster: Tobias Kaupp (tobasco at users.sourceforge.net)


Generated for Orca Robotics by  doxygen 1.4.5