You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
43 lines
944 B
43 lines
944 B
// Fill out your copyright notice in the Description page of Project Settings.
|
|
|
|
#pragma once
|
|
|
|
#include "CoreMinimal.h"
|
|
#include "Link.h"
|
|
#include "GameFramework/Actor.h"
|
|
#include "Robot.generated.h"
|
|
|
|
UCLASS()
|
|
class PBDROBOTICS_API ARobot : public AActor
|
|
{
|
|
GENERATED_BODY()
|
|
public:
|
|
ARobot();
|
|
|
|
protected:
|
|
virtual void BeginPlay() override;
|
|
|
|
UPROPERTY(BlueprintReadWrite)
|
|
TArray<ULink*> Links = TArray<ULink*>();
|
|
|
|
UPROPERTY(BlueprintReadWrite)
|
|
TArray<UJoint*> Joints = TArray<UJoint*>();
|
|
|
|
UFUNCTION(BlueprintCallable)
|
|
void Connect(ULink* L1, ULink* L2);
|
|
|
|
UPROPERTY(BlueprintReadWrite)
|
|
bool HasGravity = false;
|
|
|
|
UPROPERTY(BlueprintReadWrite)
|
|
FVector EffectorMove = FVector::ZeroVector;
|
|
|
|
UFUNCTION(BlueprintCallable)
|
|
ULink* GetEffector() const;
|
|
|
|
private:
|
|
// Assumes First Link to have Identity Orientation and Joints Array to be in order
|
|
void ResetPositionAndOrientation();
|
|
public:
|
|
virtual void Tick(float DeltaTime) override;
|
|
};
|
|
|