Sphere shape used for collision 更多...
#include <SphereElem.h>
类 FKSphereElem 继承关系图: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 | 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 sphere's origin | |
| float | Radius |
| Radius of the sphere | |
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 | |
Sphere shape used for collision
| ENGINE_API float FKSphereElem::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 FKSphereElem::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 |