// Fill out your copyright notice in the Description page of Project Settings. #pragma once #include "CoreMinimal.h" #include "Components/StaticMeshComponent.h" #include "Eigen/Dense" #include "Link.generated.h" /** * */ UCLASS(ClassGroup=(Custom), meta=(BlueprintSpawnableComponent)) class PBDROBOTICS_API ULink : public UStaticMeshComponent { GENERATED_BODY() public: Eigen::Vector3d CenterOfMass; Eigen::Vector3d Position; Eigen::Vector3d Velocity; double Mass; Eigen::Quaterniond Orientation; Eigen::Vector3d AngleVelocity; Eigen::Matrix3d Inertia; private: Eigen::Vector3d inertia_tensor; Eigen::Matrix3d GetMomentOfInertia() const; Eigen::Matrix3d GetRotationMatrix() const; protected: virtual void BeginPlay() override; };