engine
 
载入中...
搜索中...
未找到
Public 成员函数 | Public 属性 | 所有成员列表
FKSphereElem结构体 参考

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

成员函数说明

◆ GetClosestPointAndNormal()

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

参数
WorldPositionThe point we are trying to get close to
BodyToWorldTMThe transform to convert BodySetup into world space
ClosestWorldPositionThe closest point on the shape in world space
NormalThe normal of the feature associated with ClosestWorldPosition.
返回
The distance between WorldPosition and the shape. 0 indicates WorldPosition is inside the shape.

◆ GetShortestDistanceToPoint()

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

参数
WorldPositionThe point we are trying to get close to
BodyToWorldTMThe transform to convert BodySetup into world space
返回
The distance between WorldPosition and the shape. 0 indicates WorldPosition is inside the shape.

该结构体的文档由以下文件生成: