Files
SatyandClaude Opus 5.5 597201ec6a Gx pass 1: device-free leaves, C3Vector ctors, Gx enums into Gx/Types.h
- CGxFormat(), CGxMatrixStack() + Identity, CGxLight(), CGxApiLight::operator= (moved to CGxLight.h),
  CGxPool::Invalidate/Discard, CGxGammaRamp::Set
- Gx.h/Gx.cpp: GxApiSupported, GxVertexSize, GxVertexAttribOffset, GxCalcTexelStrideInBytes + tables
- C3Vector() zero-inits and C3Vector(x, y, z) exists (inline only); CAaBox/C3Ray/CFrustum/Intersect rely on it
- EGxApi/EGxTexFormat/EGxVertexBufferFormat moved to Engine/Source/Gx/Types.h
- struct/class forward declaration mismatches fixed in CGxDevice.h and CGxPool.h

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
2026-09-24 22:05:14 +02:00

25 lines
577 B
C++

#include <cmath>
#include "Engine/Source/Tempest/C3Ray.h"
// VERIFY: a5d6e75f manual
// OFFSET: 0x00985200
C3Ray C3Ray::FromStartEnd(const C3Vector& start, const C3Vector& end, bool normalize) {
float x = end.x - start.x;
float y = end.y - start.y;
float z = end.z - start.z;
if (normalize) {
float scale = 1.0f / sqrt(z * z + y * y + x * x);
x = x * scale;
y = y * scale;
z = scale * z;
}
C3Ray result;
result.origin = start;
result.dir.x = x;
result.dir.y = y;
result.dir.z = z;
return result;
}