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

Container for a physics representation of an object. 更多...

#include <ConstraintInstance.h>

继承自 FConstraintInstanceBase .

Public 成员函数

void CopyProfilePropertiesFrom (const FConstraintProfileProperties &FromProperties)
 Copies behavior properties from the given profile. 更多...
 
void DisableProjection ()
 Turn off linear and angular projection
 
void EnableParentDominates ()
 Enable/Disable parent dominates (meaning the parent body cannot be be affected at all by a child)
 
void EnableProjection ()
 Turn on linear and angular projection
 
 FConstraintInstance ()
 Constructor
 
float GetAngularSwing1Limit () const
 Gets the cone limit swing1 angle in degrees
 
EAngularConstraintMotion GetAngularSwing1Motion () const
 Gets the motion type for the swing1 of the cone constraint
 
float GetAngularSwing2Limit () const
 Gets the cone limit swing2 angle in degrees
 
EAngularConstraintMotion GetAngularSwing2Motion () const
 Gets the motion type for the swing2 of the cone constraint
 
float GetAngularTwistLimit () const
 Gets the twist limit angle in degrees
 
EAngularConstraintMotion GetAngularTwistMotion () const
 Gets the motion type for the twist of the cone constraint
 
FVector GetConstraintLocation ()
 Get the position of this constraint in world space.
 
bool GetIsSoftLinearLimit () const
 Whether the linear limits are soft (only if at least one axis if Limited)
 
bool GetIsSoftSwingLimit () const
 Whether the swing limits are soft (only available if swing1 and/or swing2 is Limited)
 
bool GetIsSoftTwistLimit () const
 Whether the twist limits are soft (only available if twist is Limited)
 
float GetLinearLimit () const
 Gets the linear limit size
 
ELinearConstraintMotion GetLinearXMotion () const
 Gets the motion type for the linear X-axis limit.
 
ELinearConstraintMotion GetLinearYMotion () const
 Gets the motion type for the linear Y-axis limit.
 
ELinearConstraintMotion GetLinearZMotion () const
 Gets the motion type for the linear Z-axis limit.
 
const FPhysicsConstraintHandle & GetPhysicsConstraintRef () const
 Get underlying physics engine constraint
 
float GetSoftLinearLimitDamping () const
 Linear damping if the constraint is set to use soft linear limits
 
float GetSoftLinearLimitStiffness () const
 Linear stiffness if the constraint is set to use soft linear limits
 
float GetSoftSwingLimitDamping () const
 Swing damping if the constraint is set to use soft limits
 
float GetSoftSwingLimitStiffness () const
 Swing stiffness if the constraint is set to use soft limits
 
float GetSoftTwistLimitDamping () const
 Twist damping if the constraint is set to use soft limits
 
float GetSoftTwistLimitStiffness () const
 Twist stiffness if the constraint is set to use soft limits
 
void InitConstraint (FBodyInstance *Body1, FBodyInstance *Body2, float Scale, UObject *DebugOwner, FOnConstraintBroken InConstraintBrokenDelegate=FOnConstraintBroken())
 Create physics engine constraint.
 
void InitConstraint_AssumesLocked (const FPhysicsActorHandle &ActorRef1, const FPhysicsActorHandle &ActorRef2, float InScale, FOnConstraintBroken InConstraintBrokenDelegate=FOnConstraintBroken())
 Create physics engine constraint using physx actors.
 
bool IsAngularOrientationDriveEnabled () const
 Whether the angular orientation drive is enabled
 
bool IsAngularVelocityDriveEnabled () const
 Whether the angular velocity drive is enabled
 
bool IsCollisionDisabled () const
 Whether collision is currently disabled
 
bool IsLinearPositionDriveEnabled () const
 Whether the linear position drive is enabled
 
bool IsLinearVelocityDriveEnabled () const
 Whether the linear velocity drive is enabled
 
bool IsParentDominatesEnabled () const
 Whether parent domination is enabled (meaning the parent body cannot be be affected at all by a child)
 
bool IsProjectionEnabled () const
 Whether projection is enabled for this constraint
 
bool IsTerminated () const
 Whether the physics engine constraint has been terminated
 
bool IsValidConstraintInstance () const
 See if this constraint is valid.
 
void SetAngularBreakable (bool bInAngularBreakable, float InAngularBreakThreshold)
 Sets the Angular Breakable properties 更多...
 
void SetAngularDOFLimitScale (float InSwing1LimitScale, float InSwing2LimitScale, float InTwistLimitScale)
 Scale Angular Limit Constraints (as defined in RB_ConstraintSetup). 更多...
 
void SetAngularDriveMode (EAngularDriveMode::Type DriveMode)
 Set the angular drive mode
 
void SetAngularDriveParams (float InSpring, float InDamping, float InForceLimit)
 Set the angular drive's strength parameters
 
void SetAngularOrientationTarget (const FQuat &InPosTarget)
 Set the angular drive's orientation target
 
void SetAngularSwing1Limit (EAngularConstraintMotion MotionType, float InSwing1LimitAngle)
 Sets the Angular Swing1 Motion Type 更多...
 
void SetAngularSwing1Motion (EAngularConstraintMotion MotionType)
 Sets the cone limit's swing1 motion type
 
void SetAngularSwing2Limit (EAngularConstraintMotion MotionType, float InSwing2LimitAngle)
 Sets the Angular Swing2 Motion Type 更多...
 
void SetAngularSwing2Motion (EAngularConstraintMotion MotionType)
 Sets the cone limit's swing2 motion type
 
void SetAngularTwistLimit (EAngularConstraintMotion MotionType, float InTwistLimitAngle)
 Sets the Angular Twist Motion Type 更多...
 
void SetAngularTwistMotion (EAngularConstraintMotion MotionType)
 Sets the twist limit's motion type
 
void SetAngularVelocityDriveSLERP (bool bInEnableSLERP)
 Set whether the SLERP angular velocity drive is enabled. 更多...
 
void SetAngularVelocityDriveTwistAndSwing (bool bInEnableTwistDrive, bool bInEnableSwingDrive)
 Set which twist and swing angular velocity drives are enabled. 更多...
 
void SetAngularVelocityTarget (const FVector &InVelTarget)
 Set the angular drive's angular velocity target
 
void SetConstraintBrokenDelegate (FOnConstraintBroken InConstraintBrokenDelegate)
 Set teh constraint broken delegate.
 
void SetDisableCollision (bool InDisableCollision)
 Set whether jointed actors can collide with each other
 
void SetLinearBreakable (bool bInLinearBreakable, float InLinearBreakThreshold)
 Sets the Linear Breakable properties 更多...
 
void SetLinearDriveParams (float InPositionStrength, float InVelocityStrength, float InForceLimit)
 Set the linear drive's strength parameters
 
void SetLinearLimitSize (float NewLimitSize)
 Allows you to dynamically change the size of the linear limit 'sphere'.
 
void SetLinearPositionDrive (bool bEnableXDrive, bool bEnableYDrive, bool bEnableZDrive)
 Set which linear position drives are enabled
 
void SetLinearPositionTarget (const FVector &InPosTarget)
 Set the linear drive's target position position
 
void SetLinearVelocityDrive (bool bEnableXDrive, bool bEnableYDrive, bool bEnableZDrive)
 Set which linear velocity drives are enabled
 
void SetLinearVelocityTarget (const FVector &InVelTarget)
 Set the linear drive's target velocity
 
void SetLinearXLimit (ELinearConstraintMotion ConstraintType, float InLinearLimitSize)
 Sets the LinearX Motion Type and the limit distance (Note distance is the same for all 3 axes)
 
void SetLinearXMotion (ELinearConstraintMotion ConstraintType)
 Sets the Linear XMotion type
 
void SetLinearYLimit (ELinearConstraintMotion ConstraintType, float InLinearLimitSize)
 Sets the LinearY Motion Type and the limit distance (Note distance is the same for all 3 axes)
 
void SetLinearYMotion (ELinearConstraintMotion ConstraintType)
 Sets the Linear YMotion type
 
void SetLinearZLimit (ELinearConstraintMotion ConstraintType, float InLinearLimitSize)
 Sets the LinearZ Motion Type and the limit distance (Note distance is the same for all 3 axes)
 
void SetLinearZMotion (ELinearConstraintMotion ConstraintType)
 Sets the Linear ZMotion type
 
void SetOrientationDriveSLERP (bool bInEnableSLERP)
 Set whether the SLERP angular position drive is enabled. 更多...
 
void SetOrientationDriveTwistAndSwing (bool bInEnableTwistDrive, bool bInEnableSwingDrive)
 Set which twist and swing orientation drives are enabled. 更多...
 
void TermConstraint ()
 Terminate physics engine constraint
 
void UpdateAngularLimit ()
 Refreshes the physics engine joint's angular limits. 更多...
 
void UpdateLinearLimit ()
 Refreshes the physics engine joint's linear limits. 更多...
 

Public 属性

FRotator AngularRotationOffset
 Specifies the angular offset between the two frames of reference. 更多...
 
uint32 bScaleLinearLimits: 1
 If true, linear limits scale using the absolute min of the 3d scale of the owning component
 
FName ConstraintBone1
 Name of first bone (body) that this constraint is connecting. 更多...
 
FName ConstraintBone2
 Name of second bone (body) that this constraint is connecting. 更多...
 
FName JointName
 Name of bone that this joint is associated with.
 
FVector Pos1
 Location of constraint in Body1 reference frame (usually the "child" body for skeletal meshes).
 
FVector Pos2
 Location of constraint in Body2 reference frame (usually the "parent" body for skeletal meshes).
 
FVector PriAxis1
 Primary (twist) axis in Body1 reference frame.
 
FVector PriAxis2
 Primary (twist) axis in Body2 reference frame.
 
FVector SecAxis1
 Seconday axis in Body1 reference frame. 更多...
 
FVector SecAxis2
 Seconday axis in Body2 reference frame. 更多...
 

详细描述

Container for a physics representation of an object.

成员函数说明

◆ CopyProfilePropertiesFrom()

void FConstraintInstance::CopyProfilePropertiesFrom ( const FConstraintProfileProperties &  FromProperties)

Copies behavior properties from the given profile.

Automatically updates the physx representation if it's been created

◆ SetAngularBreakable()

void FConstraintInstance::SetAngularBreakable ( bool  bInAngularBreakable,
float  InAngularBreakThreshold 
)
inline

Sets the Angular Breakable properties

参数
bInAngularBreakableWhether it is possible to break the joint with angular force
InAngularBreakThresholdTorque needed to break the joint

◆ SetAngularDOFLimitScale()

void FConstraintInstance::SetAngularDOFLimitScale ( float  InSwing1LimitScale,
float  InSwing2LimitScale,
float  InTwistLimitScale 
)

Scale Angular Limit Constraints (as defined in RB_ConstraintSetup).

This only affects the physics engine and does not update the unreal side so you can do things like a LERP of the scale values.

◆ SetAngularSwing1Limit()

void FConstraintInstance::SetAngularSwing1Limit ( EAngularConstraintMotion  MotionType,
float  InSwing1LimitAngle 
)
inline

Sets the Angular Swing1 Motion Type

参数
MotionTypeNew Motion Type

◆ SetAngularSwing2Limit()

void FConstraintInstance::SetAngularSwing2Limit ( EAngularConstraintMotion  MotionType,
float  InSwing2LimitAngle 
)
inline

Sets the Angular Swing2 Motion Type

参数
MotionTypeNew Motion Type

◆ SetAngularTwistLimit()

void FConstraintInstance::SetAngularTwistLimit ( EAngularConstraintMotion  MotionType,
float  InTwistLimitAngle 
)
inline

Sets the Angular Twist Motion Type

参数
MotionTypeNew Motion Type

◆ SetAngularVelocityDriveSLERP()

void FConstraintInstance::SetAngularVelocityDriveSLERP ( bool  bInEnableSLERP)

Set whether the SLERP angular velocity drive is enabled.

Only applicable when SLERP drive mode is used

◆ SetAngularVelocityDriveTwistAndSwing()

void FConstraintInstance::SetAngularVelocityDriveTwistAndSwing ( bool  bInEnableTwistDrive,
bool  bInEnableSwingDrive 
)

Set which twist and swing angular velocity drives are enabled.

Only applicable when Twist And Swing drive mode is used

◆ SetLinearBreakable()

void FConstraintInstance::SetLinearBreakable ( bool  bInLinearBreakable,
float  InLinearBreakThreshold 
)
inline

Sets the Linear Breakable properties

参数
bInLinearBreakableWhether it is possible to break the joint with linear force
InLinearBreakThresholdForce needed to break the joint

◆ SetOrientationDriveSLERP()

void FConstraintInstance::SetOrientationDriveSLERP ( bool  bInEnableSLERP)

Set whether the SLERP angular position drive is enabled.

Only applicable when SLERP drive mode is used

◆ SetOrientationDriveTwistAndSwing()

void FConstraintInstance::SetOrientationDriveTwistAndSwing ( bool  bInEnableTwistDrive,
bool  bInEnableSwingDrive 
)

Set which twist and swing orientation drives are enabled.

Only applicable when Twist And Swing drive mode is used

◆ UpdateAngularLimit()

void FConstraintInstance::UpdateAngularLimit ( )

Refreshes the physics engine joint's angular limits.

Only applicable if the joint has been created already.

◆ UpdateLinearLimit()

void FConstraintInstance::UpdateLinearLimit ( )

Refreshes the physics engine joint's linear limits.

Only applicable if the joint has been created already.

类成员变量说明

◆ AngularRotationOffset

FRotator FConstraintInstance::AngularRotationOffset

Specifies the angular offset between the two frames of reference.

By default limit goes from (-Angle, +Angle) This allows you to bias the limit for swing1 swing2 and twist.

◆ ConstraintBone1

FName FConstraintInstance::ConstraintBone1

Name of first bone (body) that this constraint is connecting.

This will be the 'child' bone in a PhysicsAsset.

◆ ConstraintBone2

FName FConstraintInstance::ConstraintBone2

Name of second bone (body) that this constraint is connecting.

This will be the 'parent' bone in a PhysicsAset.

◆ SecAxis1

FVector FConstraintInstance::SecAxis1

Seconday axis in Body1 reference frame.

Orthogonal to PriAxis1.

◆ SecAxis2

FVector FConstraintInstance::SecAxis2

Seconday axis in Body2 reference frame.

Orthogonal to PriAxis2.


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