mirror of
https://github.com/whoahq/whoa.git
synced 2026-03-18 21:51:06 +03:00
Compare commits
3 Commits
58ba0ce436
...
8d77b8d8d2
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8d77b8d8d2 | ||
|
|
86084516cd | ||
|
|
44bee4cbd7 |
@ -1 +1 @@
|
|||||||
Subproject commit 1c9e7831c874068e7c939a7dea8790eef6513d78
|
Subproject commit a7733b6a8c2d52f081fbd74ca40d7ca8f94e1209
|
||||||
@ -1214,4 +1214,17 @@ struct CHARACTER_INFO {
|
|||||||
uint8_t firstLogin;
|
uint8_t firstLogin;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
struct CHARACTER_CREATE_INFO {
|
||||||
|
char name[48];
|
||||||
|
uint8_t raceID;
|
||||||
|
uint8_t classID;
|
||||||
|
uint8_t sexID;
|
||||||
|
uint8_t skinID;
|
||||||
|
uint8_t faceID;
|
||||||
|
uint8_t hairStyleID;
|
||||||
|
uint8_t hairColorID;
|
||||||
|
uint8_t facialHairStyleID;
|
||||||
|
uint8_t outfitID;
|
||||||
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
52
src/ui/simple/CSimpleCamera.cpp
Normal file
52
src/ui/simple/CSimpleCamera.cpp
Normal file
@ -0,0 +1,52 @@
|
|||||||
|
#include "ui/simple/CSimpleCamera.hpp"
|
||||||
|
|
||||||
|
CSimpleCamera::CSimpleCamera(float nearZ, float farZ, float fov) {
|
||||||
|
this->float10 = 0.0f;
|
||||||
|
|
||||||
|
this->m_nearZ = nearZ;
|
||||||
|
this->m_farZ = farZ;
|
||||||
|
this->m_fov = fov;
|
||||||
|
this->m_aspect = 1.0f;
|
||||||
|
|
||||||
|
this->SetFacing(0.0f, 0.0f, 0.0f);
|
||||||
|
}
|
||||||
|
|
||||||
|
float CSimpleCamera::FOV() {
|
||||||
|
return this->m_fov;
|
||||||
|
}
|
||||||
|
|
||||||
|
C3Vector CSimpleCamera::Forward() const {
|
||||||
|
return { this->m_facing.a0, this->m_facing.a1, this->m_facing.a2 };
|
||||||
|
}
|
||||||
|
|
||||||
|
C3Vector CSimpleCamera::Right() const {
|
||||||
|
return { this->m_facing.b0, this->m_facing.b1, this->m_facing.b2 };
|
||||||
|
}
|
||||||
|
|
||||||
|
void CSimpleCamera::SetFacing(const C3Vector& forward) {
|
||||||
|
// TODO
|
||||||
|
}
|
||||||
|
|
||||||
|
void CSimpleCamera::SetFacing(const C3Vector& forward, const C3Vector& up) {
|
||||||
|
// TODO
|
||||||
|
}
|
||||||
|
|
||||||
|
void CSimpleCamera::SetFacing(float yaw, float pitch, float roll) {
|
||||||
|
this->m_facing.FromEulerAnglesZYX(yaw, pitch, roll);
|
||||||
|
}
|
||||||
|
|
||||||
|
void CSimpleCamera::SetFarZ(float farZ) {
|
||||||
|
this->m_farZ = farZ;
|
||||||
|
}
|
||||||
|
|
||||||
|
void CSimpleCamera::SetFieldOfView(float fov) {
|
||||||
|
this->m_fov = fov;
|
||||||
|
}
|
||||||
|
|
||||||
|
void CSimpleCamera::SetNearZ(float nearZ) {
|
||||||
|
this->m_nearZ = nearZ;
|
||||||
|
}
|
||||||
|
|
||||||
|
C3Vector CSimpleCamera::Up() const {
|
||||||
|
return { this->m_facing.c0, this->m_facing.c1, this->m_facing.c2 };
|
||||||
|
}
|
||||||
35
src/ui/simple/CSimpleCamera.hpp
Normal file
35
src/ui/simple/CSimpleCamera.hpp
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
#ifndef UI_SIMPLE_C_SIMPLE_CAMERA_HPP
|
||||||
|
#define UI_SIMPLE_C_SIMPLE_CAMERA_HPP
|
||||||
|
|
||||||
|
#include <tempest/Matrix.hpp>
|
||||||
|
#include <tempest/Vector.hpp>
|
||||||
|
|
||||||
|
class CSimpleCamera {
|
||||||
|
public:
|
||||||
|
// Virtual public member functions
|
||||||
|
virtual float FOV();
|
||||||
|
virtual C3Vector Forward() const;
|
||||||
|
virtual C3Vector Right() const;
|
||||||
|
virtual C3Vector Up() const;
|
||||||
|
|
||||||
|
// Public member functions
|
||||||
|
CSimpleCamera(float nearZ, float farZ, float fov);
|
||||||
|
void SetFacing(const C3Vector& forward);
|
||||||
|
void SetFacing(const C3Vector& forward, const C3Vector& up);
|
||||||
|
void SetFacing(float yaw, float pitch, float roll);
|
||||||
|
void SetFarZ(float farZ);
|
||||||
|
void SetFieldOfView(float fov);
|
||||||
|
void SetNearZ(float nearZ);
|
||||||
|
|
||||||
|
protected:
|
||||||
|
// Protected member variables
|
||||||
|
C3Vector m_position;
|
||||||
|
float float10;
|
||||||
|
C33Matrix m_facing;
|
||||||
|
float m_nearZ;
|
||||||
|
float m_farZ;
|
||||||
|
float m_fov;
|
||||||
|
float m_aspect;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
||||||
Loading…
Reference in New Issue
Block a user