MCPcopy Create free account
hub / github.com/dartsim/dart / updateHeightmapShape

Method updateHeightmapShape

examples/heightmap/main.cpp:144–153  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

142 }
143
144 void updateHeightmapShape()
145 {
146 mTerrain->setShape(createHeightmapShape(
147 mXResolution, mYResolution, mXSize, mYSize, mZMin, mZMax));
148
149 auto tf = mTerrain->getRelativeTransform();
150 tf.translation()[0] = -static_cast<double>(mXSize) / 2.0;
151 tf.translation()[1] = +static_cast<double>(mYSize) / 2.0;
152 mTerrain->setRelativeTransform(tf);
153 }
154
155 void render() override
156 {

Callers

nothing calls this directly

Calls 3

createHeightmapShapeFunction · 0.85
setShapeMethod · 0.80
setRelativeTransformMethod · 0.45

Tested by

no test coverage detected