Overview | Package | Class | Source | Class tree | Glossary | UnrealScript Documentation |
previous class next class | frames no frames |
00001 00002 00003 00004 00005 00006 00007 00008 00009 00010 00011 00012 00013 00014 00015 00016 00017 00018 00019 00020 00021 00022 00023 00024 00025 00026 00027 00028 00029 00030 00031 00032 00033 00034 00035 00036 00037 00038 00039 00040 00041 00042 00043 00044 00045 00046 00047 00048 00049 00050 00051 00052 00053 00054 00055 00056 00057 00058 00059 00060 00061 00062 00063 00064 00065 00066 00067 00068 00069 00070 00071 00072 00073 00074 00075 00076 00077 00078 00079 00080 00081 00082 00083 00084 00085 00086 00087 00088 00089 00090 00091 00092 00093 00094 00095 00096 00097 00098 00099 00100 00101 00102 00103 00104 00105 00106 00107 00108 00109 00110 00111 00112 00113 00114 00115 00116 00117 00118 00119 00120 00121 00122 00123 00124 00125 00126 00127 00128 00129 00130 00131 00132 00133 00134 00135 00136 00137 00138 00139 |
/** * Copyright 1998-2011 Epic Games, Inc. All Rights Reserved. */ class PhysicsAssetInstance extends Object hidecategories(Object) native(Physics); /** * Per-instance asset variables * You only need one of these when you are actually running physics for the asset. * One is created for a skeletal mesh inside AActor::InitArticulated. * You can perform line-checks etc. with just a PhysicsAsset. */ /** * Actor that owns this PhysicsAsset instance. * Filled in by InitInstance, so we don't need to save it. */ var const transient Actor Owner; /** * Index of the 'Root Body', or top body in the asset heirarchy. Used by PHYS_RigidBody to get new location for Actor. * Filled in by InitInstance, so we don't need to save it. */ var const transient int RootBodyIndex; /** Array of RB_BodyInstance objects, storing per-instance state about about each body. */ var const instanced array<RB_BodyInstance> Bodies; /** Array of RB_ConstraintInstance structs, storing per-instance state about each constraint. */ var const instanced array<RB_ConstraintInstance> Constraints; /** Table indicating which pairs of bodies have collision disabled between them. Used internally. */ var const native Map_Mirror CollisionDisableTable{TMap<FRigidBodyIndexPair,UBOOL>}; // IF ADDING NEW PROPERTIES BELOW HERE, MAKE SURE TO UPDATE USkeletalMeshComponent::InitArticulated /** Scaling factor to LinearDriveSpring in all RB_ConstraintInstances within this instance. */ var const float LinearSpringScale; /** Scaling factor to LinearDriveDamping in all RB_ConstraintInstances within this instance. */ var const float LinearDampingScale; /** Scaling factor to LinearDriveForceLimit in all RB_ConstraintInstances within this instance. */ var const float LinearForceLimitScale; /** Scaling factor to AngularDriveSpring in all RB_ConstraintInstances within this instance. */ var const float AngularSpringScale; /** Scaling factor to AngularDriveDamping in all RB_ConstraintInstances within this instance. */ var const float AngularDampingScale; /** Scaling factor to AngularDriveForceLimit in all RB_ConstraintInstances within this instance. */ var const float AngularForceLimitScale; /** Allows initialization of bodies to be deferred */ var const bool bInitBodies; cpptext { // UObject interface virtual void Serialize(FArchive& Ar); // UPhysicsAssetInstance interface void InitInstance(class USkeletalMeshComponent* SkelComp, class UPhysicsAsset* PhysAsset, UBOOL bFixed, FRBPhysScene* InRBScene); UBOOL TermInstance(FRBPhysScene* Scene); /** Terminate physics on all bodies below the named bone */ void TermBodiesBelow(FName ParentBoneName, class USkeletalMeshComponent* SkelComp); /** Enable/Disable collision on all bodies below the named bone */ void EnableCollisionBodiesBelow(UBOOL bEnable, FName ParentBoneName, class USkeletalMeshComponent* SkelComp); void DisableCollision(class URB_BodyInstance* BodyA, class URB_BodyInstance* BodyB); void EnableCollision(class URB_BodyInstance* BodyA, class URB_BodyInstance* BodyB); } final native function SetLinearDriveScale(float InLinearSpringScale, float InLinearDampingScale, float InLinearForceLimitScale); final native function SetAngularDriveScale(float InAngularSpringScale, float InAngularDampingScale, float InAngularForceLimitScale); /** Utility which returns total mass of all bones below the supplied one in the hierarchy (including this one). */ final native function float GetTotalMassBelowBone(name InBoneName, PhysicsAsset InAsset, SkeletalMesh InSkelMesh); /** Fix or unfix all bodies */ final native function SetAllBodiesFixed(bool bNewFixed); /** Fix or unfix a list of bodies, by name */ final native function SetNamedBodiesFixed(bool bNewFixed, Array<Name> BoneNames, SkeletalMeshComponent SkelMesh, optional bool bSetOtherBodiesToComplement, optional bool bSkipFullAnimWeightBodies); /** * Set all of the bones below passed in bone to be UnFixed AND also set the bForceUnfixed flag to TRUE. * @param InbInstanceAlwaysFullAnimWeight whether or not the bones below should be bInstanceAlwaysFullAnimWeight **/ final native function ForceAllBodiesBelowUnfixed(const out name InBoneName, PhysicsAsset InAsset, SkeletalMeshComponent InSkelMesh, bool InbInstanceAlwaysFullAnimWeight ); /** Enable or Disable AngularPositionDrive */ final native function SetAllMotorsAngularPositionDrive(bool bEnableSwingDrive, bool bEnableTwistDrive, optional SkeletalMeshComponent SkelMesh, optional bool bSkipFullAnimWeightBodies); /** Enable or Disable AngularVelocityDrive based on a list of bone names */ final native function SetAllMotorsAngularVelocityDrive(bool bEnableSwingDrive, bool bEnableTwistDrive, SkeletalMeshComponent SkelMeshComp, optional bool bSkipFullAnimWeightBodies); /** Set Angular Drive motors params for all constraint instance */ final native function SetAllMotorsAngularDriveParams(float InSpring, float InDamping, float InForceLimit, optional SkeletalMeshComponent SkelMesh, optional bool bSkipFullAnimWeightBodies); /** Enable or Disable AngularPositionDrive based on a list of bone names */ final native function SetNamedMotorsAngularPositionDrive(bool bEnableSwingDrive, bool bEnableTwistDrive, Array<Name> BoneNames, SkeletalMeshComponent SkelMeshComp, optional bool bSetOtherBodiesToComplement); /** Enable or Disable AngularVelocityDrive based on a list of bone names */ final native function SetNamedMotorsAngularVelocityDrive(bool bEnableSwingDrive, bool bEnableTwistDrive, Array<Name> BoneNames, SkeletalMeshComponent SkelMeshComp, optional bool bSetOtherBodiesToComplement); /** Use to toggle and set RigidBody angular and linear bone springs (see RB_BodyInstance). */ final native function SetNamedRBBoneSprings(bool bEnable, Array<Name> BoneNames, float InBoneLinearSpring, float InBoneAngularSpring, SkeletalMeshComponent SkelMeshComp); /** Use to toggle collision on particular bodies in the asset. */ final native function SetNamedBodiesBlockRigidBody(bool bNewBlockRigidBody, Array<Name> BoneNames, SkeletalMeshComponent SkelMesh); /** Use to toggle collision on particular bodies in the asset. */ final native function SetFullAnimWeightBlockRigidBody(bool bNewBlockRigidBody, SkeletalMeshComponent SkelMesh); /** Allows you to fix/unfix bodies where bAlwaysFullAnimWeight is set to TRUE in the BodySetup. */ final native function SetFullAnimWeightBonesFixed(bool bNewFixed, SkeletalMeshComponent SkelMesh); /** Find instance of the body that matches the name supplied. */ final native function RB_BodyInstance FindBodyInstance(name BodyName, PhysicsAsset InAsset); /** Find instance of the constraint that matches the name supplied. */ final native function RB_ConstraintInstance FindConstraintInstance(name ConName, PhysicsAsset InAsset); defaultproperties { LinearSpringScale=1.0 LinearDampingScale=1.0 LinearForceLimitScale=1.0 AngularSpringScale=1.0 AngularDampingScale=1.0 AngularForceLimitScale=1.0 bInitBodies=true } |
Overview | Package | Class | Source | Class tree | Glossary | UnrealScript Documentation |
previous class next class | frames no frames |