Batch #9484 by ragnarok-clanker: forced by an admin (2 lower score(s), 5 changed function(s)); checked with 87 compiled unit(s), including every includer of Source/Contents/Camera/Camera.h, Source/Contents/Camera/CameraFrame.h, Source/Contents/Camera/CameraState.h.
33 lines
1,003 B
C++
33 lines
1,003 B
C++
#ifndef RAGNAROK_SOURCE_CONTENTS_CAMERA_CAMERAFRAME_H
|
|
#define RAGNAROK_SOURCE_CONTENTS_CAMERA_CAMERAFRAME_H
|
|
|
|
#include "Contents/Camera/CameraState.h"
|
|
#include "Utility/Math/AffineMatrix.h"
|
|
|
|
#include <cstddef>
|
|
|
|
struct TerrainHeight;
|
|
class CRenderer;
|
|
|
|
struct CameraFrame {
|
|
/* 0080 */ float eye[3];
|
|
/* 008C */ float up[3];
|
|
/* 0098 */ matrix view;
|
|
/* 00C8 */ matrix inverse;
|
|
|
|
void Build(const CameraState& camera, const TerrainHeight& terrain);
|
|
void Refresh(const CameraState& camera, const TerrainHeight& terrain, CRenderer& renderer);
|
|
void Forward(const CameraState& camera, float* output) const;
|
|
void AlternateView(const CameraState& camera, float yaw, const TerrainHeight& terrain, matrix& output) const;
|
|
};
|
|
|
|
|
|
static_assert(sizeof(CameraFrame) == 120);
|
|
|
|
#if defined(_WIN32) && !defined(_WIN64)
|
|
static_assert(offsetof(CameraFrame, up) + 0x80 == 0x8C);
|
|
static_assert(offsetof(CameraFrame, view) + 0x80 == 0x98);
|
|
static_assert(offsetof(CameraFrame, inverse) + 0x80 == 0xC8);
|
|
#endif
|
|
|
|
#endif
|