GxuFontMain.cpp (0x6BCD60-0x6BF370), GxuFontUtil.cpp, GxuFontFont.cpp, GxuFontFace.cpp, GxuFontString.cpp, GxuFontMiscClasses.cpp, GxuFontTextureCache.cpp and IGxuFontGlyph.cpp, named after the 12340 and Mac 13682 source file strings; CGxFont moves from Gx to Gxu. GxuLight.cpp (0x6BB510-0x6BCD60): the light grid behind the GxuLight* function-pointer table at 0xAD9834. Gxu links FreeType 2.0.1. Shared additions: GxBufDestroy, GxFormatColor, CGxVertexPC/PCT, CMath fint_n/fuint_pi/CeilToInt64, C3Vector::SquaredMag, HASHKEY_DWORD and the template instances in stpl.h. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
62 lines
1.4 KiB
C++
62 lines
1.4 KiB
C++
#ifndef ENGINE_SOURCE_TEMPEST_C3VECTOR_H
|
|
#define ENGINE_SOURCE_TEMPEST_C3VECTOR_H
|
|
|
|
#include <cstddef>
|
|
#include <cstdint>
|
|
|
|
class C4Vector;
|
|
class CImVector;
|
|
|
|
class C3Vector {
|
|
public:
|
|
enum EAxis {
|
|
AXIS_X = 0,
|
|
AXIS_Y = 1,
|
|
AXIS_Z = 2
|
|
};
|
|
|
|
static C3Vector Cross(const C3Vector& a, const C3Vector& b);
|
|
static C3Vector Max(const C3Vector& a, const C3Vector& b);
|
|
static C3Vector Min(const C3Vector& a, const C3Vector& b);
|
|
|
|
/* 0000 */ float x;
|
|
/* 0004 */ float y;
|
|
/* 0008 */ float z;
|
|
|
|
C3Vector();
|
|
C3Vector(float x, float y, float z);
|
|
C3Vector(const C4Vector& v);
|
|
C3Vector(const CImVector& color);
|
|
EAxis MajorAxis() const;
|
|
EAxis MinorAxis() const;
|
|
void Normalize();
|
|
void NormalizeSafe();
|
|
float SquaredMag() const;
|
|
void Zero();
|
|
C3Vector operator-() const;
|
|
C3Vector& operator+=(const C3Vector& v);
|
|
C3Vector& operator*=(float s);
|
|
C3Vector& operator/=(float s);
|
|
};
|
|
|
|
C3Vector operator+(const C3Vector& l, const C3Vector& r);
|
|
C3Vector operator-(const C3Vector& l, const C3Vector& r);
|
|
bool operator==(const C3Vector& l, const C3Vector& r);
|
|
bool operator!=(const C3Vector& l, const C3Vector& r);
|
|
|
|
// INLINED
|
|
inline C3Vector::C3Vector() {
|
|
this->x = 0.0f;
|
|
this->y = 0.0f;
|
|
this->z = 0.0f;
|
|
}
|
|
|
|
// INLINED
|
|
inline C3Vector::C3Vector(float x, float y, float z) {
|
|
this->x = x;
|
|
this->y = y;
|
|
this->z = z;
|
|
}
|
|
|
|
#endif
|