![]() |
Jolt Physics
A multi core friendly Game Physics Engine
|
A path that follows a Hermite spline. More...
#include <PathConstraintPathHermite.h>
Classes | |
| struct | Point |
Public Member Functions | |
| virtual float | GetPathMaxFraction () const override |
| Gets the max fraction along the path. I.e. sort of the length of the path. More... | |
| virtual float | GetClosestPoint (Vec3Arg inPosition, float inFractionHint) const override |
| virtual void | GetPointOnPath (float inFraction, Vec3 &outPathPosition, Vec3 &outPathTangent, Vec3 &outPathNormal, Vec3 &outPathBinormal) const override |
| void | AddPoint (Vec3Arg inPosition, Vec3Arg inTangent, Vec3Arg inNormal) |
| Adds a point to the path. More... | |
| virtual void | SaveBinaryState (StreamOut &inStream) const override |
| Saves the contents of the path in binary form to inStream. More... | |
Public Member Functions inherited from PathConstraintPath | |
| virtual | ~PathConstraintPath () override=default |
| Virtual destructor to ensure that derived types get their destructors called. More... | |
| virtual float | GetPathMaxFraction () const =0 |
| Gets the max fraction along the path. I.e. sort of the length of the path. More... | |
| virtual float | GetClosestPoint (Vec3Arg inPosition, float inFractionHint) const =0 |
| virtual void | GetPointOnPath (float inFraction, Vec3 &outPathPosition, Vec3 &outPathTangent, Vec3 &outPathNormal, Vec3 &outPathBinormal) const =0 |
| void | SetIsLooping (bool inIsLooping) |
| If the path is looping or not. If a path is looping, the first and last point are automatically connected to each other. They should not be the same points. More... | |
| bool | IsLooping () const |
| void | DrawPath (DebugRenderer *inRenderer, RMat44Arg inBaseTransform) const |
| Draw the path relative to inBaseTransform. Used for debug purposes. More... | |
| virtual void | SaveBinaryState (StreamOut &inStream) const |
| Saves the contents of the path in binary form to inStream. More... | |
Public Member Functions inherited from SerializableObject | |
| virtual | ~SerializableObject ()=default |
| Constructor. More... | |
Public Member Functions inherited from NonCopyable | |
| NonCopyable ()=default | |
| NonCopyable (const NonCopyable &)=delete | |
| void | operator= (const NonCopyable &)=delete |
Public Member Functions inherited from RefTarget< PathConstraintPath > | |
| RefTarget ()=default | |
| Constructor. More... | |
| RefTarget (const RefTarget &) | |
| ~RefTarget () | |
| assert no one is referencing us More... | |
| void | SetEmbedded () const |
| RefTarget & | operator= (const RefTarget &) |
| Assignment operator. More... | |
| uint32 | GetRefCount () const |
| Get current refcount of this object. More... | |
| void | AddRef () const |
| Add or release a reference to this object. More... | |
| void | Release () const |
Protected Member Functions | |
| virtual void | RestoreBinaryState (StreamIn &inStream) override |
| This function should not be called directly, it is used by sRestoreFromBinaryState. More... | |
| virtual void | RestoreBinaryState (StreamIn &inStream) |
| This function should not be called directly, it is used by sRestoreFromBinaryState. More... | |
Additional Inherited Members | |
Public Types inherited from PathConstraintPath | |
| using | PathResult = Result< Ref< PathConstraintPath > > |
Static Public Member Functions inherited from PathConstraintPath | |
| static PathResult | sRestoreFromBinaryState (StreamIn &inStream) |
| Creates a Shape of the correct type and restores its contents from the binary stream inStream. More... | |
Static Public Member Functions inherited from RefTarget< PathConstraintPath > | |
| static int | sInternalGetRefCountOffset () |
| INTERNAL HELPER FUNCTION USED BY SERIALIZATION. More... | |
Protected Attributes inherited from RefTarget< PathConstraintPath > | |
| atomic< uint32 > | mRefCount |
| Current reference count. More... | |
Static Protected Attributes inherited from RefTarget< PathConstraintPath > | |
| static constexpr uint32 | cEmbedded |
| A large value that gets added to the refcount to mark the object as embedded. More... | |
A path that follows a Hermite spline.
|
inline |
Adds a point to the path.
|
overridevirtual |
Get the globally closest point on the curve (Could be slow!)
| inPosition | Position to find closest point for |
| inFractionHint | Last known fraction along the path (can be used to speed up the search) |
Implements PathConstraintPath.
|
inlineoverridevirtual |
Gets the max fraction along the path. I.e. sort of the length of the path.
Implements PathConstraintPath.
|
overridevirtual |
Given the fraction along the path, get the point, tangent and normal.
| inFraction | Fraction along the path [0, GetPathMaxFraction()]. |
| outPathPosition | Returns the closest position to inSearchPosition on the path. |
| outPathTangent | Returns the tangent to the path at outPathPosition (the vector that follows the direction of the path) |
| outPathNormal | Return the normal to the path at outPathPosition (a vector that's perpendicular to outPathTangent) |
| outPathBinormal | Returns the binormal to the path at outPathPosition (a vector so that normal cross tangent = binormal) |
Implements PathConstraintPath.
|
overrideprotectedvirtual |
This function should not be called directly, it is used by sRestoreFromBinaryState.
Reimplemented from PathConstraintPath.
|
overridevirtual |
Saves the contents of the path in binary form to inStream.
Reimplemented from PathConstraintPath.