some finishing touches for drawing shadows/clusters/textures.

This commit is contained in:
erwin.coumans
2008-08-01 06:11:11 +00:00
parent 7bf65e95f4
commit 9c776c6ed0
7 changed files with 89 additions and 19 deletions

View File

@@ -1108,6 +1108,7 @@ psb0->appendLinearJoint(lj,psb1);
//
static void Init_ClusterCar(SoftDemo* pdemo)
{
pdemo->setAzi(270);
const btVector3 origin(100,80,0);
const btQuaternion orientation(-SIMD_PI/2,0,0);
const btScalar widthf=8;
@@ -1446,6 +1447,19 @@ void SoftDemo::renderme()
}
void SoftDemo::setDrawClusters(bool drawClusters)
{
if (drawClusters)
{
getSoftDynamicsWorld()->setDrawFlags(getSoftDynamicsWorld()->getDrawFlags()|fDrawFlags::Clusters);
} else
{
getSoftDynamicsWorld()->setDrawFlags(getSoftDynamicsWorld()->getDrawFlags()& (~fDrawFlags::Clusters));
}
}
void SoftDemo::keyboardCallback(unsigned char key, int x, int y)
{
switch(key)
@@ -1580,6 +1594,10 @@ void SoftDemo::initPhysics()
{
///create concave ground mesh
//reset and disable motorcontrol at the start
motorcontrol.goal = 0;
motorcontrol.maxtorque = 0;
m_azi = 0;
btCollisionShape* groundShape = 0;
bool useConcaveMesh = false;//not ready yet true;