Erwin Coumans
1e8f39b492
improve premake4 build in case X11 headers are missing
improve video_sync_mp4.py example
allow to create a heightfield from file or programmatically in C++ robotics api. Example:
{
b3RobotSimulatorCreateCollisionShapeArgs shapeArgs;
shapeArgs.m_shapeType = GEOM_HEIGHTFIELD;
bool useFile = true;
if (useFile)
{
shapeArgs.m_fileName = "D:/dev/bullet3/data/heightmaps/gimp_overlay_out.png";
shapeArgs.m_meshScale.setValue(.05, .05, 1);
}
else
{
shapeArgs.m_numHeightfieldColumns = 256;
shapeArgs.m_numHeightfieldRows = 256;
shapeArgs.m_meshScale.setValue(.05, .05, 1);
shapeArgs.m_heightfieldData.resize(shapeArgs.m_numHeightfieldRows * shapeArgs.m_numHeightfieldColumns);
double heightPerturbationRange = 0.05;
for (int j = 0; j<int(shapeArgs.m_numHeightfieldColumns / 2); j++)
{
for (int i = 0; i < (int(shapeArgs.m_numHeightfieldRows / 2)); i++)
{
double height = ((double)rand() / (RAND_MAX)) * heightPerturbationRange;
shapeArgs.m_heightfieldData[2 * i + 2 * j * shapeArgs.m_numHeightfieldRows] = height;
shapeArgs.m_heightfieldData[2 * i + 1 + 2 * j * shapeArgs.m_numHeightfieldRows] = height;
shapeArgs.m_heightfieldData[2 * i + (2 * j + 1) * shapeArgs.m_numHeightfieldRows] = height;
shapeArgs.m_heightfieldData[2 * i + 1 + (2 * j + 1) * shapeArgs.m_numHeightfieldRows] = height;
}
}
}
int shape = sim->createCollisionShape(shapeArgs.m_shapeType, shapeArgs);
b3RobotSimulatorCreateMultiBodyArgs bodyArgs;
bodyArgs.m_baseCollisionShapeIndex = shape;
int groundId = sim->createMultiBody(bodyArgs);
int texId = sim->loadTexture(shapeArgs.m_fileName);
b3RobotSimulatorChangeVisualShapeArgs args;
args.m_objectUniqueId = groundId;
args.m_linkIndex = -1;
args.m_textureUniqueId = texId;
sim->changeVisualShape(args);
}
2020-07-24 18:09:13 -07:00
..
2018-09-23 14:17:31 -07:00
2019-05-07 11:18:11 -07:00
2018-09-23 14:17:31 -07:00
2019-02-24 14:09:42 -08:00
2020-05-08 10:44:39 -07:00
2018-09-23 14:17:31 -07:00
2018-09-23 14:17:31 -07:00
2019-04-25 07:04:22 -07:00
2018-10-08 21:27:08 -07:00
2018-09-23 14:17:31 -07:00
2020-07-24 18:09:13 -07:00
2020-07-24 18:09:13 -07:00
2018-09-23 14:17:31 -07:00
2018-09-23 14:17:31 -07:00
2019-03-26 15:07:55 -07:00
2019-06-13 23:24:22 -07:00
2019-06-13 23:24:22 -07:00
2019-06-13 23:24:22 -07:00
2020-05-17 13:46:11 -07:00
2019-06-13 23:24:22 -07:00
2019-06-13 23:24:22 -07:00
2020-05-17 13:46:11 -07:00
2020-05-17 13:46:11 -07:00
2020-01-11 12:43:27 -08:00
2019-07-10 17:21:18 -07:00
2018-09-23 14:17:31 -07:00
2018-09-23 14:17:31 -07:00
2018-09-23 14:17:31 -07:00
2018-09-23 14:17:31 -07:00
2019-06-17 19:00:53 -07:00
2020-07-07 19:42:23 -07:00
2020-07-07 19:42:23 -07:00
2020-04-03 09:47:28 -07:00
2018-09-23 14:17:31 -07:00
2018-09-23 14:17:31 -07:00
2018-09-23 14:17:31 -07:00
2018-09-27 09:49:59 -07:00
2018-09-23 14:17:31 -07:00
2018-09-23 14:17:31 -07:00
2018-09-23 14:17:31 -07:00
2018-09-23 14:17:31 -07:00
2019-02-20 19:57:10 -08:00
2018-09-23 14:17:31 -07:00
2020-03-19 14:18:35 -07:00
2020-03-19 14:18:35 -07:00
2018-09-23 14:17:31 -07:00
2018-09-23 14:17:31 -07:00
2020-06-14 21:57:43 -04:00
2018-09-23 14:17:31 -07:00
2018-09-23 14:17:31 -07:00
2018-09-23 14:17:31 -07:00
2018-09-23 14:17:31 -07:00
2018-09-23 14:17:31 -07:00
2018-09-23 14:17:31 -07:00
2020-05-05 03:15:26 +00:00
2019-08-08 10:53:23 +02:00
2018-09-23 14:17:31 -07:00
2018-09-23 14:17:31 -07:00
2019-06-17 19:00:53 -07:00
2019-06-17 19:00:53 -07:00
2018-09-23 14:17:31 -07:00
2018-09-23 14:17:31 -07:00
2018-09-23 14:17:31 -07:00
2020-07-17 15:04:54 -07:00
2020-06-17 17:20:39 -07:00
2020-05-17 13:46:11 -07:00
2018-09-23 14:17:31 -07:00
2018-09-23 14:17:31 -07:00
2018-09-23 14:17:31 -07:00
2019-06-13 23:24:22 -07:00
2018-09-23 14:17:31 -07:00
2018-09-23 14:17:31 -07:00
2018-09-23 14:17:31 -07:00
2019-12-11 13:07:53 -08:00
2020-05-17 13:46:11 -07:00
2020-05-17 13:46:11 -07:00
2020-03-24 10:34:02 -07:00
2020-03-20 15:43:52 -07:00
2018-09-23 14:17:31 -07:00
2018-09-23 14:17:31 -07:00
2019-08-11 13:59:24 -07:00
2019-03-06 23:27:59 -08:00
2018-09-23 14:17:31 -07:00
2020-07-07 19:42:23 -07:00
2018-09-23 14:17:31 -07:00
2020-03-22 20:12:21 -07:00
2020-03-22 11:58:39 -07:00
2018-09-23 14:17:31 -07:00
2020-07-06 22:57:03 -07:00
2018-09-23 14:17:31 -07:00
2018-11-24 11:57:01 -08:00
2018-09-23 14:17:31 -07:00