1 #ifndef __GNUC__ 2 #pragma once 3 #endif 4 #ifndef __XR_OBJ_MOTION_H__ 5 #define __XR_OBJ_MOTION_H__ 6 7 #include "xr_motion.h" 8 #include "xr_vector3.h" 9 10 namespace xray_re { 11 12 class xr_obj_motion: public xr_motion { 13 public: 14 xr_obj_motion(); 15 virtual ~xr_obj_motion(); 16 virtual void load(xr_reader& r); 17 virtual void save(xr_writer& w) const; 18 bool load_anm(const char* path); 19 bool save_anm(const char* path) const; 20 21 void evaluate(float time, fvector3& t, fvector3& r) const; 22 23 void create_envelopes(); 24 void delete_envelopes(); 25 26 const xr_envelope* const* envelopes() const; 27 xr_envelope* const* envelopes(); 28 29 private: 30 enum { 31 OMOTION_VERSION_3 = 3, 32 OMOTION_VERSION_4 = 4, 33 OMOTION_VERSION_5 = 5, 34 }; 35 xr_envelope* m_envelopes[6]; 36 }; 37 envelopes()38inline xr_envelope* const* xr_obj_motion::envelopes() { return m_envelopes; } envelopes()39inline const xr_envelope* const* xr_obj_motion::envelopes() const { return m_envelopes; } 40 41 } // end of namespace xray_re 42 43 #endif 44