4 header = """/* Copyright (C) 2011 Erwin Coumans & Charlie C
6 * This software is provided 'as-is', without any express or implied
7 * warranty. In no event will the authors be held liable for any damages
8 * arising from the use of this software.
10 * Permission is granted to anyone to use this software for any purpose,
11 * including commercial applications, and to alter it and redistribute it
12 * freely, subject to the following restrictions:
14 * 1. The origin of this software must not be misrepresented; you must not
15 * claim that you wrote the original software. If you use this software
16 * in a product, an acknowledgment in the product documentation would be
17 * appreciated but is not required.
18 * 2. Altered source versions must be plainly marked as such, and must not be
19 * misrepresented as being the original software.
20 * 3. This notice may not be removed or altered from any source distribution.
22 // Auto generated from Bullet/Extras/HeaderGenerator/bulletGenerate.py
25 dtList = dump.DataTypeList
27 out = "autogenerated/"
30 def addSpaces(file, space):
31 for i in range(0, space):
34 def write(file, spaces, string):
35 addSpaces(file, spaces)
38 ###################################################################################
39 blender = open(out+"bullet.h", 'w')
41 blender.write("#ifndef __BULLET_H__\n")
42 blender.write("#define __BULLET_H__\n")
44 # blender.write("struct %s;\n"%dt.filename)
47 ###################################################################################
49 blender.write("namespace Bullet {\n")
52 // put an empty struct in the case
53 typedef struct bInvalidHandle {
58 blender.write(strUnRes)
61 write(blender, 4, "class %s;\n"%dt.name)
66 strUpper = dt.filename.upper()
68 blender.write("// -------------------------------------------------- //\n")
70 write(blender, 4, "class %s\n"%dt.name)
72 write(blender, 4, "{\n")
73 write(blender, 4, "public:\n")
74 for i in dt.dataTypes:
75 write(blender, 8, i+";\n")
77 write(blender, 4, "};\n")
82 blender.write("#endif//__BULLET_H__")