Skip to content

Commit

Permalink
tweak(extra-natives/rdr3): add GamePrimitives
Browse files Browse the repository at this point in the history
  • Loading branch information
Disquse committed Nov 7, 2023
1 parent d2991d3 commit b605177
Show file tree
Hide file tree
Showing 2 changed files with 58 additions and 4 deletions.
8 changes: 4 additions & 4 deletions code/components/extra-natives-five/include/GamePrimitives.h
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@ struct alignas(16) Vec4V

struct spdAABB
{
rage::Vec3V mins;
rage::Vec3V maxs;
Vec3V mins;
Vec3V maxs;
};

struct spdSphere
Expand All @@ -88,8 +88,8 @@ struct spdSphere
// fake name
struct spdRay
{
rage::Vec3V start;
rage::Vec3V end;
Vec3V start;
Vec3V end;
};

enum class eSearchVolumeType : int
Expand Down
54 changes: 54 additions & 0 deletions code/components/extra-natives-rdr3/include/GamePrimitives.h
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;
};
}

0 comments on commit b605177

Please sign in to comment.