[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [11622] branches/soc-2007-hcube: Merge 11303:11621

Csaba Hruska csaba.hruska at gmail.com
Thu Aug 16 09:41:49 CEST 2007


Revision: 11622
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=11622
Author:   hcube
Date:     2007-08-16 09:41:48 +0200 (Thu, 16 Aug 2007)

Log Message:
-----------
Merge 11303:11621

Modified Paths:
--------------
    branches/soc-2007-hcube/SConstruct
    branches/soc-2007-hcube/bin/.blender/.Blanguages
    branches/soc-2007-hcube/bin/.blender/locale/cs/LC_MESSAGES/blender.mo
    branches/soc-2007-hcube/doc/blender-scons.txt
    branches/soc-2007-hcube/extern/bullet2/src/BulletDynamics/ConstraintSolver/btHingeConstraint.cpp
    branches/soc-2007-hcube/extern/bullet2/src/BulletDynamics/ConstraintSolver/btHingeConstraint.h
    branches/soc-2007-hcube/intern/bsp/intern/BSP_CSGMesh_CFIterator.h
    branches/soc-2007-hcube/intern/ghost/intern/GHOST_DisplayManager.cpp
    branches/soc-2007-hcube/intern/opennl/extern/ONL_opennl.h
    branches/soc-2007-hcube/intern/opennl/intern/opennl.c
    branches/soc-2007-hcube/po/Makefile
    branches/soc-2007-hcube/po/cs.po
    branches/soc-2007-hcube/projectfiles_vc7/blender/ftfont/FTF_ftfont.vcproj
    branches/soc-2007-hcube/projectfiles_vc7/blender/render/BRE_render.vcproj
    branches/soc-2007-hcube/projectfiles_vc7/blender/src/BL_src.vcproj
    branches/soc-2007-hcube/release/scripts/3ds_import.py
    branches/soc-2007-hcube/release/scripts/DirectX8Importer.py
    branches/soc-2007-hcube/release/scripts/ac3d_import.py
    branches/soc-2007-hcube/release/scripts/bpymodules/BPyMesh.py
    branches/soc-2007-hcube/release/scripts/bpymodules/colladaImEx/collada.py
    branches/soc-2007-hcube/release/scripts/bpymodules/colladaImEx/cstartup.py
    branches/soc-2007-hcube/release/scripts/bpymodules/colladaImEx/cutils.py
    branches/soc-2007-hcube/release/scripts/bpymodules/colladaImEx/helperObjects.py
    branches/soc-2007-hcube/release/scripts/bpymodules/colladaImEx/xmlUtils.py
    branches/soc-2007-hcube/release/scripts/bvh_import.py
    branches/soc-2007-hcube/release/scripts/colladaExport14.py
    branches/soc-2007-hcube/release/scripts/colladaImport14.py
    branches/soc-2007-hcube/release/scripts/export_fbx.py
    branches/soc-2007-hcube/release/scripts/import_obj.py
    branches/soc-2007-hcube/release/scripts/lightwave_import.py
    branches/soc-2007-hcube/release/scripts/ply_import.py
    branches/soc-2007-hcube/release/scripts/uv_export.py
    branches/soc-2007-hcube/release/scripts/vertexpaint_selfshadow_ao.py
    branches/soc-2007-hcube/release/text/BlenderQuickStart.pdf
    branches/soc-2007-hcube/source/blender/blenkernel/BKE_DerivedMesh.h
    branches/soc-2007-hcube/source/blender/blenkernel/BKE_action.h
    branches/soc-2007-hcube/source/blender/blenkernel/BKE_constraint.h
    branches/soc-2007-hcube/source/blender/blenkernel/BKE_global.h
    branches/soc-2007-hcube/source/blender/blenkernel/BKE_lattice.h
    branches/soc-2007-hcube/source/blender/blenkernel/BKE_modifier.h
    branches/soc-2007-hcube/source/blender/blenkernel/BKE_object.h
    branches/soc-2007-hcube/source/blender/blenkernel/intern/DerivedMesh.c
    branches/soc-2007-hcube/source/blender/blenkernel/intern/action.c
    branches/soc-2007-hcube/source/blender/blenkernel/intern/anim.c
    branches/soc-2007-hcube/source/blender/blenkernel/intern/armature.c
    branches/soc-2007-hcube/source/blender/blenkernel/intern/constraint.c
    branches/soc-2007-hcube/source/blender/blenkernel/intern/ipo.c
    branches/soc-2007-hcube/source/blender/blenkernel/intern/key.c
    branches/soc-2007-hcube/source/blender/blenkernel/intern/modifier.c
    branches/soc-2007-hcube/source/blender/blenkernel/intern/object.c
    branches/soc-2007-hcube/source/blender/blenkernel/intern/softbody.c
    branches/soc-2007-hcube/source/blender/blenkernel/intern/subsurf_ccg.c
    branches/soc-2007-hcube/source/blender/blenlib/BLI_arithb.h
    branches/soc-2007-hcube/source/blender/blenlib/intern/arithb.c
    branches/soc-2007-hcube/source/blender/blenloader/intern/readfile.c
    branches/soc-2007-hcube/source/blender/blenloader/intern/writefile.c
    branches/soc-2007-hcube/source/blender/ftfont/CMakeLists.txt
    branches/soc-2007-hcube/source/blender/ftfont/FTF_Api.h
    branches/soc-2007-hcube/source/blender/ftfont/SConscript
    branches/soc-2007-hcube/source/blender/ftfont/intern/FTF_Api.cpp
    branches/soc-2007-hcube/source/blender/ftfont/intern/Makefile
    branches/soc-2007-hcube/source/blender/include/BIF_editarmature.h
    branches/soc-2007-hcube/source/blender/include/BIF_editconstraint.h
    branches/soc-2007-hcube/source/blender/include/BIF_interface.h
    branches/soc-2007-hcube/source/blender/include/BIF_poseobject.h
    branches/soc-2007-hcube/source/blender/include/BIF_resources.h
    branches/soc-2007-hcube/source/blender/include/BIF_transform.h
    branches/soc-2007-hcube/source/blender/include/BSE_editipo.h
    branches/soc-2007-hcube/source/blender/include/BSE_node.h
    branches/soc-2007-hcube/source/blender/include/butspace.h
    branches/soc-2007-hcube/source/blender/include/multires.h
    branches/soc-2007-hcube/source/blender/include/transform.h
    branches/soc-2007-hcube/source/blender/makesdna/DNA_action_types.h
    branches/soc-2007-hcube/source/blender/makesdna/DNA_armature_types.h
    branches/soc-2007-hcube/source/blender/makesdna/DNA_constraint_types.h
    branches/soc-2007-hcube/source/blender/makesdna/DNA_curve_types.h
    branches/soc-2007-hcube/source/blender/makesdna/DNA_group_types.h
    branches/soc-2007-hcube/source/blender/makesdna/DNA_image_types.h
    branches/soc-2007-hcube/source/blender/makesdna/DNA_ipo_types.h
    branches/soc-2007-hcube/source/blender/makesdna/DNA_lamp_types.h
    branches/soc-2007-hcube/source/blender/makesdna/DNA_mesh_types.h
    branches/soc-2007-hcube/source/blender/makesdna/DNA_meshdata_types.h
    branches/soc-2007-hcube/source/blender/makesdna/DNA_modifier_types.h
    branches/soc-2007-hcube/source/blender/makesdna/DNA_nla_types.h
    branches/soc-2007-hcube/source/blender/makesdna/DNA_object_types.h
    branches/soc-2007-hcube/source/blender/makesdna/DNA_scene_types.h
    branches/soc-2007-hcube/source/blender/makesdna/DNA_screen_types.h
    branches/soc-2007-hcube/source/blender/makesdna/DNA_sequence_types.h
    branches/soc-2007-hcube/source/blender/makesdna/DNA_space_types.h
    branches/soc-2007-hcube/source/blender/makesdna/DNA_texture_types.h
    branches/soc-2007-hcube/source/blender/makesdna/DNA_world_types.h
    branches/soc-2007-hcube/source/blender/nodes/intern/CMP_nodes/CMP_math.c
    branches/soc-2007-hcube/source/blender/python/BPY_extern.h
    branches/soc-2007-hcube/source/blender/python/BPY_interface.c
    branches/soc-2007-hcube/source/blender/python/api2_2x/Armature.c
    branches/soc-2007-hcube/source/blender/python/api2_2x/Blender.c
    branches/soc-2007-hcube/source/blender/python/api2_2x/Bone.c
    branches/soc-2007-hcube/source/blender/python/api2_2x/Constraint.c
    branches/soc-2007-hcube/source/blender/python/api2_2x/Curve.c
    branches/soc-2007-hcube/source/blender/python/api2_2x/Draw.c
    branches/soc-2007-hcube/source/blender/python/api2_2x/Draw.h
    branches/soc-2007-hcube/source/blender/python/api2_2x/Effect.c
    branches/soc-2007-hcube/source/blender/python/api2_2x/Material.c
    branches/soc-2007-hcube/source/blender/python/api2_2x/Mathutils.c
    branches/soc-2007-hcube/source/blender/python/api2_2x/Mesh.c
    branches/soc-2007-hcube/source/blender/python/api2_2x/Object.c
    branches/soc-2007-hcube/source/blender/python/api2_2x/Scene.c
    branches/soc-2007-hcube/source/blender/python/api2_2x/SurfNurb.c
    branches/soc-2007-hcube/source/blender/python/api2_2x/Texture.c
    branches/soc-2007-hcube/source/blender/python/api2_2x/Window.c
    branches/soc-2007-hcube/source/blender/python/api2_2x/doc/Blender.py
    branches/soc-2007-hcube/source/blender/python/api2_2x/doc/Constraint.py
    branches/soc-2007-hcube/source/blender/python/api2_2x/doc/Draw.py
    branches/soc-2007-hcube/source/blender/python/api2_2x/doc/Mesh.py
    branches/soc-2007-hcube/source/blender/python/api2_2x/sceneSequence.h
    branches/soc-2007-hcube/source/blender/render/intern/include/render_types.h
    branches/soc-2007-hcube/source/blender/render/intern/include/rendercore.h
    branches/soc-2007-hcube/source/blender/render/intern/source/convertblender.c
    branches/soc-2007-hcube/source/blender/render/intern/source/envmap.c
    branches/soc-2007-hcube/source/blender/render/intern/source/pipeline.c
    branches/soc-2007-hcube/source/blender/render/intern/source/rendercore.c
    branches/soc-2007-hcube/source/blender/render/intern/source/shadeoutput.c
    branches/soc-2007-hcube/source/blender/render/intern/source/texture.c
    branches/soc-2007-hcube/source/blender/src/blenderbuttons.c
    branches/soc-2007-hcube/source/blender/src/buttons_editing.c
    branches/soc-2007-hcube/source/blender/src/buttons_object.c
    branches/soc-2007-hcube/source/blender/src/buttons_shading.c
    branches/soc-2007-hcube/source/blender/src/drawaction.c
    branches/soc-2007-hcube/source/blender/src/drawarmature.c
    branches/soc-2007-hcube/source/blender/src/drawimage.c
    branches/soc-2007-hcube/source/blender/src/drawipo.c
    branches/soc-2007-hcube/source/blender/src/drawobject.c
    branches/soc-2007-hcube/source/blender/src/drawscript.c
    branches/soc-2007-hcube/source/blender/src/drawseq.c
    branches/soc-2007-hcube/source/blender/src/drawview.c
    branches/soc-2007-hcube/source/blender/src/edit.c
    branches/soc-2007-hcube/source/blender/src/editaction.c
    branches/soc-2007-hcube/source/blender/src/editarmature.c
    branches/soc-2007-hcube/source/blender/src/editconstraint.c
    branches/soc-2007-hcube/source/blender/src/editface.c
    branches/soc-2007-hcube/source/blender/src/editipo.c
    branches/soc-2007-hcube/source/blender/src/editipo_lib.c
    branches/soc-2007-hcube/source/blender/src/editipo_mods.c
    branches/soc-2007-hcube/source/blender/src/editkey.c
    branches/soc-2007-hcube/source/blender/src/editmesh_mods.c
    branches/soc-2007-hcube/source/blender/src/editnode.c
    branches/soc-2007-hcube/source/blender/src/editobject.c
    branches/soc-2007-hcube/source/blender/src/editscreen.c
    branches/soc-2007-hcube/source/blender/src/editseq.c
    branches/soc-2007-hcube/source/blender/src/edittime.c
    branches/soc-2007-hcube/source/blender/src/filesel.c
    branches/soc-2007-hcube/source/blender/src/header_action.c
    branches/soc-2007-hcube/source/blender/src/header_filesel.c
    branches/soc-2007-hcube/source/blender/src/header_info.c
    branches/soc-2007-hcube/source/blender/src/header_view3d.c
    branches/soc-2007-hcube/source/blender/src/headerbuttons.c
    branches/soc-2007-hcube/source/blender/src/interface_draw.c
    branches/soc-2007-hcube/source/blender/src/multires.c
    branches/soc-2007-hcube/source/blender/src/outliner.c
    branches/soc-2007-hcube/source/blender/src/poseobject.c
    branches/soc-2007-hcube/source/blender/src/seqeffects.c
    branches/soc-2007-hcube/source/blender/src/sequence.c
    branches/soc-2007-hcube/source/blender/src/space.c
    branches/soc-2007-hcube/source/blender/src/toolbox.c
    branches/soc-2007-hcube/source/blender/src/transform.c
    branches/soc-2007-hcube/source/blender/src/transform_conversions.c
    branches/soc-2007-hcube/source/blender/src/transform_generics.c
    branches/soc-2007-hcube/source/blender/src/vpaint.c
    branches/soc-2007-hcube/source/gameengine/Converter/BL_ActionActuator.cpp
    branches/soc-2007-hcube/source/gameengine/Converter/BL_SkinDeformer.cpp
    branches/soc-2007-hcube/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp
    branches/soc-2007-hcube/tools/Blender.py
    branches/soc-2007-hcube/tools/btools.py

Added Paths:
-----------
    branches/soc-2007-hcube/bin/.blender/locale/pt_BR/
    branches/soc-2007-hcube/bin/.blender/locale/pt_BR/LC_MESSAGES/
    branches/soc-2007-hcube/bin/.blender/locale/pt_BR/LC_MESSAGES/blender.mo
    branches/soc-2007-hcube/bin/.blender/locale/zh_CN/
    branches/soc-2007-hcube/bin/.blender/locale/zh_CN/LC_MESSAGES/
    branches/soc-2007-hcube/bin/.blender/locale/zh_CN/LC_MESSAGES/blender.mo
    branches/soc-2007-hcube/po/pt_BR.po
    branches/soc-2007-hcube/release/scripts/bpymodules/colladaImEx/translator.py
    branches/soc-2007-hcube/release/scripts/weightpaint_average.py
    branches/soc-2007-hcube/source/blender/include/BIF_meshlaplacian.h
    branches/soc-2007-hcube/source/blender/render/extern/include/RE_raytrace.h
    branches/soc-2007-hcube/source/blender/render/intern/source/rayshade.c
    branches/soc-2007-hcube/source/blender/render/intern/source/raytrace.c
    branches/soc-2007-hcube/source/blender/src/meshlaplacian.c

Removed Paths:
-------------
    branches/soc-2007-hcube/bin/.blender/locale/pt_BR/LC_MESSAGES/
    branches/soc-2007-hcube/bin/.blender/locale/pt_BR/LC_MESSAGES/blender.mo
    branches/soc-2007-hcube/bin/.blender/locale/pt_br/
    branches/soc-2007-hcube/bin/.blender/locale/zh_CN/LC_MESSAGES/
    branches/soc-2007-hcube/bin/.blender/locale/zh_CN/LC_MESSAGES/blender.mo
    branches/soc-2007-hcube/bin/.blender/locale/zh_cn/
    branches/soc-2007-hcube/po/pt_br.po
    branches/soc-2007-hcube/release/scripts/bpymodules/colladaImEx/translator.py
    branches/soc-2007-hcube/source/blender/render/intern/source/ray.c

Modified: branches/soc-2007-hcube/SConstruct
===================================================================
--- branches/soc-2007-hcube/SConstruct	2007-08-16 07:14:42 UTC (rev 11621)
+++ branches/soc-2007-hcube/SConstruct	2007-08-16 07:41:48 UTC (rev 11622)
@@ -429,8 +429,10 @@
 Depends(nsiscmd, allinstall)
 
 Default(B.program_list)
-Default(installtarget)
 
+if not env['WITHOUT_BF_INSTALL']:
+	Default(installtarget)
+
 #------------ RELEASE
 # TODO: zipup the installation
 

Modified: branches/soc-2007-hcube/bin/.blender/.Blanguages
===================================================================
--- branches/soc-2007-hcube/bin/.blender/.Blanguages	2007-08-16 07:14:42 UTC (rev 11621)
+++ branches/soc-2007-hcube/bin/.blender/.Blanguages	2007-08-16 07:41:48 UTC (rev 11622)
@@ -9,7 +9,7 @@
 Spanish:es_ES
 Catalan:ca_ES
 Czech:cs_CZ
-Brazilian Portuguese:pt_br
+Brazilian Portuguese:pt_BR
 Simplified Chinese:zh_CN
 Russian:ru_RU
 Croatian:hr_HR

Modified: branches/soc-2007-hcube/bin/.blender/locale/cs/LC_MESSAGES/blender.mo
===================================================================
(Binary files differ)

Copied: branches/soc-2007-hcube/bin/.blender/locale/pt_BR (from rev 11621, trunk/blender/bin/.blender/locale/pt_BR)

Copied: branches/soc-2007-hcube/bin/.blender/locale/pt_BR/LC_MESSAGES (from rev 11621, trunk/blender/bin/.blender/locale/pt_BR/LC_MESSAGES)

Deleted: branches/soc-2007-hcube/bin/.blender/locale/pt_BR/LC_MESSAGES/blender.mo
===================================================================
(Binary files differ)

Copied: branches/soc-2007-hcube/bin/.blender/locale/pt_BR/LC_MESSAGES/blender.mo (from rev 11621, trunk/blender/bin/.blender/locale/pt_BR/LC_MESSAGES/blender.mo)
===================================================================
(Binary files differ)

Copied: branches/soc-2007-hcube/bin/.blender/locale/zh_CN (from rev 11621, trunk/blender/bin/.blender/locale/zh_CN)

Copied: branches/soc-2007-hcube/bin/.blender/locale/zh_CN/LC_MESSAGES (from rev 11621, trunk/blender/bin/.blender/locale/zh_CN/LC_MESSAGES)

Deleted: branches/soc-2007-hcube/bin/.blender/locale/zh_CN/LC_MESSAGES/blender.mo
===================================================================
(Binary files differ)

Copied: branches/soc-2007-hcube/bin/.blender/locale/zh_CN/LC_MESSAGES/blender.mo (from rev 11621, trunk/blender/bin/.blender/locale/zh_CN/LC_MESSAGES/blender.mo)
===================================================================
(Binary files differ)

Modified: branches/soc-2007-hcube/doc/blender-scons.txt
===================================================================
--- branches/soc-2007-hcube/doc/blender-scons.txt	2007-08-16 07:14:42 UTC (rev 11621)
+++ branches/soc-2007-hcube/doc/blender-scons.txt	2007-08-16 07:41:48 UTC (rev 11622)
@@ -160,6 +160,17 @@
     for example, setting BF_QUICKDEBUG won't overwrite the contents of BF_DEBUG_LIBS.
 
 
+    Not installing
+    --------------
+
+    If you dont want to install the build result, you can use the following option either
+    on the commandline or in your user-config.py :
+
+        WITHOUT_BF_INSTALL='true'
+
+    by default, this is set to 'false', and so the build is installed
+
+
     Supported toolset
     -----------------
 

Modified: branches/soc-2007-hcube/extern/bullet2/src/BulletDynamics/ConstraintSolver/btHingeConstraint.cpp
===================================================================
--- branches/soc-2007-hcube/extern/bullet2/src/BulletDynamics/ConstraintSolver/btHingeConstraint.cpp	2007-08-16 07:14:42 UTC (rev 11621)
+++ branches/soc-2007-hcube/extern/bullet2/src/BulletDynamics/ConstraintSolver/btHingeConstraint.cpp	2007-08-16 07:41:48 UTC (rev 11622)
@@ -17,176 +17,58 @@
 #include "btHingeConstraint.h"
 #include "BulletDynamics/Dynamics/btRigidBody.h"
 #include "LinearMath/btTransformUtil.h"
-#include "LinearMath/btSimdMinMax.h"
 #include <new>
 
-
 btHingeConstraint::btHingeConstraint():
 m_enableAngularMotor(false)
 {
 }
 
 btHingeConstraint::btHingeConstraint(btRigidBody& rbA,btRigidBody& rbB, const btVector3& pivotInA,const btVector3& pivotInB,
-									 btVector3& axisInA,btVector3& axisInB)
-									 :btTypedConstraint(rbA,rbB),
-									 m_angularOnly(false),
-									 m_enableAngularMotor(false)
+								 btVector3& axisInA,btVector3& axisInB)
+:btTypedConstraint(rbA,rbB),m_pivotInA(pivotInA),m_pivotInB(pivotInB),
+m_axisInA(axisInA),
+m_axisInB(-axisInB),
+m_angularOnly(false),
+m_enableAngularMotor(false)
 {
-	m_rbAFrame.getOrigin() = pivotInA;
-	
-	// since no frame is given, assume this to be zero angle and just pick rb transform axis
-	btVector3 rbAxisA1 = rbA.getCenterOfMassTransform().getBasis().getColumn(0);
-	btScalar projection = rbAxisA1.dot(axisInA);
-	if (projection > SIMD_EPSILON)
-		rbAxisA1 = rbAxisA1*projection - axisInA;
-	 else
-		rbAxisA1 = rbA.getCenterOfMassTransform().getBasis().getColumn(1);
-	
-	btVector3 rbAxisA2 = rbAxisA1.cross(axisInA);
 
-	m_rbAFrame.getBasis().setValue( rbAxisA1.getX(),rbAxisA2.getX(),axisInA.getX(),
-									rbAxisA1.getY(),rbAxisA2.getY(),axisInA.getY(),
-									rbAxisA1.getZ(),rbAxisA2.getZ(),axisInA.getZ() );
-
-	btQuaternion rotationArc = shortestArcQuat(axisInA,axisInB);
-	btVector3 rbAxisB1 =  quatRotate(rotationArc,rbAxisA1);
-	btVector3 rbAxisB2 =  rbAxisB1.cross(axisInB);
-	
-	
-	m_rbBFrame.getOrigin() = pivotInB;
-	m_rbBFrame.getBasis().setValue( rbAxisB1.getX(),rbAxisB2.getX(),-axisInB.getX(),
-									rbAxisB1.getY(),rbAxisB2.getY(),-axisInB.getY(),
-									rbAxisB1.getZ(),rbAxisB2.getZ(),-axisInB.getZ() );
-	
-	//start with free
-	m_lowerLimit = btScalar(1e30);
-	m_upperLimit = btScalar(-1e30);
-	m_biasFactor = 0.3f;
-	m_relaxationFactor = 1.0f;
-	m_limitSoftness = 0.9f;
-	m_solveLimit = false;
-
 }
 
 
 btHingeConstraint::btHingeConstraint(btRigidBody& rbA,const btVector3& pivotInA,btVector3& axisInA)
-:btTypedConstraint(rbA), m_angularOnly(false), m_enableAngularMotor(false)
-{
-
-	// since no frame is given, assume this to be zero angle and just pick rb transform axis
-	// fixed axis in worldspace
-	btVector3 rbAxisA1 = rbA.getCenterOfMassTransform().getBasis().getColumn(0);
-	btScalar projection = rbAxisA1.dot(axisInA);
-	if (projection > SIMD_EPSILON)
-		rbAxisA1 = rbAxisA1*projection - axisInA;
-	else
-		rbAxisA1 = rbA.getCenterOfMassTransform().getBasis().getColumn(1);
-
-	btVector3 rbAxisA2 = axisInA.cross(rbAxisA1);
-
-	m_rbAFrame.getOrigin() = pivotInA;
-	m_rbAFrame.getBasis().setValue( rbAxisA1.getX(),rbAxisA2.getX(),axisInA.getX(),
-									rbAxisA1.getY(),rbAxisA2.getY(),axisInA.getY(),
-									rbAxisA1.getZ(),rbAxisA2.getZ(),axisInA.getZ() );
-
-
-	btVector3 axisInB = rbA.getCenterOfMassTransform().getBasis() * -axisInA;
-
-	btQuaternion rotationArc = shortestArcQuat(axisInA,axisInB);
-	btVector3 rbAxisB1 =  quatRotate(rotationArc,rbAxisA1);
-	btVector3 rbAxisB2 = axisInB.cross(rbAxisB1);
-
-
-	m_rbBFrame.getOrigin() = rbA.getCenterOfMassTransform()(pivotInA);
-	m_rbBFrame.getBasis().setValue( rbAxisB1.getX(),rbAxisB2.getX(),axisInB.getX(),
-									rbAxisB1.getY(),rbAxisB2.getY(),axisInB.getY(),
-									rbAxisB1.getZ(),rbAxisB2.getZ(),axisInB.getZ() );
-	
-	//start with free
-	m_lowerLimit = btScalar(1e30);
-	m_upperLimit = btScalar(-1e30);
-	m_biasFactor = 0.3f;
-	m_relaxationFactor = 1.0f;
-	m_limitSoftness = 0.9f;
-	m_solveLimit = false;
-}
-
-btHingeConstraint::btHingeConstraint(btRigidBody& rbA,btRigidBody& rbB, 
-								     const btTransform& rbAFrame, const btTransform& rbBFrame)
-:btTypedConstraint(rbA,rbB),m_rbAFrame(rbAFrame),m_rbBFrame(rbBFrame),
+:btTypedConstraint(rbA),m_pivotInA(pivotInA),m_pivotInB(rbA.getCenterOfMassTransform()(pivotInA)),
+m_axisInA(axisInA),
+//fixed axis in worldspace
+m_axisInB(rbA.getCenterOfMassTransform().getBasis() * -axisInA),
 m_angularOnly(false),
 m_enableAngularMotor(false)
 {
-	// flip axis
-	m_rbBFrame.getBasis()[2][0] *= btScalar(-1.);
-	m_rbBFrame.getBasis()[2][1] *= btScalar(-1.);
-	m_rbBFrame.getBasis()[2][2] *= btScalar(-1.);
-
-	//start with free
-	m_lowerLimit = btScalar(1e30);
-	m_upperLimit = btScalar(-1e30);
-	m_biasFactor = 0.3f;
-	m_relaxationFactor = 1.0f;
-	m_limitSoftness = 0.9f;
-	m_solveLimit = false;
-}			
-
-
-
-btHingeConstraint::btHingeConstraint(btRigidBody& rbA, const btTransform& rbAFrame)
-:btTypedConstraint(rbA),m_rbAFrame(rbAFrame),m_rbBFrame(rbAFrame),
-m_angularOnly(false),
-m_enableAngularMotor(false)
-{
-	// flip axis
-	m_rbBFrame.getBasis()[2][0] *= btScalar(-1.);
-	m_rbBFrame.getBasis()[2][1] *= btScalar(-1.);
-	m_rbBFrame.getBasis()[2][2] *= btScalar(-1.);
-
-
-	//start with free
-	m_lowerLimit = btScalar(1e30);
-	m_upperLimit = btScalar(-1e30);	
-	m_biasFactor = 0.3f;
-	m_relaxationFactor = 1.0f;
-	m_limitSoftness = 0.9f;
-	m_solveLimit = false;
+	
 }
 
 void	btHingeConstraint::buildJacobian()
 {
 	m_appliedImpulse = btScalar(0.);
 
+	btVector3	normal(0,0,0);
+
 	if (!m_angularOnly)
 	{
-		btVector3 pivotAInW = m_rbA.getCenterOfMassTransform()*m_rbAFrame.getOrigin();
-		btVector3 pivotBInW = m_rbB.getCenterOfMassTransform()*m_rbBFrame.getOrigin();
-		btVector3 relPos = pivotBInW - pivotAInW;
-
-		btVector3 normal[3];
-		if (relPos.length2() > SIMD_EPSILON)
-		{
-			normal[0] = relPos.normalized();
-		}
-		else
-		{
-			normal[0].setValue(btScalar(1.0),0,0);
-		}
-
-		btPlaneSpace1(normal[0], normal[1], normal[2]);
-
 		for (int i=0;i<3;i++)
 		{
+			normal[i] = 1;
 			new (&m_jac[i]) btJacobianEntry(
 				m_rbA.getCenterOfMassTransform().getBasis().transpose(),
 				m_rbB.getCenterOfMassTransform().getBasis().transpose(),
-				pivotAInW - m_rbA.getCenterOfMassPosition(),
-				pivotBInW - m_rbB.getCenterOfMassPosition(),
-				normal[i],
+				m_rbA.getCenterOfMassTransform()*m_pivotInA - m_rbA.getCenterOfMassPosition(),
+				m_rbB.getCenterOfMassTransform()*m_pivotInB - m_rbB.getCenterOfMassPosition(),
+				normal,
 				m_rbA.getInvInertiaDiagLocal(),
 				m_rbA.getInvMass(),
 				m_rbB.getInvInertiaDiagLocal(),
 				m_rbB.getInvMass());
+			normal[i] = 0;
 		}
 	}
 
@@ -197,12 +79,12 @@
 	btVector3 jointAxis0local;
 	btVector3 jointAxis1local;
 	
-	btPlaneSpace1(m_rbAFrame.getBasis().getColumn(2),jointAxis0local,jointAxis1local);
+	btPlaneSpace1(m_axisInA,jointAxis0local,jointAxis1local);
 
-	getRigidBodyA().getCenterOfMassTransform().getBasis() * m_rbAFrame.getBasis().getColumn(2);
+	getRigidBodyA().getCenterOfMassTransform().getBasis() * m_axisInA;
 	btVector3 jointAxis0 = getRigidBodyA().getCenterOfMassTransform().getBasis() * jointAxis0local;

@@ Diff output truncated at 10240 characters. @@




More information about the Bf-blender-cvs mailing list