RapyutaSimulationPlugins
|
General utils. More...
#include <RRGeneralUtils.h>
Static Public Member Functions | |
static bool | GetRefTransform (const FString &RefActorName, const AActor *RefActor, FTransform &OutTransf) |
Get the Ref Transform. More... | |
static FTransform | GetRelativeTransform (const FTransform &RefTransf, const FTransform &WorldTransf) |
Get the transform in reference frame. More... | |
static FTransform | GetRelativeTransform (const AActor *RefActor, const FTransform &WorldTransf) |
Get the transform in reference frame. If RefActor==nullptr, return WorldTransf. More... | |
static FTransform | GetRelativeTransformFromActor (const AActor *RefActor, const FTransform &WorldTransf) |
Get the transform in reference frame. If RefActor==nullptr, return WorldTransf. More... | |
static bool | GetRelativeTransform (const FString &RefActorName, const AActor *RefActor, const FTransform &InTransf, FTransform &OutTransf) |
Get the transform in reference frame. More... | |
static FTransform | GetWorldTransform (const FTransform &RefTransf, const FTransform &RelativeTransf) |
Get the transform in world frame. More... | |
static FTransform | GetWorldTransform (const AActor *RefActor, const FTransform &RelativeTransf) |
Get the transform in world frame. If RefActor==nullptr, return RelativeTransf. More... | |
static FTransform | GetWorldTransformFromActor (const AActor *RefActor, const FTransform &RelativeTransf) |
Get the transform in world frame. If RefActor==nullptr, return RelativeTransf. More... | |
static bool | GetWorldTransform (const FString &RefActorName, const AActor *RefActor, const FTransform &InTransf, FTransform &OutTransf) |
Get the transform in world frame. More... | |
static FORCEINLINE FString | GetNewROS2NodeName (const FString &InAffix=FString()) |
Create Unique name start with UE + InAffix_ + Guid. More... | |
static FORCEINLINE FString | ComposeROSFullFrameId (const FString &InPrefix, const TCHAR *InFrameId) |
Create prefixed frame_id. More... | |
static FORCEINLINE bool | GetJsonField (const TSharedPtr< FJsonObject > &InJsonObj, const FString &InFieldName, FString &OutValue) |
Initialize OutValue with the value of the requested field in a FJsonObject. More... | |
static FORCEINLINE bool | GetJsonField (const TSharedPtr< FJsonObject > &InJsonObj, const FString &InFieldName, float &OutValue, float InMultiplier=1.f) |
Initialize OutValue with the value of the requested field in a FJsonObject. More... | |
static FORCEINLINE bool | GetJsonField (const TSharedPtr< FJsonObject > &InJsonObj, const FString &InFieldName, double &OutValue, double InMultiplier=1.) |
Initialize OutValue with the value of the requested field in a FJsonObject. More... | |
static FORCEINLINE bool | GetJsonField (const TSharedPtr< FJsonObject > &InJsonObj, const FString &InFieldName, int &OutValue) |
Initialize OutValue with the value of the requested field in a FJsonObject. More... | |
static FORCEINLINE bool | GetJsonField (const TSharedPtr< FJsonObject > &InJsonObj, const FString &InFieldName, bool &OutValue) |
Initialize OutValue with the value of the requested field in a FJsonObject. More... | |
template<typename T > | |
static FORCEINLINE bool | GetJsonFieldOrDefault (const TSharedPtr< FJsonObject > &InJsonObj, const FString &InFieldName, const T &InDefaultValue, T &OutValue) |
Initialize OutValue with the value of the requested field in a FJsonObject. More... | |
static UPrimitiveComponent * | GetComponentOfActorFromName (const AActor *Actor, FName ComponentName) |
Get the component of actor from component name. More... | |
static UPrimitiveComponent * | GetPhysicsConstraintComponent (const UPhysicsConstraintComponent *InConstraint, EConstraintFrame::Type Frame) |
Get the Physics Constraint Component. More... | |
static FTransform | GetPhysicsConstraintTransform (const UPhysicsConstraintComponent *InConstraint, const FTransform InitialJointToChildLink, UPrimitiveComponent *InChildLink=nullptr) |
Get the Physics Constraint Transform changes from initial joint transform, i.e. child link transfrom relative to joint. More... | |
static void | GetPhysicsConstraintTransform (const UPhysicsConstraintComponent *InConstraint, const FTransform InitialJointToChildLink, FVector &OutPosition, FRotator &OutOrientation, UPrimitiveComponent *InChildLink=nullptr) |
Get the Physics Constraint Transform. More... | |
static FString | PascalToSnake (const FString &InPascalString, const bool InCheckNum=false) |
General utils.
|
inlinestatic |
Create prefixed frame_id.
InPrefix | |
InFrameId |
|
inlinestatic |
Get the component of actor from component name.
Actor | |
ComponentName |
|
inlinestatic |
Initialize OutValue with the value of the requested field in a FJsonObject.
InJsonObj | the Json object containing the required field |
InFieldName | the name of the field to read |
OutValue | contains the returned value |
|
inlinestatic |
Initialize OutValue with the value of the requested field in a FJsonObject.
InJsonObj | the Json object containing the required field |
InFieldName | the name of the field to read |
OutValue | contains the returned value |
InMultiplier | (optional) returned value is multiplied by this. Set to 1.f by default |
|
inlinestatic |
Initialize OutValue with the value of the requested field in a FJsonObject.
InJsonObj | the Json object containing the required field |
InFieldName | the name of the field to read |
OutValue | contains the returned value |
InMultiplier | (optional) returned value is multiplied by this. Set to 1.f by default |
|
inlinestatic |
Initialize OutValue with the value of the requested field in a FJsonObject.
InJsonObj | the Json object containing the required field |
InFieldName | the name of the field to read |
OutValue | contains the returned value |
|
inlinestatic |
Initialize OutValue with the value of the requested field in a FJsonObject.
InJsonObj | the Json object containing the required field |
InFieldName | the name of the field to read |
OutValue | contains the returned value |
|
inlinestatic |
Initialize OutValue with the value of the requested field in a FJsonObject.
If the field does not exist, OutValue = InDefaultValue
InJsonObj | the Json object containing the required field |
InFieldName | the name of the field to read |
InDefaultValue | the value sent back if the field is not in the Json object |
OutValue | contains the returned value |
|
inlinestatic |
Create Unique name start with UE + InAffix_ + Guid.
InAffix |
|
inlinestatic |
Get the Physics Constraint Component.
InConstraint | |
Frame |
|
inlinestatic |
Get the Physics Constraint Transform.
InConstraint | |
InitialJointToChildLink | |
OutPosition | |
OutOrientation | |
InChildLink |
|
inlinestatic |
Get the Physics Constraint Transform changes from initial joint transform, i.e. child link transfrom relative to joint.
InConstraint | |
InitialJointToChildLink | |
InChildLink |
|
inlinestatic |
Get the Ref Transform.
If RefActor==nullptr, return false.
RefActorName | If this is empty, OutTranf become FTransform::Identity, i.e. reference become world origin. |
RefActor | If this is nullptr, return false. |
OutTransf | Transform of RefActor or Identity. |
|
inlinestatic |
Get the transform in reference frame. If RefActor==nullptr, return WorldTransf.
RefActor | |
WorldTransf | Transform in world frame |
|
inlinestatic |
Get the transform in reference frame.
RefActorName | If this is empty, use world origin as reference, i.e. OutTransf=InTransf |
RefActor | If this is nullptr, return false. |
InTransf | Transform in world frame |
OutTransf | Transform in reference frame |
|
inlinestatic |
Get the transform in reference frame.
RefTransf | Reference frame |
WorldTransf | Transform in world frame |
|
inlinestatic |
Get the transform in reference frame. If RefActor==nullptr, return WorldTransf.
RefActor | |
WorldTransf | Transform in world frame |
|
inlinestatic |
Get the transform in world frame. If RefActor==nullptr, return RelativeTransf.
RefActor | |
RelativeTransf | Transform in reference frame |
|
inlinestatic |
Get the transform in world frame.
RefActorName | If this is empty, use world origin as reference, i.e. OutTransf=InTransf |
RefActor | If this is nullptr, return false. |
InTransf | Transform in reference frame |
OutTransf | Transform in world frame |
|
inlinestatic |
Get the transform in world frame.
RefTransf | Reference frame |
RelativeTransf | Transform in reference frame |
|
inlinestatic |
Get the transform in world frame. If RefActor==nullptr, return RelativeTransf.
RefActor | |
RelativeTransf | Transform in reference frame |
|
inlinestatic |