Capsule shape used for collision. 更多...
#include <SphylElem.h>
类 FKSphylElem 继承关系图:Public 成员函数 | |
| ENGINE_API float | GetClosestPointAndNormal (const FVector &WorldPosition, const FTransform &BodyToWorldTM, FVector &ClosestWorldPosition, FVector &Normal) const |
| Finds the closest point on the shape given a world position. 更多... | |
| ENGINE_API float | GetScaledCylinderLength (const FVector &Scale3D) const |
| Returns the scaled length of the cylinder part of the Sphyl | |
| ENGINE_API float | GetScaledHalfLength (const FVector &Scale3D) const |
| Returns half of the total scaled length of the Sphyl, which includes the scaled top and bottom caps | |
| ENGINE_API float | GetScaledRadius (const FVector &Scale3D) const |
| Returns the scaled radius for this Sphyl, which is determined by the Max scale on X/Y and clamped by half the total length | |
| ENGINE_API float | GetShortestDistanceToPoint (const FVector &WorldPosition, const FTransform &BodyToWorldTM) const |
| Finds the shortest distance between the element and a world position. 更多... | |
Public 成员函数 继承自 FKShapeElem | |
| ENGINE_API ECollisionEnabled::Type | GetCollisionEnabled () const |
| Get whether this shape should be considered for query or sim collision | |
| ENGINE_API bool | GetContributeToMass () const |
| Get whether this shape contributes to the mass of the body | |
| ENGINE_API const FName & | GetName () const |
| Get the user-defined name for this shape | |
| ENGINE_API void | SetContributeToMass (bool bInContributeToMass) |
| Set whether this shape will contribute to the mass of the body | |
| ENGINE_API void | SetName (const FName &InName) |
| Set the user-defined name for this shape | |
Public 属性 | |
| FVector | Center |
| Position of the capsule's origin | |
| float | Length |
| This is of line-segment ie. 更多... | |
| float | Radius |
| Radius of the capsule | |
| FRotator | Rotation |
| Rotation of the capsule | |
Public 属性 继承自 FKShapeElem | |
| float | RestOffset |
| Offset used when generating contact points. 更多... | |
额外继承的成员函数 | |
Protected 成员函数 继承自 FKShapeElem | |
| void | CloneElem (const FKShapeElem &Other) |
| Helper function to safely clone instances of this shape element | |
Capsule shape used for collision.
Z axis is capsule axis.
| ENGINE_API float FKSphylElem::GetClosestPointAndNormal | ( | const FVector & | WorldPosition, |
| const FTransform & | BodyToWorldTM, | ||
| FVector & | ClosestWorldPosition, | ||
| FVector & | Normal | ||
| ) | const |
Finds the closest point on the shape given a world position.
Input and output are given in world space
| WorldPosition | The point we are trying to get close to |
| BodyToWorldTM | The transform to convert BodySetup into world space |
| ClosestWorldPosition | The closest point on the shape in world space |
| Normal | The normal of the feature associated with ClosestWorldPosition. |
| ENGINE_API float FKSphylElem::GetShortestDistanceToPoint | ( | const FVector & | WorldPosition, |
| const FTransform & | BodyToWorldTM | ||
| ) | const |
Finds the shortest distance between the element and a world position.
Input and output are given in world space
| WorldPosition | The point we are trying to get close to |
| BodyToWorldTM | The transform to convert BodySetup into world space |
| float FKSphylElem::Length |
This is of line-segment ie.
add Radius to both ends to find total length.