Home || Architecture || Video Search || Visual Search || Scripts || Applications || Important Messages || OGL || Src

ArrowR.h

Go to the documentation of this file.
00001 #ifndef Impala_Core_Geometry_ArrowR_h
00002 #define Impala_Core_Geometry_ArrowR_h
00003 
00004 #include "Util/Math.h"
00005 
00006 namespace Impala
00007 {
00008 namespace Core
00009 {
00010 namespace Geometry
00011 {
00012 
00013 
00016 class ArrowR {
00017 public:
00018 
00019     double mPX;
00020     double mPY;
00021     double mLen;
00022     double mDir;
00023 
00024     ArrowR()
00025     {
00026     }
00027 
00028     ArrowR(double pointX, double pointY, double length, double direction)
00029         : mPX(pointX), mPY(pointY), mLen(length), mDir(direction)
00030     {
00031     }
00032 
00033     double
00034     HeadX() const
00035     {
00036         return mPX + ::cos(mDir) * mLen;
00037     }
00038 
00039     double
00040     HeadY() const
00041     {
00042         return mPY - ::sin(mDir) * mLen;
00043     }
00044 
00045     double
00046     HeadLeftX() const
00047     {
00048         return mPX + ::cos(mDir + 0.13) * mLen * 0.88;
00049     }
00050 
00051     double
00052     HeadLeftY() const
00053     {
00054         return mPY - ::sin(mDir + 0.13) * mLen * 0.88;
00055     }
00056 
00057     double
00058     HeadRightX() const
00059     {
00060         return mPX + ::cos(mDir - 0.13) * mLen * 0.88;
00061     }
00062 
00063     double
00064     HeadRightY() const
00065     {
00066         return mPY - ::sin(mDir - 0.13) * mLen * 0.88;
00067     }
00068 
00069 };
00070 
00071 } // namespace Geometry
00072 } // namespace Core
00073 } // namespace Impala
00074 
00075 #endif

Generated on Fri Mar 19 09:31:08 2010 for ImpalaSrc by  doxygen 1.5.1