enable URDF loading throught the 'File/Open' menu

set a default camera targets for each demo. note that it is only reset when switching to a different demo, so you can restart at your chosen location.
no OpenCL pairbench drawing in OpenGL2 (there is no VBO available etc)
This commit is contained in:
erwincoumans
2015-05-01 11:42:14 -07:00
parent 3dd41b84a8
commit 218e9f9bf9
66 changed files with 562 additions and 217 deletions

View File

@@ -61,14 +61,14 @@ static ExampleEntry gDefaultExamples[]=
ExampleEntry(1,"Gyroscopic", "Show the Dzhanibekov effect using various settings of the gyroscopic term. You can select the gyroscopic term computation using btRigidBody::setFlags, with arguments BT_ENABLE_GYROSCOPIC_FORCE_EXPLICIT (using explicit integration, which adds energy and can lead to explosions), BT_ENABLE_GYROSCOPIC_FORCE_IMPLICIT_WORLD, BT_ENABLE_GYROSCOPIC_FORCE_IMPLICIT_BODY. If you don't set any of these flags, there is no gyroscopic term used.", GyroscopicCreateFunc),
ExampleEntry(1,"Planar 2D","Show the use of 2D collision shapes and rigid body simulation. The collision shape is wrapped into a btConvex2dShape. The rigid bodies are restricted in a plane using the 'setAngularFactor' and 'setLinearFactor' API call.",Planar2DCreateFunc),
ExampleEntry(1,"Constraints","Use of a btHingeConstraint. You can adjust the first slider to change the target velocity, and the second slider to adjust the maximum impulse applied to reach the target velocity. Note that the hinge angle can reach beyond -360 and 360 degrees.", ConstraintCreateFunc),
ExampleEntry(1,"6DofSpring2","Show the use of the btGeneric6DofSpring2Constraint.",
Dof6Spring2CreateFunc),
ExampleEntry(1,"Constraints","Show the use of the various constraints in Bullet.",
AllConstraintCreateFunc),
ExampleEntry(1,"Motorized Hinge","Use of a btHingeConstraint. You can adjust the first slider to change the target velocity, and the second slider to adjust the maximum impulse applied to reach the target velocity. Note that the hinge angle can reach beyond -360 and 360 degrees.", ConstraintCreateFunc),
ExampleEntry(0,"MultiBody"),
ExampleEntry(1,"MultiDofCreateFunc","Create a basic btMultiBody with 3-DOF spherical joints (mobilizers). The demo uses a fixed base or a floating base at restart.", MultiDofCreateFunc),
ExampleEntry(1,"TestJointTorque","Apply a torque to a btMultiBody with 1-DOF joints (mobilizers).", TestJointTorqueCreateFunc),
@@ -164,16 +164,20 @@ static ExampleEntry gDefaultExamples[]=
ExampleEntry(1,"Implicit Cloth", "Cloth simulation using implicit integration, by Stan Melax. The cloth is only attached at the corners. Note the stability using a large time step even with high stiffness.",
ImplicitClothCreateFunc),
#ifdef B3_USE_CLEW
ExampleEntry(0,"OpenCL (experimental)"),
ExampleEntry(1,"Pair Bench", "Benchmark of overlapping pair search using OpenCL.", PairBenchOpenCLCreateFunc),
#endif //
ExampleEntry(0,"Rendering"),
ExampleEntry(1,"Instanced Rendering", "Simple example of fast instanced rendering, only active when using OpenGL3+.",RenderInstancingCreateFunc),
ExampleEntry(1,"CoordinateSystemDemo","Show the axis and positive rotation direction around the axis.", CoordinateSystemCreateFunc),
};
static ExampleEntry gOpenCLExamples[]=
{
#ifdef B3_USE_CLEW
ExampleEntry(0,"OpenCL (experimental)"),
ExampleEntry(1,"Pair Bench", "Benchmark of overlapping pair search using OpenCL.", PairBenchOpenCLCreateFunc),
#endif //
};
static btAlignedObjectArray<ExampleEntry> gAdditionalRegisteredExamples;
@@ -193,6 +197,15 @@ ExampleEntries::~ExampleEntries()
delete m_data;
}
void ExampleEntries::initOpenCLExampleEntries()
{
int numDefaultEntries = sizeof(gOpenCLExamples)/sizeof(ExampleEntry);
for (int i=0;i<numDefaultEntries;i++)
{
m_data->m_allExamples.push_back(gOpenCLExamples[i]);
}
}
void ExampleEntries::initExampleEntries()
{
m_data->m_allExamples.clear();