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
00027
00028 #ifndef opengl_CArrow_H
00029 #define opengl_CArrow_H
00030
00031 #include <mrpt/opengl/CRenderizable.h>
00032
00033 namespace mrpt
00034 {
00035 namespace opengl
00036 {
00037 class MRPTDLLIMPEXP CArrow;
00038
00039
00040 DEFINE_SERIALIZABLE_PRE_CUSTOM_BASE( CArrow, CRenderizable )
00041
00042
00045 class MRPTDLLIMPEXP CArrow : public CRenderizable
00046 {
00047 DEFINE_SERIALIZABLE( CArrow )
00048 public:
00049 float m_x0,m_y0,m_z0;
00050 float m_x1,m_y1,m_z1;
00051 float m_headRatio;
00052 float m_smallRadius, m_largeRadius;
00053
00054 float m_arrow_roll;
00055 float m_arrow_pitch;
00056 float m_arrow_yaw;
00057
00060 void render();
00061
00063 static CArrowPtr Create(
00064 float x0 = 0,
00065 float y0 = 0,
00066 float z0 = 0,
00067 float x1 = 1,
00068 float y1 = 1,
00069 float z1 = 1,
00070 float headRatio = 0.2f,
00071 float smallRadius = 0.05f,
00072 float largeRadius = 0.2f,
00073 float arrow_roll = -1.0f,
00074 float arrow_pitch = -1.0f,
00075 float arrow_yaw = -1.0f
00076 )
00077 {
00078 return CArrowPtr(new CArrow(x0,y0,z0, x1,y1,z1, headRatio, smallRadius, largeRadius, arrow_roll, arrow_pitch, arrow_yaw ));
00079 }
00080
00081 private:
00084 CArrow(
00085 float x0 = 0,
00086 float y0 = 0,
00087 float z0 = 0,
00088 float x1 = 1,
00089 float y1 = 1,
00090 float z1 = 1,
00091 float headRatio = 0.2f,
00092 float smallRadius = 0.05f,
00093 float largeRadius = 0.2f,
00094 float arrow_roll = -1.0f,
00095 float arrow_pitch = -1.0f,
00096 float arrow_yaw = -1.0f
00097 ) :
00098 m_x0(x0),m_y0(y0),m_z0(z0),
00099 m_x1(x1),m_y1(y1),m_z1(z1),
00100 m_headRatio(headRatio),
00101 m_smallRadius(smallRadius),
00102 m_largeRadius(largeRadius),
00103 m_arrow_roll(arrow_roll),
00104 m_arrow_pitch(arrow_pitch),
00105 m_arrow_yaw(arrow_yaw)
00106 {
00107 }
00108
00110 virtual ~CArrow() { }
00111 };
00112
00113
00114 }
00115 }
00116
00117 #endif