source: trunk/legacy/md2_loader.hh @ 542

Last change on this file since 542 was 480, checked in by epyon, 10 years ago
  • cleanup of legacy code
  • resource updates
File size: 1.1 KB
Line 
1// Copyright (C) 2012-2015 ChaosForge Ltd
2// http://chaosforge.org/
3//
4// This file is part of Nova libraries.
5// For conditions of distribution and use, see copying.txt file in root folder.
6
7/**
8 * @file md2_loader.hh
9 * @author Kornel Kisielewicz
10 * @brief md2 loader
11 */
12
13#ifndef NV_FORMATS_MD2_LOADER_HH
14#define NV_FORMATS_MD2_LOADER_HH
15
16#include <nv/common.hh>
17#include <nv/stl/vector.hh>
18#include <nv/interface/mesh_loader.hh>
19
20namespace nv
21{
22
23        class md2_loader : public mesh_loader
24        {
25        public:
26                explicit md2_loader( string_table* strings );
27                virtual ~md2_loader();
28                virtual bool load( stream& source );
29                virtual data_channel_set* release_mesh_data( size_t index = 0 );
30                virtual size_t get_mesh_count() const { return 1; }
31        private:
32                void release_mesh_frame( data_channel_set* data, sint32 frame );
33                size_t get_max_frames() const;
34                void reindex();
35        private:
36                void* m_md2;
37                string_table* m_strings;
38                vector< uint16 > m_new_indexes;
39                vector< uint16 > m_new_vindexes;
40                vector< uint16 > m_new_tindexes;
41        };
42
43}
44
45#endif // NV_FORMATS_MD2_LOADER_HH
Note: See TracBrowser for help on using the repository browser.