mirror of
https://github.com/guezoloic/t3dsr.git
synced 2026-01-25 12:34:24 +00:00
feat: add lookAt function
This commit is contained in:
@@ -9,29 +9,33 @@
|
||||
#define vec3_h
|
||||
|
||||
|
||||
#ifndef SIMD
|
||||
#if defined(__x86_64__) || defined(__amd64__) || defined(_M_X64)
|
||||
#define SIMD_X86
|
||||
#include <xmmintrin.h>
|
||||
|
||||
#elif defined(__aarch64__) || defined(__arm64__) || defined(_M_ARM64)
|
||||
#define SIMD_ARCH
|
||||
#include <arm_neon.h>
|
||||
|
||||
#else
|
||||
#endif
|
||||
#define SIMD
|
||||
#endif
|
||||
|
||||
#ifndef ALIGN16_VEC
|
||||
#ifdef _MSC_VER
|
||||
#define ALIGN16 __declspec(align(16))
|
||||
#define ALIGN16_VEC __declspec(align(16))
|
||||
#else
|
||||
#define ALIGN16 __attribute__((aligned(16)))
|
||||
#define ALIGN16_VEC __attribute__((aligned(16)))
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
#define VEC_SIZE 3
|
||||
|
||||
typedef union {
|
||||
struct { float x, y, z; };
|
||||
float data[4];
|
||||
} ALIGN16 Vec3f_t;
|
||||
} ALIGN16_VEC Vec3f_t;
|
||||
|
||||
Vec3f_t vec3f_from_array(const float *__restrict val);
|
||||
Vec3f_t vec3f(float x, float y, float z);
|
||||
|
||||
Reference in New Issue
Block a user