MCPcopy Create free account
hub / github.com/DanielChappuis/reactphysics3d / createHeightFieldShape

Method createHeightFieldShape

src/engine/PhysicsCommon.cpp:512–519  ·  view source on GitHub ↗

Create and return a height-field collision shape * @param heightField A pointer to a HeightField object * @param scaling Scaling vector for the height field * @return A pointer to the created height field shape */

Source from the content-addressed store, hash-verified

510 * @return A pointer to the created height field shape
511 */
512HeightFieldShape* PhysicsCommon::createHeightFieldShape(HeightField* heightField, const Vector3& scaling) {
513
514 HeightFieldShape* shape = new (mMemoryManager.allocate(MemoryManager::AllocationType::Pool, sizeof(HeightFieldShape))) HeightFieldShape(heightField, mMemoryManager.getHeapAllocator(), scaling);
515
516 mHeightFieldShapes.add(shape);
517
518 return shape;
519}
520
521// Destroy a height-field shape
522/**

Callers 2

TestRaycastMethod · 0.80
HeightFieldMethod · 0.80

Calls 2

allocateMethod · 0.45
addMethod · 0.45

Tested by 1

TestRaycastMethod · 0.64