Changeset 223 for trunk/nv/gfx/keyframed_mesh.hh
- Timestamp:
- 01/02/14 16:50:01 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/nv/gfx/keyframed_mesh.hh
r204 r223 18 18 public: 19 19 keyframed_mesh( context* a_context, keyframed_mesh_data* a_data, program* a_program ); 20 size_t get_max_frames() const; 20 21 mat4 get_tag( const std::string& tag ) const; 21 size_t get_max_frames() const; 22 void set_frame( uint32 frame ); 23 void setup_animation( uint32 start, uint32 count, uint32 fps, bool loop ); 24 void update( uint32 ms ); 25 void draw( render_state& rstate ); 22 virtual void setup_animation( uint32 start, uint32 count, uint32 fps, bool loop ); 23 virtual void set_frame( uint32 frame ); 24 virtual void update( uint32 ms ); 25 virtual void draw( render_state& rstate ); 26 26 program* get_program() { return m_program; } 27 ~keyframed_mesh();28 pr ivate:27 virtual ~keyframed_mesh(); 28 protected: 29 29 context* m_context; 30 30 keyframed_mesh_data* m_data; … … 32 32 vertex_array* m_va; 33 33 34 uint32 m_start_frame; 35 uint32 m_stop_frame; 36 uint32 m_last_frame; 37 uint32 m_next_frame; 38 uint32 m_time; 39 uint32 m_fps; 40 f32 m_interpolation; 41 bool m_looping; 42 bool m_active; 43 }; 44 45 46 class keyframed_mesh_gpu : public keyframed_mesh 47 { 48 public: 49 keyframed_mesh_gpu( context* a_context, keyframed_mesh_data* a_data, program* a_program ); 50 void draw( render_state& rstate ); 51 private: 34 52 int m_loc_next_position; 35 53 int m_loc_next_normal; 36 54 37 uint32 m_last_frame;38 uint32 m_next_frame;39 55 uint32 m_gpu_last_frame; 40 56 uint32 m_gpu_next_frame; 41 f32 m_interpolation; 42 uint32 m_start_frame; 43 uint32 m_stop_frame; 44 uint32 m_time; 45 uint32 m_fps; 46 bool m_looping; 47 bool m_active; 57 }; 58 59 class keyframed_mesh_cpu : public keyframed_mesh 60 { 61 public: 62 keyframed_mesh_cpu( context* a_context, keyframed_mesh_data* a_data, program* a_program ); 63 void update( uint32 ms ); 64 private: 65 std::vector<vec3> m_position; 66 std::vector<vec3> m_normal; 67 vertex_buffer* m_vb_position; 68 vertex_buffer* m_vb_normal; 48 69 }; 49 70
Note: See TracChangeset
for help on using the changeset viewer.