00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026 #ifndef VRS_SG_GROUNDPLATENAVIGATION_H
00027 #define VRS_SG_GROUNDPLATENAVIGATION_H
00028
00029 #include <vrs/sg/interactiontechnique.h>
00030 #include <vrs/engine.h>
00031 #include <vrs/rayrequest.h>
00032 #include <vrs/sg/canvas.h>
00033
00034 namespace VRS {
00035
00040 class VRS_CORE_API GroundPlateNavigation : public InteractionTechnique {
00041
00042 public:
00048 static Vector polar2Cartesian(const Vector& v);
00049
00053 static VRS::Vector cartesian2Polar(const VRS::Vector& v);
00054
00056 static Vector getUp();
00057
00059 static double getMaxAltitude();
00060
00069 static double visualFlow2horizontalMovement(double screens, double fov = 45.0);
00070
00073 static double horizontalMovement2visualFlow(double units, double fov = 45.0);
00074
00077 static bool performRayRequest(int x, int y, SO<Canvas> canvas, SO<RayRequest> request);
00078
00079
00080 VRS_TYPEINFO(GroundPlateNavigation, InteractionTechnique);
00081
00082 protected:
00083 GroundPlateNavigation(double yValOfGroundPlate = 0.0);
00084
00086 void setYValOfGroundPlate(double yVal = 0.0);
00087
00089 double getYValOfGroundPlate() const;
00090
00092 double getHeightAboveGroundPlate(const Vector& pos) const;
00093
00095 bool performRayRequest(int x, int y, SO<Canvas> canv, Vector& hitPoint);
00096
00097 private:
00098 double yValOfGroundPlate_;
00099 SO<RayRequest> request_;
00100 };
00101
00102 }
00103
00104 #endif // VRS_SG_GROUNDPLATENAVIGATION_H