RayGeom.hh
Go to the documentation of this file.00001 /* 00002 * Gazebo - Outdoor Multi-Robot Simulator 00003 * Copyright (C) 2003 00004 * Nate Koenig & Andrew Howard 00005 * 00006 * This program is free software; you can redistribute it and/or modify 00007 * it under the terms of the GNU General Public License as published by 00008 * the Free Software Foundation; either version 2 of the License, or 00009 * (at your option) any later version. 00010 * 00011 * This program is distributed in the hope that it will be useful, 00012 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00014 * GNU General Public License for more details. 00015 * 00016 * You should have received a copy of the GNU General Public License 00017 * along with this program; if not, write to the Free Software 00018 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00019 * 00020 */ 00021 /* Desc: A ray 00022 * Author: Nate Keonig, Andrew Howard 00023 * Date: 21 May 2003 00024 * CVS: $Id: RayGeom.hh,v 1.17 2004/12/07 00:15:06 natepak Exp $ 00025 */ 00026 00027 #ifndef RAYGEOM_HH 00028 #define RAYGEOM_HH 00029 00030 #include "Geom.hh" 00031 00032 00033 class RayGeom : public Geom 00034 { 00035 // Constructor 00036 public: RayGeom( Body *body, const dSpaceID space ); 00037 00038 // Destructor 00039 public: virtual ~RayGeom(); 00040 00041 // Set object pose (relative to body) 00042 // This is a NOP for rays (use Set() instead) 00043 public: virtual void SetRelativePose( GzPose pose, bool updateCoM = true ); 00044 00045 // Get object pose (relative to body) 00046 // This is returns an identity transform for Rays 00047 public: virtual GzPose GetRelativePose() const; 00048 00049 // Set the starting point and direction (relative coordinates) 00050 public: void Set(GzVector pos, GzVector dir); 00051 00052 // Get the starting point and direction (relative coordinates) 00053 public: void Get(GzVector *pos, GzVector *dir); 00054 00055 // Set the length of the ray 00056 public: void SetLength( const double len ); 00057 00058 // Get the length of the ray 00059 public: double GetLength( void ) const; 00060 00061 // Render the geom (GL) 00062 public: virtual void Render(RenderOptions *opt); 00063 00066 friend class RayProximity; 00067 00069 private: GzVector pos_a, pos_b; 00070 00073 private: double contactDepth; 00074 private: double contactRetro; 00075 private: int contactFiducial; 00076 }; 00077 00078 00079 #endif