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
00029
00030
00031
00033
00034 #ifndef esve_components_dim4_Report_Min_Z_hxx
00035 #define esve_components_dim4_Report_Min_Z_hxx
00036
00037 #include <esve/components/dim3/Min_Z.hxx>
00038 #include <esve/engine/dim4/Make_Frame.hxx>
00039 #include <esve/types/quat.hxx>
00040
00041 namespace esve { namespace components { namespace dim4 {
00042
00047
00048 template< typename T_Frame >
00049 class Report_Min_Z
00050 : virtual public components::dim3::Min_Z,
00051 public T_Frame
00052 {
00053 private:
00054 #if !defined(NDEBUG)
00055 template< class U > static void m_unused( const U & ) { }
00056
00057 void m_requirements_1()
00058 {
00059 typedef typename T_Frame::Make_Frame_Parameter_Target Target ;
00060 typedef typename T_Frame::Make_Frame_Parameter_Frame Frame ;
00061
00062 engine::dim4::Make_Frame<Target, Frame>* r =
00063 dynamic_cast<T_Frame*>(this) ;
00064 m_unused(r) ;
00065 }
00066
00067 struct m_Requirements
00068 {
00069 m_Requirements()
00070 {
00071 typedef void (Report_Min_Z::*R)() ;
00072 R r = &Report_Min_Z::m_requirements_1 ;
00073 m_unused(r) ;
00074 }
00075 } m_requirements ;
00076 #endif // !defined(NDEBUG)
00077
00078 struct m_Find_Min
00079 {
00080 types::real min_z ;
00081
00082 m_Find_Min( types::real min_z_ )
00083 : min_z(min_z_) { }
00084
00085 void operator()( const types::quat & a )
00086 {
00087 if( a.z() < min_z )
00088 {
00089 min_z = a.z() ;
00090 }
00091 }
00092 } ;
00093
00094 struct Private
00095 {
00096 types::real initial_min_z ;
00097 types::real min_z ;
00098
00099 Private() ;
00100 } ;
00101
00102 Report_Min_Z( const Report_Min_Z & ) ;
00103 Report_Min_Z & operator=( const Report_Min_Z & ) ;
00104
00105 Private m ;
00106
00107 public:
00109 Report_Min_Z() ;
00110
00112 template< typename T_Arg >
00113 Report_Min_Z( T_Arg & ) ;
00114
00116 template< typename T_Arg >
00117 Report_Min_Z( const T_Arg & ) ;
00118
00119 types::real min_z() const
00120 {
00121 return m.min_z ;
00122 }
00123
00129 types::real initial_min_z() const
00130 {
00131 return m.initial_min_z ;
00132 }
00133
00134 void initial_min_z( types::real a )
00135 {
00136 m.initial_min_z = a ;
00137 }
00139
00140 ~Report_Min_Z() ;
00141
00142 protected:
00144 void apply_transform() ;
00145 } ;
00146
00147 }}}
00148
00149 #include <esve/components/dim4/Report_Min_Z.template.cxx>
00150
00151 #endif
00152