-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tweak(extra-natives/rdr3): add GamePrimitives
- Loading branch information
Showing
2 changed files
with
58 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
54 changes: 54 additions & 0 deletions
54
code/components/extra-natives-rdr3/include/GamePrimitives.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
#pragma once | ||
|
||
// SSE4 is pretty common | ||
#define _XM_SSE4_INTRINSICS_ | ||
#include <DirectXMath.h> | ||
|
||
namespace rage | ||
{ | ||
struct alignas(16) Vec3V | ||
{ | ||
float x; | ||
float y; | ||
float z; | ||
float pad; | ||
|
||
Vec3V() | ||
: x(0), y(0), z(0), pad(0) | ||
{ | ||
} | ||
|
||
Vec3V(float x, float y, float z) | ||
: x(x), y(y), z(z), pad(NAN) | ||
{ | ||
} | ||
}; | ||
|
||
struct alignas(16) Vec4V | ||
{ | ||
float x; | ||
float y; | ||
float z; | ||
float w; | ||
}; | ||
|
||
struct spdAABB | ||
{ | ||
Vec3V mins; | ||
Vec3V maxs; | ||
}; | ||
|
||
struct spdSphere | ||
{ | ||
// xyz = center | ||
// w = radius | ||
Vec4V sphere; | ||
}; | ||
|
||
// fake name | ||
struct spdRay | ||
{ | ||
Vec3V start; | ||
Vec3V end; | ||
}; | ||
} |