Tuesday merger of bf-blender into orange branch.
authorTon Roosendaal <ton@blender.org>
Tue, 10 Jan 2006 22:10:14 +0000 (22:10 +0000)
committerTon Roosendaal <ton@blender.org>
Tue, 10 Jan 2006 22:10:14 +0000 (22:10 +0000)
403 files changed:
SConstruct
extern/bFTGL/src/Makefile
extern/bullet/Bullet/BroadphaseCollision/BroadphaseProxy.h
extern/bullet/Bullet/BroadphaseCollision/SimpleBroadphase.cpp
extern/bullet/Bullet/CollisionShapes/BoxShape.cpp
extern/bullet/Bullet/CollisionShapes/BoxShape.h
extern/bullet/Bullet/CollisionShapes/ConeShape.h
extern/bullet/Bullet/CollisionShapes/ConvexHullShape.cpp
extern/bullet/Bullet/CollisionShapes/ConvexHullShape.h
extern/bullet/Bullet/CollisionShapes/ConvexShape.h
extern/bullet/Bullet/CollisionShapes/ConvexTriangleCallback.h
extern/bullet/Bullet/CollisionShapes/CylinderShape.h
extern/bullet/Bullet/CollisionShapes/MultiSphereShape.cpp
extern/bullet/Bullet/CollisionShapes/OptimizedBvh.h
extern/bullet/Bullet/CollisionShapes/PolyhedralConvexShape.cpp
extern/bullet/Bullet/CollisionShapes/PolyhedralConvexShape.h
extern/bullet/Bullet/CollisionShapes/Simplex1to4Shape.h
extern/bullet/Bullet/CollisionShapes/SphereShape.cpp
extern/bullet/Bullet/CollisionShapes/StridingMeshInterface.cpp
extern/bullet/Bullet/CollisionShapes/StridingMeshInterface.h
extern/bullet/Bullet/CollisionShapes/TriangleCallback.cpp
extern/bullet/Bullet/CollisionShapes/TriangleCallback.h
extern/bullet/Bullet/CollisionShapes/TriangleIndexVertexArray.h
extern/bullet/Bullet/CollisionShapes/TriangleMesh.cpp
extern/bullet/Bullet/CollisionShapes/TriangleMesh.h
extern/bullet/Bullet/CollisionShapes/TriangleMeshShape.cpp
extern/bullet/Bullet/CollisionShapes/TriangleMeshShape.h
extern/bullet/Bullet/CollisionShapes/TriangleShape.h
extern/bullet/Bullet/NarrowPhaseCollision/CollisionMargin.h [new file with mode: 0644]
extern/bullet/Bullet/NarrowPhaseCollision/ContinuousConvexCollision.h
extern/bullet/Bullet/NarrowPhaseCollision/ConvexPenetrationDepthSolver.h
extern/bullet/Bullet/NarrowPhaseCollision/GjkConvexCast.cpp
extern/bullet/Bullet/NarrowPhaseCollision/GjkConvexCast.h
extern/bullet/Bullet/NarrowPhaseCollision/GjkPairDetector.h
extern/bullet/Bullet/NarrowPhaseCollision/ManifoldContactAddResult.cpp
extern/bullet/Bullet/NarrowPhaseCollision/MinkowskiPenetrationDepthSolver.cpp
extern/bullet/Bullet/NarrowPhaseCollision/PointCollector.h
extern/bullet/Bullet/NarrowPhaseCollision/RaycastCallback.h
extern/bullet/BulletDynamics/CollisionDispatch/ConvexConvexAlgorithm.cpp
extern/bullet/BulletDynamics/CollisionDispatch/ConvexConvexAlgorithm.h
extern/bullet/BulletDynamics/ConstraintSolver/ContactConstraint.cpp
extern/bullet/BulletDynamics/ConstraintSolver/JacobianEntry.h
extern/bullet/BulletDynamics/ConstraintSolver/OdeConstraintSolver.cpp
extern/bullet/BulletDynamics/ConstraintSolver/Solve2LinearConstraint.cpp
extern/bullet/BulletDynamics/ConstraintSolver/SorLcp.cpp
extern/bullet/BulletDynamics/ConstraintSolver/SorLcp.h
extern/bullet/BulletDynamics/Dynamics/ContactJoint.cpp
extern/bullet/BulletDynamics/Dynamics/ContactJoint.h
extern/bullet/BulletDynamics/Dynamics/MassProps.h
extern/bullet/BulletDynamics/Dynamics/RigidBody.cpp
extern/bullet/Extras/PhysicsInterface/CcdPhysics/CcdPhysicsController.cpp
extern/bullet/Extras/PhysicsInterface/CcdPhysics/CcdPhysicsController.h
extern/bullet/Extras/PhysicsInterface/CcdPhysics/CcdPhysicsEnvironment.cpp
extern/bullet/Extras/PhysicsInterface/Common/PHY_IMotionState.cpp
extern/bullet/Extras/PhysicsInterface/Common/PHY_IPhysicsController.cpp
extern/bullet/Extras/PhysicsInterface/Common/PHY_IPhysicsEnvironment.cpp
extern/bullet/LinearMath/AabbUtil2.h
extern/bullet/LinearMath/IDebugDraw.h
extern/bullet/LinearMath/SimdQuadWord.h
extern/bullet/LinearMath/SimdScalar.h
extern/bullet/LinearMath/SimdTransformUtil.h
extern/bullet/SConscript
extern/bullet/make/msvc_7_0/Bullet3_vc7.vcproj
intern/SoundSystem/openal/SND_OpenALDevice.cpp
intern/bmfont/intern/BMF_BitmapFont.cpp
intern/boolop/intern/BOP_Face2Face.cpp
intern/boolop/intern/BOP_Interface.cpp
intern/boolop/intern/BOP_Mesh.cpp
intern/boolop/intern/BOP_Mesh.h
intern/bsp/intern/BSP_CSGMesh_CFIterator.h
intern/bsp/intern/CSG_BooleanOps.cpp
intern/elbeem/SConscript
intern/elbeem/intern/blenderdummy.cpp
intern/elbeem/intern/cfglexer.cpp
intern/elbeem/make/msvc_6_0/elbeem.dsp
intern/elbeem/make/msvc_7_0/elbeem.vcproj
intern/ghost/GHOST_ITimerTask.h
intern/ghost/GHOST_IWindow.h
intern/ghost/intern/GHOST_SystemCarbon.cpp
intern/iksolver/intern/IK_Solver.cpp
intern/iksolver/intern/TNT/cmat.h
intern/iksolver/intern/TNT/fmat.h
intern/iksolver/intern/TNT/fspvec.h
intern/iksolver/intern/TNT/vec.h
intern/iksolver/intern/TNT/vecadaptor.h
intern/opennl/extern/ONL_opennl.h
intern/opennl/intern/opennl.c
intern/string/intern/STR_String.cpp
projectfiles/blender/imbuf/BL_imbuf.dsp
projectfiles_vc7/blender/blender.sln
projectfiles_vc7/blender/blender.vcproj
projectfiles_vc7/blender/imbuf/BL_imbuf.vcproj
projectfiles_vc7/gameengine/ketsji/KX_ketsji.vcproj
projectfiles_vc7/gameengine/physics/PHY_Physics/PHY_Bullet/PHY_Bullet.vcproj
projectfiles_vc7/gameengine/rasterizer/openglrasterizer/RAS_openglrasterizer.vcproj
release/Makefile
release/VERSION
release/datafiles/blenderbuttons
release/scripts/Axiscopy.py
release/scripts/ac3d_export.py
release/scripts/ac3d_import.py
release/scripts/archimap.py [deleted file]
release/scripts/bevel_center.py
release/scripts/bpymodules/boxpack2d.py [deleted file]
release/scripts/bpymodules/meshtools.py
release/scripts/bvh2arm.py
release/scripts/bvh_export.py
release/scripts/bvh_import.py
release/scripts/console.py
release/scripts/lightwave_export.py
release/scripts/lightwave_import.py
release/scripts/nendo_export.py
release/scripts/nendo_import.py
release/scripts/off_export.py
release/scripts/off_import.py
release/scripts/radiosity_export.py
release/scripts/radiosity_import.py
release/scripts/raw_export.py
release/scripts/raw_import.py
release/scripts/save_theme.py
release/scripts/slp_import.py
release/scripts/truespace_export.py
release/scripts/truespace_import.py
release/scripts/uv_export.py
release/scripts/videoscape_export.py
release/scripts/wings_export.py
release/scripts/wings_import.py
source/Makefile
source/blender/SConscript
source/blender/blenkernel/BKE_DerivedMesh.h
source/blender/blenkernel/BKE_action.h
source/blender/blenkernel/BKE_anim.h
source/blender/blenkernel/BKE_bad_level_calls.h
source/blender/blenkernel/BKE_colortools.h [new file with mode: 0644]
source/blender/blenkernel/BKE_depsgraph.h
source/blender/blenkernel/BKE_displist.h
source/blender/blenkernel/BKE_effect.h
source/blender/blenkernel/BKE_font.h
source/blender/blenkernel/BKE_global.h
source/blender/blenkernel/BKE_group.h
source/blender/blenkernel/BKE_icons.h [new file with mode: 0644]
source/blender/blenkernel/BKE_library.h
source/blender/blenkernel/BKE_main.h
source/blender/blenkernel/BKE_material.h
source/blender/blenkernel/BKE_node.h [new file with mode: 0644]
source/blender/blenkernel/BKE_scene.h
source/blender/blenkernel/BKE_texture.h
source/blender/blenkernel/BKE_utildefines.h
source/blender/blenkernel/SConscript
source/blender/blenkernel/bad_level_call_stubs/stubs.c
source/blender/blenkernel/intern/DerivedMesh.c
source/blender/blenkernel/intern/Makefile
source/blender/blenkernel/intern/action.c
source/blender/blenkernel/intern/anim.c
source/blender/blenkernel/intern/armature.c
source/blender/blenkernel/intern/blender.c
source/blender/blenkernel/intern/colortools.c [new file with mode: 0644]
source/blender/blenkernel/intern/constraint.c
source/blender/blenkernel/intern/depsgraph.c
source/blender/blenkernel/intern/displist.c
source/blender/blenkernel/intern/effect.c
source/blender/blenkernel/intern/exotic.c
source/blender/blenkernel/intern/font.c
source/blender/blenkernel/intern/group.c
source/blender/blenkernel/intern/icons.c [new file with mode: 0644]
source/blender/blenkernel/intern/image.c
source/blender/blenkernel/intern/ipo.c
source/blender/blenkernel/intern/library.c
source/blender/blenkernel/intern/material.c
source/blender/blenkernel/intern/mball.c
source/blender/blenkernel/intern/nla.c
source/blender/blenkernel/intern/node.c [new file with mode: 0644]
source/blender/blenkernel/intern/node_shaders.c [new file with mode: 0644]
source/blender/blenkernel/intern/object.c
source/blender/blenkernel/intern/scene.c
source/blender/blenkernel/intern/softbody.c
source/blender/blenkernel/intern/texture.c
source/blender/blenkernel/intern/world.c
source/blender/blenkernel/intern/writeavi.c
source/blender/blenlib/BLI_blenlib.h
source/blender/blenlib/BLI_editVert.h
source/blender/blenlib/BLI_ghash.h
source/blender/blenlib/intern/BLI_ghash.c
source/blender/blenlib/intern/dynlib.c
source/blender/blenlib/intern/scanfill.c
source/blender/blenlib/intern/util.c
source/blender/blenloader/BLO_readfile.h
source/blender/blenloader/intern/readblenentry.c
source/blender/blenloader/intern/readfile.c
source/blender/blenloader/intern/writefile.c
source/blender/blenpluginapi/iff.h
source/blender/blenpluginapi/intern/pluginapi.c
source/blender/imbuf/IMB_imbuf.h
source/blender/imbuf/IMB_imbuf_types.h
source/blender/imbuf/SConscript
source/blender/imbuf/intern/IMB_allocimbuf.h
source/blender/imbuf/intern/Makefile
source/blender/imbuf/intern/allocimbuf.c
source/blender/imbuf/intern/amiga.c
source/blender/imbuf/intern/anim.c
source/blender/imbuf/intern/anim5.c
source/blender/imbuf/intern/bitplanes.c
source/blender/imbuf/intern/divers.c
source/blender/imbuf/intern/filter.c
source/blender/imbuf/intern/imageprocess.c
source/blender/imbuf/intern/iris.c
source/blender/imbuf/intern/jpeg.c
source/blender/imbuf/intern/openexr/Makefile [new file with mode: 0644]
source/blender/imbuf/intern/openexr/SConscript [new file with mode: 0644]
source/blender/imbuf/intern/openexr/openexr_api.cpp [new file with mode: 0644]
source/blender/imbuf/intern/openexr/openexr_api.h [moved from source/blender/include/BSE_buttons.h with 67% similarity]
source/blender/imbuf/intern/radiance_hdr.c
source/blender/imbuf/intern/readimage.c
source/blender/imbuf/intern/rectop.c
source/blender/imbuf/intern/rotate.c
source/blender/imbuf/intern/scaling.c
source/blender/imbuf/intern/targa.c
source/blender/imbuf/intern/tiff.c
source/blender/imbuf/intern/util.c
source/blender/imbuf/intern/writeimage.c
source/blender/include/BDR_drawobject.h
source/blender/include/BDR_unwrapper.h
source/blender/include/BIF_editarmature.h
source/blender/include/BIF_editgroup.h
source/blender/include/BIF_editmesh.h
source/blender/include/BIF_editnla.h
source/blender/include/BIF_editsima.h
source/blender/include/BIF_glutil.h
source/blender/include/BIF_interface.h
source/blender/include/BIF_interface_icons.h [new file with mode: 0644]
source/blender/include/BIF_meshtools.h
source/blender/include/BIF_outliner.h
source/blender/include/BIF_poseobject.h
source/blender/include/BIF_previewrender.h
source/blender/include/BIF_resources.h
source/blender/include/BIF_space.h
source/blender/include/BIF_spacetypes.h
source/blender/include/BIF_toolbox.h
source/blender/include/BSE_drawview.h
source/blender/include/BSE_editipo.h
source/blender/include/BSE_filesel.h
source/blender/include/BSE_headerbuttons.h
source/blender/include/BSE_node.h [new file with mode: 0644]
source/blender/include/blendef.h
source/blender/include/butspace.h
source/blender/include/interface.h
source/blender/include/mydevice.h
source/blender/include/transform.h
source/blender/makesdna/DNA_ID.h
source/blender/makesdna/DNA_action_types.h
source/blender/makesdna/DNA_armature_types.h
source/blender/makesdna/DNA_color_types.h [new file with mode: 0644]
source/blender/makesdna/DNA_effect_types.h
source/blender/makesdna/DNA_group_types.h
source/blender/makesdna/DNA_material_types.h
source/blender/makesdna/DNA_nla_types.h
source/blender/makesdna/DNA_node_types.h [new file with mode: 0644]
source/blender/makesdna/DNA_object_types.h
source/blender/makesdna/DNA_scene_types.h
source/blender/makesdna/DNA_screen_types.h
source/blender/makesdna/DNA_space_types.h
source/blender/makesdna/DNA_texture_types.h
source/blender/makesdna/DNA_userdef_types.h
source/blender/makesdna/DNA_view3d_types.h
source/blender/makesdna/DNA_world_types.h
source/blender/makesdna/intern/makesdna.c
source/blender/python/SConscript
source/blender/python/api2_2x/Armature.c
source/blender/python/api2_2x/Bone.h
source/blender/python/api2_2x/NLA.c
source/blender/python/api2_2x/Object.c
source/blender/python/api2_2x/Pose.c [new file with mode: 0644]
source/blender/python/api2_2x/Pose.h [new file with mode: 0644]
source/blender/python/api2_2x/Types.c
source/blender/python/api2_2x/Types.h
source/blender/radiosity/intern/source/radrender.c
source/blender/render/extern/include/render.h
source/blender/render/extern/include/render_types.h
source/blender/render/intern/include/pixelshading.h
source/blender/render/intern/include/rendercore.h
source/blender/render/intern/include/texture.h
source/blender/render/intern/source/envmap.c
source/blender/render/intern/source/initrender.c
source/blender/render/intern/source/pixelshading.c
source/blender/render/intern/source/ray.c
source/blender/render/intern/source/renderHelp.c
source/blender/render/intern/source/renderPreAndPost.c
source/blender/render/intern/source/rendercore.c
source/blender/render/intern/source/renderdatabase.c
source/blender/render/intern/source/shadbuf.c
source/blender/render/intern/source/texture.c
source/blender/render/intern/source/vanillaRenderPipe.c
source/blender/render/intern/source/zbuf.c
source/blender/renderconverter/intern/convertBlenderScene.c
source/blender/src/Makefile
source/blender/src/SConscript
source/blender/src/blenderbuttons.c
source/blender/src/butspace.c
source/blender/src/buttons_editing.c
source/blender/src/buttons_logic.c
source/blender/src/buttons_object.c
source/blender/src/buttons_scene.c
source/blender/src/buttons_shading.c
source/blender/src/drawaction.c
source/blender/src/drawarmature.c
source/blender/src/drawimage.c
source/blender/src/drawimasel.c
source/blender/src/drawipo.c
source/blender/src/drawnla.c
source/blender/src/drawnode.c [new file with mode: 0644]
source/blender/src/drawobject.c
source/blender/src/drawoops.c
source/blender/src/drawseq.c
source/blender/src/drawtime.c
source/blender/src/drawview.c
source/blender/src/edit.c
source/blender/src/editaction.c
source/blender/src/editarmature.c
source/blender/src/editconstraint.c
source/blender/src/editface.c
source/blender/src/editgroup.c
source/blender/src/editimasel.c
source/blender/src/editipo.c
source/blender/src/editmesh.c
source/blender/src/editmesh_lib.c
source/blender/src/editmesh_mods.c
source/blender/src/editmesh_tools.c
source/blender/src/editnla.c
source/blender/src/editnode.c [new file with mode: 0644]
source/blender/src/editobject.c
source/blender/src/editscreen.c
source/blender/src/editsima.c
source/blender/src/edittime.c
source/blender/src/editview.c
source/blender/src/filesel.c
source/blender/src/glutil.c
source/blender/src/header_action.c
source/blender/src/header_buttonswin.c
source/blender/src/header_image.c
source/blender/src/header_info.c
source/blender/src/header_ipo.c
source/blender/src/header_node.c [new file with mode: 0644]
source/blender/src/header_oops.c
source/blender/src/header_script.c
source/blender/src/header_sound.c
source/blender/src/header_text.c
source/blender/src/header_view3d.c
source/blender/src/headerbuttons.c
source/blender/src/imasel.c
source/blender/src/interface.c
source/blender/src/interface_draw.c
source/blender/src/interface_icons.c [new file with mode: 0644]
source/blender/src/interface_panel.c
source/blender/src/meshtools.c
source/blender/src/mywindow.c
source/blender/src/outliner.c
source/blender/src/parametrizer.c [new file with mode: 0644]
source/blender/src/parametrizer.h [new file with mode: 0644]
source/blender/src/parametrizer_intern.h [new file with mode: 0644]
source/blender/src/poseobject.c
source/blender/src/previewrender.c
source/blender/src/renderwin.c
source/blender/src/resources.c
source/blender/src/screendump.c
source/blender/src/sequence.c
source/blender/src/space.c
source/blender/src/spacetypes.c
source/blender/src/splash.jpg.c
source/blender/src/toets.c
source/blender/src/toolbox.c
source/blender/src/transform_conversions.c
source/blender/src/transform_generics.c
source/blender/src/transform_manipulator.c
source/blender/src/unwrapper.c
source/blender/src/usiblender.c
source/blender/src/view.c
source/blender/src/vpaint.c
source/blender/src/writeimage.c
source/blender/src/writemovie.c
source/creator/creator.c
source/gameengine/Expressions/KX_HashedPtr.cpp
source/gameengine/Expressions/KX_HashedPtr.h
source/gameengine/Ketsji/KX_CameraIpoSGController.cpp
source/gameengine/Ketsji/KX_GameObject.cpp
source/gameengine/Ketsji/KX_IPO_SGController.cpp
source/gameengine/Ketsji/KX_LightIpoSGController.cpp
source/gameengine/Ketsji/KX_ObColorIpoSGController.cpp
source/gameengine/Ketsji/KX_PyConstraintBinding.cpp
source/gameengine/Ketsji/KX_WorldIpoController.cpp
source/gameengine/Physics/BlOde/OdePhysicsEnvironment.h
source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.cpp
source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.h
source/gameengine/Physics/Dummy/DummyPhysicsEnvironment.cpp
source/gameengine/Physics/Dummy/DummyPhysicsEnvironment.h
source/gameengine/Physics/Sumo/SumoPhysicsEnvironment.cpp
source/gameengine/Physics/Sumo/SumoPhysicsEnvironment.h
source/gameengine/Physics/common/PHY_IPhysicsEnvironment.h
source/kernel/gen_system/GEN_HashedPtr.cpp
source/kernel/gen_system/GEN_HashedPtr.h
source/nan_definitions.mk
source/nan_link.mk
tools/scons/bs/bs_dirs.py
tools/scons/bs/bs_libs.py

index e998ef82ebd222af4fa6bea662f652f37ccac881..f9fef1f1a49cd89268f34756d51c9f222a241a93 100644 (file)
@@ -54,8 +54,8 @@ if os.path.isdir (bs_globals.root_build_dir) == 0:
        os.makedirs (bs_globals.root_build_dir+os.sep+'source')
 
 # Blender version.
-version='2.40'
-shortversion = '240' # for wininst target -> nsis installer creation
+version='2.40-alpha1'
+shortversion = '240alpha1' # for wininst target -> nsis installer creation
 
 sdl_env = Environment (ENV = os.environ)
 freetype_env = Environment (ENV = os.environ)
@@ -67,6 +67,7 @@ if sys.platform == 'linux2' or sys.platform == 'linux-i386':
        use_openal = 'false'
        use_fmod = 'false'
        use_quicktime = 'false'
+       use_openexr = 'true'
        use_sumo = 'true'
        use_ode = 'false'
        use_bullet = 'true'
@@ -95,6 +96,12 @@ if sys.platform == 'linux2' or sys.platform == 'linux-i386':
        png_lib = ['png']
        png_libpath = ['/usr/lib']
        png_include = ['/usr/include']
+       # OpenEXR library information
+       if use_openexr == 'true':
+               defines += ['WITH_OPENEXR']
+       openexr_lib = ['Iex', 'Half', 'IlmImf', 'Imath']
+       openexr_libpath = ['/usr/lib']
+       openexr_include = ['/usr/include/OpenEXR']
        # jpeg library information
        jpeg_lib = ['jpeg']
        jpeg_libpath = ['/usr/lib']
@@ -157,6 +164,7 @@ elif sys.platform == 'darwin':
        use_fmod = 'false'
        use_openal = 'false'
        use_quicktime = 'true'
+       use_openexr = 'true'
        use_precomp = 'true'
        use_sumo = 'true'
        use_ode = 'false'
@@ -198,6 +206,12 @@ elif sys.platform == 'darwin':
        png_lib = ['libpng']
        png_libpath = [darwin_precomp + 'png/lib']
        png_include = [darwin_precomp + 'png/include']
+       # OpenEXR library information
+       if use_openexr == 'true':
+               defines += ['WITH_OPENEXR']
+       openexr_lib = ['Iex', 'Half', 'IlmImf', 'Imath']
+       openexr_libpath = ['/usr/local/lib']
+       openexr_include = ['/usr/local/include/OpenEXR']
        # jpeg library information
        jpeg_lib = ['libjpeg']
        jpeg_libpath = [darwin_precomp + 'jpeg/lib']
@@ -279,6 +293,7 @@ elif sys.platform == 'cygwin':
        use_openal = 'false'
        use_fmod = 'false'
        use_quicktime = 'false'
+       use_openexr = 'true'
        use_sumo = 'false'
        use_ode = 'false'
        use_bullet = 'false'
@@ -309,6 +324,12 @@ elif sys.platform == 'cygwin':
        png_lib = ['png']
        png_libpath = ['#../lib/windows/png/lib']
        png_include = ['#../lib/windows/png/include']
+       # OpenEXR library information
+       if use_openexr == 'true':
+               defines += ['WITH_OPENEXR']
+       openexr_lib = ['Iex', 'Half', 'IlmImf', 'Imath']
+       openexr_libpath = ['/usr/lib']
+       openexr_include = ['/usr/include/OpenEXR']
        # jpeg library information
        jpeg_lib = ['jpeg']
        jpeg_libpath = ['#../lib/windows/jpeg/lib']
@@ -365,6 +386,7 @@ elif sys.platform == 'win32':
        use_openal = 'true'
        use_fmod = 'false'
        use_quicktime = 'true'
+       use_openexr = 'true'
        use_bullet = 'true'
        use_sumo = 'true'
        use_ode = 'false'
@@ -417,6 +439,12 @@ elif sys.platform == 'win32':
        png_lib = ['libpng_st']
        png_libpath = ['#../lib/windows/png/lib']
        png_include = ['#../lib/windows/png/include']
+       # OpenEXR library information
+       if use_openexr == 'true':
+               defines += ['WITH_OPENEXR']
+       openexr_lib = ['Iex', 'Half', 'IlmImf', 'Imath']
+       openexr_libpath = ['/usr/lib']
+       openexr_include = ['/usr/include/OpenEXR']
        # jpeg library information
        jpeg_lib = ['libjpeg']
        jpeg_libpath = ['#../lib/windows/jpeg/lib']
@@ -477,6 +505,7 @@ elif string.find (sys.platform, 'sunos') != -1:
        use_openal = 'false'
        use_fmod = 'false'
        use_quicktime = 'false'
+       use_openexr = 'false'
        use_sumo = 'false'
        use_ode = 'false'
        use_bullet = 'false'
@@ -505,6 +534,12 @@ elif string.find (sys.platform, 'sunos') != -1:
        png_lib = ['png']
        png_libpath = []
        png_include = []
+       # OpenEXR library information
+       if use_openexr == 'true':
+               defines += ['WITH_OPENEXR']
+       openexr_lib = ['Iex', 'Half', 'IlmImf', 'Imath']
+       openexr_libpath = ['/usr/lib']
+       openexr_include = ['/usr/include/OpenEXR']
        # jpeg library information
        jpeg_lib = ['jpeg']
        jpeg_libpath = []
@@ -561,6 +596,7 @@ elif string.find (sys.platform, 'irix') != -1:
        use_openal = 'false'
        use_fmod = 'false'
        use_quicktime = 'false'
+       use_openexr = 'false'
        use_sumo = 'false'
        use_ode = 'false'
        use_bullet = 'false'
@@ -597,6 +633,12 @@ elif string.find (sys.platform, 'irix') != -1:
        png_lib = ['png']
        png_libpath = [irix_precomp + '/png/lib']
        png_include = [irix_precomp + '/png/include']
+       # OpenEXR library information
+       if use_openexr == 'true':
+               defines += ['WITH_OPENEXR']
+       openexr_lib = ['Iex', 'Half', 'IlmImf', 'Imath']
+       openexr_libpath = ['/usr/lib']
+       openexr_include = ['/usr/include/OpenEXR']
        # jpeg library information
        jpeg_lib = ['jpeg']
        jpeg_libpath = [irix_precomp + '/jpeg/lib']
@@ -657,6 +699,7 @@ elif sys.platform=='openbsd3':
        use_openal = 'false'
        use_fmod = 'false'
        use_quicktime = 'false'
+       use_openexr = 'false'
        use_sumo = 'false'
        use_ode = 'false'
        use_bullet = 'false'
@@ -684,6 +727,12 @@ elif sys.platform=='openbsd3':
        png_lib = ['png']
        png_libpath = ['/usr/local/lib']
        png_include = ['/usr/local/include/libpng']
+       # OpenEXR library information
+       if use_openexr == 'true':
+               defines += ['WITH_OPENEXR']
+       openexr_lib = ['Iex', 'Half', 'IlmImf', 'Imath']
+       openexr_libpath = ['/usr/lib']
+       openexr_include = ['/usr/include/OpenEXR']
        # jpeg library information
        jpeg_lib = ['jpeg']
        jpeg_libpath = ['/usr/local/lib']
@@ -742,6 +791,7 @@ elif sys.platform=='freebsd4' or sys.platform=='freebsd5':
        use_openal = 'false'
        use_fmod = 'false'
        use_quicktime = 'false'
+       use_openexr = 'false'
        use_sumo = 'false'
        use_ode = 'false'
        use_bullet = 'false'
@@ -769,6 +819,12 @@ elif sys.platform=='freebsd4' or sys.platform=='freebsd5':
        png_lib = ['png']
        png_libpath = ['/usr/local/lib']
        png_include = ['/usr/local/include']
+       # OpenEXR library information
+       if use_openexr == 'true':
+               defines += ['WITH_OPENEXR']
+       openexr_lib = ['Iex', 'Half', 'IlmImf', 'Imath']
+       openexr_libpath = ['/usr/lib']
+       openexr_include = ['/usr/include/OpenEXR']
        # jpeg library information
        jpeg_lib = ['jpeg']
        jpeg_libpath = ['/usr/local/lib']
@@ -870,6 +926,7 @@ else:
        config.write ("USE_OPENAL = %r\n"%(use_openal))
        config.write ("USE_FMOD = %r\n"%(use_fmod))
        config.write ("USE_QUICKTIME = %r\n"%(use_quicktime))
+       config.write ("USE_OPENEXR = %r\n"%(use_openexr))
        config.write ("USE_FLUIDSIM = %r\n"%(use_fluidsim))
        config.write ("\n# Compiler information.\n")
        config.write ("HOST_CC = %r\n"%(env_dict['CC']))
@@ -896,6 +953,9 @@ else:
        config.write ("PNG_INCLUDE = %r\n"%(png_include))
        config.write ("PNG_LIBPATH = %r\n"%(png_libpath))
        config.write ("PNG_LIBRARY = %r\n"%(png_lib))
+        config.write ("OPENEXR_INCLUDE = %r\n"%(openexr_include))
+        config.write ("OPENEXR_LIBPATH = %r\n"%(openexr_libpath))
+        config.write ("OPENEXR_LIBRARY = %r\n"%(openexr_lib))
        config.write ("JPEG_INCLUDE = %r\n"%(jpeg_include))
        config.write ("JPEG_LIBPATH = %r\n"%(jpeg_libpath))
        config.write ("JPEG_LIBRARY = %r\n"%(jpeg_lib))
@@ -982,6 +1042,9 @@ user_options.AddOptions (
                (BoolOption ('USE_QUICKTIME',
                                        'Set to 1 to add support for QuickTime.',
                                        'false')),
+               (BoolOption ('USE_OPENEXR',
+                                        'Set to 1 to add support for OpenEXR.',
+                                        'false')),
                (BoolOption ('USE_FLUIDSIM', # NT test new
                                        'Set to 0 to disable compilation of fluid simulation library El\'Beem.',
                                        'true')),
@@ -1008,6 +1071,9 @@ user_options.AddOptions (
                ('PNG_INCLUDE', 'Include directory for png header files.'),
                ('PNG_LIBPATH', 'Library path where the png library is located.'),
                ('PNG_LIBRARY', 'png library name.'),
+                ('OPENEXR_INCLUDE', 'Include directory for OpenEXR header files.'),
+                ('OPENEXR_LIBPATH', 'Library path where the OpenEXR libraries are located.'),
+                ('OPENEXR_LIBRARY', 'OpenEXR library names.'),
                ('JPEG_INCLUDE', 'Include directory for jpeg header files.'),
                ('JPEG_LIBPATH', 'Library path where the jpeg library is located.'),
                ('JPEG_LIBRARY', 'jpeg library name.'),
index 3fa3e9139ab0fa0e60da5e16a2bb894c09547656..064480fbd16be74bf9a02e4c30e8cbdbc1501341 100644 (file)
@@ -46,7 +46,6 @@ CCSRCS =  FTBitmapGlyph.cpp FTCharmap.cpp FTContour.cpp FTExtrdGlyph.cpp \
 
 include nan_compile.mk 
 CPPFLAGS += -I../include
-CPPFLAGS += -I/usr/X11R6/include
 CPPFLAGS += -I$(NAN_FREETYPE)/include -I$(NAN_FREETYPE)/include/freetype2 
 
 install: all debug
index 235e2f1e46512b6ae4ad13814b14b6beee5216d1..2f4ed2c16534c17deaef0e062547bb991179e58c 100644 (file)
@@ -36,7 +36,6 @@ IMPLICIT_CONVEX_SHAPES_START_HERE,
 CONCAVE_SHAPES_START_HERE,
        //keep all the convex shapetype below here, for the check IsConvexShape in broadphase proxy!
        TRIANGLE_MESH_SHAPE_PROXYTYPE,
-       EMPTY_SHAPE_PROXYTYPE,
 
        MAX_BROADPHASE_COLLISION_TYPES
 };
index 823bfdc9edd870d0a9893f8987be50eda4a455f2..663cae2949a70d5c6b04371d239c87e89fc83153 100644 (file)
@@ -16,7 +16,7 @@
 #include "SimdTransform.h"
 #include "SimdMatrix3x3.h"
 #include <vector>
-#include "CollisionShapes/CollisionMargin.h"
+#include "NarrowPhaseCollision/CollisionMargin.h"
 
 SimpleBroadphase::SimpleBroadphase()
 :  m_firstFreeProxy(0),
@@ -63,34 +63,12 @@ BroadphaseProxy*    SimpleBroadphase::CreateProxy( void *object, int type, const Si
 }
 void   SimpleBroadphase::DestroyProxy(BroadphaseProxy* proxy)
 {
-               
-               int i;
-               
+               m_numProxies--;
                BroadphaseProxy* proxy1 = &m_proxies[0];
        
                int index = proxy - proxy1;
                m_freeProxies[--m_firstFreeProxy] = index;
 
-               for ( i=m_NumOverlapBroadphasePair-1;i>=0;i--)
-               {
-                       BroadphasePair& pair = m_OverlappingPairs[i];
-                       if (pair.m_pProxy0 == proxy ||
-                                       pair.m_pProxy1 == proxy)
-                       {
-                               RemoveOverlappingPair(pair);
-                       }
-               }
-               
-               for (i=0;i<m_numProxies;i++)
-               {
-                       if (m_pProxies[i] == proxy)
-                       {
-                               m_proxies[i] = m_proxies[m_numProxies-1];
-                               break;
-                       }
-               }
-               m_numProxies--;
-               
 }
 
 SimpleBroadphaseProxy* SimpleBroadphase::GetSimpleProxyFromProxy(BroadphaseProxy* proxy)
@@ -98,7 +76,7 @@ SimpleBroadphaseProxy*        SimpleBroadphase::GetSimpleProxyFromProxy(BroadphaseProxy
        SimpleBroadphaseProxy* proxy0 = static_cast<SimpleBroadphaseProxy*>(proxy);
 
        int index = proxy0 - &m_proxies[0];
-       //assert(index < m_numProxies);
+       assert(index < m_numProxies);
 
        SimpleBroadphaseProxy* sbp = &m_proxies[index];
        return sbp;
@@ -140,8 +118,6 @@ void        SimpleBroadphase::CleanProxyFromPairs(BroadphaseProxy* proxy)
 
 void   SimpleBroadphase::AddOverlappingPair(BroadphaseProxy* proxy0,BroadphaseProxy* proxy1)
 {
-       
-
        BroadphasePair pair(*proxy0,*proxy1);
        m_OverlappingPairs[m_NumOverlapBroadphasePair] = pair;
 
index f7492328c0262b3ef29c453a2f7ac6a18d2e50e5..b32744352639c0d6cc0c6c86ac88b65ba9a8cc4b 100644 (file)
@@ -50,5 +50,4 @@ void  BoxShape::CalculateLocalInertia(SimdScalar mass,SimdVector3& inertia)
        inertia[2] = mass/(12.0f) * (lx*lx + ly*ly);
 
 
-}
-
+}
\ No newline at end of file
index bbc07f90f5b5729d50a2609299d21d8f04cf1051..1cb0d822b76240629ff2426421e7015050323fbf 100644 (file)
@@ -13,7 +13,7 @@
 #define OBB_BOX_MINKOWSKI_H
 
 #include "PolyhedralConvexShape.h"
-#include "CollisionShapes/CollisionMargin.h"
+#include "NarrowPhaseCollision/CollisionMargin.h"
 #include "BroadphaseCollision/BroadphaseProxy.h"
 #include "SimdPoint3.h"
 #include "SimdMinMax.h"
index 55a6d02c33470d54f5ca042e34dd6942a261041f..5a6b27c904d81585be038a40b54bfcd309c3f1d6 100644 (file)
@@ -70,5 +70,4 @@ public:
 };
 
 
-#endif //CONE_MINKOWSKI_H
-
+#endif //CONE_MINKOWSKI_H
\ No newline at end of file
index fdb7a4d801a5a070b62ddc22b4cd20e3b98df0eb..1cea1d02f083a7d9ace7bb6d3087a4b461cfa77e 100644 (file)
@@ -10,7 +10,7 @@
  */
 
 #include "ConvexHullShape.h"
-#include "CollisionShapes/CollisionMargin.h"
+#include "NarrowPhaseCollision/CollisionMargin.h"
 
 #include "SimdQuaternion.h"
 
@@ -75,7 +75,29 @@ SimdVector3  ConvexHullShape::LocalGetSupportingVertex(const SimdVector3& vec)con
 
 
 
+void   ConvexHullShape::CalculateLocalInertia(SimdScalar mass,SimdVector3& inertia)
+{
+       //not yet, return box inertia
+
+       float margin = GetMargin();
+
+       SimdTransform ident;
+       ident.setIdentity();
+       SimdVector3 aabbMin,aabbMax;
+       GetAabb(ident,aabbMin,aabbMax);
+       SimdVector3 halfExtents = (aabbMax-aabbMin)*0.5f;
 
+       SimdScalar lx=2.f*(halfExtents.x()+margin);
+       SimdScalar ly=2.f*(halfExtents.y()+margin);
+       SimdScalar lz=2.f*(halfExtents.z()+margin);
+       const SimdScalar x2 = lx*lx;
+       const SimdScalar y2 = ly*ly;
+       const SimdScalar z2 = lz*lz;
+       const SimdScalar scaledmass = mass * 0.08333333f;
+
+       inertia = scaledmass * (SimdVector3(y2+z2,x2+z2,x2+y2));
+
+}
 
 
 
index 5906b9354c4892f31b8e23ace6f0f439dffa17de..a06bcb1e9dcdbc27b7be815c4f91cf222bc9b60c 100644 (file)
@@ -35,6 +35,7 @@ public:
        virtual SimdVector3     LocalGetSupportingVertex(const SimdVector3& vec)const;
        virtual SimdVector3     LocalGetSupportingVertexWithoutMargin(const SimdVector3& vec)const;
 
+       virtual void    CalculateLocalInertia(SimdScalar mass,SimdVector3& inertia);
 
        virtual int     GetShapeType()const { return CONVEX_HULL_SHAPE_PROXYTYPE; }
 
@@ -55,5 +56,4 @@ public:
 };
 
 
-#endif //CONVEX_HULL_SHAPE_H
-
+#endif //CONVEX_HULL_SHAPE_H
\ No newline at end of file
index 82986200497e73ce239fb0195457bcab2fc4da18..b1e6f9e99241e7554db1ecafe4eb1dce17c215d9 100644 (file)
@@ -18,7 +18,7 @@
 #include "SimdTransform.h"
 #include "SimdMatrix3x3.h"
 #include <vector>
-#include "CollisionShapes/CollisionMargin.h"
+#include "NarrowPhaseCollision/CollisionMargin.h"
 
 //todo: get rid of this ConvexCastResult thing!
 struct ConvexCastResult;
index c9f1a4acffd6f7b4861d4a75d227d272558c5c90..8e0e446a549013eebbe8e3e837e7cd1d720e578c 100644 (file)
@@ -46,5 +46,4 @@ int   m_triangleCount;
 };
 
 
-#endif //CONVEX_TRIANGLE_CALLBACK_H
-
+#endif //CONVEX_TRIANGLE_CALLBACK_H
\ No newline at end of file
index e35464ef1d3db449ab0810801d43a6deefb26b8b..8b1cb66685a2636171da91eff66bbcd4e4821187 100644 (file)
@@ -82,5 +82,4 @@ public:
 };
 
 
-#endif //CYLINDER_MINKOWSKI_H
-
+#endif //CYLINDER_MINKOWSKI_H
\ No newline at end of file
index d1d5aa9289768957837c47e4b8fda2c44942b04f..93787081a3437849acdc30e134ef1a7ccf127d0a 100644 (file)
@@ -9,7 +9,7 @@
  * It is provided "as is" without express or implied warranty.
 */
 #include "MultiSphereShape.h"
-#include "CollisionShapes/CollisionMargin.h"
+#include "NarrowPhaseCollision/CollisionMargin.h"
 #include "SimdQuaternion.h"
 
 MultiSphereShape::MultiSphereShape (const SimdVector3& inertiaHalfExtents,const SimdVector3* positions,const SimdScalar* radi,int numSpheres)
index ca71ded41c9be032878caa70b2eb6d3766d4c292..911bb9af4320d4976b46474672c0d8c0c5380f3f 100644 (file)
@@ -89,5 +89,4 @@ public:
 };
 
 
-#endif //OPTIMIZED_BVH_H
-
+#endif //OPTIMIZED_BVH_H
\ No newline at end of file
index e480b8911c7f5dec939968014784c60c9eb75ecb..55f29bab9608bb444d6bf81dd3903fa092cf01cb 100644 (file)
@@ -50,28 +50,3 @@ SimdVector3  PolyhedralConvexShape::LocalGetSupportingVertexWithoutMargin(const S
        return supVec;
 
 }
-
-void   PolyhedralConvexShape::CalculateLocalInertia(SimdScalar mass,SimdVector3& inertia)
-{
-       //not yet, return box inertia
-
-       float margin = GetMargin();
-
-       SimdTransform ident;
-       ident.setIdentity();
-       SimdVector3 aabbMin,aabbMax;
-       GetAabb(ident,aabbMin,aabbMax);
-       SimdVector3 halfExtents = (aabbMax-aabbMin)*0.5f;
-
-       SimdScalar lx=2.f*(halfExtents.x()+margin);
-       SimdScalar ly=2.f*(halfExtents.y()+margin);
-       SimdScalar lz=2.f*(halfExtents.z()+margin);
-       const SimdScalar x2 = lx*lx;
-       const SimdScalar y2 = ly*ly;
-       const SimdScalar z2 = lz*lz;
-       const SimdScalar scaledmass = mass * 0.08333333f;
-
-       inertia = scaledmass * (SimdVector3(y2+z2,x2+z2,x2+y2));
-
-}
-
index f1462e21f97d4ac5680b6e434ce4e0b5e8635731..9c3764ae0142132494948ade8524298a383ffa10 100644 (file)
@@ -27,9 +27,6 @@ public:
        //brute force implementations
        virtual SimdVector3     LocalGetSupportingVertexWithoutMargin(const SimdVector3& vec)const;
 
-               virtual void    CalculateLocalInertia(SimdScalar mass,SimdVector3& inertia);
-
-
 
        virtual int     GetNumVertices() const = 0 ;
        virtual int GetNumEdges() const = 0;
index 7c61cb661d7753c25bfa229c454bd04328aa3435..a7533efa5cf774aebab3dee6ad81c76a7eaa5100 100644 (file)
@@ -38,6 +38,10 @@ public:
                m_numVertices = 0;
        }
        
+       virtual void    CalculateLocalInertia(SimdScalar mass,SimdVector3& inertia)
+       {
+               inertia = SimdVector3(1.f,1.f,1.f);
+       }
 
        virtual int     GetShapeType() const{ return TETRAHEDRAL_SHAPE_PROXYTYPE; }
 
index bbffb8137dec201ab99f5989e609acce1e6a2cf8..8c28cca172e0354ecf11268d75733a140bb8677b 100644 (file)
@@ -10,7 +10,7 @@
  */
 
 #include "SphereShape.h"
-#include "CollisionShapes/CollisionMargin.h"
+#include "NarrowPhaseCollision/CollisionMargin.h"
 
 #include "SimdQuaternion.h"
 
index 9763a3c02a22e04839e6f176d4df53683ffb03c2..8fd761f06cba277d5522e9ad670c2eb7acb73835 100644 (file)
@@ -14,67 +14,3 @@ StridingMeshInterface::~StridingMeshInterface()
 {
 
 }
-
-
-void   StridingMeshInterface::InternalProcessAllTriangles(InternalTriangleIndexCallback* callback,const SimdVector3& aabbMin,const SimdVector3& aabbMax) const
-{
-
-       SimdVector3 meshScaling = getScaling();
-
-       int numtotalphysicsverts = 0;
-       int part,graphicssubparts = getNumSubParts();
-       for (part=0;part<graphicssubparts ;part++)
-       {
-               const unsigned char * vertexbase;
-               const unsigned char * indexbase;
-               int indexstride;
-               PHY_ScalarType type;
-               PHY_ScalarType gfxindextype;
-               int stride,numverts,numtriangles;
-               getLockedReadOnlyVertexIndexBase(&vertexbase,numverts,type,stride,&indexbase,indexstride,numtriangles,gfxindextype,part);
-
-               numtotalphysicsverts+=numtriangles*3; //upper bound
-
-       
-               int gfxindex;
-               SimdVector3 triangle[3];
-
-               for (gfxindex=0;gfxindex<numtriangles;gfxindex++)
-               {
-               
-                       int     graphicsindex=0;
-
-#ifdef DEBUG_TRIANGLE_MESH
-                       printf("triangle indices:\n");
-#endif //DEBUG_TRIANGLE_MESH
-                       ASSERT(gfxindextype == PHY_INTEGER);
-                       int* gfxbase = (int*)(indexbase+gfxindex*indexstride);
-
-                       for (int j=2;j>=0;j--)
-                       {
-                               
-                               graphicsindex = gfxbase[j];
-#ifdef DEBUG_TRIANGLE_MESH
-                               printf("%d ,",graphicsindex);
-#endif //DEBUG_TRIANGLE_MESH
-                               float* graphicsbase = (float*)(vertexbase+graphicsindex*stride);
-
-                               triangle[j] = SimdVector3(
-                                       graphicsbase[0]*meshScaling.getX(),
-                                       graphicsbase[1]*meshScaling.getY(),
-                                       graphicsbase[2]*meshScaling.getZ());
-#ifdef DEBUG_TRIANGLE_MESH
-                               printf("triangle vertices:%f,%f,%f\n",triangle[j].x(),triangle[j].y(),triangle[j].z());
-#endif //DEBUG_TRIANGLE_MESH
-                       }
-
-                       
-                       //check aabb in triangle-space, before doing this
-                       callback->InternalProcessTriangleIndex(triangle,part,gfxindex);
-                       
-               }
-               
-               unLockReadOnlyVertexBase(part);
-       }
-}
-
index 82f89b4dbe0f105e9aac37644f691888cfddc168..ba8a925c8dd3d58cc7708f1d151250c4f8430983 100644 (file)
@@ -12,7 +12,6 @@
 #define STRIDING_MESHINTERFACE_H
 
 #include "SimdVector3.h"
-#include "TriangleCallback.h"
 
 /// PHY_ScalarType enumerates possible scalar types.
 /// See the StridingMeshInterface for its use
@@ -39,36 +38,26 @@ class  StridingMeshInterface
                }
 
                virtual ~StridingMeshInterface();
-
-
-
-               void    InternalProcessAllTriangles(InternalTriangleIndexCallback* callback,const SimdVector3& aabbMin,const SimdVector3& aabbMax) const;
-
-
                /// get read and write access to a subpart of a triangle mesh
                /// this subpart has a continuous array of vertices and indices
                /// in this way the mesh can be handled as chunks of memory with striding
                /// very similar to OpenGL vertexarray support
                /// make a call to unLockVertexBase when the read and write access is finished  
-               virtual void    getLockedVertexIndexBase(unsigned char **vertexbase, int& numverts,PHY_ScalarType& type, int& stride,unsigned char **indexbase,int & indexstride,int& numfaces,PHY_ScalarType& indicestype,int subpart=0)=0;
+       virtual void    getLockedVertexIndexBase(unsigned char **vertexbase, int& numverts,PHY_ScalarType& type, int& stride,unsigned char **indexbase,int & indexstride,int& numfaces,PHY_ScalarType& indicestype,int subpart=0)=0;
                
-               virtual void    getLockedReadOnlyVertexIndexBase(const unsigned char **vertexbase, int& numverts,PHY_ScalarType& type, int& stride,const unsigned char **indexbase,int & indexstride,int& numfaces,PHY_ScalarType& indicestype,int subpart=0) const=0;
-       
+
                /// unLockVertexBase finishes the access to a subpart of the triangle mesh
                /// make a call to unLockVertexBase when the read and write access (using getLockedVertexIndexBase) is finished
                virtual void    unLockVertexBase(int subpart)=0;
 
-               virtual void    unLockReadOnlyVertexBase(int subpart) const=0;
-
-
                /// getNumSubParts returns the number of seperate subparts
                /// each subpart has a continuous array of vertices and indices
-               virtual int             getNumSubParts() const=0;
+               virtual int             getNumSubParts()=0;
 
                virtual void    preallocateVertices(int numverts)=0;
                virtual void    preallocateIndices(int numindices)=0;
 
-               const SimdVector3&      getScaling() const {
+               const SimdVector3&      getScaling() {
                        return m_scaling;
                }
                void    setScaling(const SimdVector3& scaling)
index 64704dc41fd3f557ecaa340a319c8140cec431fc..6fc69355c2d65ed1859e2e7d2e7cf923981a0103 100644 (file)
@@ -20,5 +20,4 @@ TriangleCallback::~TriangleCallback()
 InternalTriangleIndexCallback::~InternalTriangleIndexCallback()
 {
 
-}
-
+}
\ No newline at end of file
index cbffeeb98395e3e327c765efa9adf60a41cd7f7f..0e464d09e8beabe2240d501be06708b4bc387911 100644 (file)
@@ -22,14 +22,4 @@ public:
        virtual void ProcessTriangle(SimdVector3* triangle) = 0;
 };
 
-class InternalTriangleIndexCallback
-{
-public:
-
-       virtual ~InternalTriangleIndexCallback();
-       virtual void InternalProcessTriangleIndex(SimdVector3* triangle,int partId,int  triangleIndex) = 0;
-};
-
-
-
 #endif //TRIANGLE_CALLBACK_H
index 1e82950a344d7299bde4a2ce6a9ef9dc4c969eb1..4784dc3938fc829f08000aeac7773c5d7f2601c0 100644 (file)
@@ -43,5 +43,4 @@ public:
        virtual void    preallocateVertices(int numverts){}
        virtual void    preallocateIndices(int numindices){}
 
-};
-
+};
\ No newline at end of file
index 38cccec3e1542d2682ec11a3fea33ff081c4d3f8..d02b96009857562f0b5febce7044c1395f327acb 100644 (file)
@@ -33,24 +33,7 @@ void TriangleMesh::getLockedVertexIndexBase(unsigned char **vertexbase, int& num
 
 }
 
-void   TriangleMesh::getLockedReadOnlyVertexIndexBase(const unsigned char **vertexbase, int& numverts,PHY_ScalarType& type, int& stride,const unsigned char **indexbase,int & indexstride,int& numfaces,PHY_ScalarType& indicestype,int subpart) const
-{
-       numverts = 3;
-       *vertexbase = (unsigned char*)&m_triangles[subpart];
-       type = PHY_FLOAT;
-       stride = sizeof(SimdVector3);
-
-
-       numfaces = 1;
-       *indexbase = (unsigned char*) &myindices[0];
-       indicestype = PHY_INTEGER;
-       indexstride = sizeof(int);
-
-}
-
-
-
-int            TriangleMesh::getNumSubParts() const
+int            TriangleMesh::getNumSubParts()
 {
        return m_triangles.size();
 }
index 891ef6ea91a433f7463edea2fc05f892d019cbc1..0b0b937bf122e25d940c1c66f027f6cbeb66c697 100644 (file)
@@ -46,17 +46,13 @@ class TriangleMesh : public StridingMeshInterface
 
                virtual void    getLockedVertexIndexBase(unsigned char **vertexbase, int& numverts,PHY_ScalarType& type, int& stride,unsigned char **indexbase,int & indexstride,int& numfaces,PHY_ScalarType& indicestype,int subpart=0);
 
-               virtual void    getLockedReadOnlyVertexIndexBase(const unsigned char **vertexbase, int& numverts,PHY_ScalarType& type, int& stride,const unsigned char **indexbase,int & indexstride,int& numfaces,PHY_ScalarType& indicestype,int subpart=0) const;
-
                /// unLockVertexBase finishes the access to a subpart of the triangle mesh
                /// make a call to unLockVertexBase when the read and write access (using getLockedVertexIndexBase) is finished
                virtual void    unLockVertexBase(int subpart) {}
 
-               virtual void    unLockReadOnlyVertexBase(int subpart) const {}
-
                /// getNumSubParts returns the number of seperate subparts
                /// each subpart has a continuous array of vertices and indices
-               virtual int             getNumSubParts() const;
+               virtual int             getNumSubParts();
                
                virtual void    preallocateVertices(int numverts){}
                virtual void    preallocateIndices(int numindices){}
index 743e413307e58495702d700fef5e0ca508319b32..0c20f78c1dfae69cea2d257f5637106606170924 100644 (file)
@@ -13,7 +13,7 @@
 #include "SimdQuaternion.h"
 #include "StridingMeshInterface.h"
 #include "AabbUtil2.h"
-#include "CollisionShapes/CollisionMargin.h"
+#include "NarrowPhaseCollision/CollisionMargin.h"
 
 #include "stdio.h"
 
@@ -21,10 +21,8 @@ TriangleMeshShape::TriangleMeshShape(StridingMeshInterface* meshInterface)
 : m_meshInterface(meshInterface),
 m_collisionMargin(CONVEX_DISTANCE_MARGIN)
 {
-       RecalcLocalAabb();
 }
 
-
 TriangleMeshShape::~TriangleMeshShape()
 {
                
@@ -36,39 +34,23 @@ TriangleMeshShape::~TriangleMeshShape()
 void TriangleMeshShape::GetAabb(const SimdTransform& trans,SimdVector3& aabbMin,SimdVector3& aabbMax) const
 {
 
-       SimdVector3 localHalfExtents = 0.5f*(m_localAabbMax-m_localAabbMin);
-       SimdVector3 localCenter = 0.5f*(m_localAabbMax+m_localAabbMin);
-       
-       SimdMatrix3x3 abs_b = trans.getBasis().absolute();  
-
-       SimdPoint3 center = trans(localCenter);
-
-       SimdVector3 extent = SimdVector3(abs_b[0].dot(localHalfExtents),
-                  abs_b[1].dot(localHalfExtents),
-                 abs_b[2].dot(localHalfExtents));
-       extent += SimdVector3(GetMargin(),GetMargin(),GetMargin());
-
-       aabbMin = center - extent;
-       aabbMax = center + extent;
-
-       
-}
-
-void   TriangleMeshShape::RecalcLocalAabb()
-{
        for (int i=0;i<3;i++)
        {
                SimdVector3 vec(0.f,0.f,0.f);
                vec[i] = 1.f;
-               SimdVector3 tmp = LocalGetSupportingVertex(vec);
-               m_localAabbMax[i] = tmp[i]+m_collisionMargin;
+               SimdVector3 tmp = trans(LocalGetSupportingVertex(vec*trans.getBasis()));
+               aabbMax[i] = tmp[i]+m_collisionMargin;
                vec[i] = -1.f;
-               tmp = LocalGetSupportingVertex(vec);
-               m_localAabbMin[i] = tmp[i]-m_collisionMargin;
+               tmp = trans(LocalGetSupportingVertex(vec*trans.getBasis()));
+               aabbMin[i] = tmp[i]-m_collisionMargin;
        }
 }
 
 
+TriangleCallback::~TriangleCallback()
+{
+
+}
 
 class SupportVertexCallback : public TriangleCallback
 {
@@ -116,7 +98,6 @@ public:
 void TriangleMeshShape::setLocalScaling(const SimdVector3& scaling)
 {
        m_meshInterface->setScaling(scaling);
-       RecalcLocalAabb();
 }
 
 const SimdVector3& TriangleMeshShape::getLocalScaling() const
@@ -126,43 +107,57 @@ const SimdVector3& TriangleMeshShape::getLocalScaling() const
 
 
 
-
-
-
-//#define DEBUG_TRIANGLE_MESH
-
-
 void   TriangleMeshShape::ProcessAllTriangles(TriangleCallback* callback,const SimdVector3& aabbMin,const SimdVector3& aabbMax) const
 {
 
-       struct FilteredCallback : public InternalTriangleIndexCallback
+       SimdVector3 meshScaling = m_meshInterface->getScaling();
+       int numtotalphysicsverts = 0;
+       int part,graphicssubparts = m_meshInterface->getNumSubParts();
+       for (part=0;part<graphicssubparts ;part++)
        {
-               TriangleCallback* m_callback;
-               SimdVector3 m_aabbMin;
-               SimdVector3 m_aabbMax;
-
-               FilteredCallback(TriangleCallback* callback,const SimdVector3& aabbMin,const SimdVector3& aabbMax)
-                       :m_callback(callback),
-                       m_aabbMin(aabbMin),
-                       m_aabbMax(aabbMax)
-               {
-               }
+               unsigned char * vertexbase;
+               unsigned char * indexbase;
+               int indexstride;
+               PHY_ScalarType type;
+               PHY_ScalarType gfxindextype;
+               int stride,numverts,numtriangles;
+               m_meshInterface->getLockedVertexIndexBase(&vertexbase,numverts,type,stride,&indexbase,indexstride,numtriangles,gfxindextype,part);
+               numtotalphysicsverts+=numtriangles*3; //upper bound
 
-               virtual void InternalProcessTriangleIndex(SimdVector3* triangle,int partId,int triangleIndex)
+       
+               int gfxindex;
+               SimdVector3 triangle[3];
+
+               for (gfxindex=0;gfxindex<numtriangles;gfxindex++)
                {
-                       if (TestTriangleAgainstAabb2(&triangle[0],m_aabbMin,m_aabbMax))
+               
+                       int     graphicsindex=0;
+
+                       for (int j=2;j>=0;j--)
+                       {
+                               ASSERT(gfxindextype == PHY_INTEGER);
+                               int* gfxbase = (int*)(indexbase+gfxindex*indexstride);
+                               graphicsindex = gfxbase[j];
+                               float* graphicsbase = (float*)(vertexbase+graphicsindex*stride);
+
+                               triangle[j] = SimdVector3(
+                                       graphicsbase[0]*meshScaling.getX(),
+                                       graphicsbase[1]*meshScaling.getY(),
+                                       graphicsbase[2]*meshScaling.getZ());
+                       }
+
+                       if (TestTriangleAgainstAabb2(&triangle[0],aabbMin,aabbMax))
                        {
                                //check aabb in triangle-space, before doing this
-                               m_callback->ProcessTriangle(triangle);
+                               callback->ProcessTriangle(triangle);
+       
                        }
                        
                }
+               
+               m_meshInterface->unLockVertexBase(part);
+       }
 
-       };
-
-       FilteredCallback filterCallback(callback,aabbMin,aabbMax);
-
-       m_meshInterface->InternalProcessAllTriangles(&filterCallback,aabbMin,aabbMax);
 
 }
 
index 4f42458f0626acc5b7a6f7005df4a56c21273fe8..926191bddbbb9617c01f3cd1097f53f6a7785bea 100644 (file)
 ///Concave triangle mesh. Uses an interface to access the triangles to allow for sharing graphics/physics triangles.
 class TriangleMeshShape : public CollisionShape
 {
-protected:
+
        StridingMeshInterface* m_meshInterface;
-       SimdVector3     m_localAabbMin;
-       SimdVector3     m_localAabbMax;
        float m_collisionMargin;
 
 public:
@@ -43,8 +41,6 @@ public:
                return LocalGetSupportingVertex(vec);
        }
 
-       void    RecalcLocalAabb();
-
        virtual int     GetShapeType() const
        {
                return TRIANGLE_MESH_SHAPE_PROXYTYPE;
@@ -52,7 +48,7 @@ public:
 
        virtual void GetAabb(const SimdTransform& t,SimdVector3& aabbMin,SimdVector3& aabbMax) const;
 
-       virtual void    ProcessAllTriangles(TriangleCallback* callback,const SimdVector3& aabbMin,const SimdVector3& aabbMax) const;
+       void    ProcessAllTriangles(TriangleCallback* callback,const SimdVector3& aabbMin,const SimdVector3& aabbMax) const;
 
        virtual void    CalculateLocalInertia(SimdScalar mass,SimdVector3& inertia);
 
index 570a312da1a468748f2baeecbd885a2260067a5e..60ea95da5d03dcdc11d12b2336a9f6399d396796 100644 (file)
@@ -143,5 +143,4 @@ public:
 
 };
 
-#endif //OBB_TRIANGLE_MINKOWSKI_H
-
+#endif //OBB_TRIANGLE_MINKOWSKI_H
\ No newline at end of file
diff --git a/extern/bullet/Bullet/NarrowPhaseCollision/CollisionMargin.h b/extern/bullet/Bullet/NarrowPhaseCollision/CollisionMargin.h
new file mode 100644 (file)
index 0000000..41009dc
--- /dev/null
@@ -0,0 +1,11 @@
+#ifndef COLLISION_MARGIN_H
+#define COLLISION_MARGIN_H
+
+//used by Gjk and some other algorithms
+
+#define CONVEX_DISTANCE_MARGIN 0.04f// 0.1f//;//0.01f
+
+
+
+#endif //COLLISION_MARGIN_H
+
index 94f1dafe1bb9869c19fccb02505202e429b22811..b8b31377aa720346455e5e2b53c464f96dd15ed9 100644 (file)
@@ -43,5 +43,4 @@ public:
 
 };
 
-#endif //CONTINUOUS_COLLISION_CONVEX_CAST_H
-
+#endif //CONTINUOUS_COLLISION_CONVEX_CAST_H
\ No newline at end of file
index a8fdbc5541413fcd10627583fc6c8a1d78e3f740..8af37e080321c7bc6d345299c144b3adc0b5dc63 100644 (file)
@@ -30,5 +30,4 @@ public:
 
 
 };
-#endif //CONVEX_PENETRATION_DEPTH_H
-
+#endif //CONVEX_PENETRATION_DEPTH_H
\ No newline at end of file
index 4c129848fe05d8ba7475b720f180ae3b7410f8b7..45d7403586f766d3f5bcfef5d1316c024684569b 100644 (file)
@@ -154,5 +154,4 @@ bool        GjkConvexCast::calcTimeOfImpact(
        }
 
        return false;
-}
-
+}
\ No newline at end of file
index 3d3c5de41107af362f6a08bde41e4eca4042238d..a1bcc615010f99d812ec1878aefd4f1806a3d6b0 100644 (file)
@@ -13,8 +13,7 @@
 #ifndef GJK_CONVEX_CAST_H
 #define GJK_CONVEX_CAST_H
 
-#include <CollisionShapes/CollisionMargin.h>
-
+#include "CollisionMargin.h"
 #include "SimdVector3.h"
 #include "ConvexCast.h"
 class ConvexShape;
index bfef4a91682bb7612f8c7102ed93a6257a2c26cc..f6311a9eba5d4e94dd3f52a40b715c6ac9f756bc 100644 (file)
@@ -17,7 +17,7 @@
 #include "DiscreteCollisionDetectorInterface.h"
 #include "SimdPoint3.h"
 
-#include <CollisionShapes/CollisionMargin.h>
+#include "CollisionMargin.h"
 
 class ConvexShape;
 #include "SimplexSolverInterface.h"
index 98e45f6d1dfb90869e6851db03c2abd3400b6279..bb45e5215f3867c215e02364c28edcbf32fc17d8 100644 (file)
@@ -30,5 +30,4 @@ void ManifoldContactAddResult::AddContactPoint(const SimdVector3& normalOnBInWor
        {
                m_manifoldPtr->AddManifoldPoint(newPt);
        }
-}
-
+}
\ No newline at end of file
index 6ff503e732240a8a0b415f6d6fb1d256f99fd73e..1926501b84b355d246d58a50db4e8f77b4b5af00 100644 (file)
@@ -131,7 +131,7 @@ bool MinkowskiPenetrationDepthSolver::CalcPenDepth(SimplexSolverInterface& simpl
 
        if (res.m_hasResult)
        {
-               pa = res.m_pointInWorld - res.m_normalOnBInWorld*0.1f*res.m_depth;
+               pa = res.m_pointInWorld - res.m_normalOnBInWorld*res.m_depth;
                pb = res.m_pointInWorld;
        }
        return res.m_hasResult;
index e4f22b69f469a11aedb7e82050965bd9da0de1c2..f39fa090ae49db912fca41a94da3dd020c4e0a73 100644 (file)
@@ -33,5 +33,4 @@ struct PointCollector : public DiscreteCollisionDetectorInterface::Result
        }
 };
 
-#endif //POINT_COLLECTOR_H
-
+#endif //POINT_COLLECTOR_H
\ No newline at end of file
index a1d34dcb2f6eac82d7e8b79d77a9d361ef0e563e..8fc97bb3b409ef9d7e521b698d0ac5f8b5e935e3 100644 (file)
@@ -37,5 +37,4 @@ public:
        virtual void ProcessTriangle(SimdVector3* triangle);
 };
 
-#endif //RAYCAST_TRI_CALLBACK_H
-
+#endif //RAYCAST_TRI_CALLBACK_H
\ No newline at end of file
index fef5ef281b24bec65aa0bf52cdcd894c84a06677..3f356c703d78b022080e60827f0834c5ecf9c84a 100644 (file)
@@ -38,7 +38,7 @@
 ///It improves the penetration depth handling dramatically
 //#define USE_EPA
 #ifdef USE_EPA
-#include "../Extras/ExtraSolid35/Solid3EpaPenetrationDepth.h"
+#include "NarrowPhaseCollision/Solid3EpaPenetrationDepth.h"
 bool gUseEpa = true;
 #else
 bool gUseEpa = false;
@@ -68,10 +68,11 @@ ConvexConvexAlgorithm::ConvexConvexAlgorithm(PersistentManifold* mf,const Collis
 m_gjkPairDetector(0,0,&m_simplexSolver,0),
 m_box0(*proxy0),
 m_box1(*proxy1),
+m_collisionImpulse(0.f),
 m_ownManifold (false),
 m_manifoldPtr(mf),
 m_lowLevelOfDetail(false),
-m_useEpa(!gUseEpa)
+m_useEpa(gUseEpa)
 {
        CheckPenetrationDepthSolver();
 
@@ -136,34 +137,30 @@ public:
 
 };
 
-static MinkowskiPenetrationDepthSolver gPenetrationDepthSolver;
-
-#ifdef USE_EPA
-Solid3EpaPenetrationDepth      gSolidEpaPenetrationSolver;
-#endif //USE_EPA
-
 void   ConvexConvexAlgorithm::CheckPenetrationDepthSolver()
 {
-       if (m_useEpa != gUseEpa)
+//     if (m_useEpa != gUseEpa)
        {
                m_useEpa  = gUseEpa;
                if (m_useEpa)
                {
                        //not distributed, see top of this file
                        #ifdef USE_EPA
-                       m_gjkPairDetector.SetPenetrationDepthSolver(&gSolidEpaPenetrationSolver);
+                       m_gjkPairDetector.SetPenetrationDepthSolver(new Solid3EpaPenetrationDepth);
                        #else
-                       m_gjkPairDetector.SetPenetrationDepthSolver(&gPenetrationDepthSolver);
+                       m_gjkPairDetector.SetPenetrationDepthSolver(new MinkowskiPenetrationDepthSolver);
                        #endif
                        
                } else
                {
-                       m_gjkPairDetector.SetPenetrationDepthSolver(&gPenetrationDepthSolver);
+                       m_gjkPairDetector.SetPenetrationDepthSolver(new MinkowskiPenetrationDepthSolver);
                }
        }
        
 }
+bool extra = false;
 
+float gFriction = 0.5f;
 //
 // box-box collision algorithm, for simplicity also applies resolution-impulse
 //
@@ -172,7 +169,7 @@ void ConvexConvexAlgorithm ::ProcessCollision (BroadphaseProxy* ,BroadphaseProxy
        CheckPenetrationDepthSolver();
 
 //     printf("ConvexConvexAlgorithm::ProcessCollision\n");
-
+m_collisionImpulse = 0.f;
        
        RigidBody* body0 = (RigidBody*)m_box0.m_clientObject;
        RigidBody* body1 = (RigidBody*)m_box1.m_clientObject;
@@ -230,7 +227,7 @@ float       ConvexConvexAlgorithm::CalculateTimeOfImpact(BroadphaseProxy* proxy0,Broad
 
        CheckPenetrationDepthSolver();
 
-
+       m_collisionImpulse = 0.f;
        
        RigidBody* body0 = (RigidBody*)m_box0.m_clientObject;
        RigidBody* body1 = (RigidBody*)m_box1.m_clientObject;
index b560e8d4c154b3b17c8a622fccc0467a14d9e70b..8b16687f19222ee8fe848b9758822cb721a0b660 100644 (file)
@@ -29,7 +29,7 @@ class ConvexConvexAlgorithm : public CollisionAlgorithm
 public:
        BroadphaseProxy m_box0;
        BroadphaseProxy m_box1;
-
+       float                   m_collisionImpulse;
        bool    m_ownManifold;
        PersistentManifold*     m_manifoldPtr;
        bool                    m_lowLevelOfDetail;
index 0c400a84dca2bc62304b4d62638c9008abaaac68..01c2dbf031d8ec02295623bb71c5fe05342d7492 100644 (file)
@@ -27,8 +27,8 @@ SimdScalar contactTau = .02f;//0.02f;//*0.02f;
 
 SimdScalar restitutionCurve(SimdScalar rel_vel, SimdScalar restitution)
 {
-//     return 0.f;
-       return restitution * GEN_min(1.0f, rel_vel / ContactThreshold);
+       return 0.f;
+//     return restitution * GEN_min(1.0f, rel_vel / ContactThreshold);
 }
 
 
@@ -139,31 +139,28 @@ SimdScalar rel_vel;
 */     
        rel_vel = normal.dot(vel);
        
+//     if (rel_vel< 0.f)//-SIMD_EPSILON) 
+//     {
        float combinedRestitution = body1.getRestitution() * body2.getRestitution();
 
-       SimdScalar restitution = restitutionCurve(rel_vel, combinedRestitution);
+       SimdScalar rest = restitutionCurve(rel_vel, combinedRestitution);
+//     SimdScalar massTerm = 1.f / (body1.getInvMass() + body2.getInvMass());
 
-       SimdScalar Kfps = 1.f / solverInfo.m_timeStep ;
+       SimdScalar timeCorrection = 0.5f / solverInfo.m_timeStep ;
 
        float damping = solverInfo.m_damping ;
-       float Kerp = solverInfo.m_tau;
-       
+       float tau = solverInfo.m_tau;
+
        if (useGlobalSettingContacts)
        {
                damping = contactDamping;
-               Kerp = contactTau;
+               tau = contactTau;
        } 
+       SimdScalar penetrationImpulse = (-distance* tau *timeCorrection)  * jacDiagABInv;
+               
 
-       float Kcor = Kerp *Kfps;
-
-
-       SimdScalar positionalError = Kcor *-distance;
-       //jacDiagABInv;
-       SimdScalar velocityError = -(1.0f + restitution) * damping * rel_vel;
-
-       SimdScalar penetrationImpulse = positionalError * jacDiagABInv;
 
-       SimdScalar      velocityImpulse = velocityError * jacDiagABInv;
+       SimdScalar velocityImpulse = -(1.0f + rest) * damping * rel_vel * jacDiagABInv;
 
        SimdScalar friction_impulse = 0.f;
 
@@ -180,11 +177,11 @@ SimdScalar rel_vel;
 
                {
                
-               SimdVector3 vel1 = body1.getVelocityInLocalPoint(rel_pos1);
-               SimdVector3 vel2 = body2.getVelocityInLocalPoint(rel_pos2);
-               SimdVector3 vel = vel1 - vel2;
-               
-               rel_vel = normal.dot(vel);
+                               SimdVector3 vel1 = body1.getVelocityInLocalPoint(rel_pos1);
+       SimdVector3 vel2 = body2.getVelocityInLocalPoint(rel_pos2);
+       SimdVector3 vel = vel1 - vel2;
+       
+       rel_vel = normal.dot(vel);
 
 #define PER_CONTACT_FRICTION
 #ifdef PER_CONTACT_FRICTION
index 3a89f2ad1fd784eaa2a756970acc70a561fc91ea..ebf58c344851075db13236decc2edfc2934da6c8 100644 (file)
@@ -16,7 +16,7 @@
 
 
 //notes:
-// Another memory optimization would be to store m_1MinvJt in the remaining 3 w components
+// Another memory optimization would be to store m_MbJ in the remaining 3 w components
 // which makes the JacobianEntry memory layout 16 bytes
 // if you only are interested in angular part, just feed massInvA and massInvB zero
 
@@ -32,59 +32,59 @@ public:
                const SimdMatrix3x3& world2A,
                const SimdMatrix3x3& world2B,
                const SimdVector3& rel_pos1,const SimdVector3& rel_pos2,
-               const SimdVector3& jointAxis,
+               const SimdVector3& normal,
                const SimdVector3& inertiaInvA, 
                const SimdScalar massInvA,
                const SimdVector3& inertiaInvB,
                const SimdScalar massInvB)
-               :m_jointAxis(jointAxis)
+               :m_normalAxis(normal)
        {
-               m_aJ = world2A*(rel_pos1.cross(m_jointAxis));
-               m_bJ = world2B*(rel_pos2.cross(m_jointAxis));
-               m_0MinvJt       = inertiaInvA * m_aJ;
-               m_1MinvJt = inertiaInvB * m_bJ;
-               m_Adiag = massInvA + m_0MinvJt.dot(m_aJ) + massInvB + m_1MinvJt.dot(m_bJ);
+               m_aJ = world2A*(rel_pos1.cross(normal));
+               m_bJ = world2B*(rel_pos2.cross(normal));
+               m_MaJ   = inertiaInvA * m_aJ;
+               m_MbJ = inertiaInvB * m_bJ;
+               m_jacDiagAB = massInvA + m_MaJ.dot(m_aJ) + massInvB + m_MbJ.dot(m_bJ);
        }
 
                //angular constraint between two different rigidbodies
-       JacobianEntry(const SimdVector3& jointAxis,
+       JacobianEntry(const SimdVector3& normal,
                const SimdMatrix3x3& world2A,
                const SimdMatrix3x3& world2B,
                const SimdVector3& inertiaInvA,
                const SimdVector3& inertiaInvB)
-               :m_jointAxis(m_jointAxis)
+               :m_normalAxis(normal)
        {
-               m_aJ= world2A*m_jointAxis;
-               m_bJ = world2B*-m_jointAxis;
-               m_0MinvJt       = inertiaInvA * m_aJ;
-               m_1MinvJt = inertiaInvB * m_bJ;
-               m_Adiag =  m_0MinvJt.dot(m_aJ) + m_1MinvJt.dot(m_bJ);
+               m_aJ= world2A*normal;
+               m_bJ = world2B*-normal;
+               m_MaJ   = inertiaInvA * m_aJ;
+               m_MbJ = inertiaInvB * m_bJ;
+               m_jacDiagAB =  m_MaJ.dot(m_aJ) + m_MbJ.dot(m_bJ);
        }
 
        //constraint on one rigidbody
        JacobianEntry(
                const SimdMatrix3x3& world2A,
                const SimdVector3& rel_pos1,const SimdVector3& rel_pos2,
-               const SimdVector3& jointAxis,
+               const SimdVector3& normal,
                const SimdVector3& inertiaInvA, 
                const SimdScalar massInvA)
-               :m_jointAxis(jointAxis)
+               :m_normalAxis(normal)
        {
-               m_aJ= world2A*(rel_pos1.cross(m_jointAxis));
-               m_bJ = world2A*(rel_pos2.cross(m_jointAxis));
-               m_0MinvJt       = inertiaInvA * m_aJ;
-               m_1MinvJt = SimdVector3(0.f,0.f,0.f);
-               m_Adiag = massInvA + m_0MinvJt.dot(m_aJ);
+               m_aJ= world2A*(rel_pos1.cross(normal));
+               m_bJ = world2A*(rel_pos2.cross(normal));
+               m_MaJ   = inertiaInvA * m_aJ;
+               m_MbJ = SimdVector3(0.f,0.f,0.f);
+               m_jacDiagAB = massInvA + m_MaJ.dot(m_aJ);
        }
 
-       SimdScalar      getDiagonal() const { return m_Adiag; }
+       SimdScalar      getDiagonal() const { return m_jacDiagAB; }
 
        // for two constraints on the same rigidbody (for example vehicle friction)
        SimdScalar      getNonDiagonal(const JacobianEntry& jacB, const SimdScalar massInvA) const
        {
                const JacobianEntry& jacA = *this;
-               SimdScalar lin = massInvA * jacA.m_jointAxis.dot(jacB.m_jointAxis);
-               SimdScalar ang = jacA.m_0MinvJt.dot(jacB.m_aJ);
+               SimdScalar lin = massInvA * jacA.m_normalAxis.dot(jacB.m_normalAxis);
+               SimdScalar ang = jacA.m_MaJ.dot(jacB.m_aJ);
                return lin + ang;
        }
 
@@ -94,9 +94,9 @@ public:
        SimdScalar      getNonDiagonal(const JacobianEntry& jacB,const SimdScalar massInvA,const SimdScalar massInvB) const
        {
                const JacobianEntry& jacA = *this;
-               SimdVector3 lin = jacA.m_jointAxis* jacB.m_jointAxis;
-               SimdVector3 ang0 = jacA.m_0MinvJt * jacB.m_aJ;
-               SimdVector3 ang1 = jacA.m_1MinvJt * jacB.m_bJ;
+               SimdVector3 lin = jacA.m_normalAxis * jacB.m_normalAxis;
+               SimdVector3 ang0 = jacA.m_MaJ * jacB.m_aJ;
+               SimdVector3 ang1 = jacA.m_MbJ * jacB.m_bJ;
                SimdVector3 lin0 = massInvA * lin ;
                SimdVector3 lin1 = massInvB * lin;
                SimdVector3 sum = ang0+ang1+lin0+lin1;
@@ -108,7 +108,7 @@ public:
                SimdVector3 linrel = linvelA - linvelB;
                SimdVector3 angvela  = angvelA * m_aJ;
                SimdVector3 angvelb  = angvelB * m_bJ;
-               linrel *= m_jointAxis;
+               linrel *= m_normalAxis;
                angvela += angvelb;
                angvela += linrel;
                SimdScalar rel_vel2 = angvela[0]+angvela[1]+angvela[2];
@@ -116,13 +116,13 @@ public:
        }
 //private:
 
-       SimdVector3     m_jointAxis;
+       SimdVector3     m_normalAxis;
        SimdVector3     m_aJ;
        SimdVector3     m_bJ;
-       SimdVector3     m_0MinvJt;
-       SimdVector3     m_1MinvJt;
+       SimdVector3     m_MaJ;
+       SimdVector3     m_MbJ;
        //Optimization: can be stored in the w/last component of one of the vectors
-       SimdScalar      m_Adiag;
+       SimdScalar      m_jacDiagAB;
 
 };
 
index acb6728deeb27e708cf5e07833931a415c6ea91d..aa0beab778603a1e4d6638dc238fc321a885c1cc 100644 (file)
 #include <string.h>
 #include <stdio.h>
 
-#if defined (WIN32)
+#ifdef WIN32
 #include <malloc.h>
 #else
-#if defined (__FreeBSD__)
-#include <stdlib.h>
-#else
 #include <alloca.h>
 #endif
-#endif
 
 class BU_Joint;
 
@@ -49,7 +45,7 @@ class BU_Joint;
 
 OdeConstraintSolver::OdeConstraintSolver():
 m_cfm(1e-5f),
-m_erp(0.4f)
+m_erp(0.3f)
 {
 }
 
index 849e57d1088675d213ac9fb092b354c1053aa89e..4111de679d03fcbc0c49e27f4861e81070fe4c7a 100644 (file)
@@ -231,5 +231,4 @@ void Solve2LinearConstraint::resolveAngularConstraint(      const SimdMatrix3x3& invI
                                                                                        SimdScalar& imp0,SimdScalar& imp1)
 {
 
-}
-
+}
\ No newline at end of file
index 311fd8b5eed6b76148030fae3a1065bd4884e66b..ea9240c2bcfd26a7d93d02b17b41fe0f982ede80 100644 (file)
 #include <string.h>
 #include <stdio.h>
 
-#if defined (WIN32)
+#ifdef WIN32
 #include <malloc.h>
 #else
-#if defined (__FreeBSD__)
-#include <stdlib.h>
-#else
 #include <alloca.h>
 #endif
-#endif
 
 #include "Dynamics/BU_Joint.h"
 #include "ContactSolverInfo.h"
@@ -842,4 +838,4 @@ void SolveInternal1 (float global_cfm,
 }
 
 
-#endif //USE_SOR_SOLVER
+#endif //USE_SOR_SOLVER
\ No newline at end of file
index 37fe09c26074fe0e2e76225f942252b49e542ea6..7edeaba3dd12b8f053da804c657eea5a72f7561c 100644 (file)
@@ -41,5 +41,4 @@ int dRandInt2 (int n);
 
 #endif //SOR_LCP_H
 
-#endif //USE_SOR_SOLVER
-
+#endif //USE_SOR_SOLVER
\ No newline at end of file
index 0a988adcc7599d6a9c4e0d57033e26e9c5570869..b60b4eefe3468c88f3dd60c774b6de294d124808 100644 (file)
@@ -165,7 +165,7 @@ void ContactJoint::GetInfo2(Info2 *info)
        c2[2] = ccc2[2];
        
        
-       float friction = FRICTION_CONSTANT*m_body0->getFriction() * m_body1->getFriction();
+       float friction = 10.1f;//FRICTION_CONSTANT*m_body0->getFriction() * m_body1->getFriction();
        
        // first friction direction
        if (m_numRows >= 2) 
index 4e1dc8e1669c09187c5bdd3a95ca2c8ab2dab051..54cc5283da01d686119aee1e1992467613470c59 100644 (file)
@@ -30,6 +30,4 @@ public:
        
 
 };
-
-#endif //CONTACT_JOINT_H
-
+#endif //CONTACT_JOINT_H
\ No newline at end of file
index e0e4e87bc8a0fe2f58d9c9f80d004266641e8aa6..892e1c0b9a8dd52cb6d2ac3b041bf77274274d8e 100644 (file)
@@ -15,5 +15,4 @@ struct MassProps {
 };
 
 
-#endif
-
+#endif
\ No newline at end of file
index f7c31dd0d68570c8e7d98d34ee758dcf5790e9f5..a6c0fda96f3676a089ef224a61ac0b2e471fa4b6 100644 (file)
@@ -58,6 +58,11 @@ void RigidBody::getAabb(SimdVector3& aabbMin,SimdVector3& aabbMax) const
 void   RigidBody::SetCollisionShape(CollisionShape* mink)
 {
        m_collisionShape = mink;
+       SimdTransform ident;
+       ident.setIdentity();
+       SimdVector3 aabbMin,aabbMax;
+       m_collisionShape ->GetAabb(ident,aabbMin,aabbMax);
+       SimdVector3 diag = (aabbMax-aabbMin)*0.5f;
 }
 
 
index 919d1f9e58c5eeb83e6ecbe91738e2ac9c1fb3f0..5ddacd05d050dfb18b906cb81ffd6013c07f9cb6 100644 (file)
@@ -39,12 +39,10 @@ CcdPhysicsController::CcdPhysicsController (const CcdConstructionInfo& ci)
        MassProps mp(ci.m_mass, ci.m_localInertiaTensor);
 
        m_body = new RigidBody(mp,0,0,ci.m_friction,ci.m_restitution);
-
-       m_body->SetCollisionShape( ci.m_collisionShape);
-
        
        m_broadphaseHandle = ci.m_broadphaseHandle;
 
+       m_collisionShape = ci.m_collisionShape;
 
        //
        // init the rigidbody properly
@@ -69,6 +67,7 @@ CcdPhysicsController::CcdPhysicsController (const CcdConstructionInfo& ci)
 CcdPhysicsController::~CcdPhysicsController()
 {
        //will be reference counted, due to sharing
+       //delete m_collisionShape;
        delete m_MotionState;
        delete m_body;
 }
@@ -90,18 +89,12 @@ bool                CcdPhysicsController::SynchronizeMotionStates(float time)
        m_MotionState->getWorldScaling(scale[0],scale[1],scale[2]);
        
        SimdVector3 scaling(scale[0],scale[1],scale[2]);
-       m_body->GetCollisionShape()->setLocalScaling(scaling);
+       m_collisionShape->setLocalScaling(scaling);
 
-       return true;
-}
 
-CollisionShape*        CcdPhysicsController::GetCollisionShape() 
-{ 
-       return m_body->GetCollisionShape();
+       return true;
 }
 
-
-
                /**
                        WriteMotionStateToDynamics synchronizes dynas, kinematic and deformable entities (and do 'late binding')
                */
index 478e0e66a39027d5d5af5f36f9cefa7f1e95bc2a..4f189b7f32471aa6ac12530d5c5d2024382ed85f 100644 (file)
@@ -53,6 +53,7 @@ class CcdPhysicsController : public PHY_IPhysicsController
 {
        RigidBody* m_body;
        class   PHY_IMotionState*                       m_MotionState;
+       CollisionShape*                 m_collisionShape;
        void*           m_newClientInfo;
 
        void GetWorldOrientation(SimdMatrix3x3& mat);
@@ -70,7 +71,7 @@ class CcdPhysicsController : public PHY_IPhysicsController
 
                RigidBody* GetRigidBody() { return m_body;}
 
-               CollisionShape* GetCollisionShape();
+               CollisionShape* GetCollisionShape() { return m_collisionShape;}
                ////////////////////////////////////
                // PHY_IPhysicsController interface
                ////////////////////////////////////
index 558f294344aa0e0fce723c932fb7fede4fbe85f9..b68e730b4c6305ccdab172c307f1e8a1a3c6fa78 100644 (file)
@@ -118,7 +118,6 @@ void        CcdPhysicsEnvironment::addCcdPhysicsController(CcdPhysicsController* ctrl)
        
        BroadphaseInterface* scene =  m_broadphase;
        
-
        CollisionShape* shapeinterface = ctrl->GetCollisionShape();
        
        assert(shapeinterface);
@@ -172,7 +171,7 @@ void        CcdPhysicsEnvironment::addCcdPhysicsController(CcdPhysicsController* ctrl)
                        maxAabb);
        }
        
-       
+       body->SetCollisionShape( shapeinterface );
        
        
        
index 1bf92b4effc4d1e7b7159be542efd45e2a356772..b8521ffaf8784ecaf6157f015213239f3c6709d5 100644 (file)
 
 #include "PHY_IMotionState.h"
 
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
 PHY_IMotionState::~PHY_IMotionState()
 {
 
index 655763d0bf6b2690856de1b488772a489854046b..b051a45bd13236763f0b2bdfd05d208f5da5fa19 100644 (file)
 
 #include "PHY_IPhysicsController.h"
 
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
 PHY_IPhysicsController::~PHY_IPhysicsController()
 {
 
index f59efad561ad6d6b9929a43e2d987f346c56d307..1794606edf38ceb761d614b31065d7df3ad060cc 100644 (file)
 
 #include "PHY_IPhysicsEnvironment.h"
 
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
 /**
 *      Physics Environment takes care of stepping the simulation and is a container for physics entities (rigidbodies,constraints, materials etc.)
 *      A derived class may be able to 'construct' entities by loading and/or converting
index 77271e1320248b8c30e732db6da7651fc57bc9f7..27172f93139a7f1420af3c515bd306c7919d8b16 100644 (file)
@@ -64,5 +64,4 @@ SIMD_FORCE_INLINE bool TestTriangleAgainstAabb2(const SimdVector3 *vertices,
        return true;
 }
 
-#endif
-
+#endif
\ No newline at end of file
index 7734eccf510ef3aa25969f8855d97f68c054d0f5..be2e421a77ee3c74f99f995d65048d7c7c55d996 100644 (file)
@@ -57,5 +57,4 @@ class IDebugDraw
 
 };
 
-#endif //IDEBUG_DRAW__H
-
+#endif //IDEBUG_DRAW__H
\ No newline at end of file
index a9967682d61f9070355d6136d65e966b2e38f887..492981fb303262b88d3791db367ee872d1c57241 100644 (file)
@@ -109,38 +109,6 @@ class      SimdQuadWord
                }
 
 
-               SIMD_FORCE_INLINE void  setMax(const SimdQuadWord& other)
-               {
-                       if (other.m_x > m_x)
-                               m_x = other.m_x;
-
-                       if (other.m_y > m_y)
-                               m_y = other.m_y;
-
-                       if (other.m_z > m_z)
-                               m_z = other.m_z;
-
-                       if (other.m_unusedW > m_unusedW)
-                               m_unusedW = other.m_unusedW;
-               }
-
-               SIMD_FORCE_INLINE void  setMin(const SimdQuadWord& other)
-               {
-                       if (other.m_x < m_x)
-                               m_x = other.m_x;
-
-                       if (other.m_y < m_y)
-                               m_y = other.m_y;
-
-                       if (other.m_z < m_z)
-                               m_z = other.m_z;
-
-                       if (other.m_unusedW < m_unusedW)
-                               m_unusedW = other.m_unusedW;
-               }
-
-
-
 };
 
 #endif //SIMD_QUADWORD_H
index f20de0d06d90c076a1fdc8755169fd34d295defb..4ea359db1b65366da8c7a003b56d9b10f5e53915 100644 (file)
@@ -39,8 +39,7 @@ DEALINGS IN THE SOFTWARE.
 #include <float.h>
 
 #ifdef WIN32
-#pragma warning(disable:4530)
-#pragma warning(disable:4996)
+
 #ifdef __MINGW32__
 #define SIMD_FORCE_INLINE inline
 #else
@@ -60,6 +59,8 @@ DEALINGS IN THE SOFTWARE.
 #endif
 
 
+
+
 #define ASSERT assert
 
 #endif
@@ -118,16 +119,6 @@ SIMD_FORCE_INLINE bool     SimdEqual(SimdScalar a, SimdScalar eps) {
 SIMD_FORCE_INLINE bool SimdGreaterEqual (SimdScalar a, SimdScalar eps) {
        return (!((a) <= eps));
 }
-
-/*SIMD_FORCE_INLINE SimdScalar SimdCos(SimdScalar x) { return cosf(x); }
-SIMD_FORCE_INLINE SimdScalar SimdSin(SimdScalar x) { return sinf(x); }
-SIMD_FORCE_INLINE SimdScalar SimdTan(SimdScalar x) { return tanf(x); }
-SIMD_FORCE_INLINE SimdScalar SimdAcos(SimdScalar x) { return acosf(x); }
-SIMD_FORCE_INLINE SimdScalar SimdAsin(SimdScalar x) { return asinf(x); }
-SIMD_FORCE_INLINE SimdScalar SimdAtan(SimdScalar x) { return atanf(x); }
-SIMD_FORCE_INLINE SimdScalar SimdAtan2(SimdScalar x, SimdScalar y) { return atan2f(x, y); }
-*/
-
 SIMD_FORCE_INLINE int       SimdSign(SimdScalar x) {
     return x < 0.0f ? -1 : x > 0.0f ? 1 : 0;
 }
index ab3d3f45a302149eab804e05720ab38649db80a2..179e2f51daa24cdefd14c98dad271a46da79f695 100644 (file)
@@ -91,5 +91,4 @@ public:
 
 };
 
-#endif //SIMD_TRANSFORM_UTIL_H
-
+#endif //SIMD_TRANSFORM_UTIL_H
\ No newline at end of file
index 453d18aff6d1e10b73b8505e2a1779142b2dda0a..ae3763d6e45690385315c58484d0d86855d72290 100644 (file)
@@ -57,13 +57,7 @@ bullet_sources = ['Bullet/BroadphaseCollision/BroadphaseProxy.cpp',
                                'Bullet/CollisionShapes/StridingMeshInterface.cpp',
                                'Bullet/CollisionShapes/TriangleMesh.cpp',
                                'Bullet/CollisionShapes/TriangleMeshShape.cpp',
-                               'Bullet/CollisionShapes/BvhTriangleMeshShape.cpp',
-                               'Bullet/CollisionShapes/ConvexTriangleCallback.cpp',
-                               'Bullet/CollisionShapes/EmptyShape.cpp',
-                               'Bullet/CollisionShapes/OptimizedBvh.cpp',
-                               'Bullet/CollisionShapes/TriangleCallback.cpp',
-                               'Bullet/CollisionShapes/TriangleIndexVertexArray.cpp',
-                                                                                       
+                               
                                'Bullet/NarrowPhaseCollision/BU_AlgebraicPolynomialSolver.cpp',
                                'Bullet/NarrowPhaseCollision/BU_Collidable.cpp',
                                'Bullet/NarrowPhaseCollision/BU_CollisionPair.cpp',
@@ -79,8 +73,7 @@ bullet_sources = ['Bullet/BroadphaseCollision/BroadphaseProxy.cpp',
                                'Bullet/NarrowPhaseCollision/RaycastCallback.cpp',
                                'Bullet/NarrowPhaseCollision/SubSimplexConvexCast.cpp',
                                'Bullet/NarrowPhaseCollision/VoronoiSimplexSolver.cpp',
-                               'Bullet/NarrowPhaseCollision/ManifoldContactAddResult.cpp',
-                                                               
+                               
                                'BulletDynamics/CollisionDispatch/ConvexConcaveCollisionAlgorithm.cpp',
                                'BulletDynamics/CollisionDispatch/ConvexConvexAlgorithm.cpp',
                                'BulletDynamics/CollisionDispatch/EmptyCollisionAlgorithm.cpp',
index 60c6b02a92418df00991d8a1d0dafc12646fc164..f0cd96247d288254db2176e1b1d12334a86bd9d8 100644 (file)
@@ -716,6 +716,9 @@ ECHO Done
                                <File
                                        RelativePath="..\..\Bullet\NarrowPhaseCollision\BU_VertexPoly.h">
                                </File>
+                               <File
+                                       RelativePath="..\..\Bullet\NarrowPhaseCollision\CollisionMargin.h">
+                               </File>
                                <File
                                        RelativePath="..\..\Bullet\NarrowPhaseCollision\ContinuousConvexCollision.h">
                                </File>
@@ -793,9 +796,6 @@ ECHO Done
                                                        ObjectFile="$(IntDir)/$(InputName)1.obj"/>
                                        </FileConfiguration>
                                </File>
-                               <File
-                                       RelativePath="..\..\Bullet\CollisionShapes\BvhTriangleMeshShape.cpp">
-                               </File>
                                <File
                                        RelativePath="..\..\Bullet\CollisionShapes\CollisionShape.cpp">
                                        <FileConfiguration
@@ -904,9 +904,6 @@ ECHO Done
                                                        ObjectFile="$(IntDir)/$(InputName)1.obj"/>
                                        </FileConfiguration>
                                </File>
-                               <File
-                                       RelativePath="..\..\Bullet\CollisionShapes\ConvexTriangleCallback.cpp">
-                               </File>
                                <File
                                        RelativePath="..\..\Bullet\CollisionShapes\CylinderShape.cpp">
                                        <FileConfiguration
@@ -934,9 +931,6 @@ ECHO Done
                                                        ObjectFile="$(IntDir)/$(InputName)1.obj"/>
                                        </FileConfiguration>
                                </File>
-                               <File
-                                       RelativePath="..\..\Bullet\CollisionShapes\EmptyShape.cpp">
-                               </File>
                                <File
                                        RelativePath="..\..\Bullet\CollisionShapes\MinkowskiSumShape.cpp">
                                        <FileConfiguration
@@ -991,9 +985,6 @@ ECHO Done
                                                        ObjectFile="$(IntDir)/$(InputName)1.obj"/>
                                        </FileConfiguration>
                                </File>
-                               <File
-                                       RelativePath="..\..\Bullet\CollisionShapes\OptimizedBvh.cpp">
-                               </File>
                                <File
                                        RelativePath="..\..\Bullet\CollisionShapes\PolyhedralConvexShape.cpp">
                                        <FileConfiguration
@@ -1102,12 +1093,6 @@ ECHO Done
                                                        ObjectFile="$(IntDir)/$(InputName)1.obj"/>
                                        </FileConfiguration>
                                </File>
-                               <File
-                                       RelativePath="..\..\Bullet\CollisionShapes\TriangleCallback.cpp">
-                               </File>
-                               <File
-                                       RelativePath="..\..\Bullet\CollisionShapes\TriangleIndexVertexArray.cpp">
-                               </File>
                                <File
                                        RelativePath="..\..\Bullet\CollisionShapes\TriangleMesh.cpp">
                                        <FileConfiguration
@@ -1169,12 +1154,6 @@ ECHO Done
                                <File
                                        RelativePath="..\..\Bullet\CollisionShapes\BoxShape.h">
                                </File>
-                               <File
-                                       RelativePath="..\..\Bullet\CollisionShapes\BvhTriangleMeshShape.h">
-                               </File>
-                               <File
-                                       RelativePath="..\..\Bullet\CollisionShapes\CollisionMargin.h">
-                               </File>
                                <File
                                        RelativePath="..\..\Bullet\CollisionShapes\CollisionShape.h">
                                </File>
@@ -1187,24 +1166,15 @@ ECHO Done
                                <File
                                        RelativePath="..\..\Bullet\CollisionShapes\ConvexShape.h">
                                </File>
-                               <File
-                                       RelativePath="..\..\Bullet\CollisionShapes\ConvexTriangleCallback.h">
-                               </File>
                                <File
                                        RelativePath="..\..\Bullet\CollisionShapes\CylinderShape.h">
                                </File>
-                               <File
-                                       RelativePath="..\..\Bullet\CollisionShapes\EmptyShape.h">
-                               </File>
                                <File
                                        RelativePath="..\..\Bullet\CollisionShapes\MinkowskiSumShape.h">
                                </File>
                                <File
                                        RelativePath="..\..\Bullet\CollisionShapes\MultiSphereShape.h">
                                </File>
-                               <File
-                                       RelativePath="..\..\Bullet\CollisionShapes\OptimizedBvh.h">
-                               </File>
                                <File
                                        RelativePath="..\..\Bullet\CollisionShapes\PolyhedralConvexShape.h">
                                </File>
@@ -1220,9 +1190,6 @@ ECHO Done
                                <File
                                        RelativePath="..\..\Bullet\CollisionShapes\TriangleCallback.h">
                                </File>
-                               <File
-                                       RelativePath="..\..\Bullet\CollisionShapes\TriangleIndexVertexArray.h">
-                               </File>
                                <File
                                        RelativePath="..\..\Bullet\CollisionShapes\TriangleMesh.h">
                                </File>
index 98eed6bb1040839ba978618e610b12618c9942b3..28421b9f2e4ee573532fb64c2fc0269abce8a0ac 100644 (file)
@@ -231,12 +231,8 @@ SND_OpenALDevice::SND_OpenALDevice()
                        m_context = alcCreateContext(dev, NULL);
 
                        if (m_context) {
-#ifdef AL_VERSION_1_1
-               alcMakeContextCurrent((ALCcontext*)m_context);
-#else
-                       alcMakeContextCurrent(m_context);
-#endif
-                       m_audio = true;
+                               alcMakeContextCurrent((ALCcontext*)m_context);
+                               m_audio = true;
                                m_device = dev;
 #ifdef __linux__
                                /*
@@ -343,11 +339,7 @@ SND_OpenALDevice::~SND_OpenALDevice()
        
        if (m_context) {
                MakeCurrent();
-#ifdef AL_VERSION_1_1
                alcDestroyContext((ALCcontext*)m_context);
-#else
-               alcDestroyContext(m_context);
-#endif
                m_context = NULL;
        }
        
@@ -418,7 +410,7 @@ SND_WaveSlot* SND_OpenALDevice::LoadSample(const STR_String& name,
                                        waveslot->SetFileSize(size);
                                        
                                        /* what was (our) buffer? */
-                                       int buffer = waveslot->GetBuffer();
+                                       buffer = waveslot->GetBuffer();
                                        
                                        /* get some info out of the sample */
                                        SND_GetSampleInfo((signed char*)memlocation, waveslot);
@@ -427,14 +419,9 @@ SND_WaveSlot* SND_OpenALDevice::LoadSample(const STR_String& name,
                                        
                                        /* load the sample into openal */
 #if defined(OUDE_OPENAL) || defined (__APPLE__)
-                                       alutLoadWAVMemory((char*)memlocation, &sampleformat, &data, &numberofsamples, &samplerate);                             //      openal_2.12
-#else
-#ifdef AL_VERSION_1_1                                  
-                                       alutLoadWAVMemory((ALbyte*)memlocation, &sampleformat, &data, &numberofsamples, &samplerate, &loop);//  openal_2.14+
+                                       alutLoadWAVMemory((ALbyte *)memlocation, &sampleformat, &data, &numberofsamples, &samplerate);                          //      openal_2.12
 #else
-                                        alutLoadWAVMemory((signed char*)memlocation, &sampleformat, &data, &numberofsamples, &samplerate, &loop);//  openal_2.14+
-                                        
-#endif 
+                                       alutLoadWAVMemory((ALbyte *)memlocation, &sampleformat, &data, &numberofsamples, &samplerate, &loop);// openal_2.14+
 #endif
                                        /* put it in the buffer */
                                        alBufferData(m_buffers[buffer], sampleformat, data, numberofsamples, samplerate);
index 7997a94344b93d0f0df68f2bdd9bde38fda6c811..bbba2c978dd71597ab4d6568bb089b87e17af3c5 100644 (file)
 #include "BMF_BitmapFont.h"
 
 
-#ifdef __APPLE__        
-#include <stdio.h>
-
-static int needs_nvidia_rasterpos_workaround(void)
-{
-       static int well_is_it= -1;
-       
-       if (well_is_it==-1)
-       {
-               well_is_it= (strncmp((char *)glGetString(GL_RENDERER), "NVIDIA GeForce 6800", 18) == 0);
-               if ( well_is_it != 0)
-               {
-                       const GLubyte* vers = glGetString(GL_VERSION);
-                       const GLubyte* v = vers;
-                       int major = 0, minor = 0, sub = 0;
-                       
-                       //advance to the '-'
-                       while ((*v != 0) && (*v!='-'))
-                               v++;
-                       
-                       if (*v == '-')
-                       {
-                               int i = 0;
-                               v++;
-                               
-                               while ((v[i] <= '9') && (v[i] >= '0'))
-                               {
-                                       major *=10;
-                                       major += v[i]-'0';
-                                       i++;
-                               }
-                               
-                               if (v[i] == '.')
-                               {
-                                       i++;
-                                       while ((v[i] <= '9') && (v[i] >= '0'))
-                                       {
-                                               minor *=10;
-                                               minor += v[i]-'0';
-                                               i++;
-                                       }
-                               }
-                               else
-                                       major = -1;
-                               
-                               if (v[i] == '.')
-                               {
-                                       i++;
-                                       while ((v[i] <= '9') && (v[i] >= '0'))
-                                       {
-                                               sub *=10;
-                                               sub += v[i]-'0';
-                                               i++;
-                                       }
-                               }
-                               else
-                                       minor = -1;
-                       }
-
-                       //OS X 10.4.3 is the first version that contained the fix for this problem
-                       // and the 6800's driver version in it is 1.4.16.  So anything after that
-                       // doesn't need the workaround
-
-                       if ( (major == -1) || (minor == -1))
-                       //If anything went wrong don't do the workaround
-                       //
-                               well_is_it = 0;
-                       else if ( (major <= 1) && (minor <= 4) && (sub < 16))
-                               well_is_it = 1;
-                       else
-                               well_is_it = 0;
-               }       
-       }
-
-       return well_is_it;
-}
-
-
-#endif
-
 BMF_BitmapFont::BMF_BitmapFont(BMF_FontData* fontData)
 : m_fontData(fontData)
 {
@@ -154,19 +74,7 @@ void BMF_BitmapFont::DrawString(char* str)
        GLint alignment;
        unsigned char c;
 
-#ifdef __APPLE__        
-     GLint vp[4];  // hack stuff        
-     GLubyte nullm = 0;      // hack stuff      
-        
-     if(needs_nvidia_rasterpos_workaround()) {  // was is_a_really_crappy_nvidia_card()
-             glGetIntegerv(GL_VIEWPORT, vp);   // hack stuff    
-        
-             glBitmap(1, 1, 0, 0, -vp[0], vp[1], &nullm);       
-        
-         }      
- #endif
-       glGetIntegerv(GL_UNPACK_ALIGNMENT, &alignment);
+       glGetIntegerv(GL_UNPACK_ALIGNMENT, &alignment);
        glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
        
        while ( (c = (unsigned char) *str++) ) {
index bdd3637a5986bcbe0c918a1eb115874a245cf1c2..08928935f33da85c5869a70a4687746dc3c4ad26 100644 (file)
@@ -146,7 +146,7 @@ void BOP_mergeVertexs(BOP_Mesh *mesh, unsigned int firstFace);
  * @param facesB set of faces from object B
  */
 void BOP_Face2Face(BOP_Mesh *mesh, BOP_Faces *facesA, BOP_Faces *facesB)
-{
+{              
        for(unsigned int idxFaceA=0;idxFaceA<facesA->size();idxFaceA++) {
                BOP_Face *faceA = (*facesA)[idxFaceA];
                MT_Plane3 planeA = faceA->getPlane();
@@ -160,28 +160,28 @@ void BOP_Face2Face(BOP_Mesh *mesh, BOP_Faces *facesA, BOP_Faces *facesB)
                        idxFaceB<facesB->size() && (faceA->getTAG() != BROKEN) && (faceA->getTAG() != PHANTOM);) {
                        BOP_Face *faceB = (*facesB)[idxFaceB];
                        if ((faceB->getTAG() != BROKEN) && (faceB->getTAG() != PHANTOM)) {
-                               BOP_BBox boxB(mesh->getVertex(faceB->getVertex(0))->getPoint(),
-                                                         mesh->getVertex(faceB->getVertex(1))->getPoint(),
-                                                         mesh->getVertex(faceB->getVertex(2))->getPoint());
-                               if (boxA.intersect(boxB)) {
+                         BOP_BBox boxB(mesh->getVertex(faceB->getVertex(0))->getPoint(),
+                                       mesh->getVertex(faceB->getVertex(1))->getPoint(),
+                                       mesh->getVertex(faceB->getVertex(2))->getPoint());
+                         if (boxA.intersect(boxB)) {
 
-                                       MT_Plane3 planeB = faceB->getPlane();
-                                       if (BOP_containsPoint(planeB,p1) && 
-                                               BOP_containsPoint(planeB,p2) && 
-                                               BOP_containsPoint(planeB,p3)) {
-                                               if (BOP_orientation(planeB,planeA)>0) {
-                                                       BOP_intersectCoplanarFaces(mesh,facesB,faceA,faceB,false);
-                                               }
-                                       }
-                                       else {
-                                               BOP_intersectNonCoplanarFaces(mesh,facesA,facesB,faceA,faceB);
-                                       }
-                               }                         
+                           MT_Plane3 planeB = faceB->getPlane();
+                           if (BOP_containsPoint(planeB,p1) && 
+                               BOP_containsPoint(planeB,p2) && 
+                               BOP_containsPoint(planeB,p3)) {
+                             if (BOP_orientation(planeB,planeA)>0) {
+                               BOP_intersectCoplanarFaces(mesh,facesB,faceA,faceB,false);
+                             }
+                           }
+                           else {
+                             BOP_intersectNonCoplanarFaces(mesh,facesA,facesB,faceA,faceB);
+                           }
+                         }                       
                        }
                        if (faceB->getTAG()==BROKEN){
-                               facesB->erase(facesB->begin()+idxFaceB);
+                         facesB->erase(facesB->begin()+idxFaceB);
                        }else
-                               idxFaceB++;
+                         idxFaceB++;
                }
        }
        
index 1ef394963ac03387033464336286ff408c2ef6f6..02945340d55e25dd34c0405a764e154955b1597f 100644 (file)
@@ -92,9 +92,9 @@ BoolOpState BOP_performBooleanOperation(BoolOpType                    opType,
                                                                                CSG_VertexIteratorDescriptor  obBVertices,
                                                                                CSG_InterpolateUserFaceVertexDataFunc interpFunc)
 {
-#ifdef DEBUG
+       #ifdef DEBUG
        cout << "BEGIN BOP_performBooleanOperation" << endl;
-#endif
+       #endif
 
        // Set invert flags depending on boolean operation type:
        // INTERSECTION: A^B = and(A,B)
@@ -121,9 +121,6 @@ BoolOpState BOP_performBooleanOperation(BoolOpType                    opType,
        // Add B-mesh into C-mesh
        BOP_addMesh(&meshC, &meshBFacesId, &materials, obBProps, obBFaces, obBVertices, invertMeshB);
 
-       if (!meshC.isClosedMesh())
-               return BOP_NO_SOLID;
-
        // Perform the intersection boolean operation.
        BoolOpState result = BOP_intersectionBoolOp(&meshC, &meshAFacesId, &meshBFacesId, 
                                                                                                invertMeshA, invertMeshB);
@@ -131,9 +128,9 @@ BoolOpState BOP_performBooleanOperation(BoolOpType                    opType,
        // Invert the output mesh if is required
        *outputMesh = BOP_exportMesh(&meshC, &materials, outputProps, invertMeshC);
 
-#ifdef DEBUG
+       #ifdef DEBUG
        cout << "END BOP_performBooleanOperation" << endl;
-#endif
+       #endif
        
        return result;
 }
@@ -154,13 +151,13 @@ BoolOpState BOP_intersectionBoolOp(BOP_Mesh*  meshC,
                                                                   bool       invertMeshA,
                                                                   bool       invertMeshB)
 {
-#ifdef DEBUG
+       #ifdef DEBUG
        BOP_Chrono chrono;
        float t = 0.0f;
        float c = 0.0f;
        chrono.start();  
        cout << "---" << endl;
-#endif
+       #endif
 
        // Create BSPs trees for mesh A & B
        BOP_BSPTree bspA;
@@ -171,10 +168,10 @@ BoolOpState BOP_intersectionBoolOp(BOP_Mesh*  meshC,
        bspB.addMesh(meshC, *facesB);
        bspB.computeBox();
        
-#ifdef DEBUG
+       #ifdef DEBUG
        c = chrono.stamp(); t += c;
        cout << "Create BSP     " << c << endl; 
-#endif
+       #endif
 
        unsigned int numVertices = meshC->getNumVertexs();
        
@@ -187,54 +184,54 @@ BoolOpState BOP_intersectionBoolOp(BOP_Mesh*  meshC,
        if ((0.25*facesB->size()) > bspA.getDeep())
          BOP_meshFilter(meshC, facesB, &bspA);
        
-#ifdef DEBUG
+       #ifdef DEBUG
        c = chrono.stamp(); t += c;
        cout << "mesh Filter    " << c << endl; 
-#endif
+       #endif
 
        // Face 2 Face
        BOP_Face2Face(meshC,facesA,facesB);
 
-#ifdef DEBUG
+       #ifdef DEBUG
        c = chrono.stamp(); t += c;
        cout << "Face2Face      " << c << endl;
-#endif
+       #endif
 
        // BSP classification
        BOP_meshClassify(meshC,facesA,&bspB);
        BOP_meshClassify(meshC,facesB,&bspA);
        
-#ifdef DEBUG
+       #ifdef DEBUG
        c = chrono.stamp(); t += c;
        cout << "Classification " << c << endl;
-#endif
+       #endif
        
        // Process overlapped faces
        BOP_removeOverlappedFaces(meshC,facesA,facesB);
        
-#ifdef DEBUG
+       #ifdef DEBUG
        c = chrono.stamp(); t += c;
        cout << "Remove overlap " << c << endl;
-#endif
+       #endif
 
        // Sew two meshes
        BOP_sew(meshC,facesA,facesB);
 
-#ifdef DEBUG
+       #ifdef DEBUG
        c = chrono.stamp(); t += c;
        cout << "Sew            " << c << endl;
-#endif
+       #endif
 
        // Merge faces
        BOP_Merge::getInstance().mergeFaces(meshC,numVertices);
 
-#ifdef DEBUG
+       #ifdef DEBUG
        c = chrono.stamp(); t += c;
        cout << "Merge faces    " << c << endl;
        cout << "Total          " << t << endl;
        // Test integrity
        meshC->testMesh();
-#endif
+       #endif
        
        return BOP_OK;
 }
index a7e7ef61e435e2fa2d84942187eb1ed2b73db347..24d5b3fb6a90b64df4cadd8865750a8ab36d99b8 100644 (file)
@@ -553,23 +553,6 @@ BOP_Index BOP_Mesh::replaceVertexIndex(BOP_Index oldIndex, BOP_Index newIndex)
        return newIndex;
 }
 
-bool BOP_Mesh::isClosedMesh()
-{
-       for(unsigned int i=0; i<m_edges.size(); i++) {
-               BOP_Edge *edge = m_edges[i];
-               BOP_Indexs faces = edge->getFaces();
-               unsigned int count = 0;
-               const BOP_IT_Indexs facesEnd = faces.end();
-               for(BOP_IT_Indexs it = faces.begin();it!=facesEnd;it++) {
-                       if (m_faces[*it]->getTAG()!=BROKEN)
-                               count++;
-               }
-
-               if ((count%2)!=0) return false;
-       }
-
-       return true;
-}
 
 
 /** ***************************************************************************
index adc92c915594e9d50523b4173257fdc89ea6c258..6751df7c4e76058f12db0be546c4111acd447290 100644 (file)
@@ -82,7 +82,6 @@ public:
        unsigned int getNumVertexs(BOP_TAG tag);
        unsigned int getNumFaces(BOP_TAG tag);
        BOP_Index replaceVertexIndex(BOP_Index oldIndex, BOP_Index newIndex);
-       bool isClosedMesh();
        
        // Debug functions
        void print();
index 77ba076885f9a64227c4c1d46afc4a6b463dfafe..453e6e20ea7346ffa919b84f9c5d6e04d986ed83 100755 (executable)
@@ -178,6 +178,7 @@ BSP_CSGMesh_FaceIt_Fill(
        // assume CSG_IteratorPtr is of the correct type.
        BSP_CSGMesh_FaceIt * face_it = (BSP_CSGMesh_FaceIt *)it;                
        // essentially iterating through a triangle fan here.
+       const int tri_index = face_it->face_triangle;
 
        if (face_it->pos->m_verts.size()>3) {
                // QUAD
index 9ea0ef60be51e72e3b5278e98d315e7f68346d80..6c9fecd88e14feb7703b5061cf10b350ae5b7757 100755 (executable)
  * Implementation of external api for CSG part of BSP lib interface.
  */
 
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
 #include "../extern/CSG_BooleanOps.h"
 #include "BSP_CSGMesh_CFIterator.h"
 #include "BSP_CSGMeshBuilder.h"
@@ -43,7 +47,7 @@
 #include "../../boolop/extern/BOP_Interface.h"
 #include <iostream>
 using namespace std;
-#include "BSP_MeshPrimitives.h"
+#include "BSP_MeshPrimitives.h";
 
 struct BSP_MeshInfo {
        BSP_CSGMesh *output_mesh;
@@ -99,20 +103,22 @@ CSG_DescibeOperands(
 /**
  * Compute the boolean operation, UNION, INTERSECION or DIFFERENCE
  */
-int
+       int
 CSG_PerformBooleanOperation(
-                                                       CSG_BooleanOperation                 *operation,
-                                                       CSG_OperationType                     op_type,
-                                                       CSG_FaceIteratorDescriptor            obAFaces,
-                                                       CSG_VertexIteratorDescriptor          obAVertices,
-                                                       CSG_FaceIteratorDescriptor            obBFaces,
-                                                       CSG_VertexIteratorDescriptor          obBVertices,
-                                                       CSG_InterpolateUserFaceVertexDataFunc interp_func
+       CSG_BooleanOperation                 *operation,
+       CSG_OperationType                     op_type,
+       CSG_FaceIteratorDescriptor            obAFaces,
+       CSG_VertexIteratorDescriptor          obAVertices,
+       CSG_FaceIteratorDescriptor            obBFaces,
+       CSG_VertexIteratorDescriptor          obBVertices,
+       CSG_InterpolateUserFaceVertexDataFunc interp_func
 ){
        if (operation == NULL) return 0;
        BSP_MeshInfo * mesh_info = static_cast<BSP_MeshInfo *>(operation->CSG_info);
        if (mesh_info == NULL) return 0;
 
+       bool success = 1;
+
        obAFaces.Reset(obAFaces.it);
        obBFaces.Reset(obBFaces.it);
        obAVertices.Reset(obAVertices.it);
@@ -122,39 +128,33 @@ CSG_PerformBooleanOperation(
        
        switch( op_type ) {
        case e_csg_union:
-               boolType = BOP_UNION;
-               break;
+         boolType = BOP_UNION;
+         break;
        case e_csg_difference:
-               boolType = BOP_DIFFERENCE;
-               break;
+         boolType = BOP_DIFFERENCE;
+         break;
        default:
-               boolType = BOP_INTERSECTION;
-               break;
+         boolType = BOP_INTERSECTION;
+         break;
        }
 
-       BoolOpState boolOpResult;
        try {
-               boolOpResult= BOP_performBooleanOperation( boolType,
-                                                                                                  mesh_info->output_descriptor,
-                                                                                                  (BSP_CSGMesh**) &(mesh_info->output_mesh),
-                                                                                                  mesh_info->obB_descriptor,
-                                                                                                  obBFaces,
-                                                                                                  obBVertices,
-                                                                                                  mesh_info->obA_descriptor,
-                                                                                                  obAFaces,
-                                                                                                  obAVertices,
-                                                                                                  interp_func );
+       BOP_performBooleanOperation( boolType,
+                                    mesh_info->output_descriptor,
+                                    (BSP_CSGMesh**) &(mesh_info->output_mesh),
+                                        mesh_info->obB_descriptor,
+                                        obBFaces,
+                                        obBVertices,
+                                        mesh_info->obA_descriptor,
+                                    obAFaces,
+                                    obAVertices,
+                                    interp_func );
        }
        catch(...) {
                return 0;
        }
 
-       switch (boolOpResult) {
-       case BOP_OK: return 1;
-       case BOP_NO_SOLID: return -2;
-       case BOP_ERROR: return 0;
-       default: return 1;
-       }
+       return success;
 }
 
        int
index 5d30b58a98230ac8a14332934360deeb08912632..3ef20b9be3af4aa302a94a4ce6d510c2135d82cb 100644 (file)
@@ -10,8 +10,6 @@ elbeem_env.Append(CPPDEFINES= [('ELBEEM_BLENDER',1)] );
 if use_fluidsim=='false':
        # print "El'Beem Fluid Simulation Disabled..." # debug
        elbeem_env.Append (CPPPATH = user_options_dict['PNG_INCLUDE'])
-       elbeem_env.Append (CPPPATH = user_options_dict['SDL_INCLUDE'])
-       elbeem_env.Append(CPPDEFINES= 'ELBEEM_DUMMIES');
        # dummy interface build
        Sources = [ 
                "intern/utilities.cpp",
index 3111c9359dd6264b509e94420cf9f86d0413d023..4d672dee528bcecf9d2b9a944aeb0bf030bd5b8f 100644 (file)
@@ -9,30 +9,11 @@
  *
  *****************************************************************************/
  
-#ifdef ELBEEM_DUMMIES
-
 #include <stdlib.h>
-#include "ntl_vector3dim.h"
 
 extern "C" 
 int performElbeemSimulation(char *cfgfilename) {
-       return 1; // dummy
+       return 1;
 };
 
-// dummies from intern/elbeem/intern/solver_interface.cpp
-// for utilities.cpp
-
-void initGridSizes(int &sizex, int &sizey, int &sizez,
-               ntlVec3Gfx &geoStart, ntlVec3Gfx &geoEnd, 
-               int mMaxRefine, bool parallel) 
-{
-       // dummy
-}
-
-void calculateMemreqEstimate( int resx,int resy,int resz, int refine,
-               double *reqret, string *reqstr) {
-       *reqret =  0.0; // dummy
-}
-
-#endif // ELBEEM_DUMMIES
 
index 0bc9d96b5b23e98ec1f5ff3516de466a111c9d9c..472c692945111eaa05abda780fb238d8fedc855f 100644 (file)
@@ -430,16 +430,16 @@ static yyconst flex_int32_t yy_ec[256] =
         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
         1,    4,    1,    5,    6,    1,    1,    1,    1,    1,
-        1,    7,    8,    1,    9,   10,   11,   12,   12,   12,
-       12,   12,   12,   12,   12,   12,   12,   13,   14,    1,
-       15,    1,    1,    1,   18,   19,   20,   21,   22,   23,
-       24,   25,   26,   27,   28,   29,   30,   31,   32,   33,
-       34,   35,   36,   37,   38,   39,   40,   41,   42,   34,
-        1,   16,    1,    1,   17,    1,   18,   19,   20,   21,
-
-       22,   23,   24,   25,   26,   27,   28,   29,   30,   31,
-       32,   33,   34,   35,   36,   37,   38,   39,   40,   41,
-       42,   34,   43,    1,   44,    1,    1,    1,    1,    1,
+        1,    7,    1,    1,    8,    9,   10,   11,   11,   11,
+       11,   11,   11,   11,   11,   11,   11,   12,   13,    1,
+       14,    1,    1,    1,   17,   18,   19,   20,   21,   22,
+       23,   24,   25,   26,   27,   28,   29,   30,   31,   32,
+       33,   34,   35,   36,   37,   38,   39,   40,   41,   33,
+        1,   15,    1,    1,   16,    1,   17,   18,   19,   20,
+
+       21,   22,   23,   24,   25,   26,   27,   28,   29,   30,
+       31,   32,   33,   34,   35,   36,   37,   38,   39,   40,
+       41,   33,   42,    1,   43,    1,    1,    1,    1,    1,
         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
@@ -456,103 +456,103 @@ static yyconst flex_int32_t yy_ec[256] =
         1,    1,    1,    1,    1
     } ;
 
-static yyconst flex_int32_t yy_meta[45] =
+static yyconst flex_int32_t yy_meta[44] =
     {   0,
-        1,    2,    3,    4,    1,    1,    1,    5,    5,    6,
-        5,    6,    5,    2,    1,    5,    6,    6,    6,    6,
+        1,    2,    3,    4,    1,    1,    1,    5,    6,    5,
+        6,    5,    2,    1,    5,    6,    6,    6,    6,    6,
         6,    6,    6,    6,    6,    6,    6,    6,    6,    6,
         6,    6,    6,    6,    6,    6,    6,    6,    6,    6,
-        6,    6,    1,    1
+        6,    1,    1
     } ;
 
-static yyconst flex_int16_t yy_base[575] =
+static yyconst flex_int16_t yy_base[576] =
     {   0,
-        0,    0,   44,    0,   87,  130,  713,  714,   95,  714,
-      102,    0,    0,   84,  700,   96,   90,   85,   91,   92,
-       86,   83,  122,  689,   82,   85,  101,  111,  133,  118,
-      137,  128,  125,  677,  136,  124,  166,  167,  173,    0,
-      174,    0,  704,  177,  173,  714,  181,  185,  188,  191,
-      192,  703,    0,  695,  187,  694,  714,    0,  188,  668,
-      685,  175,  670,  665,  681,  180,  659,  167,  178,  190,
-      192,  678,  676,  668,  667,  657,  655,  200,  661,  653,
-      659,  666,  657,  182,  653,  657,  656,  658,  661,  652,
-      714,  660,  649,  191,  638,  205,  661,  199,  660,  641,
-
-      208,  643,  636,  639,  637,  231,  235,  236,  240,    0,
-      241,    0,  667,  666,  245,    0,  246,  714,    0,  644,
-      643,  229,  642,  645,  631,  637,  633,  632,  714,  625,
-      625,  628,  626,  620,  631,  627,  632,  714,  621,  617,
-      630,  625,  608,  619,  612,  617,  624,  609,  619,  615,
-      620,  606,  605,  617,  222,  608,  714,  611,  605,  604,
-      592,  607,  595,  609,  595,  608,  596,  606,  606,  603,
-      589,  586,  591,  599,  598,  597,  596,  580,  590,  252,
-      576,  592,  578,  575,  593,  590,  583,  584,  586,  575,
-      569,  567,  229,  585,  578,  570,  578,  561,  566,  575,
-
-      227,  575,  714,  573,  563,  571,  557,  553,  553,  571,
-      553,  569,  554,  714,  553,  562,  551,  714,  558,  557,
-      556,  542,  543,  551,  558,  553,  545,  541,  534,  536,
-      533,  539,  532,  537,  714,  714,  546,  543,  545,  541,
-      531,  543,  542,  530,  521,  538,  521,  533,  714,  529,
-      527,  714,  517,  516,  239,  528,  529,  512,  521,  714,
-      514,  527,  515,  507,  520,  504,  503,  504,  714,  501,
-      511,  494,  500,  505,  498,  511,  502,  714,  498,  503,
-      510,  488,  506,  490,  486,  483,  493,  499,  714,  488,
-      244,  501,  714,  477,  488,  714,  479,  485,  479,  487,
-
-      714,  474,  479,  475,  491,  488,  714,  485,  484,  473,
-      478,  486,  465,  479,  469,  478,  468,  478,  468,  466,
-      459,  714,  470,  714,  474,  470,  714,  448,  452,  466,
-      469,  455,  453,  464,  461,  456,  461,  443,  449,  460,
-      714,  456,  249,  458,  434,  714,  452,  444,  450,  434,
-      452,  432,  430,  449,  445,  245,  436,  425,  442,  421,
-      443,  425,  714,  422,  436,  435,  426,  429,  714,  412,
-      435,  423,  429,  426,  423,  419,  410,  714,  415,  419,
-      408,  412,  424,  415,  422,  404,  416,  416,  399,  400,
-      252,  714,  408,  238,  714,  397,  410,  400,  393,  397,
-
-      393,  402,  246,  407,  403,  402,  401,  385,  395,  714,
-      714,  714,  714,  387,  714,  399,  714,  385,  385,  396,
-      714,  378,  714,  383,  388,  391,  373,  378,  376,  714,
-      714,  382,  387,  384,  383,  369,  379,  714,  376,  714,
-      365,  379,  362,  358,  362,  364,  377,  359,  363,  363,
-      714,  362,  353,  369,  714,  366,  350,  355,  363,  349,
-      359,  364,  359,  344,  348,  359,  340,  344,  344,  341,
-      347,  347,  341,  714,  714,  335,  333,  350,  330,  333,
-      343,  714,  714,  714,  329,  714,  714,  338,  326,  325,
-      714,  714,  339,  318,  321,  714,  331,  330,  326,  334,
-
-      316,  334,  314,  328,  714,  714,  328,  316,  714,  316,
-      320,  714,  714,  714,  313,  714,  318,  325,  303,  714,
-      319,  315,  305,  714,  714,  261,  299,  300,  300,  278,
-      297,  277,  290,  714,  714,  287,  280,  268,  256,  254,
-      252,  252,  251,  714,  714,  256,  248,  231,  714,  228,
-      197,  714,  714,  207,  167,  149,  714,  150,  106,  714,
-      714,  101,  714,  714,  714,  294,  297,  303,   89,  309,
-      315,  321,  327,  333
+        0,    0,   43,   86,  128,  170,  704,  705,   60,  705,
+       63,    0,    0,   43,  692,   53,   50,   47,   53,   78,
+       47,   39,   87,  681,   43,   82,   54,   80,  117,   92,
+       93,  112,  116,  669,   99,  123,  138,  149,  152,    0,
+      141,    0,  695,  156,  101,  705,  157,  160,  163,  175,
+      180,  694,    0,  687,  176,  686,  705,    0,  177,  660,
+      677,  153,  662,  657,  673,  101,  651,  161,   46,  175,
+      178,  670,  668,  660,  659,  649,  647,  186,  653,  645,
+      651,  658,  649,  168,  645,  649,  648,  650,  653,  644,
+      705,  652,  641,  174,  630,  192,  653,  131,  652,  633,
+
+      198,  635,  628,  631,  629,  214,  219,  222,  226,    0,
+      227,    0,  658,  657,  230,    0,  235,  705,    0,  636,
+      635,  146,  634,  637,  623,  629,  625,  624,  705,  617,
+      617,  620,  618,  612,  623,  619,  624,  705,  613,  609,
+      622,  617,  600,  611,  604,  609,  616,  601,  611,  607,
+      612,  598,  597,  609,  206,  600,  705,  603,  597,  596,
+      584,  599,  587,  601,  587,  600,  588,  598,  598,  595,
+      581,  578,  583,  591,  590,  589,  588,  572,  582,  238,
+      568,  584,  570,  567,  585,  582,  575,  576,  578,  567,
+      561,  559,  183,  577,  570,  562,  570,  553,  558,  567,
+
+      216,  567,  705,  565,  555,  563,  549,  545,  545,  563,
+      545,  561,  546,  705,  545,  554,  543,  705,  550,  549,
+      548,  534,  535,  543,  550,  545,  537,  533,  526,  528,
+      525,  531,  524,  529,  705,  705,  538,  535,  537,  533,
+      523,  535,  534,  522,  513,  530,  513,  525,  705,  521,
+      519,  705,  509,  508,  221,  520,  521,  504,  513,  705,
+      506,  519,  507,  499,  512,  496,  495,  496,  705,  493,
+      503,  486,  492,  497,  490,  503,  494,  705,  490,  495,
+      502,  480,  498,  482,  478,  475,  485,  491,  705,  480,
+      193,  493,  705,  469,  480,  705,  471,  477,  471,  479,
+
+      705,  466,  471,  467,  483,  480,  705,  477,  476,  465,
+      470,  478,  457,  471,  461,  470,  460,  470,  460,  458,
+      451,  705,  462,  705,  466,  462,  705,  440,  444,  458,
+      461,  447,  445,  456,  453,  448,  453,  435,  441,  452,
+      705,  448,  221,  450,  426,  705,  444,  436,  442,  426,
+      444,  424,  422,  441,  437,  227,  428,  417,  434,  413,
+      435,  417,  705,  414,  428,  427,  418,  421,  705,  404,
+      427,  415,  421,  418,  415,  411,  402,  705,  407,  411,
+      400,  404,  416,  407,  414,  396,  408,  408,  391,  392,
+      227,  705,  400,  219,  705,  389,  402,  392,  385,  389,
+
+      385,  394,  231,  399,  395,  394,  393,  377,  387,  705,
+      705,  705,  705,  379,  705,  391,  705,  377,  377,  388,
+      705,  370,  705,  375,  380,  383,  365,  370,  368,  705,
+      705,  374,  379,  376,  375,  361,  371,  705,  368,  705,
+      357,  371,  354,  350,  354,  356,  369,  351,  355,  355,
+      705,  354,  345,  361,  705,  358,  342,  347,  355,  341,
+      351,  356,  351,  336,  340,  351,  332,  336,  336,  333,
+      339,  339,  333,  705,  705,  327,  325,  342,  322,  325,
+      335,  705,  705,  705,  321,  705,  705,  330,  318,  317,
+      705,  705,  331,  310,  313,  705,  323,  322,  318,  326,
+
+      308,  326,  306,  320,  705,  705,  320,  308,  705,  308,
+      312,  705,  705,  705,  305,  705,  310,  317,  295,  705,
+      311,  307,  300,  705,  705,  236,  299,  305,  309,  287,
+      306,  289,  302,  705,  705,  299,  296,  296,  281,  274,
+      267,  264,  263,  705,  705,  269,  258,  261,  705,  267,
+      250,  705,  705,  245,  225,  222,  705,  212,  166,  705,
+      705,  155,  705,  705,  705,  268,  274,  277,  283,  113,
+      289,  295,  301,  307,  313
     } ;
 
-static yyconst flex_int16_t yy_def[575] =
+static yyconst flex_int16_t yy_def[576] =
     {   0,
-      565,    1,  565,    3,  566,  566,  565,  565,  565,  565,
-      565,  567,  568,  565,  565,  565,  565,  565,  565,  565,
+      565,    1,  566,  566,  567,  567,  565,  565,  565,  565,
+      565,  568,  569,  565,  565,  565,  565,  565,  565,  565,
       565,  565,  565,  565,  565,  565,  565,  565,  565,  565,
-      565,  565,  565,  565,  565,  565,  565,  565,  565,  569,
-      565,  570,  571,  572,  570,  565,  570,  570,  565,  565,
-      565,  567,  568,  565,  565,  565,  565,  573,  565,  565,
+      565,  565,  565,  565,  565,  565,  565,  565,  565,  570,
+      565,  571,  572,  573,  571,  565,  571,  571,  565,  565,
+      565,  568,  569,  565,  565,  565,  565,  574,  565,  565,
       565,  565,  565,  565,  565,  565,  565,  565,  565,  565,
       565,  565,  565,  565,  565,  565,  565,  565,  565,  565,
       565,  565,  565,  565,  565,  565,  565,  565,  565,  565,
       565,  565,  565,  565,  565,  565,  565,  565,  565,  565,
 
-      565,  565,  565,  565,  565,  565,  565,  565,  565,  569,
-      565,  570,  571,  571,  572,  570,  574,  565,  573,  565,
+      565,  565,  565,  565,  565,  565,  565,  565,  565,  570,
+      565,  571,  572,  572,  573,  571,  575,  565,  574,  565,
       565,  565,  565,  565,  565,  565,  565,  565,  565,  565,
       565,  565,  565,  565,  565,  565,  565,  565,  565,  565,
       565,  565,  565,  565,  565,  565,  565,  565,  565,  565,
       565,  565,  565,  565,  565,  565,  565,  565,  565,  565,
       565,  565,  565,  565,  565,  565,  565,  565,  565,  565,
-      565,  565,  565,  565,  565,  565,  565,  565,  565,  574,
+      565,  565,  565,  565,  565,  565,  565,  565,  565,  575,
       565,  565,  565,  565,  565,  565,  565,  565,  565,  565,
       565,  565,  565,  565,  565,  565,  565,  565,  565,  565,
 
@@ -596,177 +596,175 @@ static yyconst flex_int16_t yy_def[575] =
       565,  565,  565,  565,  565,  565,  565,  565,  565,  565,
       565,  565,  565,  565,  565,  565,  565,  565,  565,  565,
       565,  565,  565,  565,    0,  565,  565,  565,  565,  565,
-      565,  565,  565,  565
+      565,  565,  565,  565,  565
     } ;
 
-static yyconst flex_int16_t yy_nxt[759] =
+static yyconst flex_int16_t yy_nxt[749] =
     {   0,
-        8,    9,   10,   11,   12,   13,    8,    8,   14,   15,
-       16,   17,    8,    8,    8,    8,    8,   18,   19,   20,
-       21,   22,   23,   24,    8,   25,    8,    8,   26,   27,
-       28,   29,   30,    8,   31,   32,   33,   34,   35,    8,
-        8,    8,   36,   37,    8,   38,   10,   39,    8,   13,
-        8,    8,    8,   40,   16,   40,    8,    8,   41,    8,
-       40,   40,   40,   40,   40,   40,   40,   40,   40,   40,
-       40,   40,   40,   40,   40,   40,   40,   40,   40,   40,
-       40,   40,   40,   40,   40,   40,   36,   37,    9,   10,
-       11,   43,   44,   54,  110,   55,   49,   45,   49,   54,
-
-       46,   59,   57,   49,   60,   49,   58,   70,   65,   68,
-       82,   71,   80,   72,   61,   62,   83,   81,   84,   66,
-       63,   64,   67,   69,   73,  106,   85,  106,   86,   47,
-       48,    9,   10,   11,   43,   44,  564,   50,   51,   74,
-       45,  563,   93,   46,   50,   51,  100,   75,   87,   94,
-       76,   88,   97,   77,   95,   89,   78,  104,   96,  101,
-       98,  105,   90,   91,   99,   92,  102,  107,  108,  107,
-      108,  562,   47,   48,  108,  111,  108,  111,   53,  116,
-       53,  109,  106,  117,  106,  561,  107,  109,  107,   49,
-       53,   49,  106,  107,  106,  107,   54,   54,   55,   59,
-
-      122,  127,  130,  560,  131,  128,  132,  133,  134,   50,
-       51,  123,  135,  136,  137,   50,   51,  144,  151,  161,
-      169,  145,  152,  170,  164,  173,  162,  165,  559,  174,
-       50,   51,  106,  558,  106,  166,  107,  108,  107,  108,
-      167,  111,  111,  111,  111,  175,   53,  119,   53,  119,
-      109,  183,  557,  119,  215,  119,  261,  262,   53,  119,
-      216,  343,  556,  252,  184,  119,  253,  309,  310,  388,
-      401,  311,  435,  438,  439,  447,  344,  402,   50,   51,
-      403,  537,  448,  555,  554,  389,  553,  552,  436,  551,
-      550,  549,  548,  538,   42,   42,   42,   42,   42,   42,
-
-       52,   52,   52,   53,   53,  547,   53,   53,   53,  112,
-      546,  545,  544,  112,  112,  113,  543,  542,  541,  113,
-      113,  115,  115,  540,  115,  115,  115,  119,  119,  539,
-      119,  119,  119,  180,  180,  536,  180,  180,  180,  535,
-      534,  533,  532,  531,  530,  529,  528,  527,  526,  525,
-      524,  523,  522,  521,  520,  519,  518,  517,  516,  515,
-      514,  513,  512,  511,  510,  509,  508,  507,  506,  505,
-      504,  503,  502,  501,  500,  499,  498,  497,  496,  495,
-      494,  493,  492,  491,  490,  489,  488,  487,  486,  485,
-      484,  483,  482,  481,  480,  479,  478,  477,  476,  475,
-
-      474,  473,  472,  471,  470,  469,  468,  467,  466,  465,
-      464,  463,  462,  461,  460,  459,  458,  457,  456,  455,
-      454,  453,  452,  451,  450,  449,  446,  445,  444,  443,
-      442,  441,  440,  437,  434,  433,  432,  431,  430,  429,
-      428,  427,  426,  425,  424,  423,  422,  421,  420,  419,
-      418,  417,  416,  415,  414,  413,  412,  411,  410,  409,
-      408,  407,  406,  405,  404,  400,  399,  398,  397,  396,
-      395,  394,  393,  392,  391,  390,  387,  386,  385,  384,
-      383,  382,  381,  380,  379,  378,  377,  376,  375,  374,
-      373,  372,  371,  370,  369,  368,  367,  366,  365,  364,
-
-      363,  362,  361,  360,  359,  358,  357,  356,  355,  354,
-      353,  352,  351,  350,  349,  348,  347,  346,  345,  342,
-      341,  340,  339,  338,  337,  336,  335,  334,  333,  332,
-      331,  330,  329,  328,  327,  326,  325,  324,  323,  322,
-      321,  320,  319,  318,  317,  316,  315,  314,  313,  312,
-      308,  307,  306,  305,  304,  303,  302,  301,  300,  299,
-      298,  297,  296,  295,  294,  293,  292,  291,  290,  289,
-      288,  287,  286,  285,  284,  283,  282,  281,  280,  279,
-      278,  277,  276,  275,  274,  273,  272,  271,  270,  269,
-      268,  267,  266,  265,  264,  263,  260,  259,  258,  257,
-
-      256,  255,  254,  251,  250,  249,  248,  247,  246,  245,
-      244,  243,  242,  241,  240,  239,  238,  237,  236,  235,
-      234,  233,  232,  231,  230,  229,  228,  227,  226,  225,
-      224,  223,  222,  221,  220,  219,  218,  217,  214,  213,
-      212,  211,  210,  209,  208,  207,  206,  205,  204,  203,
-      202,  201,  200,  199,  198,  197,  196,  195,  194,  193,
-      192,  191,  190,  189,  188,  187,  186,  185,  182,  181,
-      114,  114,  179,  178,  177,  176,  172,  171,  168,  163,
-      160,  159,  158,  157,  156,  155,  154,  153,  150,  149,
-      148,  147,  146,  143,  142,  141,  140,  139,  138,  129,
-
-      126,  125,  124,  121,  120,   56,   56,  118,  114,  103,
-       79,   56,  565,    7,  565,  565,  565,  565,  565,  565,
+        8,    9,   10,   11,   12,   13,    8,   14,   15,   16,
+       17,    8,    8,    8,    8,    8,   18,   19,   20,   21,
+       22,   23,   24,    8,   25,    8,    8,   26,   27,   28,
+       29,   30,    8,   31,   32,   33,   34,   35,    8,    8,
+        8,   36,   37,    8,   38,   10,   39,    8,   13,    8,
+        8,   54,   16,   55,    8,    8,   41,    8,   54,   57,
+       59,   49,   58,   49,   49,   60,   49,   70,   72,   65,
+       84,   71,   80,  132,  133,   61,   62,   81,   85,   73,
+       66,   63,   64,   67,   36,   37,    8,   38,   10,   39,
+        8,   13,    8,    8,   68,   16,   86,    8,    8,   41,
+
+        8,   50,   51,   74,   50,   51,   82,  116,   69,   95,
+      117,   75,   83,   96,   76,   93,   87,   77,  110,  104,
+       78,  127,   94,  105,  106,  128,  106,   36,   37,    9,
+       10,   11,   43,   44,   88,   97,  100,   45,   89,  107,
+       46,  107,  111,   98,  111,   90,   91,   99,   92,  101,
+      108,  169,  108,  108,  170,  108,  102,   53,  106,   53,
+      106,  107,  109,  107,   49,  109,   49,  183,   53,   47,
+       48,    9,   10,   11,   43,   44,  106,  122,  106,   45,
+      184,  107,   46,  107,   54,   54,   55,   59,  123,  564,
+       50,   51,  134,   50,   51,  130,  135,  131,  136,  137,
+
+      563,  161,  144,  151,   50,   51,  145,  152,  162,  343,
+      164,   47,   48,  165,  173,  106,  252,  106,  174,  253,
+      107,  166,  107,  108,  344,  108,  167,  111,  111,  111,
+      111,   53,  562,   53,  175,  109,  119,  215,  119,  119,
+      388,  119,   53,  216,  261,  262,  435,  119,  309,  310,
+      119,  401,  311,  438,  439,  537,  389,  561,  402,  447,
+      560,  403,  436,   50,   51,  559,  448,  538,   40,   40,
+       40,   40,   40,   40,   42,   42,   42,   42,   42,   42,
+       52,   52,   52,   53,   53,  558,   53,   53,   53,  112,
+      557,  556,  555,  112,  112,  113,  554,  553,  552,  113,
+
+      113,  115,  115,  551,  115,  115,  115,  119,  119,  550,
+      119,  119,  119,  180,  180,  549,  180,  180,  180,  548,
+      547,  546,  545,  544,  543,  542,  541,  540,  539,  536,
+      535,  534,  533,  532,  531,  530,  529,  528,  527,  526,
+      525,  524,  523,  522,  521,  520,  519,  518,  517,  516,
+      515,  514,  513,  512,  511,  510,  509,  508,  507,  506,
+      505,  504,  503,  502,  501,  500,  499,  498,  497,  496,
+      495,  494,  493,  492,  491,  490,  489,  488,  487,  486,
+      485,  484,  483,  482,  481,  480,  479,  478,  477,  476,
+      475,  474,  473,  472,  471,  470,  469,  468,  467,  466,
+
+      465,  464,  463,  462,  461,  460,  459,  458,  457,  456,
+      455,  454,  453,  452,  451,  450,  449,  446,  445,  444,
+      443,  442,  441,  440,  437,  434,  433,  432,  431,  430,
+      429,  428,  427,  426,  425,  424,  423,  422,  421,  420,
+      419,  418,  417,  416,  415,  414,  413,  412,  411,  410,
+      409,  408,  407,  406,  405,  404,  400,  399,  398,  397,
+      396,  395,  394,  393,  392,  391,  390,  387,  386,  385,
+      384,  383,  382,  381,  380,  379,  378,  377,  376,  375,
+      374,  373,  372,  371,  370,  369,  368,  367,  366,  365,
+      364,  363,  362,  361,  360,  359,  358,  357,  356,  355,
+
+      354,  353,  352,  351,  350,  349,  348,  347,  346,  345,
+      342,  341,  340,  339,  338,  337,  336,  335,  334,  333,
+      332,  331,  330,  329,  328,  327,  326,  325,  324,  323,
+      322,  321,  320,  319,  318,  317,  316,  315,  314,  313,
+      312,  308,  307,  306,  305,  304,  303,  302,  301,  300,
+      299,  298,  297,  296,  295,  294,  293,  292,  291,  290,
+      289,  288,  287,  286,  285,  284,  283,  282,  281,  280,
+      279,  278,  277,  276,  275,  274,  273,  272,  271,  270,
+      269,  268,  267,  266,  265,  264,  263,  260,  259,  258,
+      257,  256,  255,  254,  251,  250,  249,  248,  247,  246,
+
+      245,  244,  243,  242,  241,  240,  239,  238,  237,  236,
+      235,  234,  233,  232,  231,  230,  229,  228,  227,  226,
+      225,  224,  223,  222,  221,  220,  219,  218,  217,  214,
+      213,  212,  211,  210,  209,  208,  207,  206,  205,  204,
+      203,  202,  201,  200,  199,  198,  197,  196,  195,  194,
+      193,  192,  191,  190,  189,  188,  187,  186,  185,  182,
+      181,  114,  114,  179,  178,  177,  176,  172,  171,  168,
+      163,  160,  159,  158,  157,  156,  155,  154,  153,  150,
+      149,  148,  147,  146,  143,  142,  141,  140,  139,  138,
+      129,  126,  125,  124,  121,  120,   56,   56,  118,  114,
+
+      103,   79,   56,  565,    7,  565,  565,  565,  565,  565,
       565,  565,  565,  565,  565,  565,  565,  565,  565,  565,
       565,  565,  565,  565,  565,  565,  565,  565,  565,  565,
       565,  565,  565,  565,  565,  565,  565,  565,  565,  565,
       565,  565,  565,  565,  565,  565,  565,  565
     } ;
 
-static yyconst flex_int16_t yy_chk[759] =
+static yyconst flex_int16_t yy_chk[749] =
     {   0,
         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    3,    3,    3,    3,    3,    3,
-        3,    3,    3,    3,    3,    3,    3,    3,    3,    3,
-        3,    3,    3,    3,    3,    3,    3,    3,    3,    3,
-        3,    3,    3,    3,    3,    3,    3,    3,    3,    3,
-        3,    3,    3,    3,    3,    3,    3,    3,    5,    5,
-        5,    5,    5,   14,  569,   14,    9,    5,    9,   17,
-
-        5,   17,   16,   11,   18,   11,   16,   21,   19,   20,
-       26,   21,   25,   22,   18,   18,   26,   25,   27,   19,
-       18,   18,   19,   20,   22,   36,   27,   36,   28,    5,
-        5,    6,    6,    6,    6,    6,  562,    9,    9,   23,
-        6,  559,   30,    6,   11,   11,   33,   23,   28,   30,
-       23,   29,   32,   23,   31,   29,   23,   35,   31,   33,
-       32,   35,   29,   29,   32,   29,   33,   37,   38,   37,
-       38,  558,    6,    6,   39,   41,   39,   41,   44,   45,
-       44,   38,   47,   45,   47,  556,   48,   39,   48,   49,
-       44,   49,   50,   51,   50,   51,   55,   59,   55,   59,
-
-       62,   66,   68,  555,   68,   66,   69,   69,   70,   38,
-       38,   62,   70,   71,   71,   39,   39,   78,   84,   94,
-       98,   78,   84,   98,   96,  101,   94,   96,  554,  101,
-       49,   49,  106,  551,  106,   96,  107,  108,  107,  108,
-       96,  109,  111,  109,  111,  101,  115,  117,  115,  117,
-      108,  122,  550,  180,  155,  180,  201,  201,  115,  117,
-      155,  291,  548,  193,  122,  180,  193,  255,  255,  343,
-      356,  255,  391,  394,  394,  403,  291,  356,  108,  108,
-      356,  526,  403,  547,  546,  343,  543,  542,  391,  541,
-      540,  539,  538,  526,  566,  566,  566,  566,  566,  566,
-
-      567,  567,  567,  568,  568,  537,  568,  568,  568,  570,
-      536,  533,  532,  570,  570,  571,  531,  530,  529,  571,
-      571,  572,  572,  528,  572,  572,  572,  573,  573,  527,
-      573,  573,  573,  574,  574,  523,  574,  574,  574,  522,
-      521,  519,  518,  517,  515,  511,  510,  508,  507,  504,
-      503,  502,  501,  500,  499,  498,  497,  495,  494,  493,
-      490,  489,  488,  485,  481,  480,  479,  478,  477,  476,
-      473,  472,  471,  470,  469,  468,  467,  466,  465,  464,
-      463,  462,  461,  460,  459,  458,  457,  456,  454,  453,
-      452,  450,  449,  448,  447,  446,  445,  444,  443,  442,
-
-      441,  439,  437,  436,  435,  434,  433,  432,  429,  428,
-      427,  426,  425,  424,  422,  420,  419,  418,  416,  414,
-      409,  408,  407,  406,  405,  404,  402,  401,  400,  399,
-      398,  397,  396,  393,  390,  389,  388,  387,  386,  385,
-      384,  383,  382,  381,  380,  379,  377,  376,  375,  374,
-      373,  372,  371,  370,  368,  367,  366,  365,  364,  362,
-      361,  360,  359,  358,  357,  355,  354,  353,  352,  351,
-      350,  349,  348,  347,  345,  344,  342,  340,  339,  338,
-      337,  336,  335,  334,  333,  332,  331,  330,  329,  328,
-      326,  325,  323,  321,  320,  319,  318,  317,  316,  315,
-
-      314,  313,  312,  311,  310,  309,  308,  306,  305,  304,
-      303,  302,  300,  299,  298,  297,  295,  294,  292,  290,
-      288,  287,  286,  285,  284,  283,  282,  281,  280,  279,
-      277,  276,  275,  274,  273,  272,  271,  270,  268,  267,
-      266,  265,  264,  263,  262,  261,  259,  258,  257,  256,
-      254,  253,  251,  250,  248,  247,  246,  245,  244,  243,
-      242,  241,  240,  239,  238,  237,  234,  233,  232,  231,
-      230,  229,  228,  227,  226,  225,  224,  223,  222,  221,
-      220,  219,  217,  216,  215,  213,  212,  211,  210,  209,
-      208,  207,  206,  205,  204,  202,  200,  199,  198,  197,
-
-      196,  195,  194,  192,  191,  190,  189,  188,  187,  186,
-      185,  184,  183,  182,  181,  179,  178,  177,  176,  175,
-      174,  173,  172,  171,  170,  169,  168,  167,  166,  165,
-      164,  163,  162,  161,  160,  159,  158,  156,  154,  153,
-      152,  151,  150,  149,  148,  147,  146,  145,  144,  143,
-      142,  141,  140,  139,  137,  136,  135,  134,  133,  132,
-      131,  130,  128,  127,  126,  125,  124,  123,  121,  120,
-      114,  113,  105,  104,  103,  102,  100,   99,   97,   95,
-       93,   92,   90,   89,   88,   87,   86,   85,   83,   82,
-       81,   80,   79,   77,   76,   75,   74,   73,   72,   67,
-
-       65,   64,   63,   61,   60,   56,   54,   52,   43,   34,
-       24,   15,    7,  565,  565,  565,  565,  565,  565,  565,
+        1,    1,    1,    3,    3,    3,    3,    3,    3,    3,
+        3,   14,    3,   14,    3,    3,    3,    3,   17,   16,
+       17,    9,   16,    9,   11,   18,   11,   21,   22,   19,
+       27,   21,   25,   69,   69,   18,   18,   25,   27,   22,
+       19,   18,   18,   19,    3,    3,    4,    4,    4,    4,
+        4,    4,    4,    4,   20,    4,   28,    4,    4,    4,
+
+        4,    9,    9,   23,   11,   11,   26,   45,   20,   31,
+       45,   23,   26,   31,   23,   30,   28,   23,  570,   35,
+       23,   66,   30,   35,   36,   66,   36,    4,    4,    5,
+        5,    5,    5,    5,   29,   32,   33,    5,   29,   37,
+        5,   37,   41,   32,   41,   29,   29,   32,   29,   33,
+       38,   98,   38,   39,   98,   39,   33,   44,   47,   44,
+       47,   48,   38,   48,   49,   39,   49,  122,   44,    5,
+        5,    6,    6,    6,    6,    6,   50,   62,   50,    6,
+      122,   51,    6,   51,   55,   59,   55,   59,   62,  562,
+       38,   38,   70,   39,   39,   68,   70,   68,   71,   71,
+
+      559,   94,   78,   84,   49,   49,   78,   84,   94,  291,
+       96,    6,    6,   96,  101,  106,  193,  106,  101,  193,
+      107,   96,  107,  108,  291,  108,   96,  109,  111,  109,
+      111,  115,  558,  115,  101,  108,  117,  155,  117,  180,
+      343,  180,  115,  155,  201,  201,  391,  117,  255,  255,
+      180,  356,  255,  394,  394,  526,  343,  556,  356,  403,
+      555,  356,  391,  108,  108,  554,  403,  526,  566,  566,
+      566,  566,  566,  566,  567,  567,  567,  567,  567,  567,
+      568,  568,  568,  569,  569,  551,  569,  569,  569,  571,
+      550,  548,  547,  571,  571,  572,  546,  543,  542,  572,
+
+      572,  573,  573,  541,  573,  573,  573,  574,  574,  540,
+      574,  574,  574,  575,  575,  539,  575,  575,  575,  538,
+      537,  536,  533,  532,  531,  530,  529,  528,  527,  523,
+      522,  521,  519,  518,  517,  515,  511,  510,  508,  507,
+      504,  503,  502,  501,  500,  499,  498,  497,  495,  494,
+      493,  490,  489,  488,  485,  481,  480,  479,  478,  477,
+      476,  473,  472,  471,  470,  469,  468,  467,  466,  465,
+      464,  463,  462,  461,  460,  459,  458,  457,  456,  454,
+      453,  452,  450,  449,  448,  447,  446,  445,  444,  443,
+      442,  441,  439,  437,  436,  435,  434,  433,  432,  429,
+
+      428,  427,  426,  425,  424,  422,  420,  419,  418,  416,
+      414,  409,  408,  407,  406,  405,  404,  402,  401,  400,
+      399,  398,  397,  396,  393,  390,  389,  388,  387,  386,
+      385,  384,  383,  382,  381,  380,  379,  377,  376,  375,
+      374,  373,  372,  371,  370,  368,  367,  366,  365,  364,
+      362,  361,  360,  359,  358,  357,  355,  354,  353,  352,
+      351,  350,  349,  348,  347,  345,  344,  342,  340,  339,
+      338,  337,  336,  335,  334,  333,  332,  331,  330,  329,
+      328,  326,  325,  323,  321,  320,  319,  318,  317,  316,
+      315,  314,  313,  312,  311,  310,  309,  308,  306,  305,
+
+      304,  303,  302,  300,  299,  298,  297,  295,  294,  292,
+      290,  288,  287,  286,  285,  284,  283,  282,  281,  280,
+      279,  277,  276,  275,  274,  273,  272,  271,  270,  268,
+      267,  266,  265,  264,  263,  262,  261,  259,  258,  257,
+      256,  254,  253,  251,  250,  248,  247,  246,  245,  244,
+      243,  242,  241,  240,  239,  238,  237,  234,  233,  232,
+      231,  230,  229,  228,  227,  226,  225,  224,  223,  222,
+      221,  220,  219,  217,  216,  215,  213,  212,  211,  210,
+      209,  208,  207,  206,  205,  204,  202,  200,  199,  198,
+      197,  196,  195,  194,  192,  191,  190,  189,  188,  187,
+
+      186,  185,  184,  183,  182,  181,  179,  178,  177,  176,
+      175,  174,  173,  172,  171,  170,  169,  168,  167,  166,
+      165,  164,  163,  162,  161,  160,  159,  158,  156,  154,
+      153,  152,  151,  150,  149,  148,  147,  146,  145,  144,
+      143,  142,  141,  140,  139,  137,  136,  135,  134,  133,
+      132,  131,  130,  128,  127,  126,  125,  124,  123,  121,
+      120,  114,  113,  105,  104,  103,  102,  100,   99,   97,
+       95,   93,   92,   90,   89,   88,   87,   86,   85,   83,
+       82,   81,   80,   79,   77,   76,   75,   74,   73,   72,
+       67,   65,   64,   63,   61,   60,   56,   54,   52,   43,
+
+       34,   24,   15,    7,  565,  565,  565,  565,  565,  565,
       565,  565,  565,  565,  565,  565,  565,  565,  565,  565,
       565,  565,  565,  565,  565,  565,  565,  565,  565,  565,
       565,  565,  565,  565,  565,  565,  565,  565,  565,  565,
@@ -802,11 +800,10 @@ char *yy_text;
 /* this header file is automatically generated by bison 
  * and includes all token definitions, as well as yy_lval */
 #if ELBEEM_BLENDER==1
-// for blender the headers have to be .h 
 #include "cfgparser.h"
-#else 
+#else // ELBEEM_BLENDER==1
 #include "cfgparser.hpp"
-#endif
+#endif // ELBEEM_BLENDER==1
 #include "utilities.h"
 
 #include <string.h>
@@ -828,7 +825,7 @@ extern "C" int yy_wrap (void ) { return 1; }
  * rules start 
  */
 /*----------------------------------------------------------------------------*/
-#line 832 "<stdout>"
+#line 829 "<stdout>"
 
 #define INITIAL 0
 #define ATTR 1
@@ -981,11 +978,11 @@ YY_DECL
        register char *yy_cp, *yy_bp;
        register int yy_act;
     
-#line 55 "src/cfglexer.ll"
+#line 54 "src/cfglexer.ll"
 
 
 
-#line 989 "<stdout>"
+#line 986 "<stdout>"
 
        if ( (yy_init) )
                {
@@ -1066,25 +1063,25 @@ do_action:      /* This label is used only to access EOF actions. */
 
 case 1:
 YY_RULE_SETUP
-#line 58 "src/cfglexer.ll"
+#line 57 "src/cfglexer.ll"
 { return KW_PAROPEN; }
        YY_BREAK
 case 2:
 YY_RULE_SETUP
-#line 59 "src/cfglexer.ll"
+#line 58 "src/cfglexer.ll"
 { BEGIN(INITIAL); // '}' always closes scopes
                        return KW_PARCLOSE; }
        YY_BREAK
 case 3:
 YY_RULE_SETUP
-#line 62 "src/cfglexer.ll"
+#line 61 "src/cfglexer.ll"
 { 
                        BEGIN(ATTRVALUE);
                        return KW_EQUALS; }
        YY_BREAK
 case 4:
 YY_RULE_SETUP
-#line 65 "src/cfglexer.ll"
+#line 64 "src/cfglexer.ll"
 { /* attribute name = normal string */
                strncpy( charBuffer, yy_text, CHAR_BUFFER_SIZE-2 );
                yy_lval.charValue = charBuffer;
@@ -1094,7 +1091,7 @@ YY_RULE_SETUP
        YY_BREAK
 case 5:
 YY_RULE_SETUP
-#line 71 "src/cfglexer.ll"
+#line 70 "src/cfglexer.ll"
 { /* quoted string! attribute name = normal string */
                strncpy( charBuffer, yy_text, CHAR_BUFFER_SIZE-2 );
                        /* get rid of " " */
@@ -1105,7 +1102,7 @@ YY_RULE_SETUP
        YY_BREAK
 case 6:
 YY_RULE_SETUP
-#line 78 "src/cfglexer.ll"
+#line 77 "src/cfglexer.ll"
 { /* ends at newline or ';' */
                strncpy( charBuffer, yy_text, CHAR_BUFFER_SIZE-2 );
                yy_lval.charValue = charBuffer;
@@ -1113,433 +1110,433 @@ YY_RULE_SETUP
        YY_BREAK
 case 7:
 YY_RULE_SETUP
-#line 82 "src/cfglexer.ll"
+#line 81 "src/cfglexer.ll"
 { /* return end token... */
                        BEGIN(ATTR); 
                        return KW_ATTREND; }
        YY_BREAK
 case 8:
 YY_RULE_SETUP
-#line 87 "src/cfglexer.ll"
+#line 86 "src/cfglexer.ll"
 { return KW_LBMSIM; }
        YY_BREAK
 case 9:
 YY_RULE_SETUP
-#line 88 "src/cfglexer.ll"
+#line 87 "src/cfglexer.ll"
 { return KW_COMPARELBM; }
        YY_BREAK
 case 10:
 YY_RULE_SETUP
-#line 89 "src/cfglexer.ll"
+#line 88 "src/cfglexer.ll"
 { return KW_DEBUGMODE; }
        YY_BREAK
 case 11:
 YY_RULE_SETUP
-#line 90 "src/cfglexer.ll"
+#line 89 "src/cfglexer.ll"
 { return KW_DEBUGLEVEL; }
        YY_BREAK
 case 12:
 YY_RULE_SETUP
-#line 91 "src/cfglexer.ll"
+#line 90 "src/cfglexer.ll"
 { return KW_RAYTRACING; }
        YY_BREAK
 case 13:
 YY_RULE_SETUP
-#line 94 "src/cfglexer.ll"
+#line 93 "src/cfglexer.ll"
 { return KW_RESOLUTION; }
        YY_BREAK
 case 14:
 YY_RULE_SETUP
-#line 95 "src/cfglexer.ll"
+#line 94 "src/cfglexer.ll"
 { return KW_ANTIALIAS; }
        YY_BREAK
 case 15:
 YY_RULE_SETUP
-#line 96 "src/cfglexer.ll"
+#line 95 "src/cfglexer.ll"
 { return KW_EYEPOINT; }
        YY_BREAK
 case 16:
 YY_RULE_SETUP
-#line 97 "src/cfglexer.ll"
+#line 96 "src/cfglexer.ll"
 { return KW_LOOKAT ; }
        YY_BREAK
 case 17:
 YY_RULE_SETUP
-#line 98 "src/cfglexer.ll"
+#line 97 "src/cfglexer.ll"
 { return KW_UPVEC ; }
        YY_BREAK
 case 18:
 YY_RULE_SETUP
-#line 99 "src/cfglexer.ll"
+#line 98 "src/cfglexer.ll"
 { return KW_FOVY; }
        YY_BREAK
 case 19:
 YY_RULE_SETUP
-#line 100 "src/cfglexer.ll"
+#line 99 "src/cfglexer.ll"
 { return KW_ASPECT ; }
        YY_BREAK
 case 20:
 YY_RULE_SETUP
-#line 101 "src/cfglexer.ll"
+#line 100 "src/cfglexer.ll"
 { return KW_AMBIENCE; }
        YY_BREAK
 case 21:
 YY_RULE_SETUP
-#line 102 "src/cfglexer.ll"
+#line 101 "src/cfglexer.ll"
 { return KW_BACKGROUND; }
        YY_BREAK
 case 22:
 YY_RULE_SETUP
-#line 103 "src/cfglexer.ll"
+#line 102 "src/cfglexer.ll"
 { return KW_ANISTART; }
        YY_BREAK
 case 23:
 YY_RULE_SETUP
-#line 104 "src/cfglexer.ll"
+#line 103 "src/cfglexer.ll"
 { return KW_ANIFRAMES; }
        YY_BREAK
 case 24:
 YY_RULE_SETUP
-#line 105 "src/cfglexer.ll"
+#line 104 "src/cfglexer.ll"
 { return KW_ANIFRAMETIME; }
        YY_BREAK
 case 25:
 YY_RULE_SETUP
-#line 106 "src/cfglexer.ll"
+#line 105 "src/cfglexer.ll"
 { return KW_FRAMESKIP; }
        YY_BREAK
 case 26:
 YY_RULE_SETUP
-#line 107 "src/cfglexer.ll"
+#line 106 "src/cfglexer.ll"
 { return KW_FILENAME; }
        YY_BREAK
 case 27:
 YY_RULE_SETUP
-#line 108 "src/cfglexer.ll"
+#line 107 "src/cfglexer.ll"
 { return KW_PMCAUSTICS; }
        YY_BREAK
 case 28:
 YY_RULE_SETUP
-#line 109 "src/cfglexer.ll"
+#line 108 "src/cfglexer.ll"
 { return KW_CAUSTICDIST; }
        YY_BREAK
 case 29:
 YY_RULE_SETUP
-#line 110 "src/cfglexer.ll"
+#line 109 "src/cfglexer.ll"
 { return KW_CAUSTICPHOT; }
        YY_BREAK
 case 30:
 YY_RULE_SETUP
-#line 111 "src/cfglexer.ll"
+#line 110 "src/cfglexer.ll"
 { return KW_SHADOWMAPBIAS; }
        YY_BREAK
 case 31:
 YY_RULE_SETUP
-#line 112 "src/cfglexer.ll"
+#line 111 "src/cfglexer.ll"
 { return KW_MAXRAYDEPTH; }
        YY_BREAK
 case 32:
 YY_RULE_SETUP
-#line 113 "src/cfglexer.ll"
+#line 112 "src/cfglexer.ll"
 { return KW_TREEMAXDEPTH; }
        YY_BREAK
 case 33:
 YY_RULE_SETUP
-#line 114 "src/cfglexer.ll"
+#line 113 "src/cfglexer.ll"
 { return KW_TREEMAXTRIANGLES; }
        YY_BREAK
 case 34:
 YY_RULE_SETUP
-#line 115 "src/cfglexer.ll"
+#line 114 "src/cfglexer.ll"
 { return KW_DEBUGPIXEL; }
        YY_BREAK
 case 35:
 YY_RULE_SETUP
-#line 116 "src/cfglexer.ll"
+#line 115 "src/cfglexer.ll"
 { return KW_TESTMODE; }
        YY_BREAK
 case 36:
 YY_RULE_SETUP
-#line 117 "src/cfglexer.ll"
+#line 116 "src/cfglexer.ll"
 { return KW_OPENGLATTR; }
        YY_BREAK
 case 37:
 YY_RULE_SETUP
-#line 118 "src/cfglexer.ll"
+#line 117 "src/cfglexer.ll"
 { return KW_BLENDERATTR; }
        YY_BREAK
 case 38:
 YY_RULE_SETUP
-#line 120 "src/cfglexer.ll"
+#line 119 "src/cfglexer.ll"
 { return KW_OBJATTR; /* assign attr to obj */ }
        YY_BREAK
 case 39:
 YY_RULE_SETUP
-#line 121 "src/cfglexer.ll"
+#line 120 "src/cfglexer.ll"
 { BEGIN(ATTR); return KW_ATTRIBUTE;  /* global attr list */ }
        YY_BREAK
 case 40:
 YY_RULE_SETUP
-#line 122 "src/cfglexer.ll"
+#line 121 "src/cfglexer.ll"
 { BEGIN(ATTR); return KW_DEFINEATTR; /* obj defines new attrs */ }
        YY_BREAK
 case 41:
 YY_RULE_SETUP
-#line 123 "src/cfglexer.ll"
+#line 122 "src/cfglexer.ll"
 { BEGIN(ATTR); return KW_DEFINEATTR; }
        YY_BREAK
 case 42:
 YY_RULE_SETUP
-#line 124 "src/cfglexer.ll"
+#line 123 "src/cfglexer.ll"
 { BEGIN(ATTR); return KW_DEFINEATTR; }
        YY_BREAK
 case 43:
 YY_RULE_SETUP
-#line 126 "src/cfglexer.ll"
+#line 125 "src/cfglexer.ll"
 { return KW_GEOMETRY; }
        YY_BREAK
 case 44:
 YY_RULE_SETUP
-#line 127 "src/cfglexer.ll"
+#line 126 "src/cfglexer.ll"
 { return KW_TYPE; }
        YY_BREAK
 case 45:
 YY_RULE_SETUP
-#line 128 "src/cfglexer.ll"
+#line 127 "src/cfglexer.ll"
 { return KW_GEOTYPE_BOX; }
        YY_BREAK
 case 46:
 YY_RULE_SETUP
-#line 129 "src/cfglexer.ll"
+#line 128 "src/cfglexer.ll"
 { return KW_GEOTYPE_SPHERE; }
        YY_BREAK
 case 47:
 YY_RULE_SETUP
-#line 130 "src/cfglexer.ll"
+#line 129 "src/cfglexer.ll"
 { return KW_GEOTYPE_OBJMODEL; }
        YY_BREAK
 case 48:
 YY_RULE_SETUP
-#line 131 "src/cfglexer.ll"
+#line 130 "src/cfglexer.ll"
 { return KW_CASTSHADOWS; }  
        YY_BREAK
 case 49:
 YY_RULE_SETUP
-#line 132 "src/cfglexer.ll"
+#line 131 "src/cfglexer.ll"
 { return KW_RECEIVESHADOWS ; }
        YY_BREAK
 case 50:
 YY_RULE_SETUP
-#line 133 "src/cfglexer.ll"
+#line 132 "src/cfglexer.ll"
 { return KW_VISIBLE; }  
        YY_BREAK
 case 51:
 YY_RULE_SETUP
-#line 134 "src/cfglexer.ll"
+#line 133 "src/cfglexer.ll"
 { return KW_BOX_START; }
        YY_BREAK
 case 52:
 YY_RULE_SETUP
-#line 135 "src/cfglexer.ll"
+#line 134 "src/cfglexer.ll"
 { return KW_BOX_END; }
        YY_BREAK
 case 53:
 YY_RULE_SETUP
-#line 136 "src/cfglexer.ll"
+#line 135 "src/cfglexer.ll"
 { return KW_POLY ; }
        YY_BREAK
 case 54:
 YY_RULE_SETUP
-#line 137 "src/cfglexer.ll"
+#line 136 "src/cfglexer.ll"
 { return KW_POLY ; }
        YY_BREAK
 case 55:
 YY_RULE_SETUP
-#line 138 "src/cfglexer.ll"
+#line 137 "src/cfglexer.ll"
 { return KW_NUMVERTICES; }
        YY_BREAK
 case 56:
 YY_RULE_SETUP
-#line 139 "src/cfglexer.ll"
+#line 138 "src/cfglexer.ll"
 { return KW_VERTEX; }
        YY_BREAK
 case 57:
 YY_RULE_SETUP
-#line 140 "src/cfglexer.ll"
+#line 139 "src/cfglexer.ll"
 { return KW_NUMPOLYGONS; }
        YY_BREAK
 case 58:
 YY_RULE_SETUP
-#line 141 "src/cfglexer.ll"
+#line 140 "src/cfglexer.ll"
 { return KW_ISOSURF; }  
        YY_BREAK
 case 59:
 YY_RULE_SETUP
-#line 142 "src/cfglexer.ll"
+#line 141 "src/cfglexer.ll"
 { return KW_FILEMODE; }  
        YY_BREAK
 case 60:
 YY_RULE_SETUP
-#line 143 "src/cfglexer.ll"
+#line 142 "src/cfglexer.ll"
 { return KW_INVERT; }  
        YY_BREAK
 case 61:
 YY_RULE_SETUP
-#line 145 "src/cfglexer.ll"
+#line 144 "src/cfglexer.ll"
 { return KW_MATERIAL; }
        YY_BREAK
 case 62:
 YY_RULE_SETUP
-#line 146 "src/cfglexer.ll"
+#line 145 "src/cfglexer.ll"
 { return KW_MATTYPE_PHONG; }
        YY_BREAK
 case 63:
 YY_RULE_SETUP
-#line 147 "src/cfglexer.ll"
+#line 146 "src/cfglexer.ll"
 { return KW_MATTYPE_BLINN; }
        YY_BREAK
 case 64:
 YY_RULE_SETUP
-#line 148 "src/cfglexer.ll"
+#line 147 "src/cfglexer.ll"
 { return KW_NAME; }
        YY_BREAK
 case 65:
 YY_RULE_SETUP
-#line 149 "src/cfglexer.ll"
+#line 148 "src/cfglexer.ll"
 { return KW_AMBIENT; }
        YY_BREAK
 case 66:
 YY_RULE_SETUP
-#line 150 "src/cfglexer.ll"
+#line 149 "src/cfglexer.ll"
 { return KW_DIFFUSE; }
        YY_BREAK
 case 67:
 YY_RULE_SETUP
-#line 151 "src/cfglexer.ll"
+#line 150 "src/cfglexer.ll"
 { return KW_SPECULAR; }
        YY_BREAK
 case 68:
 YY_RULE_SETUP
-#line 152 "src/cfglexer.ll"
+#line 151 "src/cfglexer.ll"
 { return KW_MIRROR; }
        YY_BREAK
 case 69:
 YY_RULE_SETUP
-#line 153 "src/cfglexer.ll"
+#line 152 "src/cfglexer.ll"
 { return KW_TRANSPARENCE; }
        YY_BREAK
 case 70:
 YY_RULE_SETUP
-#line 154 "src/cfglexer.ll"
+#line 153 "src/cfglexer.ll"
 { return KW_REFRACINDEX; }
        YY_BREAK
 case 71:
 YY_RULE_SETUP
-#line 155 "src/cfglexer.ll"
+#line 154 "src/cfglexer.ll"
 { return KW_TRANSADDITIVE; }
        YY_BREAK
 case 72:
 YY_RULE_SETUP
-#line 156 "src/cfglexer.ll"
+#line 155 "src/cfglexer.ll"
 { return KW_TRANSATTCOL; }
        YY_BREAK
 case 73:
 YY_RULE_SETUP
-#line 157 "src/cfglexer.ll"
+#line 156 "src/cfglexer.ll"
 { return KW_FRESNEL; }
        YY_BREAK
 case 74:
 YY_RULE_SETUP
-#line 158 "src/cfglexer.ll"
+#line 157 "src/cfglexer.ll"
 { return KW_FRESNEL; }
        YY_BREAK
 case 75:
 YY_RULE_SETUP
-#line 160 "src/cfglexer.ll"
+#line 159 "src/cfglexer.ll"
 { return KW_LIGHT; }
        YY_BREAK
 case 76:
 YY_RULE_SETUP
-#line 161 "src/cfglexer.ll"
+#line 160 "src/cfglexer.ll"
 { return KW_LIGHT_OMNI; }
        YY_BREAK
 case 77:
 YY_RULE_SETUP
-#line 162 "src/cfglexer.ll"
+#line 161 "src/cfglexer.ll"
 { return KW_ACTIVE; }
        YY_BREAK
 case 78:
 YY_RULE_SETUP
-#line 163 "src/cfglexer.ll"
+#line 162 "src/cfglexer.ll"
 { return KW_COLOUR; }
        YY_BREAK
 case 79:
 YY_RULE_SETUP
-#line 164 "src/cfglexer.ll"
+#line 163 "src/cfglexer.ll"
 { return KW_COLOUR; }
        YY_BREAK
 case 80:
 YY_RULE_SETUP
-#line 165 "src/cfglexer.ll"
+#line 164 "src/cfglexer.ll"
 { return KW_POSITION; }
        YY_BREAK
 case 81:
 YY_RULE_SETUP
-#line 166 "src/cfglexer.ll"
+#line 165 "src/cfglexer.ll"
 { return KW_CAUSTICPHOTONS; }
        YY_BREAK
 case 82:
 YY_RULE_SETUP
-#line 167 "src/cfglexer.ll"
+#line 166 "src/cfglexer.ll"
 { return KW_CAUSTICSTRENGTH; }
        YY_BREAK
 case 83:
 YY_RULE_SETUP
-#line 168 "src/cfglexer.ll"
+#line 167 "src/cfglexer.ll"
 { return KW_SHADOWMAP; }
        YY_BREAK
 case 84:
 YY_RULE_SETUP
-#line 169 "src/cfglexer.ll"
+#line 168 "src/cfglexer.ll"
 { return KW_CAUSTICSMAP; }
        YY_BREAK
 case 85:
 YY_RULE_SETUP
-#line 171 "src/cfglexer.ll"
+#line 170 "src/cfglexer.ll"
 { yy_lval.intValue = 1; return DT_INTEGER; }
        YY_BREAK
 case 86:
 YY_RULE_SETUP
-#line 172 "src/cfglexer.ll"
+#line 171 "src/cfglexer.ll"
 { yy_lval.intValue = 0; return DT_INTEGER; }
        YY_BREAK
 case 87:
 YY_RULE_SETUP
-#line 173 "src/cfglexer.ll"
+#line 172 "src/cfglexer.ll"
 { yy_lval.intValue = 1; return DT_INTEGER; }
        YY_BREAK
 case 88:
 YY_RULE_SETUP
-#line 174 "src/cfglexer.ll"
+#line 173 "src/cfglexer.ll"
 { yy_lval.intValue = 0; return DT_INTEGER; }
        YY_BREAK
 case 89:
 YY_RULE_SETUP
-#line 177 "src/cfglexer.ll"
+#line 176 "src/cfglexer.ll"
 { // integer number
   yy_lval.intValue = atoi( yy_text );
   return DT_INTEGER; }
        YY_BREAK
 case 90:
 YY_RULE_SETUP
-#line 181 "src/cfglexer.ll"
+#line 180 "src/cfglexer.ll"
 { // floating point number
   yy_lval.floatValue = atof( yy_text );
   return DT_FLOAT; }
        YY_BREAK
 case 91:
 YY_RULE_SETUP
-#line 185 "src/cfglexer.ll"
+#line 184 "src/cfglexer.ll"
 { /* normal character strings, now also for paths/filenames */
   strncpy( charBuffer, yy_text, CHAR_BUFFER_SIZE-2 );
        /* get rid of " " */
@@ -1550,17 +1547,17 @@ YY_RULE_SETUP
        YY_BREAK
 case 92:
 YY_RULE_SETUP
-#line 193 "src/cfglexer.ll"
+#line 192 "src/cfglexer.ll"
 { /* one line comment */  }
        YY_BREAK
 case 93:
 YY_RULE_SETUP
-#line 194 "src/cfglexer.ll"
+#line 193 "src/cfglexer.ll"
 { /* one line comment */  }
        YY_BREAK
 case 94:
 YY_RULE_SETUP
-#line 195 "src/cfglexer.ll"
+#line 194 "src/cfglexer.ll"
 { /* multiline comment */
        register int c; 
        for ( ; ; )     {
@@ -1586,26 +1583,26 @@ YY_RULE_SETUP
 case 95:
 /* rule 95 can match eol */
 YY_RULE_SETUP
-#line 219 "src/cfglexer.ll"
+#line 218 "src/cfglexer.ll"
 { // count line numbers
   lineCount++; }
        YY_BREAK
 case 96:
 YY_RULE_SETUP
-#line 222 "src/cfglexer.ll"
+#line 221 "src/cfglexer.ll"
 { /* do nothing by default... */ }
        YY_BREAK
 case 97:
 YY_RULE_SETUP
-#line 224 "src/cfglexer.ll"
+#line 223 "src/cfglexer.ll"
 { /*errorOut( "cfgLexer, Line "<<lineCount<<" : Unknown character '"<<(char)yyinput()<<"' " ); xit(1); */ }
        YY_BREAK
 case 98:
 YY_RULE_SETUP
-#line 227 "src/cfglexer.ll"
+#line 226 "src/cfglexer.ll"
 ECHO;
        YY_BREAK
-#line 1609 "<stdout>"
+#line 1606 "<stdout>"
 case YY_STATE_EOF(INITIAL):
 case YY_STATE_EOF(ATTR):
 case YY_STATE_EOF(ATTRVALUE):
@@ -2570,4 +2567,4 @@ void yy_free (void * ptr )
 #undef YY_DECL_IS_OURS
 #undef YY_DECL
 #endif
-#line 227 "src/cfglexer.ll"
+#line 226 "src/cfglexer.ll"
index ec6e094efef4b6f8ac7adfb8f5853155bd1d0a24..78b3282b7662f8d4458531fd81c5a9157872abbd 100644 (file)
@@ -70,7 +70,7 @@ PostBuild_Cmds=ECHO copy to lib ...   xcopy /Y .\release\blender_elbeem.lib ..\..\
 # PROP Target_Dir ""
 LINK32=link.exe -lib
 # ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c
-# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "../../../../../lib/windows/sdl/include" /I "../../../../../lib/windows/zlib/include" /I "../../../../../lib/windows/png/include" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /D "NOGUI" /D "ELBEEM_BLENDER" /YX /FD /GZ /c
+# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../../../../../lib/windows/sdl/include" /I "../../../../../lib/windows/zlib/include" /I "../../../../../lib/windows/png/include" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /D "NOGUI" /D "ELBEEM_BLENDER" /YX /FD /GZ /c
 # ADD BASE RSC /l 0x407 /d "_DEBUG"
 # ADD RSC /l 0x407 /d "_DEBUG"
 BSC32=bscmake.exe
index f2c4451233848a38188d54d08d5cc5af238620ac..afd4c345ccd4680787c443526642d34352988845 100644 (file)
@@ -273,9 +273,6 @@ ECHO Done
                        <File
                                RelativePath="..\..\intern\ntl_scene.cpp">
                        </File>
-                       <File
-                               RelativePath="..\..\intern\ntl_world.cpp">
-                       </File>
                        <File
                                RelativePath="..\..\intern\parametrizer.cpp">
                        </File>
@@ -285,18 +282,6 @@ ECHO Done
                        <File
                                RelativePath="..\..\intern\simulation_object.cpp">
                        </File>
-                       <File
-                               RelativePath="..\..\intern\solver_init.cpp">
-                       </File>
-                       <File
-                               RelativePath="..\..\intern\solver_interface.cpp">
-                       </File>
-                       <File
-                               RelativePath="..\..\intern\solver_main.cpp">
-                       </File>
-                       <File
-                               RelativePath="..\..\intern\solver_util.cpp">
-                       </File>
                        <File
                                RelativePath="..\..\intern\utilities.cpp">
                        </File>
@@ -311,9 +296,6 @@ ECHO Done
                        <File
                                RelativePath="..\..\intern\cfgparser.h">
                        </File>
-                       <File
-                               RelativePath="..\..\intern\elbeem.h">
-                       </File>
                        <File
                                RelativePath="..\..\intern\globals.h">
                        </File>
@@ -368,9 +350,6 @@ ECHO Done
                        <File
                                RelativePath="..\..\intern\ntl_vector3dim.h">
                        </File>
-                       <File
-                               RelativePath="..\..\intern\ntl_world.h">
-                       </File>
                        <File
                                RelativePath="..\..\intern\parametrizer.h">
                        </File>
@@ -380,18 +359,6 @@ ECHO Done
                        <File
                                RelativePath="..\..\intern\simulation_object.h">
                        </File>
-                       <File
-                               RelativePath="..\..\intern\solver_class.h">
-                       </File>
-                       <File
-                               RelativePath="..\..\intern\solver_dimenions.h">
-                       </File>
-                       <File
-                               RelativePath="..\..\intern\solver_interface.h">
-                       </File>
-                       <File
-                               RelativePath="..\..\intern\solver_relax.h">
-                       </File>
                        <File
                                RelativePath="..\..\intern\utilities.h">
                        </File>
index fa2f788823fba3413ecda2176f53200cf5cd4b50..61a2b83011b662cf77901471248a873e89fb7431 100644 (file)
@@ -67,19 +67,19 @@ public:
         * Returns the timer callback.
         * @return The timer callback.
         */
-       virtual GHOST_TimerProcPtr getTimerProc() const = 0;
+       inline virtual GHOST_TimerProcPtr getTimerProc() const = 0;
 
        /**
         * Changes the timer callback.
         * @param timerProc The timer callback.
         */
-       virtual void setTimerProc(const GHOST_TimerProcPtr timerProc) = 0;
+       inline virtual void setTimerProc(const GHOST_TimerProcPtr timerProc) = 0;
 
        /**
         * Returns the timer user data.
         * @return The timer user data.
         */
-       virtual GHOST_TUserDataPtr getUserData() const = 0;
+       inline virtual GHOST_TUserDataPtr getUserData() const = 0;
        
        /**
         * Changes the time user data.
index 903d1e4498da24c566326eb54c849bf4ba0b7226..bd15df3dba8580bc0a15ac6a8cae826c7a2820d0 100644 (file)
@@ -79,7 +79,7 @@ public:
         * Returns the type of drawing context used in this window.
         * @return The current type of drawing context.
         */
-       virtual GHOST_TDrawingContextType getDrawingContextType() = 0;
+       inline virtual GHOST_TDrawingContextType getDrawingContextType() = 0;
 
        /**
         * Tries to install a rendering context in this window.
@@ -193,7 +193,7 @@ public:
         * Returns the window user data.
         * @return The window user data.
         */
-       virtual GHOST_TUserDataPtr getUserData() const = 0;
+       inline virtual GHOST_TUserDataPtr getUserData() const = 0;
        
        /**
         * Changes the window user data.
index ee76349ededded616172d377408535fed415fcf0..d1caadab219edcf7f5d180fbe1c71d9f930f8b0d 100644 (file)
@@ -655,7 +655,6 @@ OSStatus GHOST_SystemCarbon::handleWindowEvent(EventRef event)
                        case kEventWindowActivated:
                                m_windowManager->setActiveWindow(window);
                                window->loadCursor(window->getCursorVisibility(), window->getCursorShape());
-                               window->updateDrawingContext();
                                pushEvent( new GHOST_Event(getMilliSeconds(), GHOST_kEventWindowActivate, window) );
                                break;
                        case kEventWindowDeactivated:
@@ -664,7 +663,6 @@ OSStatus GHOST_SystemCarbon::handleWindowEvent(EventRef event)
                                break;
                        case kEventWindowUpdate:
                                //if (getFullScreen()) GHOST_PRINT("GHOST_SystemCarbon::handleWindowEvent(): full-screen update event\n");
-                               window->updateDrawingContext();
                                pushEvent( new GHOST_Event(getMilliSeconds(), GHOST_kEventWindowUpdate, window) );
                                break;
                        case kEventWindowBoundsChanged:
index 919eeb739ce08ef48160e82fa4959fce2be17e48..23960a9550b0eeedb6902209c4f44b670d8ab643 100644 (file)
 #include <list>
 using namespace std;
 
-class IK_QSolver {
-public:
-       IK_QSolver() {};
-
+typedef struct {
        IK_QJacobianSolver solver;
        IK_QSegment *root;
        std::list<IK_QTask*> tasks;
-};
+} IK_QSolver;
 
 IK_QSegment *CreateSegment(int flag, bool translate)
 {
index c6d701b30fcdc0a9eb70087a4ca8599c8f73e578..46eb11004757853ee677eb1584a72759a43c5cf3 100644 (file)
@@ -39,6 +39,7 @@
 #include <stdlib.h>
 #include <assert.h>
 #include <iostream>
+#include <strstream>
 #ifdef TNT_USE_REGIONS
 #include "region2d.h"
 #endif
@@ -203,7 +204,19 @@ class Matrix
         copy(v);
     }
 
+    Matrix(Subscript M, Subscript N, const char *s)
+    {
+        initialize(M,N);
+        std::istrstream ins(s);
+
+        Subscript i, j;
+
+        for (i=0; i<M; i++)
+            for (j=0; j<N; j++)
+                ins >> row_[i][j];
+    }
 
+               
     // destructor
     //
     ~Matrix()
index daba50c993f9774a9c981a8a2501ed6d4b6e2b2a..eb5531815eb161ef2a12fd675f00d7762a872055 100644 (file)
@@ -38,6 +38,7 @@
 #include <cstdlib>
 #include <cassert>
 #include <iostream>
+#include <strstream>
 #ifdef TNT_USE_REGIONS
 #include "region2d.h"
 #endif
@@ -197,6 +198,18 @@ class Fortran_Matrix
     }
 
 
+    Fortran_Matrix(Subscript M, Subscript N, char *s)
+    {
+        initialize(M,N);
+        std::istrstream ins(s);
+
+        Subscript i, j;
+
+        for (i=1; i<=M; i++)
+            for (j=1; j<=N; j++)
+                ins >> (*this)(i,j);
+    }
+
     // destructor
     ~Fortran_Matrix()
     {
index 1fafccdfe935b52448f5f2eede87eecf167a1530..7ebba6f882d1931cf41f9398e5b0654dbc9c331f 100644 (file)
@@ -39,6 +39,7 @@
 #include <cstdlib>
 #include <cassert>
 #include <iostream>
+#include <strstream>
 
 using namespace std;
 
index 1729d83ca107ca23a765891009a56eb43fa3e38c..d4f7c2f40210a2ab7481aa7635c31061b36edea3 100644 (file)
@@ -37,6 +37,7 @@
 #include <stdlib.h>
 #include <assert.h>
 #include <iostream>
+#include <strstream>
 
 namespace TNT
 {
@@ -185,6 +186,17 @@ class Vector
         copy(v);
     }
 
+    Vector(Subscript N, char *s) :  v_(0), vm1_(0), n_(0)
+    {
+        initialize(N);
+        std::istrstream ins(s);
+
+        Subscript i;
+
+        for (i=0; i<N; i++)
+                ins >> v_[i];
+    }
+
 
     // methods
     // 
index ef2e66f19e0056613ba3f6ef806f46c3782d1dfa..fc5930c1b4faa1730c69bf3d0f86145bd8e5ac6c 100644 (file)
@@ -33,6 +33,7 @@
 
 #include <cstdlib>
 #include <iostream>
+#include <strstream>
 #include <cassert>
 
 #include "subscript.h"
@@ -116,6 +117,15 @@ class Vector_Adaptor
 
     } 
 
+    Vector_Adaptor(Subscript N, /*const*/ char *s) : v_(N) 
+    {
+        istrstream ins(s);
+        for (Subscript i=0; i<N; i++)
+            ins >> v_[i] ;
+
+        vm1_ = ( v_.size() > 0 ? &(v_[0]) -1 : NULL); 
+    }; 
+
     Vector_Adaptor(Subscript N, const T& value = T()) : v_(N)
     {
         for (Subscript i=0; i<N; i++)
index 128f1b137bcfb12550dc2e2ba5182165948c9981..345cf0dc7170f8f77b9a98b57a6a375277f24c0b 100644 (file)
@@ -89,10 +89,6 @@ typedef void* NLContext;
 #define NL_SYMMETRIC        0x106
 #define NL_ERROR            0x108
 
-/* Enable / Disable */
-
-#define NL_NORMALIZE_ROWS  0x400
-
 /* Row parameters */
 
 #define NL_RIGHT_HAND_SIDE 0x500
@@ -142,7 +138,9 @@ void nlRightHandSideAdd(NLuint index, NLfloat value);
 
 /* Solve */
 
-NLboolean nlSolve(void);
+void nlPrintMatrix(void);
+NLboolean nlSolve();
+NLboolean nlSolveAdvanced(NLint *permutation, NLboolean solveAgain);
 
 #ifdef __cplusplus
 }
index 7773582e0272932262883ea2424bc18b7c5d29c3..c5518731c6bccf3e106cebbde1ad36d9715ad2f8 100644 (file)
  *
  *  Contact: Bruno Levy
  *
- *     levy@loria.fr
+ *      levy@loria.fr
  *
- *     ISA Project
- *     LORIA, INRIA Lorraine, 
- *     Campus Scientifique, BP 239
- *     54506 VANDOEUVRE LES NANCY CEDEX 
- *     FRANCE
+ *      ISA Project
+ *      LORIA, INRIA Lorraine, 
+ *      Campus Scientifique, BP 239
+ *      54506 VANDOEUVRE LES NANCY CEDEX 
+ *      FRANCE
  *
  *  Note that the GNU General Public License does not permit incorporating
  *  the Software into proprietary programs. 
 
 
 static void __nl_assertion_failed(char* cond, char* file, int line) {
-    fprintf(
-        stderr, 
-        "OpenNL assertion failed: %s, file:%s, line:%d\n",
-        cond,file,line
-    );
-    abort();
+       fprintf(
+               stderr, 
+               "OpenNL assertion failed: %s, file:%s, line:%d\n",
+               cond,file,line
+       );
+       abort();
 }
 
 static void __nl_range_assertion_failed(
-    float x, float min_val, float max_val, char* file, int line
+       float x, float min_val, float max_val, char* file, int line
 ) {
-    fprintf(
-        stderr, 
-        "OpenNL range assertion failed: %f in [ %f ... %f ], file:%s, line:%d\n",
-        x, min_val, max_val, file,line
-    );
-    abort();
+       fprintf(
+               stderr, 
+               "OpenNL range assertion failed: %f in [ %f ... %f ], file:%s, line:%d\n",
+               x, min_val, max_val, file,line
+       );
+       abort();
 }
 
 static void __nl_should_not_have_reached(char* file, int line) {
-    fprintf(
-        stderr, 
-        "OpenNL should not have reached this point: file:%s, line:%d\n",
-        file,line
-    );
-    abort();
+       fprintf(
+               stderr, 
+               "OpenNL should not have reached this point: file:%s, line:%d\n",
+               file,line
+       );
+       abort();
 }
 
 
-#define __nl_assert(x) {                                        \
-    if(!(x)) {                                                  \
-        __nl_assertion_failed(#x,__FILE__, __LINE__);          \
-    }                                                           \
+#define __nl_assert(x) {                                                                               \
+       if(!(x)) {                                                                                                \
+               __nl_assertion_failed(#x,__FILE__, __LINE__);             \
+       }                                                                                                                  \
 } 
 
-#define __nl_range_assert(x,min_val,max_val) {                  \
-    if(((x) < (min_val)) || ((x) > (max_val))) {                \
-        __nl_range_assertion_failed(x, min_val, max_val,        \
-            __FILE__, __LINE__                                  \
-        );                                                     \
-    }                                                           \
+#define __nl_range_assert(x,min_val,max_val) {                           \
+       if(((x) < (min_val)) || ((x) > (max_val))) {                            \
+               __nl_range_assertion_failed(x, min_val, max_val,                \
+                       __FILE__, __LINE__                                                                \
+               );                                                                                                       \
+       }                                                                                                                  \
 }
 
-#define __nl_assert_not_reached {                               \
-    __nl_should_not_have_reached(__FILE__, __LINE__);          \
+#define __nl_assert_not_reached {                                                         \
+       __nl_should_not_have_reached(__FILE__, __LINE__);                 \
 }
 
 #ifdef NL_DEBUG
@@ -135,301 +135,301 @@ static void __nl_should_not_have_reached(char* file, int line) {
 /************************************************************************************/
 /* memory management */
 
-#define __NL_NEW(T)                (T*)(calloc(1, sizeof(T))) 
-#define __NL_NEW_ARRAY(T,NB)       (T*)(calloc((NB),sizeof(T))) 
+#define __NL_NEW(T)                            (T*)(calloc(1, sizeof(T))) 
+#define __NL_NEW_ARRAY(T,NB)      (T*)(calloc((NB),sizeof(T))) 
 #define __NL_RENEW_ARRAY(T,x,NB)   (T*)(realloc(x,(NB)*sizeof(T))) 
-#define __NL_DELETE(x)             free(x); x = NULL 
-#define __NL_DELETE_ARRAY(x)       free(x); x = NULL
+#define __NL_DELETE(x)                  free(x); x = NULL 
+#define __NL_DELETE_ARRAY(x)      free(x); x = NULL
 
-#define __NL_CLEAR(T, x)           memset(x, 0, sizeof(T)) 
+#define __NL_CLEAR(T, x)                  memset(x, 0, sizeof(T)) 
 #define __NL_CLEAR_ARRAY(T,x,NB)   memset(x, 0, (NB)*sizeof(T)) 
 
 /************************************************************************************/
 /* Dynamic arrays for sparse row/columns */
 
 typedef struct {
-    NLuint   index;
-    NLfloat value;
+       NLuint   index;
+       NLfloat value;
 } __NLCoeff;
 
 typedef struct {
-    NLuint size;
-    NLuint capacity;
-    __NLCoeff* coeff;
+       NLuint size;
+       NLuint capacity;
+       __NLCoeff* coeff;
 } __NLRowColumn;
 
 static void __nlRowColumnConstruct(__NLRowColumn* c) {
-    c->size     = 0;
-    c->capacity = 0;
-    c->coeff    = NULL;
+       c->size  = 0;
+       c->capacity&nbs