fixed some compile issue for Mac Dynamica plugin, see
http://code.google.com/p/bullet/issues/detail?id=221 added some missing file for autotools/Makefile.am fix: btBulletWorldImporter::loadFileFromMemory always returned false, if it was succesful
This commit is contained in:
@@ -23,7 +23,7 @@ subject to the following restrictions:
|
||||
#include "LinearMath/btGeometryUtil.h"
|
||||
#include "BulletCollision/CollisionShapes/btShapeHull.h"
|
||||
|
||||
#define TEST_SERIALIZATION
|
||||
//#define TEST_SERIALIZATION
|
||||
//#define NO_OBJ_TO_BULLET
|
||||
|
||||
#ifdef TEST_SERIALIZATION
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#MayaPlugin Makefile
|
||||
|
||||
MAYA_LOCATION?=/Applications/Autodesk/maya2008/devkit
|
||||
MAYA_LOCATION?=/Applications/Autodesk/maya2009/devkit
|
||||
|
||||
## MAYA_LOCATION is the Maya installation directory. It should be already defined in your
|
||||
# environment variables. If not, please change it to the appropriate directory
|
||||
@@ -30,16 +30,22 @@ CPPFLAGS = -DMAC_PLUGIN -DOSMac_MachO_ -DBits32_ -m32 -DUNIX -D_BOOL -DOSMac_ -D
|
||||
LDFLAGS = -ldl -shared
|
||||
|
||||
BULLET_INCLUDE=-I$(BULLET)/src -I.
|
||||
|
||||
BULLET_LIB=-L$(BULLET)/out/macosxx86/optimize/libs -L$(BULLET)/src \
|
||||
-lBulletColladaConverter -lcolladadom -llibxml -lGIMPACTUtils -lbulletdynamics \
|
||||
-lGIMPACTUtils -lbulletdynamics \
|
||||
-lbulletcollision -lbulletmath
|
||||
|
||||
#BULLET_LIB=-L$(BULLET)/src/.libs \
|
||||
# -lbulletdynamics \
|
||||
# -lbulletcollision -lbulletmath
|
||||
|
||||
|
||||
GL_LIB=-framework OpenGL
|
||||
|
||||
MAYA_INCLUDE=-I$(MAYA)/include
|
||||
MAYA_LIB=-L/Applications/Autodesk/maya2008/Maya.app/Contents/MacOS -lOpenMaya -lFoundation -Wl,-executable_path,/Applications/Autodesk/maya2008/Maya.app/Contents/MacOS -lOpenMayaUI -lOpenMayaFX -lOpenMaya -lFoundation
|
||||
MAYA_LIB=-L/Applications/Autodesk/maya2009/Maya.app/Contents/MacOS -lOpenMaya -lFoundation -Wl,-executable_path,/Applications/Autodesk/maya2009/Maya.app/Contents/MacOS -lOpenMayaUI -lOpenMayaFX -lOpenMaya -lFoundation
|
||||
|
||||
SOURCES = pluginMain.cpp colladaExport.cpp rigidBodyNode.cpp rigidBodyArrayNode.cpp collisionShapeNode.cpp \
|
||||
SOURCES = pluginMain.cpp bulletExport.cpp rigidBodyNode.cpp rigidBodyArrayNode.cpp collisionShapeNode.cpp \
|
||||
solver.cpp bt_solver.cpp dSolverNode.cpp dSolverCmd.cpp dRigidBodyCmd.cpp dRigidBodyArrayCmd.cpp \
|
||||
pdbIO.cpp drawUtils.cpp constraint/dHingeConstraintCmd.cpp constraint/dSliderConstraintCmd.cpp \
|
||||
constraint/hingeConstraintNode.cpp constraint/sixdofConstraintNode.cpp constraint/dNailConstraintCmd.cpp \
|
||||
|
||||
@@ -341,7 +341,8 @@ void hingeConstraintNode::draw( M3dView & view, const MDagPath &path,
|
||||
rigid_bodyB->get_transform(pos, rot);
|
||||
m_constraint->worldToA(pos, posB);
|
||||
}
|
||||
m_constraint->worldFromB(vec3f(0.f, 0.f, 0.f), pos);
|
||||
vec3f zeroVec(0.f,0.f,0.f);
|
||||
m_constraint->worldFromB(zeroVec, pos);
|
||||
m_constraint->worldToA(pos, pivB);
|
||||
}
|
||||
|
||||
@@ -370,21 +371,29 @@ void hingeConstraintNode::draw( M3dView & view, const MDagPath &path,
|
||||
|
||||
vec3f posT, posP, posM;
|
||||
|
||||
m_constraint->worldFromB(vec3f(-1.f, 0.f, 0.f), posT);
|
||||
vec3f minusXVec(-1.f,0.f,0.f);
|
||||
vec3f posXVec(1.f,0.f,0.f);
|
||||
vec3f minusYVec (0.f,-1.f,0.f);
|
||||
vec3f posYVec (0.f,1.f,0.f);
|
||||
vec3f minusZVec (0.f,0.f,-1.f);
|
||||
vec3f posZVec (0.f,0.f,1.f);
|
||||
|
||||
|
||||
m_constraint->worldFromB(minusXVec, posT);
|
||||
m_constraint->worldToA(posT, posM);
|
||||
m_constraint->worldFromB(vec3f( 1.f, 0.f, 0.f), posT);
|
||||
m_constraint->worldFromB(posXVec, posT);
|
||||
m_constraint->worldToA(posT, posP);
|
||||
glVertex3f(posM[0], posM[1], posM[2]);
|
||||
glVertex3f(posP[0], posP[1], posP[2]);
|
||||
m_constraint->worldFromB(vec3f( 0.f, -1.f, 0.f), posT);
|
||||
m_constraint->worldFromB(minusYVec, posT);
|
||||
m_constraint->worldToA(posT, posM);
|
||||
m_constraint->worldFromB(vec3f( 0.f, 1.f, 0.f), posT);
|
||||
m_constraint->worldFromB(posYVec, posT);
|
||||
m_constraint->worldToA(posT, posP);
|
||||
glVertex3f(posM[0], posM[1], posM[2]);
|
||||
glVertex3f(posP[0], posP[1], posP[2]);
|
||||
m_constraint->worldFromB(vec3f( 0.f, 0.f, -1.f), posT);
|
||||
m_constraint->worldFromB(minusZVec, posT);
|
||||
m_constraint->worldToA(posT, posM);
|
||||
m_constraint->worldFromB(vec3f( 0.f, 0.f, 1.f), posT);
|
||||
m_constraint->worldFromB(posZVec, posT);
|
||||
m_constraint->worldToA(posT, posP);
|
||||
glVertex3f(posM[0], posM[1], posM[2]);
|
||||
glVertex3f(posP[0], posP[1], posP[2]);
|
||||
|
||||
@@ -274,6 +274,13 @@ void sixdofConstraintNode::draw( M3dView & view, const MDagPath &path,
|
||||
M3dView::DisplayStatus status )
|
||||
{
|
||||
update();
|
||||
vec3f zeroVec(0.f,0.f,0.f);
|
||||
vec3f minusXVec(-1.f,0.f,0.f);
|
||||
vec3f posXVec(1.f,0.f,0.f);
|
||||
vec3f minusYVec (0.f,-1.f,0.f);
|
||||
vec3f posYVec (0.f,1.f,0.f);
|
||||
vec3f minusZVec (0.f,0.f,-1.f);
|
||||
vec3f posZVec (0.f,0.f,1.f);
|
||||
|
||||
view.beginGL();
|
||||
glPushAttrib( GL_ALL_ATTRIB_BITS );
|
||||
@@ -301,7 +308,7 @@ void sixdofConstraintNode::draw( M3dView & view, const MDagPath &path,
|
||||
rigid_bodyB->get_transform(pos, rot);
|
||||
m_constraint->worldToA(pos, posB);
|
||||
}
|
||||
m_constraint->worldFromB(vec3f(0.f, 0.f, 0.f), pos);
|
||||
m_constraint->worldFromB(zeroVec, pos);
|
||||
m_constraint->worldToA(pos, pivB);
|
||||
}
|
||||
|
||||
@@ -330,21 +337,21 @@ void sixdofConstraintNode::draw( M3dView & view, const MDagPath &path,
|
||||
|
||||
vec3f posT, posP, posM;
|
||||
|
||||
m_constraint->worldFromB(vec3f(-1.f, 0.f, 0.f), posT);
|
||||
m_constraint->worldFromB(minusXVec, posT);
|
||||
m_constraint->worldToA(posT, posM);
|
||||
m_constraint->worldFromB(vec3f( 1.f, 0.f, 0.f), posT);
|
||||
m_constraint->worldFromB(posXVec, posT);
|
||||
m_constraint->worldToA(posT, posP);
|
||||
glVertex3f(posM[0], posM[1], posM[2]);
|
||||
glVertex3f(posP[0], posP[1], posP[2]);
|
||||
m_constraint->worldFromB(vec3f( 0.f, -1.f, 0.f), posT);
|
||||
m_constraint->worldFromB(minusYVec, posT);
|
||||
m_constraint->worldToA(posT, posM);
|
||||
m_constraint->worldFromB(vec3f( 0.f, 1.f, 0.f), posT);
|
||||
m_constraint->worldFromB(posYVec, posT);
|
||||
m_constraint->worldToA(posT, posP);
|
||||
glVertex3f(posM[0], posM[1], posM[2]);
|
||||
glVertex3f(posP[0], posP[1], posP[2]);
|
||||
m_constraint->worldFromB(vec3f( 0.f, 0.f, -1.f), posT);
|
||||
m_constraint->worldFromB(minusZVec, posT);
|
||||
m_constraint->worldToA(posT, posM);
|
||||
m_constraint->worldFromB(vec3f( 0.f, 0.f, 1.f), posT);
|
||||
m_constraint->worldFromB(posZVec, posT);
|
||||
m_constraint->worldToA(posT, posP);
|
||||
glVertex3f(posM[0], posM[1], posM[2]);
|
||||
glVertex3f(posP[0], posP[1], posP[2]);
|
||||
|
||||
@@ -270,6 +270,13 @@ void sliderConstraintNode::draw( M3dView & view, const MDagPath &path,
|
||||
M3dView::DisplayStatus status )
|
||||
{
|
||||
update();
|
||||
vec3f zeroVec(0.f,0.f,0.f);
|
||||
vec3f minusXVec(-1.f,0.f,0.f);
|
||||
vec3f posXVec(1.f,0.f,0.f);
|
||||
vec3f minusYVec (0.f,-1.f,0.f);
|
||||
vec3f posYVec (0.f,1.f,0.f);
|
||||
vec3f minusZVec (0.f,0.f,-1.f);
|
||||
vec3f posZVec (0.f,0.f,1.f);
|
||||
|
||||
view.beginGL();
|
||||
glPushAttrib( GL_ALL_ATTRIB_BITS );
|
||||
@@ -297,7 +304,7 @@ void sliderConstraintNode::draw( M3dView & view, const MDagPath &path,
|
||||
rigid_bodyB->get_transform(pos, rot);
|
||||
m_constraint->worldToA(pos, posB);
|
||||
}
|
||||
m_constraint->worldFromB(vec3f(0.f, 0.f, 0.f), pos);
|
||||
m_constraint->worldFromB(zeroVec, pos);
|
||||
m_constraint->worldToA(pos, pivB);
|
||||
}
|
||||
|
||||
@@ -326,21 +333,21 @@ void sliderConstraintNode::draw( M3dView & view, const MDagPath &path,
|
||||
|
||||
vec3f posT, posP, posM;
|
||||
|
||||
m_constraint->worldFromB(vec3f(-1.f, 0.f, 0.f), posT);
|
||||
m_constraint->worldFromB(minusXVec, posT);
|
||||
m_constraint->worldToA(posT, posM);
|
||||
m_constraint->worldFromB(vec3f( 1.f, 0.f, 0.f), posT);
|
||||
m_constraint->worldFromB(posXVec, posT);
|
||||
m_constraint->worldToA(posT, posP);
|
||||
glVertex3f(posM[0], posM[1], posM[2]);
|
||||
glVertex3f(posP[0], posP[1], posP[2]);
|
||||
m_constraint->worldFromB(vec3f( 0.f, -1.f, 0.f), posT);
|
||||
m_constraint->worldFromB(minusYVec, posT);
|
||||
m_constraint->worldToA(posT, posM);
|
||||
m_constraint->worldFromB(vec3f( 0.f, 1.f, 0.f), posT);
|
||||
m_constraint->worldFromB(posYVec, posT);
|
||||
m_constraint->worldToA(posT, posP);
|
||||
glVertex3f(posM[0], posM[1], posM[2]);
|
||||
glVertex3f(posP[0], posP[1], posP[2]);
|
||||
m_constraint->worldFromB(vec3f( 0.f, 0.f, -1.f), posT);
|
||||
m_constraint->worldFromB(minusZVec, posT);
|
||||
m_constraint->worldToA(posT, posM);
|
||||
m_constraint->worldFromB(vec3f( 0.f, 0.f, 1.f), posT);
|
||||
m_constraint->worldFromB(posZVec, posT);
|
||||
m_constraint->worldToA(posT, posP);
|
||||
glVertex3f(posM[0], posM[1], posM[2]);
|
||||
glVertex3f(posP[0], posP[1], posP[2]);
|
||||
|
||||
@@ -614,7 +614,7 @@ bool btBulletWorldImporter::loadFileFromMemory( bParse::btBulletFile* bulletFil
|
||||
|
||||
}
|
||||
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
btTypedConstraint* btBulletWorldImporter::createUniversalD6Constraint(class btRigidBody* body0,class btRigidBody* otherBody,
|
||||
|
||||
29
config.h.in
29
config.h.in
@@ -9,27 +9,12 @@
|
||||
/* Architecture is x86-64 */
|
||||
#undef ARCH_X86_64
|
||||
|
||||
/* Define when compiling for MacOS/X */
|
||||
#undef CS_PLATFORM_MACOSX
|
||||
|
||||
/* Define when compiling for Unix and Unix-like (i.e. MacOS/X) */
|
||||
#undef CS_PLATFORM_UNIX
|
||||
|
||||
/* Define when compiling for Win32 */
|
||||
#undef CS_PLATFORM_WIN32
|
||||
|
||||
/* Define to 1 if you have the <dlfcn.h> header file. */
|
||||
#undef HAVE_DLFCN_H
|
||||
|
||||
/* Define to 1 if you have the <inttypes.h> header file. */
|
||||
#undef HAVE_INTTYPES_H
|
||||
|
||||
/* Define to 1 if you have the `mx' library (-lmx). */
|
||||
#undef HAVE_LIBMX
|
||||
|
||||
/* Define to 1 if you have the `nsl' library (-lnsl). */
|
||||
#undef HAVE_LIBNSL
|
||||
|
||||
/* Define to 1 if you have the <memory.h> header file. */
|
||||
#undef HAVE_MEMORY_H
|
||||
|
||||
@@ -51,14 +36,12 @@
|
||||
/* Define to 1 if you have the <sys/types.h> header file. */
|
||||
#undef HAVE_SYS_TYPES_H
|
||||
|
||||
/* Whether the int32 type is available */
|
||||
#undef HAVE_TYPE_INT32
|
||||
|
||||
/* Define to 1 if you have the <unistd.h> header file. */
|
||||
#undef HAVE_UNISTD_H
|
||||
|
||||
/* Define to 1 if you have the <windows.h> header file. */
|
||||
#undef HAVE_WINDOWS_H
|
||||
/* Define to the sub-directory in which libtool stores uninstalled libraries.
|
||||
*/
|
||||
#undef LT_OBJDIR
|
||||
|
||||
/* Define to 1 if your C compiler doesn't accept -c and -o together. */
|
||||
#undef NO_MINUS_C_MINUS_O
|
||||
@@ -99,9 +82,3 @@
|
||||
/* Define to 1 if your processor stores words with the most significant byte
|
||||
first (like Motorola and SPARC, unlike Intel and VAX). */
|
||||
#undef WORDS_BIGENDIAN
|
||||
|
||||
/* Define to 1 if the X Window System is missing or not being used. */
|
||||
#undef X_DISPLAY_MISSING
|
||||
|
||||
/* Avoid problem caused by missing <Carbon/CarbonSound.h> */
|
||||
#undef __CARBONSOUND__
|
||||
|
||||
@@ -93,6 +93,7 @@ libbulletmath_la_SOURCES = \
|
||||
LinearMath/btQuickprof.cpp \
|
||||
LinearMath/btGeometryUtil.cpp \
|
||||
LinearMath/btAlignedAllocator.cpp \
|
||||
LinearMath/btSerializer.cpp \
|
||||
LinearMath/btConvexHull.cpp \
|
||||
LinearMath/btHashMap.h \
|
||||
LinearMath/btConvexHull.h \
|
||||
@@ -111,6 +112,7 @@ libbulletmath_la_SOURCES = \
|
||||
LinearMath/btQuaternion.h \
|
||||
LinearMath/btAlignedObjectArray.h \
|
||||
LinearMath/btQuickprof.h \
|
||||
LinearMath/btSerializer.h \
|
||||
LinearMath/btTransformUtil.h \
|
||||
LinearMath/btTransform.h \
|
||||
LinearMath/btDefaultMotionState.h \
|
||||
@@ -545,4 +547,5 @@ nobase_bullet_include_HEADERS += \
|
||||
LinearMath/btStackAlloc.h \
|
||||
LinearMath/btAlignedObjectArray.h \
|
||||
LinearMath/btHashMap.h \
|
||||
LinearMath/btQuickprof.h
|
||||
LinearMath/btQuickprof.h\
|
||||
LinearMath/btSerializer.h
|
||||
|
||||
Reference in New Issue
Block a user