updated Jamfile, character demo, concave demo
reset for character demo (on space), and local refit of tree
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -49,7 +49,7 @@ class ConcaveDemo : public DemoApplication
|
||||
|
||||
public:
|
||||
|
||||
ConcaveDemo() : m_animatedMesh(false)
|
||||
ConcaveDemo() : m_animatedMesh(true)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
@@ -315,12 +315,33 @@ void ConcaveDemo::clientMoveAndDisplay()
|
||||
static float offset=0.f;
|
||||
offset+=0.01f;
|
||||
|
||||
setVertexPositions(waveheight,offset);
|
||||
// setVertexPositions(waveheight,offset);
|
||||
|
||||
int i;
|
||||
int j;
|
||||
btVector3 aabbMin(1e30,1e30,1e30);
|
||||
btVector3 aabbMax(-1e30,-1e30,-1e30);
|
||||
|
||||
btVector3 worldMin(-1000,-1000,-1000);
|
||||
btVector3 worldMax(1000,1000,1000);
|
||||
for ( i=NUM_VERTS_X/2-3;i<NUM_VERTS_X/2+2;i++)
|
||||
{
|
||||
for (j=NUM_VERTS_X/2-3;j<NUM_VERTS_Y/2+2;j++)
|
||||
{
|
||||
|
||||
aabbMax.setMax(gVertices[i+j*NUM_VERTS_X]);
|
||||
aabbMin.setMin(gVertices[i+j*NUM_VERTS_X]);
|
||||
|
||||
gVertices[i+j*NUM_VERTS_X].setValue((i-NUM_VERTS_X*0.5f)*TRIANGLE_SIZE,
|
||||
//0.f,
|
||||
waveheight*sinf((float)i+offset)*cosf((float)j+offset),
|
||||
(j-NUM_VERTS_Y*0.5f)*TRIANGLE_SIZE);
|
||||
|
||||
aabbMin.setMin(gVertices[i+j*NUM_VERTS_X]);
|
||||
aabbMax.setMax(gVertices[i+j*NUM_VERTS_X]);
|
||||
|
||||
trimeshShape->refitTree(worldMin,worldMax);
|
||||
}
|
||||
}
|
||||
|
||||
trimeshShape->partialRefitTree(aabbMin,aabbMax);
|
||||
|
||||
//clear all contact points involving mesh proxy. Note: this is a slow/unoptimized operation.
|
||||
m_dynamicsWorld->getBroadphase()->getOverlappingPairCache()->cleanProxyFromPairs(staticBody->getBroadphaseHandle(),getDynamicsWorld()->getDispatcher());
|
||||
|
||||
@@ -71,6 +71,7 @@ SubInclude TOP Demos BspDemo ;
|
||||
SubInclude TOP Demos BasicDemo ;
|
||||
SubInclude TOP Demos ConvexDecompositionDemo ;
|
||||
SubInclude TOP Demos ColladaDemo ;
|
||||
SubInclude TOP Demos CharacterDemo ;
|
||||
SubInclude TOP Demos VehicleDemo ;
|
||||
SubInclude TOP Demos CollisionDemo ;
|
||||
SubInclude TOP Demos CollisionInterfaceDemo ;
|
||||
|
||||
@@ -12,7 +12,7 @@ if $(GLUT.AVAILABLE) = "yes"
|
||||
CFlags bulletopenglsupport : [ FIncludes $(TOP)/Extras/ConvexHull ]
|
||||
;
|
||||
|
||||
MsvcIncDirs $(<) :
|
||||
MsvcIncDirs bulletopenglsupport :
|
||||
"../../Extras/ConvexHull" ;
|
||||
|
||||
bulletopenglsupport.CFLAGS = [ FIncludes $(TOP)/Extras/ConvexHull ] ;
|
||||
|
||||
Reference in New Issue
Block a user