LeviLamina
Loading...
Searching...
No Matches
ICameraAPI.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/deps/core/math/Vec3.h"
7#include "mc/deps/game_refs/WeakRef.h"
8#include "mc/deps/minecraft_camera/CameraShakeType.h"
9#include "mc/deps/shared_types/legacy/actor/ActorLocation.h"
10
11// auto generated forward declare list
12// clang-format off
13class EntityContext;
14class EntityRegistry;
15class Vec2;
16// clang-format on
17
18class ICameraAPI {
19public:
20 // ICameraAPI inner types declare
21 // clang-format off
22 struct ShakeParameters;
23 struct CameraMovementData;
24 // clang-format on
25
26 // ICameraAPI inner types define
27 enum class CameraMovementSpeed : int {
28 Fast = 0,
29 Slow = 1,
30 };
31
32 struct ShakeParameters {
33 public:
34 // member variables
35 // NOLINTBEGIN
36 ::ll::TypedStorage<4, 12, ::Vec3> mShakeNoise;
37 ::ll::TypedStorage<1, 1, ::CameraShakeType> mShakeType;
38 // NOLINTEND
39 };
40
41 struct CameraMovementData {
42 public:
43 // member variables
44 // NOLINTBEGIN
45 ::ll::TypedStorage<4, 12, ::Vec3> mDirection;
46 ::ll::TypedStorage<4, 4, ::ICameraAPI::CameraMovementSpeed> mSpeed;
47 // NOLINTEND
48 };
49
50public:
51 // virtual functions
52 // NOLINTBEGIN
53 virtual ~ICameraAPI() = default;
54
55 virtual ::std::optional<::Vec3> tryGetActorRelativeLocation(
56 ::WeakRef<::EntityContext> const actorRef,
57 ::SharedTypes::Legacy::ActorLocation actorLoc
58 ) const = 0;
59
60 virtual ::std::optional<::Vec3>
61 tryGetActorInterpolatedPosition(::WeakRef<::EntityContext> actorRef, float interpolationFactor) const = 0;
62
63 virtual ::std::optional<::Vec2> tryGetActorRotation(::WeakRef<::EntityContext const> const actorRef) const = 0;
64
65 virtual ::std::optional<::Vec3> tryGetActorPositionDelta(::WeakRef<::EntityContext> actorRef) const = 0;
66
67 virtual ::std::optional<::ICameraAPI::ShakeParameters> tryGetShakeParameters(
68 ::WeakRef<::EntityContext> actorRef,
69 float noiseMultiplier,
70 float frequency,
71 float amplitude
72 ) const = 0;
73
74 virtual ::std::optional<float> tryGetFOV() const = 0;
75
76 virtual ::ICameraAPI::CameraMovementData getCameraMovementVector() const = 0;
77
78 virtual float getSecondsSinceProgramStart() const = 0;
79
80 virtual ::WeakRef<::EntityContext> getDefaultCameraTarget() const = 0;
81
82 virtual ::WeakRef<::EntityContext> getWeakEntity(int64 actorId) const = 0;
83
84 virtual ::WeakRef<::EntityRegistry> getRegistryWeakEntity_DONOTUSE() const = 0;
85
86 virtual float getFrameAlpha() const = 0;
87
88 virtual ::glm::vec2 getViewportSize() const = 0;
89
90 virtual ::std::optional<::Vec3> clip(::glm::vec3 const& A, ::glm::vec3 const& B) = 0;
91
92 virtual bool isInWall(::Vec3 const& pos) const = 0;
93
94 virtual bool isAlive(::WeakRef<::EntityContext> const actorRef) const = 0;
95 // NOLINTEND
96
97public:
98 // virtual function thunks
99 // NOLINTBEGIN
100
101 // NOLINTEND
102};
Definition EntityContext.h:17
Definition EntityRegistry.h:11
Definition ICameraAPI.h:5
Definition Vec2.h:5
Definition ICameraAPI.h:18
Definition ICameraAPI.h:16