[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [16308] branches/soc-2008-quorn: Merge from trunk 16122-16307
Ian Thompson
quornian at googlemail.com
Sat Aug 30 16:32:16 CEST 2008
Revision: 16308
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=16308
Author: quorn
Date: 2008-08-30 16:32:16 +0200 (Sat, 30 Aug 2008)
Log Message:
-----------
Merge from trunk 16122-16307
Modified Paths:
--------------
branches/soc-2008-quorn/CMake/macros.cmake
branches/soc-2008-quorn/CMakeLists.txt
branches/soc-2008-quorn/extern/bullet2/src/BulletCollision/CollisionDispatch/btCollisionWorld.cpp
branches/soc-2008-quorn/extern/bullet2/src/BulletCollision/CollisionDispatch/btCollisionWorld.h
branches/soc-2008-quorn/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btRaycastCallback.cpp
branches/soc-2008-quorn/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btRaycastCallback.h
branches/soc-2008-quorn/extern/bullet2/src/BulletDynamics/Dynamics/btDiscreteDynamicsWorld.cpp
branches/soc-2008-quorn/intern/guardedalloc/intern/mallocn.c
branches/soc-2008-quorn/intern/guardedalloc/intern/mmap_win.c
branches/soc-2008-quorn/intern/guardedalloc/make/msvc_7_0/guardedalloc.vcproj
branches/soc-2008-quorn/intern/guardedalloc/mmap_win.h
branches/soc-2008-quorn/intern/opennl/make/msvc_7_0/opennl.vcproj
branches/soc-2008-quorn/intern/opennl/superlu/smemory.c
branches/soc-2008-quorn/projectfiles_vc7/blender/blenkernel/BKE_blenkernel.vcproj
branches/soc-2008-quorn/projectfiles_vc7/gameengine/gamelogic/SCA_GameLogic.vcproj
branches/soc-2008-quorn/projectfiles_vc7/gameengine/ketsji/KX_ketsji.vcproj
branches/soc-2008-quorn/projectfiles_vc7/gameengine/physics/PHY_Physics/PHY_Bullet/PHY_Bullet.vcproj
branches/soc-2008-quorn/projectfiles_vc7/kernel/system/SYS_system.vcproj
branches/soc-2008-quorn/release/datafiles/datatoc.c
branches/soc-2008-quorn/release/scripts/flt_properties.py
branches/soc-2008-quorn/release/text/copyright.txt
branches/soc-2008-quorn/source/Makefile
branches/soc-2008-quorn/source/blender/blenkernel/BKE_blender.h
branches/soc-2008-quorn/source/blender/blenkernel/BKE_collision.h
branches/soc-2008-quorn/source/blender/blenkernel/BKE_customdata.h
branches/soc-2008-quorn/source/blender/blenkernel/BKE_deform.h
branches/soc-2008-quorn/source/blender/blenkernel/BKE_effect.h
branches/soc-2008-quorn/source/blender/blenkernel/BKE_endian.h
branches/soc-2008-quorn/source/blender/blenkernel/BKE_utildefines.h
branches/soc-2008-quorn/source/blender/blenkernel/intern/CCGSubSurf.c
branches/soc-2008-quorn/source/blender/blenkernel/intern/DerivedMesh.c
branches/soc-2008-quorn/source/blender/blenkernel/intern/bvhutils.c
branches/soc-2008-quorn/source/blender/blenkernel/intern/cloth.c
branches/soc-2008-quorn/source/blender/blenkernel/intern/collision.c
branches/soc-2008-quorn/source/blender/blenkernel/intern/deform.c
branches/soc-2008-quorn/source/blender/blenkernel/intern/displist.c
branches/soc-2008-quorn/source/blender/blenkernel/intern/effect.c
branches/soc-2008-quorn/source/blender/blenkernel/intern/icons.c
branches/soc-2008-quorn/source/blender/blenkernel/intern/image.c
branches/soc-2008-quorn/source/blender/blenkernel/intern/implicit.c
branches/soc-2008-quorn/source/blender/blenkernel/intern/ipo.c
branches/soc-2008-quorn/source/blender/blenkernel/intern/modifier.c
branches/soc-2008-quorn/source/blender/blenkernel/intern/particle.c
branches/soc-2008-quorn/source/blender/blenkernel/intern/particle_system.c
branches/soc-2008-quorn/source/blender/blenkernel/intern/sca.c
branches/soc-2008-quorn/source/blender/blenlib/BLI_editVert.h
branches/soc-2008-quorn/source/blender/blenlib/BLI_rand.h
branches/soc-2008-quorn/source/blender/blenlib/BLI_winstuff.h
branches/soc-2008-quorn/source/blender/blenlib/intern/BLI_ghash.c
branches/soc-2008-quorn/source/blender/blenlib/intern/BLI_kdopbvh.c
branches/soc-2008-quorn/source/blender/blenlib/intern/fileops.c
branches/soc-2008-quorn/source/blender/blenlib/intern/psfont.c
branches/soc-2008-quorn/source/blender/blenlib/intern/rand.c
branches/soc-2008-quorn/source/blender/blenlib/intern/util.c
branches/soc-2008-quorn/source/blender/blenloader/BLO_sys_types.h
branches/soc-2008-quorn/source/blender/blenloader/intern/genfile.c
branches/soc-2008-quorn/source/blender/blenloader/intern/readblenentry.c
branches/soc-2008-quorn/source/blender/blenloader/intern/readfile.c
branches/soc-2008-quorn/source/blender/blenloader/intern/writefile.c
branches/soc-2008-quorn/source/blender/blenpluginapi/intern/pluginapi.c
branches/soc-2008-quorn/source/blender/imbuf/intern/cineon/cineonlib.c
branches/soc-2008-quorn/source/blender/imbuf/intern/cineon/dpxlib.c
branches/soc-2008-quorn/source/blender/imbuf/intern/cineon/logImageCore.h
branches/soc-2008-quorn/source/blender/imbuf/intern/cineon/logmemfile.c
branches/soc-2008-quorn/source/blender/imbuf/intern/cineon/logmemfile.h
branches/soc-2008-quorn/source/blender/imbuf/intern/scaling.c
branches/soc-2008-quorn/source/blender/include/BDR_gpencil.h
branches/soc-2008-quorn/source/blender/include/BIF_drawgpencil.h
branches/soc-2008-quorn/source/blender/include/BIF_editarmature.h
branches/soc-2008-quorn/source/blender/include/BIF_editview.h
branches/soc-2008-quorn/source/blender/include/BIF_meshtools.h
branches/soc-2008-quorn/source/blender/include/BIF_resources.h
branches/soc-2008-quorn/source/blender/include/BSE_drawipo.h
branches/soc-2008-quorn/source/blender/include/transform.h
branches/soc-2008-quorn/source/blender/makesdna/DNA_actuator_types.h
branches/soc-2008-quorn/source/blender/makesdna/DNA_gpencil_types.h
branches/soc-2008-quorn/source/blender/makesdna/DNA_ipo_types.h
branches/soc-2008-quorn/source/blender/makesdna/DNA_modifier_types.h
branches/soc-2008-quorn/source/blender/makesdna/DNA_object_force.h
branches/soc-2008-quorn/source/blender/makesdna/DNA_particle_types.h
branches/soc-2008-quorn/source/blender/makesdna/DNA_sensor_types.h
branches/soc-2008-quorn/source/blender/makesdna/DNA_space_types.h
branches/soc-2008-quorn/source/blender/makesdna/DNA_userdef_types.h
branches/soc-2008-quorn/source/blender/makesdna/intern/makesdna.c
branches/soc-2008-quorn/source/blender/python/api2_2x/Draw.c
branches/soc-2008-quorn/source/blender/python/api2_2x/Material.c
branches/soc-2008-quorn/source/blender/python/api2_2x/Mesh.c
branches/soc-2008-quorn/source/blender/python/api2_2x/Object.c
branches/soc-2008-quorn/source/blender/python/api2_2x/Particle.c
branches/soc-2008-quorn/source/blender/python/api2_2x/Text3d.c
branches/soc-2008-quorn/source/blender/python/api2_2x/doc/Material.py
branches/soc-2008-quorn/source/blender/python/api2_2x/doc/Mathutils.py
branches/soc-2008-quorn/source/blender/python/api2_2x/doc/Object.py
branches/soc-2008-quorn/source/blender/python/api2_2x/doc/Text3d.py
branches/soc-2008-quorn/source/blender/python/api2_2x/vector.c
branches/soc-2008-quorn/source/blender/python/api2_2x/vector.h
branches/soc-2008-quorn/source/blender/radiosity/CMakeLists.txt
branches/soc-2008-quorn/source/blender/radiosity/SConscript
branches/soc-2008-quorn/source/blender/radiosity/intern/source/Makefile
branches/soc-2008-quorn/source/blender/radiosity/intern/source/radnode.c
branches/soc-2008-quorn/source/blender/radiosity/intern/source/radpreprocess.c
branches/soc-2008-quorn/source/blender/render/CMakeLists.txt
branches/soc-2008-quorn/source/blender/render/SConscript
branches/soc-2008-quorn/source/blender/render/intern/include/render_types.h
branches/soc-2008-quorn/source/blender/render/intern/source/convertblender.c
branches/soc-2008-quorn/source/blender/render/intern/source/occlusion.c
branches/soc-2008-quorn/source/blender/render/intern/source/pipeline.c
branches/soc-2008-quorn/source/blender/render/intern/source/rendercore.c
branches/soc-2008-quorn/source/blender/render/intern/source/shadbuf.c
branches/soc-2008-quorn/source/blender/render/intern/source/strand.c
branches/soc-2008-quorn/source/blender/render/intern/source/zbuf.c
branches/soc-2008-quorn/source/blender/src/buttons_editing.c
branches/soc-2008-quorn/source/blender/src/buttons_logic.c
branches/soc-2008-quorn/source/blender/src/buttons_object.c
branches/soc-2008-quorn/source/blender/src/buttons_scene.c
branches/soc-2008-quorn/source/blender/src/drawgpencil.c
branches/soc-2008-quorn/source/blender/src/drawipo.c
branches/soc-2008-quorn/source/blender/src/drawmesh.c
branches/soc-2008-quorn/source/blender/src/drawobject.c
branches/soc-2008-quorn/source/blender/src/editarmature.c
branches/soc-2008-quorn/source/blender/src/editipo.c
branches/soc-2008-quorn/source/blender/src/editipo_lib.c
branches/soc-2008-quorn/source/blender/src/editkey.c
branches/soc-2008-quorn/source/blender/src/editmesh_mods.c
branches/soc-2008-quorn/source/blender/src/editmesh_tools.c
branches/soc-2008-quorn/source/blender/src/editnode.c
branches/soc-2008-quorn/source/blender/src/editobject.c
branches/soc-2008-quorn/source/blender/src/editview.c
branches/soc-2008-quorn/source/blender/src/gpencil.c
branches/soc-2008-quorn/source/blender/src/header_info.c
branches/soc-2008-quorn/source/blender/src/header_script.c
branches/soc-2008-quorn/source/blender/src/header_view3d.c
branches/soc-2008-quorn/source/blender/src/interface.c
branches/soc-2008-quorn/source/blender/src/meshlaplacian.c
branches/soc-2008-quorn/source/blender/src/meshtools.c
branches/soc-2008-quorn/source/blender/src/parametrizer.c
branches/soc-2008-quorn/source/blender/src/parametrizer.h
branches/soc-2008-quorn/source/blender/src/parametrizer_intern.h
branches/soc-2008-quorn/source/blender/src/renderwin.c
branches/soc-2008-quorn/source/blender/src/resources.c
branches/soc-2008-quorn/source/blender/src/space.c
branches/soc-2008-quorn/source/blender/src/toolbox.c
branches/soc-2008-quorn/source/blender/src/transform_conversions.c
branches/soc-2008-quorn/source/blender/src/transform_generics.c
branches/soc-2008-quorn/source/blender/src/transform_numinput.c
branches/soc-2008-quorn/source/blender/src/usiblender.c
branches/soc-2008-quorn/source/blender/yafray/intern/export_Plugin.cpp
branches/soc-2008-quorn/source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp
branches/soc-2008-quorn/source/gameengine/BlenderRoutines/KX_BlenderRenderTools.cpp
branches/soc-2008-quorn/source/gameengine/BlenderRoutines/KX_BlenderRenderTools.h
branches/soc-2008-quorn/source/gameengine/Converter/BL_BlenderDataConversion.cpp
branches/soc-2008-quorn/source/gameengine/Converter/KX_ConvertActuators.cpp
branches/soc-2008-quorn/source/gameengine/Converter/KX_ConvertSensors.cpp
branches/soc-2008-quorn/source/gameengine/Expressions/PyObjectPlus.h
branches/soc-2008-quorn/source/gameengine/GameLogic/SCA_IController.cpp
branches/soc-2008-quorn/source/gameengine/GameLogic/SCA_ISensor.cpp
branches/soc-2008-quorn/source/gameengine/GameLogic/SCA_ISensor.h
branches/soc-2008-quorn/source/gameengine/GameLogic/SCA_KeyboardSensor.cpp
branches/soc-2008-quorn/source/gameengine/GameLogic/SCA_LogicManager.cpp
branches/soc-2008-quorn/source/gameengine/GameLogic/SCA_LogicManager.h
branches/soc-2008-quorn/source/gameengine/GameLogic/SCA_PythonController.cpp
branches/soc-2008-quorn/source/gameengine/GameLogic/SCA_PythonController.h
branches/soc-2008-quorn/source/gameengine/GamePlayer/common/GPC_RenderTools.cpp
branches/soc-2008-quorn/source/gameengine/GamePlayer/common/GPC_RenderTools.h
branches/soc-2008-quorn/source/gameengine/GamePlayer/ghost/GPG_Application.cpp
branches/soc-2008-quorn/source/gameengine/GamePlayer/ghost/GPG_Application.h
branches/soc-2008-quorn/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp
branches/soc-2008-quorn/source/gameengine/Ketsji/KX_ConstraintActuator.cpp
branches/soc-2008-quorn/source/gameengine/Ketsji/KX_ConstraintActuator.h
branches/soc-2008-quorn/source/gameengine/Ketsji/KX_ConvertPhysicsObjects.cpp
branches/soc-2008-quorn/source/gameengine/Ketsji/KX_GameObject.cpp
branches/soc-2008-quorn/source/gameengine/Ketsji/KX_GameObject.h
branches/soc-2008-quorn/source/gameengine/Ketsji/KX_IPO_SGController.cpp
branches/soc-2008-quorn/source/gameengine/Ketsji/KX_MaterialIpoController.cpp
branches/soc-2008-quorn/source/gameengine/Ketsji/KX_MeshProxy.cpp
branches/soc-2008-quorn/source/gameengine/Ketsji/KX_MeshProxy.h
branches/soc-2008-quorn/source/gameengine/Ketsji/KX_MouseFocusSensor.cpp
branches/soc-2008-quorn/source/gameengine/Ketsji/KX_MouseFocusSensor.h
branches/soc-2008-quorn/source/gameengine/Ketsji/KX_PythonInit.cpp
branches/soc-2008-quorn/source/gameengine/Ketsji/KX_RayCast.cpp
branches/soc-2008-quorn/source/gameengine/Ketsji/KX_RayCast.h
branches/soc-2008-quorn/source/gameengine/Ketsji/KX_RaySensor.cpp
branches/soc-2008-quorn/source/gameengine/Ketsji/KX_RaySensor.h
branches/soc-2008-quorn/source/gameengine/Ketsji/KX_SCA_AddObjectActuator.cpp
branches/soc-2008-quorn/source/gameengine/Ketsji/KX_SCA_AddObjectActuator.h
branches/soc-2008-quorn/source/gameengine/Ketsji/KX_Scene.cpp
branches/soc-2008-quorn/source/gameengine/Ketsji/KX_Scene.h
branches/soc-2008-quorn/source/gameengine/Ketsji/KX_SoundActuator.cpp
branches/soc-2008-quorn/source/gameengine/Ketsji/Makefile
branches/soc-2008-quorn/source/gameengine/Physics/BlOde/OdePhysicsEnvironment.cpp
branches/soc-2008-quorn/source/gameengine/Physics/BlOde/OdePhysicsEnvironment.h
branches/soc-2008-quorn/source/gameengine/Physics/Bullet/CMakeLists.txt
branches/soc-2008-quorn/source/gameengine/Physics/Bullet/CcdPhysicsController.cpp
branches/soc-2008-quorn/source/gameengine/Physics/Bullet/CcdPhysicsController.h
branches/soc-2008-quorn/source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.cpp
branches/soc-2008-quorn/source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.h
branches/soc-2008-quorn/source/gameengine/Physics/Bullet/Makefile
branches/soc-2008-quorn/source/gameengine/Physics/Bullet/SConscript
branches/soc-2008-quorn/source/gameengine/Physics/Dummy/DummyPhysicsEnvironment.cpp
branches/soc-2008-quorn/source/gameengine/Physics/Dummy/DummyPhysicsEnvironment.h
branches/soc-2008-quorn/source/gameengine/Physics/Sumo/SumoPhysicsEnvironment.cpp
branches/soc-2008-quorn/source/gameengine/Physics/Sumo/SumoPhysicsEnvironment.h
branches/soc-2008-quorn/source/gameengine/Physics/common/PHY_DynamicTypes.h
branches/soc-2008-quorn/source/gameengine/Physics/common/PHY_IPhysicsEnvironment.h
branches/soc-2008-quorn/source/gameengine/PyDoc/GameKeys.py
branches/soc-2008-quorn/source/gameengine/PyDoc/GameLogic.py
branches/soc-2008-quorn/source/gameengine/PyDoc/KX_GameObject.py
branches/soc-2008-quorn/source/gameengine/PyDoc/KX_MeshProxy.py
branches/soc-2008-quorn/source/gameengine/PyDoc/KX_SCA_AddObjectActuator.py
branches/soc-2008-quorn/source/gameengine/PyDoc/SCA_ISensor.py
branches/soc-2008-quorn/source/gameengine/Rasterizer/RAS_MeshObject.cpp
branches/soc-2008-quorn/source/gameengine/Rasterizer/RAS_MeshObject.h
branches/soc-2008-quorn/source/kernel/CMakeLists.txt
branches/soc-2008-quorn/source/kernel/SConscript
branches/soc-2008-quorn/source/kernel/gen_system/GEN_HashedPtr.cpp
branches/soc-2008-quorn/source/kernel/gen_system/Makefile
branches/soc-2008-quorn/source/nan_definitions.mk
Added Paths:
-----------
branches/soc-2008-quorn/intern/guardedalloc/BLO_sys_types.h
branches/soc-2008-quorn/intern/opennl/superlu/BLO_sys_types.h
branches/soc-2008-quorn/release/scripts/flt_dofedit.py
branches/soc-2008-quorn/release/scripts/flt_lodedit.py
branches/soc-2008-quorn/source/blender/blenkernel/BKE_shrinkwrap.h
branches/soc-2008-quorn/source/blender/blenkernel/intern/shrinkwrap.c
branches/soc-2008-quorn/source/gameengine/GameLogic/SCA_DelaySensor.cpp
branches/soc-2008-quorn/source/gameengine/GameLogic/SCA_DelaySensor.h
branches/soc-2008-quorn/source/gameengine/Ketsji/KX_PolyProxy.cpp
branches/soc-2008-quorn/source/gameengine/Ketsji/KX_PolyProxy.h
branches/soc-2008-quorn/source/gameengine/PyDoc/KX_PolyProxy.py
branches/soc-2008-quorn/source/gameengine/PyDoc/SCA_DelaySensor.py
Modified: branches/soc-2008-quorn/CMake/macros.cmake
===================================================================
--- branches/soc-2008-quorn/CMake/macros.cmake 2008-08-30 12:20:43 UTC (rev 16307)
+++ branches/soc-2008-quorn/CMake/macros.cmake 2008-08-30 14:32:16 UTC (rev 16308)
@@ -38,6 +38,8 @@
ENDMACRO(BLENDERLIB)
MACRO(SETUP_LIBDIRS)
+ # see "cmake --help-policy CMP0003"
+ CMAKE_POLICY(SET CMP0003 NEW)
LINK_DIRECTORIES(${PYTHON_LIBPATH} ${SDL_LIBPATH} ${JPEG_LIBPATH} ${PNG_LIBPATH} ${ZLIB_LIBPATH} ${ICONV_LIBPATH} ${OPENEXR_LIBPATH} ${QUICKTIME_LIBPATH} ${FFMPEG_LIBPATH})
IF(WITH_INTERNATIONAL)
LINK_DIRECTORIES(${GETTEXT_LIBPATH})
Modified: branches/soc-2008-quorn/CMakeLists.txt
===================================================================
--- branches/soc-2008-quorn/CMakeLists.txt 2008-08-30 12:20:43 UTC (rev 16307)
+++ branches/soc-2008-quorn/CMakeLists.txt 2008-08-30 14:32:16 UTC (rev 16308)
@@ -63,7 +63,6 @@
OPTION(WITH_OPENEXR "Enable OpenEXR Support (http://www.openexr.com)" ON)
OPTION(WITH_FFMPEG "Enable FFMPeg Support (http://ffmpeg.mplayerhq.hu/)" OFF)
OPTION(WITH_OPENAL "Enable OpenAL Support (http://www.openal.org)" ON)
-OPTION(YESIAMSTUPID "Enable execution on 64-bit platforms" OFF)
OPTION(WITH_OPENMP "Enable OpenMP (has to be supported by the compiler)" OFF)
IF(NOT WITH_GAMEENGINE AND WITH_PLAYER)
Modified: branches/soc-2008-quorn/extern/bullet2/src/BulletCollision/CollisionDispatch/btCollisionWorld.cpp
===================================================================
--- branches/soc-2008-quorn/extern/bullet2/src/BulletCollision/CollisionDispatch/btCollisionWorld.cpp 2008-08-30 12:20:43 UTC (rev 16307)
+++ branches/soc-2008-quorn/extern/bullet2/src/BulletCollision/CollisionDispatch/btCollisionWorld.cpp 2008-08-30 14:32:16 UTC (rev 16308)
@@ -181,7 +181,9 @@
btCollisionObject* collisionObject,
const btCollisionShape* collisionShape,
const btTransform& colObjWorldTransform,
- RayResultCallback& resultCallback,short int collisionFilterMask)
+ RayResultCallback& resultCallback,
+ short int collisionFilterMask,
+ bool faceNormal)
{
btSphereShape pointShape(btScalar(0.0));
@@ -191,14 +193,16 @@
collisionObject,
collisionShape,
colObjWorldTransform,
- resultCallback,collisionFilterMask);
+ resultCallback,collisionFilterMask,faceNormal);
}
void btCollisionWorld::objectQuerySingle(const btConvexShape* castShape,const btTransform& rayFromTrans,const btTransform& rayToTrans,
btCollisionObject* collisionObject,
const btCollisionShape* collisionShape,
const btTransform& colObjWorldTransform,
- RayResultCallback& resultCallback,short int collisionFilterMask)
+ RayResultCallback& resultCallback,
+ short int collisionFilterMask,
+ bool faceNormal)
{
@@ -257,9 +261,9 @@
btCollisionObject* m_collisionObject;
btTriangleMeshShape* m_triangleMesh;
- BridgeTriangleRaycastCallback( const btVector3& from,const btVector3& to,
- btCollisionWorld::RayResultCallback* resultCallback, btCollisionObject* collisionObject,btTriangleMeshShape* triangleMesh):
- btTriangleRaycastCallback(from,to),
+ BridgeTriangleRaycastCallback( const btVector3& from,const btVector3& to,bool faceNormal,
+ btCollisionWorld::RayResultCallback* resultCallback, btCollisionObject* collisionObject,btTriangleMeshShape* triangleMesh):
+ btTriangleRaycastCallback(from,to,faceNormal),
m_resultCallback(resultCallback),
m_collisionObject(collisionObject),
m_triangleMesh(triangleMesh)
@@ -272,6 +276,7 @@
btCollisionWorld::LocalShapeInfo shapeInfo;
shapeInfo.m_shapePart = partId;
shapeInfo.m_triangleIndex = triangleIndex;
+ shapeInfo.m_triangleShape = m_triangleMesh;
btCollisionWorld::LocalRayResult rayResult
(m_collisionObject,
@@ -287,7 +292,7 @@
};
- BridgeTriangleRaycastCallback rcb(rayFromLocal,rayToLocal,&resultCallback,collisionObject,triangleMesh);
+ BridgeTriangleRaycastCallback rcb(rayFromLocal,rayToLocal,faceNormal,&resultCallback,collisionObject,triangleMesh);
rcb.m_hitFraction = resultCallback.m_closestHitFraction;
btVector3 rayAabbMinLocal = rayFromLocal;
@@ -313,7 +318,7 @@
collisionObject,
childCollisionShape,
childWorldTrans,
- resultCallback, collisionFilterMask);
+ resultCallback, collisionFilterMask, faceNormal);
}
@@ -323,7 +328,7 @@
}
}
-void btCollisionWorld::rayTest(const btVector3& rayFromWorld, const btVector3& rayToWorld, RayResultCallback& resultCallback,short int collisionFilterMask)
+void btCollisionWorld::rayTest(const btVector3& rayFromWorld, const btVector3& rayToWorld, RayResultCallback& resultCallback,short int collisionFilterMask, bool faceNormal)
{
@@ -350,11 +355,17 @@
btVector3 hitNormal;
if (btRayAabb(rayFromWorld,rayToWorld,collisionObjectAabbMin,collisionObjectAabbMax,hitLambda,hitNormal))
{
- rayTestSingle(rayFromTrans,rayToTrans,
- collisionObject,
- collisionObject->getCollisionShape(),
- collisionObject->getWorldTransform(),
- resultCallback);
+ // before testing this object, verify that it is not filtered out
+ if (resultCallback.NeedRayCast(collisionObject))
+ {
+ rayTestSingle(rayFromTrans,rayToTrans,
+ collisionObject,
+ collisionObject->getCollisionShape(),
+ collisionObject->getWorldTransform(),
+ resultCallback,
+ collisionFilterMask,
+ faceNormal);
+ }
}
}
}
Modified: branches/soc-2008-quorn/extern/bullet2/src/BulletCollision/CollisionDispatch/btCollisionWorld.h
===================================================================
--- branches/soc-2008-quorn/extern/bullet2/src/BulletCollision/CollisionDispatch/btCollisionWorld.h 2008-08-30 12:20:43 UTC (rev 16307)
+++ branches/soc-2008-quorn/extern/bullet2/src/BulletCollision/CollisionDispatch/btCollisionWorld.h 2008-08-30 14:32:16 UTC (rev 16308)
@@ -125,8 +125,8 @@
{
int m_shapePart;
int m_triangleIndex;
-
- //const btCollisionShape* m_shapeTemp;
+ // needed in case of compound shape
+ const btCollisionShape* m_triangleShape;
//const btTransform* m_shapeLocalTransform;
};
@@ -166,6 +166,10 @@
:m_closestHitFraction(btScalar(1.))
{
}
+ virtual bool NeedRayCast(btCollisionObject* object)
+ {
+ return true;
+ }
virtual btScalar AddSingleResult(LocalRayResult& rayResult) = 0;
};
@@ -209,7 +213,7 @@
/// rayTest performs a raycast on all objects in the btCollisionWorld, and calls the resultCallback
/// This allows for several queries: first hit, all hits, any hit, dependent on the value returned by the callback.
- void rayTest(const btVector3& rayFromWorld, const btVector3& rayToWorld, RayResultCallback& resultCallback, short int collisionFilterMask=-1);
+ void rayTest(const btVector3& rayFromWorld, const btVector3& rayToWorld, RayResultCallback& resultCallback, short int collisionFilterMask=-1, bool faceNormal=false);
/// rayTestSingle performs a raycast call and calls the resultCallback. It is used internally by rayTest.
/// In a future implementation, we consider moving the ray test as a virtual method in btCollisionShape.
@@ -218,14 +222,18 @@
btCollisionObject* collisionObject,
const btCollisionShape* collisionShape,
const btTransform& colObjWorldTransform,
- RayResultCallback& resultCallback, short int collisionFilterMask=-1);
+ RayResultCallback& resultCallback,
+ short int collisionFilterMask=-1,
+ bool faceNormal=false);
/// objectQuerySingle performs a collision detection query and calls the resultCallback. It is used internally by rayTest.
static void objectQuerySingle(const btConvexShape* castShape, const btTransform& rayFromTrans,const btTransform& rayToTrans,
btCollisionObject* collisionObject,
const btCollisionShape* collisionShape,
const btTransform& colObjWorldTransform,
- RayResultCallback& resultCallback, short int collisionFilterMask=-1);
+ RayResultCallback& resultCallback,
+ short int collisionFilterMask=-1,
+ bool faceNormal=false);
void addCollisionObject(btCollisionObject* collisionObject,short int collisionFilterGroup=1,short int collisionFilterMask=1);
Modified: branches/soc-2008-quorn/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btRaycastCallback.cpp
===================================================================
--- branches/soc-2008-quorn/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btRaycastCallback.cpp 2008-08-30 12:20:43 UTC (rev 16307)
+++ branches/soc-2008-quorn/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btRaycastCallback.cpp 2008-08-30 14:32:16 UTC (rev 16308)
@@ -16,10 +16,11 @@
#include "btRaycastCallback.h"
-btTriangleRaycastCallback::btTriangleRaycastCallback(const btVector3& from,const btVector3& to)
+btTriangleRaycastCallback::btTriangleRaycastCallback(const btVector3& from,const btVector3& to,bool faceNormal)
:
m_from(from),
m_to(to),
+ m_faceNormal(faceNormal),
m_hitFraction(btScalar(1.))
{
@@ -84,8 +85,7 @@
if ( (btScalar)(cp2.dot(triangleNormal)) >=edge_tolerance)
{
-
- if ( dist_a > 0 )
+ if (m_faceNormal || dist_a > 0)
{
m_hitFraction = reportHit(triangleNormal,distance,partId,triangleIndex);
}
Modified: branches/soc-2008-quorn/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btRaycastCallback.h
===================================================================
--- branches/soc-2008-quorn/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btRaycastCallback.h 2008-08-30 12:20:43 UTC (rev 16307)
+++ branches/soc-2008-quorn/extern/bullet2/src/BulletCollision/NarrowPhaseCollision/btRaycastCallback.h 2008-08-30 14:32:16 UTC (rev 16308)
@@ -27,10 +27,11 @@
//input
btVector3 m_from;
btVector3 m_to;
+ bool m_faceNormal;
btScalar m_hitFraction;
- btTriangleRaycastCallback(const btVector3& from,const btVector3& to);
+ btTriangleRaycastCallback(const btVector3& from,const btVector3& to,bool faceNormal);
virtual void processTriangle(btVector3* triangle, int partId, int triangleIndex);
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list