resetting manifest requested domain to floor
[platform/upstream/libbullet.git] / Extras / Serialize / BulletWorldImporter / btBulletWorldImporter.h
1 /*
2 Bullet Continuous Collision Detection and Physics Library
3 Copyright (c) 2003-2012 Erwin Coumans  http://bulletphysics.org
4
5 This software is provided 'as-is', without any express or implied warranty.
6 In no event will the authors be held liable for any damages arising from the use of this software.
7 Permission is granted to anyone to use this software for any purpose, 
8 including commercial applications, and to alter it and redistribute it freely, 
9 subject to the following restrictions:
10
11 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
12 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
13 3. This notice may not be removed or altered from any source distribution.
14 */
15
16
17 #ifndef BULLET_WORLD_IMPORTER_H
18 #define BULLET_WORLD_IMPORTER_H
19
20
21 #include "btWorldImporter.h"
22
23
24 class btBulletFile;
25
26
27
28
29 namespace bParse
30 {
31         class btBulletFile;
32         
33 };
34
35
36
37 ///The btBulletWorldImporter is a starting point to import .bullet files.
38 ///note that not all data is converted yet. You are expected to override or modify this class.
39 ///See Bullet/Demos/SerializeDemo for a derived class that extract btSoftBody objects too.
40 class btBulletWorldImporter : public btWorldImporter
41 {
42
43
44 public:
45         
46         btBulletWorldImporter(btDynamicsWorld* world=0);
47
48         virtual ~btBulletWorldImporter();
49
50         bool    loadFile(const char* fileName);
51
52         ///the memoryBuffer might be modified (for example if endian swaps are necessary)
53         bool    loadFileFromMemory(char *memoryBuffer, int len);
54
55         bool    loadFileFromMemory(bParse::btBulletFile* file);
56
57         //call make sure bulletFile2 has been parsed, either using btBulletFile::parse or btBulletWorldImporter::loadFileFromMemory
58         virtual bool    convertAllObjects(bParse::btBulletFile* file);
59
60         
61
62
63 };
64
65 #endif //BULLET_WORLD_IMPORTER_H
66