Updated reflection code

main
Benjamin Kraft 2 years ago
parent dbb0a2b687
commit da416ba80c
  1. BIN
      Content/Blueprints/BP_Puma.uasset
  2. BIN
      Content/Blueprints/BP_Robot.uasset
  3. BIN
      Content/Blueprints/BP_Target.uasset
  4. BIN
      Content/Levels/Main.umap
  5. BIN
      Content/Materials/M_Ground.uasset
  6. BIN
      Content/Materials/M_Link.uasset
  7. 4
      Source/PBDRobotics/Joint.h
  8. 7
      Source/PBDRobotics/Link.h
  9. 4
      Source/PBDRobotics/Robot.h

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

@ -18,10 +18,10 @@ class PBDROBOTICS_API UJoint : public UObject
GENERATED_BODY() GENERATED_BODY()
public: public:
UPROPERTY(BlueprintReadWrite) UPROPERTY()
ULink* FirstLink; ULink* FirstLink;
UPROPERTY(BlueprintReadWrite) UPROPERTY()
ULink* SecondLink; ULink* SecondLink;
// First Connection point in local space // First Connection point in local space

@ -30,10 +30,10 @@ public:
Vector3d Last_Position; Vector3d Last_Position;
Quaterniond Last_Orientation; Quaterniond Last_Orientation;
UPROPERTY(EditAnywhere, BlueprintReadWrite) UPROPERTY()
UJoint* PrevJoint; UJoint* PrevJoint;
UPROPERTY(EditAnywhere, BlueprintReadWrite) UPROPERTY()
UJoint* NextJoint; UJoint* NextJoint;
UFUNCTION(BlueprintCallable) UFUNCTION(BlueprintCallable)
@ -59,10 +59,11 @@ public:
bool IsEffector = false; bool IsEffector = false;
Vector3d GetGravityForce() const; Vector3d GetGravityForce() const;
Matrix3d Inertia_Tensor_Local;
private: private:
UPROPERTY(EditAnywhere) UPROPERTY(EditAnywhere)
bool IsBase = false; bool IsBase = false;
Matrix3d Inertia_Tensor_Local;
void SetupJoints() const; void SetupJoints() const;
void SetupProperties(); void SetupProperties();

@ -17,10 +17,10 @@ public:
protected: protected:
virtual void BeginPlay() override; virtual void BeginPlay() override;
UPROPERTY(BlueprintReadWrite) UPROPERTY()
TArray<ULink*> Links = TArray<ULink*>(); TArray<ULink*> Links = TArray<ULink*>();
UPROPERTY(BlueprintReadWrite) UPROPERTY()
TArray<UJoint*> Joints = TArray<UJoint*>(); TArray<UJoint*> Joints = TArray<UJoint*>();
UFUNCTION(BlueprintCallable) UFUNCTION(BlueprintCallable)

Loading…
Cancel
Save