jrouwe / JoltPhysics

A multi core friendly rigid body physics and collision detection library. Written in C++. Suitable for games and VR applications. Used by Horizon Forbidden West.
MIT License
6.71k stars 447 forks source link

Documentation: Syntax is not valid for JPH::ConvexHullShapeSettings #990

Closed SSNTails closed 7 months ago

SSNTails commented 7 months ago

In the 'Creating Shapes' section of the documentation ( https://jrouwe.github.io/JoltPhysics/index.html#creating-shapes ), the following sample is not valid. The signature of the function in ConvexShape.h does not match its usage here.

// Create the settings object for a convex hull JPH::ConvexHullShapeSettings settings(vertices, JPH::cDefaultConvexRadius);

Signature in ConvexShape.h: /// Constructor ConvexShapeSettings() = default; explicit ConvexShapeSettings(const PhysicsMaterial *inMaterial) : mMaterial(inMaterial) { }

jrouwe commented 7 months ago

It compiles for me, ConvexHullShapeSettings != ConvexShapeSettings

SSNTails commented 7 months ago

Yep, I figured that out, so I closed the issue. I was also missing an include of ConvexHullShape.h which is why things weren't working.