[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [20623] branches/ge_dev: svn merge -r 20307:20622 https://svn.blender.org/svnroot/bf-blender/trunk/ blender

Benoit Bolsee benoit.bolsee at online.be
Thu Jun 4 15:02:07 CEST 2009


Revision: 20623
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=20623
Author:   ben2610
Date:     2009-06-04 15:02:07 +0200 (Thu, 04 Jun 2009)

Log Message:
-----------
svn merge -r 20307:20622 https://svn.blender.org/svnroot/bf-blender/trunk/blender

Modified Paths:
--------------
    branches/ge_dev/bin/.blender/locale/de/LC_MESSAGES/blender.mo
    branches/ge_dev/extern/bullet2/src/BulletDynamics/ConstraintSolver/btConeTwistConstraint.cpp
    branches/ge_dev/extern/bullet2/src/BulletDynamics/ConstraintSolver/btConeTwistConstraint.h
    branches/ge_dev/extern/bullet2/src/BulletDynamics/ConstraintSolver/btContactSolverInfo.h
    branches/ge_dev/extern/bullet2/src/BulletDynamics/ConstraintSolver/btGeneric6DofConstraint.cpp
    branches/ge_dev/extern/bullet2/src/BulletDynamics/ConstraintSolver/btGeneric6DofConstraint.h
    branches/ge_dev/extern/bullet2/src/BulletDynamics/ConstraintSolver/btSequentialImpulseConstraintSolver.cpp
    branches/ge_dev/extern/bullet2/src/BulletDynamics/ConstraintSolver/btSliderConstraint.cpp
    branches/ge_dev/extern/bullet2/src/BulletDynamics/ConstraintSolver/btSliderConstraint.h
    branches/ge_dev/extern/bullet2/src/LinearMath/btScalar.h
    branches/ge_dev/extern/ffmpeg/libavcodec/eval.c
    branches/ge_dev/extern/ffmpeg/libavcodec/x86/dsputil_mmx.c
    branches/ge_dev/extern/libopenjpeg/jp2.c
    branches/ge_dev/intern/SoundSystem/sdl/SND_SDLCDDevice.cpp
    branches/ge_dev/intern/guardedalloc/intern/mmap_win.c
    branches/ge_dev/intern/string/STR_String.h
    branches/ge_dev/po/de.po
    branches/ge_dev/release/Makefile
    branches/ge_dev/release/VERSION
    branches/ge_dev/release/datafiles/splash.jpg
    branches/ge_dev/release/scripts/bpymodules/BPyMathutils.py
    branches/ge_dev/release/scripts/bpymodules/BPyMesh.py
    branches/ge_dev/release/scripts/bpymodules/BPyMesh_redux.py
    branches/ge_dev/release/scripts/bpymodules/BPyWindow.py
    branches/ge_dev/release/scripts/bpymodules/colladaImEx/cstartup.py
    branches/ge_dev/release/scripts/bpymodules/colladaImEx/cutils.py
    branches/ge_dev/release/scripts/bpymodules/colladaImEx/translator.py
    branches/ge_dev/release/scripts/bpymodules/dxfLibrary.py
    branches/ge_dev/release/scripts/bpymodules/mesh_gradient.py
    branches/ge_dev/release/scripts/c3d_import.py
    branches/ge_dev/release/scripts/export_dxf.py
    branches/ge_dev/release/scripts/import_dxf.py
    branches/ge_dev/release/scripts/mesh_skin.py
    branches/ge_dev/release/scripts/mesh_unfolder.py
    branches/ge_dev/release/scripts/object_drop.py
    branches/ge_dev/release/scripts/ply_import.py
    branches/ge_dev/release/scripts/rvk1_torvk2.py
    branches/ge_dev/release/scripts/scripttemplate_gamelogic.py
    branches/ge_dev/release/scripts/uvcalc_quad_clickproj.py
    branches/ge_dev/release/scripts/uvcalc_smart_project.py
    branches/ge_dev/release/scripts/vertexpaint_selfshadow_ao.py
    branches/ge_dev/release/scripts/wizard_bolt_factory.py
    branches/ge_dev/release/scripts/wizard_curve2tree.py
    branches/ge_dev/source/blender/blenkernel/BKE_blender.h
    branches/ge_dev/source/blender/blenkernel/bad_level_call_stubs/stubs.c
    branches/ge_dev/source/blender/blenkernel/intern/anim.c
    branches/ge_dev/source/blender/blenkernel/intern/cloth.c
    branches/ge_dev/source/blender/blenkernel/intern/customdata.c
    branches/ge_dev/source/blender/blenkernel/intern/fluidsim.c
    branches/ge_dev/source/blender/blenkernel/intern/object.c
    branches/ge_dev/source/blender/blenkernel/intern/world.c
    branches/ge_dev/source/blender/blenkernel/intern/writeffmpeg.c
    branches/ge_dev/source/blender/blenlib/intern/storage.c
    branches/ge_dev/source/blender/blenlib/intern/util.c
    branches/ge_dev/source/blender/blenloader/intern/readfile.c
    branches/ge_dev/source/blender/gpu/intern/gpu_material.c
    branches/ge_dev/source/blender/imbuf/IMB_imbuf.h
    branches/ge_dev/source/blender/imbuf/intern/imageprocess.c
    branches/ge_dev/source/blender/imbuf/intern/openexr/openexr_api.cpp
    branches/ge_dev/source/blender/include/BSE_seqaudio.h
    branches/ge_dev/source/blender/include/BSE_sequence.h
    branches/ge_dev/source/blender/include/butspace.h
    branches/ge_dev/source/blender/makesdna/DNA_actuator_types.h
    branches/ge_dev/source/blender/makesdna/DNA_object_types.h
    branches/ge_dev/source/blender/makesdna/DNA_scene_types.h
    branches/ge_dev/source/blender/makesdna/DNA_sequence_types.h
    branches/ge_dev/source/blender/makesdna/DNA_space_types.h
    branches/ge_dev/source/blender/makesdna/DNA_world_types.h
    branches/ge_dev/source/blender/nodes/intern/SHD_nodes/SHD_material.c
    branches/ge_dev/source/blender/nodes/intern/SHD_nodes/SHD_vectMath.c
    branches/ge_dev/source/blender/nodes/intern/TEX_nodes/TEX_bricks.c
    branches/ge_dev/source/blender/nodes/intern/TEX_nodes/TEX_translate.c
    branches/ge_dev/source/blender/python/BPY_interface.c
    branches/ge_dev/source/blender/python/api2_2x/Constraint.c
    branches/ge_dev/source/blender/python/api2_2x/Geometry.c
    branches/ge_dev/source/blender/python/api2_2x/Material.c
    branches/ge_dev/source/blender/python/api2_2x/Mathutils.h
    branches/ge_dev/source/blender/python/api2_2x/Text3d.c
    branches/ge_dev/source/blender/python/api2_2x/World.c
    branches/ge_dev/source/blender/python/api2_2x/bpy_data.c
    branches/ge_dev/source/blender/python/api2_2x/bpy_internal_import.c
    branches/ge_dev/source/blender/python/api2_2x/bpy_internal_import.h
    branches/ge_dev/source/blender/python/api2_2x/doc/Material.py
    branches/ge_dev/source/blender/python/api2_2x/doc/Mathutils.py
    branches/ge_dev/source/blender/python/api2_2x/doc/World.py
    branches/ge_dev/source/blender/python/api2_2x/doc/epy_docgen.sh
    branches/ge_dev/source/blender/python/api2_2x/quat.c
    branches/ge_dev/source/blender/python/api2_2x/quat.h
    branches/ge_dev/source/blender/python/api2_2x/sceneRender.c
    branches/ge_dev/source/blender/python/api2_2x/sceneSequence.c
    branches/ge_dev/source/blender/python/api2_2x/vector.c
    branches/ge_dev/source/blender/python/api2_2x/vector.h
    branches/ge_dev/source/blender/render/extern/include/RE_shader_ext.h
    branches/ge_dev/source/blender/render/intern/source/rayshade.c
    branches/ge_dev/source/blender/render/intern/source/shadeoutput.c
    branches/ge_dev/source/blender/src/butspace.c
    branches/ge_dev/source/blender/src/buttons_editing.c
    branches/ge_dev/source/blender/src/buttons_logic.c
    branches/ge_dev/source/blender/src/buttons_object.c
    branches/ge_dev/source/blender/src/buttons_scene.c
    branches/ge_dev/source/blender/src/buttons_shading.c
    branches/ge_dev/source/blender/src/drawobject.c
    branches/ge_dev/source/blender/src/drawseq.c
    branches/ge_dev/source/blender/src/drawview.c
    branches/ge_dev/source/blender/src/editsima.c
    branches/ge_dev/source/blender/src/fluidsim.c
    branches/ge_dev/source/blender/src/hddaudio.c
    branches/ge_dev/source/blender/src/header_ipo.c
    branches/ge_dev/source/blender/src/header_seq.c
    branches/ge_dev/source/blender/src/headerbuttons.c
    branches/ge_dev/source/blender/src/imagepaint.c
    branches/ge_dev/source/blender/src/parametrizer.c
    branches/ge_dev/source/blender/src/seqaudio.c
    branches/ge_dev/source/blender/src/seqeffects.c
    branches/ge_dev/source/blender/src/sequence.c
    branches/ge_dev/source/blender/src/splash.jpg.c
    branches/ge_dev/source/blender/src/toolbox.c
    branches/ge_dev/source/creator/creator.c
    branches/ge_dev/source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp
    branches/ge_dev/source/gameengine/Converter/BL_BlenderDataConversion.cpp
    branches/ge_dev/source/gameengine/Converter/KX_BlenderSceneConverter.cpp
    branches/ge_dev/source/gameengine/Converter/KX_BlenderSceneConverter.h
    branches/ge_dev/source/gameengine/Converter/KX_ConvertActuators.cpp
    branches/ge_dev/source/gameengine/Converter/KX_ConvertSensors.cpp
    branches/ge_dev/source/gameengine/Expressions/CMakeLists.txt
    branches/ge_dev/source/gameengine/Expressions/ListValue.cpp
    branches/ge_dev/source/gameengine/Expressions/ListValue.h
    branches/ge_dev/source/gameengine/Expressions/PyObjectPlus.cpp
    branches/ge_dev/source/gameengine/Expressions/PyObjectPlus.h
    branches/ge_dev/source/gameengine/Expressions/Value.cpp
    branches/ge_dev/source/gameengine/Expressions/Value.h
    branches/ge_dev/source/gameengine/GameLogic/CMakeLists.txt
    branches/ge_dev/source/gameengine/GameLogic/Joystick/SCA_Joystick.cpp
    branches/ge_dev/source/gameengine/GameLogic/Joystick/SCA_Joystick.h
    branches/ge_dev/source/gameengine/GameLogic/Joystick/SCA_JoystickDefines.h
    branches/ge_dev/source/gameengine/GameLogic/Joystick/SCA_JoystickEvents.cpp
    branches/ge_dev/source/gameengine/GameLogic/SCA_IController.cpp
    branches/ge_dev/source/gameengine/GameLogic/SCA_ISensor.h
    branches/ge_dev/source/gameengine/GameLogic/SCA_JoystickSensor.cpp
    branches/ge_dev/source/gameengine/GameLogic/SCA_JoystickSensor.h
    branches/ge_dev/source/gameengine/GameLogic/SCA_PythonController.cpp
    branches/ge_dev/source/gameengine/GameLogic/SCA_RandomActuator.cpp
    branches/ge_dev/source/gameengine/GameLogic/SCA_RandomActuator.h
    branches/ge_dev/source/gameengine/GameLogic/SCA_RandomNumberGenerator.cpp
    branches/ge_dev/source/gameengine/GameLogic/SCA_RandomNumberGenerator.h
    branches/ge_dev/source/gameengine/GameLogic/SCA_RandomSensor.cpp
    branches/ge_dev/source/gameengine/GameLogic/SCA_RandomSensor.h
    branches/ge_dev/source/gameengine/GamePlayer/common/GPC_RenderTools.cpp
    branches/ge_dev/source/gameengine/Ketsji/KXNetwork/CMakeLists.txt
    branches/ge_dev/source/gameengine/Ketsji/KX_BlenderMaterial.cpp
    branches/ge_dev/source/gameengine/Ketsji/KX_BlenderMaterial.h
    branches/ge_dev/source/gameengine/Ketsji/KX_BulletPhysicsController.cpp
    branches/ge_dev/source/gameengine/Ketsji/KX_Camera.cpp
    branches/ge_dev/source/gameengine/Ketsji/KX_Camera.h
    branches/ge_dev/source/gameengine/Ketsji/KX_ClientObjectInfo.h
    branches/ge_dev/source/gameengine/Ketsji/KX_ConstraintWrapper.cpp
    branches/ge_dev/source/gameengine/Ketsji/KX_ConstraintWrapper.h
    branches/ge_dev/source/gameengine/Ketsji/KX_ConvertPhysicsObject.h
    branches/ge_dev/source/gameengine/Ketsji/KX_ConvertPhysicsObjects.cpp
    branches/ge_dev/source/gameengine/Ketsji/KX_GameActuator.cpp
    branches/ge_dev/source/gameengine/Ketsji/KX_GameObject.cpp
    branches/ge_dev/source/gameengine/Ketsji/KX_GameObject.h
    branches/ge_dev/source/gameengine/Ketsji/KX_KetsjiEngine.cpp
    branches/ge_dev/source/gameengine/Ketsji/KX_KetsjiEngine.h
    branches/ge_dev/source/gameengine/Ketsji/KX_Light.cpp
    branches/ge_dev/source/gameengine/Ketsji/KX_Light.h
    branches/ge_dev/source/gameengine/Ketsji/KX_MeshProxy.cpp
    branches/ge_dev/source/gameengine/Ketsji/KX_MouseFocusSensor.cpp
    branches/ge_dev/source/gameengine/Ketsji/KX_NearSensor.h
    branches/ge_dev/source/gameengine/Ketsji/KX_ParentActuator.cpp
    branches/ge_dev/source/gameengine/Ketsji/KX_ParentActuator.h
    branches/ge_dev/source/gameengine/Ketsji/KX_PolygonMaterial.cpp
    branches/ge_dev/source/gameengine/Ketsji/KX_PyConstraintBinding.cpp
    branches/ge_dev/source/gameengine/Ketsji/KX_PyMath.h
    branches/ge_dev/source/gameengine/Ketsji/KX_PythonInit.cpp
    branches/ge_dev/source/gameengine/Ketsji/KX_PythonInit.h
    branches/ge_dev/source/gameengine/Ketsji/KX_RadarSensor.h
    branches/ge_dev/source/gameengine/Ketsji/KX_Scene.cpp
    branches/ge_dev/source/gameengine/Ketsji/KX_TouchEventManager.cpp
    branches/ge_dev/source/gameengine/Ketsji/KX_TouchSensor.cpp
    branches/ge_dev/source/gameengine/Ketsji/KX_TouchSensor.h
    branches/ge_dev/source/gameengine/Physics/Bullet/CcdPhysicsController.cpp
    branches/ge_dev/source/gameengine/Physics/Bullet/CcdPhysicsController.h
    branches/ge_dev/source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.cpp
    branches/ge_dev/source/gameengine/PyDoc/GameLogic.py
    branches/ge_dev/source/gameengine/PyDoc/GameTypes.py
    branches/ge_dev/source/gameengine/Rasterizer/RAS_IPolygonMaterial.cpp
    branches/ge_dev/source/gameengine/Rasterizer/RAS_IPolygonMaterial.h
    branches/ge_dev/source/gameengine/Rasterizer/RAS_MeshObject.cpp
    branches/ge_dev/source/gameengine/Rasterizer/RAS_MeshObject.h
    branches/ge_dev/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLRasterizer.cpp
    branches/ge_dev/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLRasterizer.h
    branches/ge_dev/source/gameengine/VideoTexture/ImageBase.cpp
    branches/ge_dev/source/gameengine/VideoTexture/ImageBuff.cpp
    branches/ge_dev/source/gameengine/VideoTexture/ImageMix.cpp
    branches/ge_dev/source/gameengine/VideoTexture/ImageRender.cpp
    branches/ge_dev/source/gameengine/VideoTexture/PyTypeList.cpp
    branches/ge_dev/source/gameengine/VideoTexture/Texture.cpp
    branches/ge_dev/source/gameengine/VideoTexture/VideoBase.cpp
    branches/ge_dev/source/gameengine/VideoTexture/VideoBase.h
    branches/ge_dev/source/gameengine/VideoTexture/VideoFFmpeg.cpp
    branches/ge_dev/source/gameengine/VideoTexture/VideoFFmpeg.h
    branches/ge_dev/source/gameengine/VideoTexture/blendVideoTex.cpp
    branches/ge_dev/source/nan_definitions.mk

Added Paths:
-----------
    branches/ge_dev/extern/ffmpeg/patches/ffmpeg_work_around_ac3_sse2_crash.patch
    branches/ge_dev/release/scripts/animation_clean.py
    branches/ge_dev/release/scripts/scripttemplate_gamelogic_module.py
    branches/ge_dev/release/scripts/textplugin_convert_ge.py
    branches/ge_dev/release/text/release_249.txt

Removed Paths:
-------------
    branches/ge_dev/intern/SoundSystem/fmod/
    branches/ge_dev/release/text/release_247.txt
    branches/ge_dev/release/text/release_248.txt

Modified: branches/ge_dev/bin/.blender/locale/de/LC_MESSAGES/blender.mo
===================================================================
(Binary files differ)

Modified: branches/ge_dev/extern/bullet2/src/BulletDynamics/ConstraintSolver/btConeTwistConstraint.cpp
===================================================================
--- branches/ge_dev/extern/bullet2/src/BulletDynamics/ConstraintSolver/btConeTwistConstraint.cpp	2009-06-04 12:47:59 UTC (rev 20622)
+++ branches/ge_dev/extern/bullet2/src/BulletDynamics/ConstraintSolver/btConeTwistConstraint.cpp	2009-06-04 13:02:07 UTC (rev 20623)
@@ -22,13 +22,14 @@
 #include "LinearMath/btMinMax.h"
 #include <new>
 
-//-----------------------------------------------------------------------------
 
+
+//#define CONETWIST_USE_OBSOLETE_SOLVER true
 #define CONETWIST_USE_OBSOLETE_SOLVER false
 #define CONETWIST_DEF_FIX_THRESH btScalar(.05f)
 
-//-----------------------------------------------------------------------------
 
+
 btConeTwistConstraint::btConeTwistConstraint()
 :btTypedConstraint(CONETWIST_CONSTRAINT_TYPE),
 m_useSolveConstraintObsolete(CONETWIST_USE_OBSOLETE_SOLVER)
@@ -63,14 +64,14 @@
 	m_bMotorEnabled = false;
 	m_maxMotorImpulse = btScalar(-1);
 
-	setLimit(btScalar(1e30), btScalar(1e30), btScalar(1e30));
+	setLimit(btScalar(BT_LARGE_FLOAT), btScalar(BT_LARGE_FLOAT), btScalar(BT_LARGE_FLOAT));
 	m_damping = btScalar(0.01);
 	m_fixThresh = CONETWIST_DEF_FIX_THRESH;
 }
 
 
-//-----------------------------------------------------------------------------
 
+
 void btConeTwistConstraint::getInfo1 (btConstraintInfo1* info)
 {
 	if (m_useSolveConstraintObsolete)
@@ -99,10 +100,10 @@
 			info->nub--;
 		}
 	}
-} // btConeTwistConstraint::getInfo1()
+}
 	
-//-----------------------------------------------------------------------------
 
+
 void btConeTwistConstraint::getInfo2 (btConstraintInfo2* info)
 {
 	btAssert(!m_useSolveConstraintObsolete);
@@ -230,8 +231,8 @@
 	}
 }
 	
-//-----------------------------------------------------------------------------
 
+
 void	btConeTwistConstraint::buildJacobian()
 {
 	if (m_useSolveConstraintObsolete)
@@ -239,6 +240,7 @@
 		m_appliedImpulse = btScalar(0.);
 		m_accTwistLimitImpulse = btScalar(0.);
 		m_accSwingLimitImpulse = btScalar(0.);
+		m_accMotorImpulse = btVector3(0.,0.,0.);
 
 		if (!m_angularOnly)
 		{
@@ -277,8 +279,8 @@
 	}
 }
 
-//-----------------------------------------------------------------------------
 
+
 void	btConeTwistConstraint::solveConstraintObsolete(btSolverBody& bodyA,btSolverBody& bodyB,btScalar	timeStep)
 {
 	if (m_useSolveConstraintObsolete)
@@ -406,10 +408,10 @@
 
 			}
 		}
-		else // no motor: do a little damping
+		else if (m_damping > SIMD_EPSILON) // no motor: do a little damping
 		{
-			const btVector3& angVelA = getRigidBodyA().getAngularVelocity();
-			const btVector3& angVelB = getRigidBodyB().getAngularVelocity();
+			btVector3 angVelA; bodyA.getAngularVelocity(angVelA);
+			btVector3 angVelB; bodyB.getAngularVelocity(angVelB);
 			btVector3 relVel = angVelB - angVelA;
 			if (relVel.length2() > SIMD_EPSILON)
 			{
@@ -490,16 +492,16 @@
 
 }
 
-//-----------------------------------------------------------------------------
 
+
 void	btConeTwistConstraint::updateRHS(btScalar	timeStep)
 {
 	(void)timeStep;
 
 }
 
-//-----------------------------------------------------------------------------
 
+
 void btConeTwistConstraint::calcAngleInfo()
 {
 	m_swingCorrection = btScalar(0.);
@@ -584,26 +586,47 @@
 			m_twistAxis.normalize();
 		}
 	}
-} // btConeTwistConstraint::calcAngleInfo()
+}
 
 
 static btVector3 vTwist(1,0,0); // twist axis in constraint's space
 
-//-----------------------------------------------------------------------------
 
+
 void btConeTwistConstraint::calcAngleInfo2()
 {
 	m_swingCorrection = btScalar(0.);
 	m_twistLimitSign = btScalar(0.);
 	m_solveTwistLimit = false;
 	m_solveSwingLimit = false;
+	// compute rotation of A wrt B (in constraint space)
+	if (m_bMotorEnabled && (!m_useSolveConstraintObsolete))
+	{	// it is assumed that setMotorTarget() was alredy called 
+		// and motor target m_qTarget is within constraint limits
+		// TODO : split rotation to pure swing and pure twist
+		// compute desired transforms in world
+		btTransform trPose(m_qTarget);
+		btTransform trA = getRigidBodyA().getCenterOfMassTransform() * m_rbAFrame;
+		btTransform trB = getRigidBodyB().getCenterOfMassTransform() * m_rbBFrame;
+		btTransform trDeltaAB = trB * trPose * trA.inverse();
+		btQuaternion qDeltaAB = trDeltaAB.getRotation();
+		btVector3 swingAxis = 	btVector3(qDeltaAB.x(), qDeltaAB.y(), qDeltaAB.z());
+		m_swingAxis = swingAxis;
+		m_swingAxis.normalize();
+		m_swingCorrection = qDeltaAB.getAngle();
+		if(!btFuzzyZero(m_swingCorrection))
+		{
+			m_solveSwingLimit = true;
+		}
+		return;
+	}
 
+
 	{
 		// compute rotation of A wrt B (in constraint space)
 		btQuaternion qA = getRigidBodyA().getCenterOfMassTransform().getRotation() * m_rbAFrame.getRotation();
 		btQuaternion qB = getRigidBodyB().getCenterOfMassTransform().getRotation() * m_rbBFrame.getRotation();
 		btQuaternion qAB = qB.inverse() * qA;
-
 		// split rotation into cone and twist
 		// (all this is done from B's perspective. Maybe I should be averaging axes...)
 		btVector3 vConeNoTwist = quatRotate(qAB, vTwist); vConeNoTwist.normalize();
@@ -756,7 +779,7 @@
 			m_twistAngle = btScalar(0.f);
 		}
 	}
-} // btConeTwistConstraint::calcAngleInfo2()
+}
 
 
 
@@ -982,8 +1005,5 @@
 }
 
 
-//-----------------------------------------------------------------------------
-//-----------------------------------------------------------------------------
-//-----------------------------------------------------------------------------
 
 

Modified: branches/ge_dev/extern/bullet2/src/BulletDynamics/ConstraintSolver/btConeTwistConstraint.h
===================================================================
--- branches/ge_dev/extern/bullet2/src/BulletDynamics/ConstraintSolver/btConeTwistConstraint.h	2009-06-04 12:47:59 UTC (rev 20622)
+++ branches/ge_dev/extern/bullet2/src/BulletDynamics/ConstraintSolver/btConeTwistConstraint.h	2009-06-04 13:02:07 UTC (rev 20623)
@@ -17,6 +17,22 @@
 
 
 
+/*
+Overview:
+
+btConeTwistConstraint can be used to simulate ragdoll joints (upper arm, leg etc).
+It is a fixed translation, 3 degree-of-freedom (DOF) rotational "joint".
+It divides the 3 rotational DOFs into swing (movement within a cone) and twist.
+Swing is divided into swing1 and swing2 which can have different limits, giving an elliptical shape.
+(Note: the cone's base isn't flat, so this ellipse is "embedded" on the surface of a sphere.)
+
+In the contraint's frame of reference:
+twist is along the x-axis,
+and swing 1 and 2 are along the z and y axes respectively.
+*/
+
+
+
 #ifndef CONETWISTCONSTRAINT_H
 #define CONETWISTCONSTRAINT_H
 
@@ -141,7 +157,18 @@
 		};
 	}
 
-	void	setLimit(btScalar _swingSpan1,btScalar _swingSpan2,btScalar _twistSpan,  btScalar _softness = 1.f, btScalar _biasFactor = 0.3f, btScalar _relaxationFactor = 1.0f)
+	// setLimit(), a few notes:
+	// _softness:
+	//		0->1, recommend ~0.8->1.
+	//		describes % of limits where movement is free.
+	//		beyond this softness %, the limit is gradually enforced until the "hard" (1.0) limit is reached.
+	// _biasFactor:
+	//		0->1?, recommend 0.3 +/-0.3 or so.
+	//		strength with which constraint resists zeroth order (angular, not angular velocity) limit violation.
+	// __relaxationFactor:
+	//		0->1, recommend to stay near 1.
+	//		the lower the value, the less the constraint will fight velocities which violate the angular limits.
+	void	setLimit(btScalar _swingSpan1,btScalar _swingSpan2,btScalar _twistSpan, btScalar _softness = 1.f, btScalar _biasFactor = 0.3f, btScalar _relaxationFactor = 1.0f)
 	{
 		m_swingSpan1 = _swingSpan1;
 		m_swingSpan2 = _swingSpan2;

Modified: branches/ge_dev/extern/bullet2/src/BulletDynamics/ConstraintSolver/btContactSolverInfo.h
===================================================================
--- branches/ge_dev/extern/bullet2/src/BulletDynamics/ConstraintSolver/btContactSolverInfo.h	2009-06-04 12:47:59 UTC (rev 20622)
+++ branches/ge_dev/extern/bullet2/src/BulletDynamics/ConstraintSolver/btContactSolverInfo.h	2009-06-04 13:02:07 UTC (rev 20623)
@@ -77,7 +77,7 @@
 		m_splitImpulsePenetrationThreshold = -0.02f;
 		m_linearSlop = btScalar(0.0);
 		m_warmstartingFactor=btScalar(0.85);
-		m_solverMode = SOLVER_USE_WARMSTARTING | SOLVER_SIMD ;//SOLVER_RANDMIZE_ORDER
+		m_solverMode = SOLVER_USE_WARMSTARTING | SOLVER_USE_2_FRICTION_DIRECTIONS |SOLVER_SIMD | SOLVER_RANDMIZE_ORDER;
 		m_restingContactRestitutionThreshold = 2;//resting contact lifetime threshold to disable restitution
 	}
 };

Modified: branches/ge_dev/extern/bullet2/src/BulletDynamics/ConstraintSolver/btGeneric6DofConstraint.cpp
===================================================================
--- branches/ge_dev/extern/bullet2/src/BulletDynamics/ConstraintSolver/btGeneric6DofConstraint.cpp	2009-06-04 12:47:59 UTC (rev 20622)
+++ branches/ge_dev/extern/bullet2/src/BulletDynamics/ConstraintSolver/btGeneric6DofConstraint.cpp	2009-06-04 13:02:07 UTC (rev 20623)
@@ -22,12 +22,14 @@
 #include "btGeneric6DofConstraint.h"
 #include "BulletDynamics/Dynamics/btRigidBody.h"
 #include "LinearMath/btTransformUtil.h"
+#include "LinearMath/btTransformUtil.h"
 #include <new>
 
 
+
 #define D6_USE_OBSOLETE_METHOD false
-//-----------------------------------------------------------------------------
 
+
 btGeneric6DofConstraint::btGeneric6DofConstraint()
 :btTypedConstraint(D6_CONSTRAINT_TYPE),
 m_useLinearReferenceFrameA(true),
@@ -35,8 +37,8 @@
 {
 }
 
-//-----------------------------------------------------------------------------
 
+
 btGeneric6DofConstraint::btGeneric6DofConstraint(btRigidBody& rbA, btRigidBody& rbB, const btTransform& frameInA, const btTransform& frameInB, bool useLinearReferenceFrameA)
 : btTypedConstraint(D6_CONSTRAINT_TYPE, rbA, rbB)
 , m_frameInA(frameInA)
@@ -46,13 +48,13 @@
 {
 
 }
-//-----------------------------------------------------------------------------
 
 
+
 #define GENERIC_D6_DISABLE_WARMSTARTING 1
 
-//-----------------------------------------------------------------------------
 
+
 btScalar btGetMatrixElem(const btMatrix3x3& mat, int index);
 btScalar btGetMatrixElem(const btMatrix3x3& mat, int index)
 {
@@ -61,8 +63,8 @@
 	return mat[i][j];
 }
 
-//-----------------------------------------------------------------------------
 
+

@@ Diff output truncated at 10240 characters. @@




More information about the Bf-blender-cvs mailing list