orca-robotics


INTRODUCTION
Overview
Download and Install
Quick Start
Documentation
Publications

REPOSITORY
Interfaces
Components
Libraries
Utilities
Software Map

DEVELOPER
Tutorials
Examples
Dev Guide
Dashboard
Wiki
login/pass: orca/orca

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-2008 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( double wireGridSpacing=2,
00033                  double groundPlaneSquareSpacing=1 );
00034 
00035     virtual bool isInGlobalCS() { return true; }
00036     
00037     virtual void setCameraPose( const orcaqgui3d::CoordinateFrame &cameraPose );
00038     virtual QStringList contextMenu();
00039     virtual void execute( int action );
00040     
00041     osg::Node *osgNode() const { return root_.get(); }
00042 
00043 private:
00044 
00045     void drawGroundPlane();
00046     void drawWireGrid();
00047     // void drawLabels();
00048     void drawOrigin();
00049     
00050     double wireGridSpacing_;
00051     double groundPlaneSquareSpacing_;
00052 
00053     osg::ref_ptr<osg::PositionAttitudeTransform> viewOffset_;
00054     osg::ref_ptr<osg::Geode> groundPlaneGeode_;
00055     osg::ref_ptr<osg::Geode> wireGridGeode_;
00056 
00057     osg::ref_ptr<osg::Geode> originGeode_;
00058 
00059     osg::ref_ptr<osg::Group> root_;
00060 };
00061 
00062 } // namespace
00063 
00064 #endif
 

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


Generated for Orca Robotics by  doxygen 1.4.5