// Fill out your copyright notice in the Description page of Project Settings. #pragma once #include "CoreMinimal.h" #include "GameFramework/Actor.h" #include "ProceduralMeshComponent.h" #include "Ocean.generated.h" UCLASS() class SEAOFCROOKS_API AOcean : public AActor { GENERATED_BODY() public: // Sets default values for this actor's properties AOcean(); float GetOceanHeight(); protected: UPROPERTY(BlueprintReadOnly, Category="Components") UProceduralMeshComponent* OceanMesh; // XSize and YSize are the number of tiles in the mesh UPROPERTY(EditDefaultsOnly, Category="Properties") uint32 XSize; UPROPERTY(EditDefaultsOnly, Category="Properties") uint32 YSize; UPROPERTY() TArray Vertices; UPROPERTY() TArray Triangles; UPROPERTY() TArray Normals; UPROPERTY() TArray UV0; UPROPERTY() TArray VertexColors; UPROPERTY() TArray Tangents; // Called when the game starts or when spawned virtual void BeginPlay() override; public: // Called every frame virtual void Tick(float DeltaTime) override; private: void GenerateMesh(); };