[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [11354] branches/pyapi_devel: merge using, previoiusly I just copied from trunk and this didnt add some to revision control
Campbell Barton
cbarton at metavr.com
Mon Jul 23 23:54:10 CEST 2007
Revision: 11354
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=11354
Author: campbellbarton
Date: 2007-07-23 23:54:10 +0200 (Mon, 23 Jul 2007)
Log Message:
-----------
merge using, previoiusly I just copied from trunk and this didnt add some to revision control
Modified Paths:
--------------
branches/pyapi_devel/CMakeLists.txt
branches/pyapi_devel/SConstruct
branches/pyapi_devel/intern/boolop/intern/BOP_Face.cpp
branches/pyapi_devel/intern/boolop/intern/BOP_Face.h
branches/pyapi_devel/intern/boolop/intern/BOP_Face2Face.cpp
branches/pyapi_devel/intern/boolop/intern/BOP_MathUtils.cpp
branches/pyapi_devel/intern/boolop/intern/BOP_MathUtils.h
branches/pyapi_devel/intern/boolop/intern/BOP_Merge.cpp
branches/pyapi_devel/intern/boolop/intern/BOP_Mesh.cpp
branches/pyapi_devel/intern/boolop/intern/BOP_Triangulator.cpp
branches/pyapi_devel/po/it.po
branches/pyapi_devel/source/blender/python/api2_2x/Ipocurve.c
branches/pyapi_devel/source/blender/python/api2_2x/Object.c
Added Paths:
-----------
branches/pyapi_devel/extern/bullet2/src/BulletCollision/CollisionShapes/btCapsuleShape.cpp
branches/pyapi_devel/extern/bullet2/src/BulletCollision/CollisionShapes/btCapsuleShape.h
branches/pyapi_devel/extern/bullet2/src/BulletDynamics/ConstraintSolver/btConeTwistConstraint.cpp
branches/pyapi_devel/extern/bullet2/src/BulletDynamics/ConstraintSolver/btConeTwistConstraint.h
branches/pyapi_devel/extern/bullet2/src/BulletDynamics/ConstraintSolver/btSolverBody.h
branches/pyapi_devel/extern/bullet2/src/BulletDynamics/ConstraintSolver/btSolverConstraint.h
branches/pyapi_devel/intern/action/
branches/pyapi_devel/intern/csg/
branches/pyapi_devel/intern/keymaker/
branches/pyapi_devel/release/scripts/add_mesh_empty.py
branches/pyapi_devel/release/scripts/scripttemplate_pyconstraint.py
branches/pyapi_devel/source/blender/imbuf/intern/dds/
branches/pyapi_devel/source/blender/imbuf/intern/dds/BlockDXT.cpp
branches/pyapi_devel/source/blender/imbuf/intern/dds/BlockDXT.h
branches/pyapi_devel/source/blender/imbuf/intern/dds/Color.h
branches/pyapi_devel/source/blender/imbuf/intern/dds/ColorBlock.cpp
branches/pyapi_devel/source/blender/imbuf/intern/dds/ColorBlock.h
branches/pyapi_devel/source/blender/imbuf/intern/dds/Common.h
branches/pyapi_devel/source/blender/imbuf/intern/dds/DirectDrawSurface.cpp
branches/pyapi_devel/source/blender/imbuf/intern/dds/DirectDrawSurface.h
branches/pyapi_devel/source/blender/imbuf/intern/dds/Image.cpp
branches/pyapi_devel/source/blender/imbuf/intern/dds/Image.h
branches/pyapi_devel/source/blender/imbuf/intern/dds/Makefile
branches/pyapi_devel/source/blender/imbuf/intern/dds/SConscript
branches/pyapi_devel/source/blender/imbuf/intern/dds/Stream.cpp
branches/pyapi_devel/source/blender/imbuf/intern/dds/Stream.h
branches/pyapi_devel/source/blender/imbuf/intern/dds/dds_api.cpp
branches/pyapi_devel/source/blender/imbuf/intern/dds/dds_api.h
branches/pyapi_devel/source/blender/nodes/intern/CMP_nodes/CMP_normalize.c
Removed Paths:
-------------
branches/pyapi_devel/source/blender/imbuf/intern/dds/BlockDXT.cpp
branches/pyapi_devel/source/blender/imbuf/intern/dds/BlockDXT.h
branches/pyapi_devel/source/blender/imbuf/intern/dds/Color.h
branches/pyapi_devel/source/blender/imbuf/intern/dds/ColorBlock.cpp
branches/pyapi_devel/source/blender/imbuf/intern/dds/ColorBlock.h
branches/pyapi_devel/source/blender/imbuf/intern/dds/Common.h
branches/pyapi_devel/source/blender/imbuf/intern/dds/DirectDrawSurface.cpp
branches/pyapi_devel/source/blender/imbuf/intern/dds/DirectDrawSurface.h
branches/pyapi_devel/source/blender/imbuf/intern/dds/Image.cpp
branches/pyapi_devel/source/blender/imbuf/intern/dds/Image.h
branches/pyapi_devel/source/blender/imbuf/intern/dds/Makefile
branches/pyapi_devel/source/blender/imbuf/intern/dds/SConscript
branches/pyapi_devel/source/blender/imbuf/intern/dds/Stream.cpp
branches/pyapi_devel/source/blender/imbuf/intern/dds/Stream.h
branches/pyapi_devel/source/blender/imbuf/intern/dds/dds_api.cpp
branches/pyapi_devel/source/blender/imbuf/intern/dds/dds_api.h
Modified: branches/pyapi_devel/CMakeLists.txt
===================================================================
--- branches/pyapi_devel/CMakeLists.txt 2007-07-23 20:38:04 UTC (rev 11353)
+++ branches/pyapi_devel/CMakeLists.txt 2007-07-23 21:54:10 UTC (rev 11354)
@@ -144,6 +144,7 @@
/opt/local/include/freetype2
/opt/csw/include/freetype2
/opt/include/freetype2
+ NO_DEFAULT_PATH
)
SET(FREETYPE_LIB freetype)
Modified: branches/pyapi_devel/SConstruct
===================================================================
--- branches/pyapi_devel/SConstruct 2007-07-23 20:38:04 UTC (rev 11353)
+++ branches/pyapi_devel/SConstruct 2007-07-23 21:54:10 UTC (rev 11354)
@@ -390,7 +390,7 @@
dllsources = ['${LCGDIR}/gettext/lib/gnu_gettext.dll',
'${LCGDIR}/png/lib/libpng.dll',
'#release/windows/extra/python25.zip',
-# '#release/windows/extra/zlib.pyd',
+ '#release/windows/extra/zlib.pyd',
'${LCGDIR}/sdl/lib/SDL.dll',
'${LCGDIR}/zlib/lib/zlib.dll',
'${LCGDIR}/tiff/lib/libtiff.dll']
Copied: branches/pyapi_devel/extern/bullet2/src/BulletCollision/CollisionShapes/btCapsuleShape.cpp (from rev 11351, trunk/blender/extern/bullet2/src/BulletCollision/CollisionShapes/btCapsuleShape.cpp)
===================================================================
--- branches/pyapi_devel/extern/bullet2/src/BulletCollision/CollisionShapes/btCapsuleShape.cpp (rev 0)
+++ branches/pyapi_devel/extern/bullet2/src/BulletCollision/CollisionShapes/btCapsuleShape.cpp 2007-07-23 21:54:10 UTC (rev 11354)
@@ -0,0 +1,146 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+
+#include "btCapsuleShape.h"
+
+#include "BulletCollision/CollisionShapes/btCollisionMargin.h"
+#include "LinearMath/btQuaternion.h"
+
+btCapsuleShape::btCapsuleShape(btScalar radius, btScalar height)
+{
+ m_implicitShapeDimensions.setValue(radius,0.5f*height,radius);
+}
+
+
+ btVector3 btCapsuleShape::localGetSupportingVertexWithoutMargin(const btVector3& vec0)const
+{
+
+ btVector3 supVec(0,0,0);
+
+ btScalar maxDot(btScalar(-1e30));
+
+ btVector3 vec = vec0;
+ btScalar lenSqr = vec.length2();
+ if (lenSqr < btScalar(0.0001))
+ {
+ vec.setValue(1,0,0);
+ } else
+ {
+ btScalar rlen = btScalar(1.) / btSqrt(lenSqr );
+ vec *= rlen;
+ }
+
+ btVector3 vtx;
+ btScalar newDot;
+
+ btScalar radius = getRadius();
+
+
+ {
+ btVector3 pos(0,getHalfHeight(),0);
+ vtx = pos +vec*m_localScaling*(radius) - vec * getMargin();
+ newDot = vec.dot(vtx);
+ if (newDot > maxDot)
+ {
+ maxDot = newDot;
+ supVec = vtx;
+ }
+ }
+ {
+ btVector3 pos(0,-getHalfHeight(),0);
+ vtx = pos +vec*m_localScaling*(radius) - vec * getMargin();
+ newDot = vec.dot(vtx);
+ if (newDot > maxDot)
+ {
+ maxDot = newDot;
+ supVec = vtx;
+ }
+ }
+
+ return supVec;
+
+}
+
+ void btCapsuleShape::batchedUnitVectorGetSupportingVertexWithoutMargin(const btVector3* vectors,btVector3* supportVerticesOut,int numVectors) const
+{
+
+
+ btScalar radius = getRadius();
+
+ for (int j=0;j<numVectors;j++)
+ {
+ btScalar maxDot(btScalar(-1e30));
+ const btVector3& vec = vectors[j];
+
+ btVector3 vtx;
+ btScalar newDot;
+ {
+ btVector3 pos(0,getHalfHeight(),0);
+ vtx = pos +vec*m_localScaling*(radius) - vec * getMargin();
+ newDot = vec.dot(vtx);
+ if (newDot > maxDot)
+ {
+ maxDot = newDot;
+ supportVerticesOut[j] = vtx;
+ }
+ }
+ {
+ btVector3 pos(0,-getHalfHeight(),0);
+ vtx = pos +vec*m_localScaling*(radius) - vec * getMargin();
+ newDot = vec.dot(vtx);
+ if (newDot > maxDot)
+ {
+ maxDot = newDot;
+ supportVerticesOut[j] = vtx;
+ }
+ }
+
+ }
+}
+
+
+void btCapsuleShape::calculateLocalInertia(btScalar mass,btVector3& inertia)
+{
+ //as an approximation, take the inertia of the box that bounds the spheres
+
+ btTransform ident;
+ ident.setIdentity();
+
+
+ btScalar radius = getRadius();
+
+ btVector3 halfExtents(radius,radius+getHalfHeight(),radius);
+
+ btScalar margin = CONVEX_DISTANCE_MARGIN;
+
+ btScalar lx=btScalar(2.)*(halfExtents[0]+margin);
+ btScalar ly=btScalar(2.)*(halfExtents[1]+margin);
+ btScalar lz=btScalar(2.)*(halfExtents[2]+margin);
+ const btScalar x2 = lx*lx;
+ const btScalar y2 = ly*ly;
+ const btScalar z2 = lz*lz;
+ const btScalar scaledmass = mass * btScalar(.08333333);
+
+ inertia[0] = scaledmass * (y2+z2);
+ inertia[1] = scaledmass * (x2+z2);
+ inertia[2] = scaledmass * (x2+y2);
+
+}
+
+
+
+
+
Copied: branches/pyapi_devel/extern/bullet2/src/BulletCollision/CollisionShapes/btCapsuleShape.h (from rev 11351, trunk/blender/extern/bullet2/src/BulletCollision/CollisionShapes/btCapsuleShape.h)
===================================================================
--- branches/pyapi_devel/extern/bullet2/src/BulletCollision/CollisionShapes/btCapsuleShape.h (rev 0)
+++ branches/pyapi_devel/extern/bullet2/src/BulletCollision/CollisionShapes/btCapsuleShape.h 2007-07-23 21:54:10 UTC (rev 11354)
@@ -0,0 +1,60 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#ifndef BT_CAPSULE_SHAPE_H
+#define BT_CAPSULE_SHAPE_H
+
+#include "btConvexShape.h"
+#include "../BroadphaseCollision/btBroadphaseProxy.h" // for the types
+
+
+///btCapsuleShape represents a capsule around the Y axis
+///A more general solution that can represent capsules is the btMultiSphereShape
+class btCapsuleShape : public btConvexShape
+{
+
+public:
+ btCapsuleShape(btScalar radius,btScalar height);
+
+ ///CollisionShape Interface
+ virtual void calculateLocalInertia(btScalar mass,btVector3& inertia);
+
+ /// btConvexShape Interface
+ virtual btVector3 localGetSupportingVertexWithoutMargin(const btVector3& vec)const;
+
+ virtual void batchedUnitVectorGetSupportingVertexWithoutMargin(const btVector3* vectors,btVector3* supportVerticesOut,int numVectors) const;
+
+ virtual int getShapeType() const { return CAPSULE_SHAPE_PROXYTYPE; }
+
+ virtual char* getName()const
+ {
+ return "CapsuleShape";
+ }
+
+ btScalar getRadius() const
+ {
+ return m_implicitShapeDimensions.getX();
+ }
+
+ btScalar getHalfHeight() const
+ {
+ return m_implicitShapeDimensions.getY();
+ }
+
+};
+
+
+
+#endif //BT_CAPSULE_SHAPE_H
Copied: branches/pyapi_devel/extern/bullet2/src/BulletDynamics/ConstraintSolver/btConeTwistConstraint.cpp (from rev 11351, trunk/blender/extern/bullet2/src/BulletDynamics/ConstraintSolver/btConeTwistConstraint.cpp)
===================================================================
--- branches/pyapi_devel/extern/bullet2/src/BulletDynamics/ConstraintSolver/btConeTwistConstraint.cpp (rev 0)
+++ branches/pyapi_devel/extern/bullet2/src/BulletDynamics/ConstraintSolver/btConeTwistConstraint.cpp 2007-07-23 21:54:10 UTC (rev 11354)
@@ -0,0 +1,286 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+btConeTwistConstraint is Copyright (c) 2007 Starbreeze Studios
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+
+Written by: Marcus Hennix
+*/
+
+
+#include "btConeTwistConstraint.h"
+#include "BulletDynamics/Dynamics/btRigidBody.h"
+#include "LinearMath/btTransformUtil.h"
+#include "LinearMath/btSimdMinMax.h"
+#include <new>
+
+btConeTwistConstraint::btConeTwistConstraint()
+{
+}
+
+
+btConeTwistConstraint::btConeTwistConstraint(btRigidBody& rbA,btRigidBody& rbB,
+ const btTransform& rbAFrame,const btTransform& rbBFrame)
+ :btTypedConstraint(rbA,rbB),m_rbAFrame(rbAFrame),m_rbBFrame(rbBFrame),
+ m_angularOnly(false)
+{
+ // flip axis for correct angles
+ m_rbBFrame.getBasis()[1][0] *= btScalar(-1.);
+ m_rbBFrame.getBasis()[1][1] *= btScalar(-1.);
+ m_rbBFrame.getBasis()[1][2] *= btScalar(-1.);
+
+ m_swingSpan1 = btScalar(1e30);
+ m_swingSpan2 = btScalar(1e30);
+ m_twistSpan = btScalar(1e30);
+ m_biasFactor = 0.3f;
+ m_relaxationFactor = 1.0f;
+
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list