godot/thirdparty/embree/include/embree4/rtcore_ray.h

// Copyright 2009-2021 Intel Corporation
// SPDX-License-Identifier: Apache-2.0

#pragma once

#include "rtcore_common.h"

RTC_NAMESPACE_BEGIN

/* Ray structure for a single ray */
struct RTC_ALIGN(16) RTCRay
{};

/* Hit structure for a single ray */
struct RTC_ALIGN(16) RTCHit
{};

/* Combined ray/hit structure for a single ray */
struct RTCRayHit
{};

/* Ray structure for a packet of 4 rays */
struct RTC_ALIGN(16) RTCRay4
{};

/* Hit structure for a packet of 4 rays */
struct RTC_ALIGN(16) RTCHit4
{};

/* Combined ray/hit structure for a packet of 4 rays */
struct RTCRayHit4
{};

/* Ray structure for a packet of 8 rays */
struct RTC_ALIGN(32) RTCRay8
{};

/* Hit structure for a packet of 8 rays */
struct RTC_ALIGN(32) RTCHit8
{};

/* Combined ray/hit structure for a packet of 8 rays */
struct RTCRayHit8
{};

/* Ray structure for a packet of 16 rays */
struct RTC_ALIGN(64) RTCRay16
{};

/* Hit structure for a packet of 16 rays */
struct RTC_ALIGN(64) RTCHit16
{};

/* Combined ray/hit structure for a packet of 16 rays */
struct RTCRayHit16
{};

struct RTCRayN;
struct RTCHitN;
struct RTCRayHitN;

#if defined(__cplusplus)

/* Helper functions to access ray packets of runtime size N */
RTC_FORCEINLINE float& RTCRayN_org_x(RTCRayN* ray, unsigned int N, unsigned int i) {}
RTC_FORCEINLINE float& RTCRayN_org_y(RTCRayN* ray, unsigned int N, unsigned int i) {}
RTC_FORCEINLINE float& RTCRayN_org_z(RTCRayN* ray, unsigned int N, unsigned int i) {}
RTC_FORCEINLINE float& RTCRayN_tnear(RTCRayN* ray, unsigned int N, unsigned int i) {}

RTC_FORCEINLINE float& RTCRayN_dir_x(RTCRayN* ray, unsigned int N, unsigned int i) {}
RTC_FORCEINLINE float& RTCRayN_dir_y(RTCRayN* ray, unsigned int N, unsigned int i) {}
RTC_FORCEINLINE float& RTCRayN_dir_z(RTCRayN* ray, unsigned int N, unsigned int i) {}
RTC_FORCEINLINE float& RTCRayN_time (RTCRayN* ray, unsigned int N, unsigned int i) {}

RTC_FORCEINLINE float&        RTCRayN_tfar (RTCRayN* ray, unsigned int N, unsigned int i) {}
RTC_FORCEINLINE unsigned int& RTCRayN_mask (RTCRayN* ray, unsigned int N, unsigned int i) {}
RTC_FORCEINLINE unsigned int& RTCRayN_id   (RTCRayN* ray, unsigned int N, unsigned int i) {}
RTC_FORCEINLINE unsigned int& RTCRayN_flags(RTCRayN* ray, unsigned int N, unsigned int i) {}

/* Helper functions to access hit packets of runtime size N */
RTC_FORCEINLINE float& RTCHitN_Ng_x(RTCHitN* hit, unsigned int N, unsigned int i) {}
RTC_FORCEINLINE float& RTCHitN_Ng_y(RTCHitN* hit, unsigned int N, unsigned int i) {}
RTC_FORCEINLINE float& RTCHitN_Ng_z(RTCHitN* hit, unsigned int N, unsigned int i) {}

RTC_FORCEINLINE float& RTCHitN_u(RTCHitN* hit, unsigned int N, unsigned int i) {}
RTC_FORCEINLINE float& RTCHitN_v(RTCHitN* hit, unsigned int N, unsigned int i) {}

RTC_FORCEINLINE unsigned int& RTCHitN_primID    (RTCHitN* hit, unsigned int N, unsigned int i) {}
RTC_FORCEINLINE unsigned int& RTCHitN_geomID    (RTCHitN* hit, unsigned int N, unsigned int i) {}
RTC_FORCEINLINE unsigned int& RTCHitN_instID    (RTCHitN* hit, unsigned int N, unsigned int i, unsigned int l) {}
#if defined(RTC_GEOMETRY_INSTANCE_ARRAY)
RTC_FORCEINLINE unsigned int& RTCHitN_instPrimID(RTCHitN* hit, unsigned int N, unsigned int i, unsigned int l) { return ((unsigned*)hit)[7*N + N*RTC_MAX_INSTANCE_LEVEL_COUNT + N*l + i]; }
#endif

/* Helper functions to extract RTCRayN and RTCHitN from RTCRayHitN */
RTC_FORCEINLINE RTCRayN* RTCRayHitN_RayN(RTCRayHitN* rayhit, unsigned int N) {}
RTC_FORCEINLINE RTCHitN* RTCRayHitN_HitN(RTCRayHitN* rayhit, unsigned int N) {}

/* Helper structure for a ray packet of compile-time size N */
template<int N>
struct RTCRayNt
{};

/* Helper structure for a hit packet of compile-time size N */
template<int N>
struct RTCHitNt
{};

/* Helper structure for a combined ray/hit packet of compile-time size N */
template<int N>
struct RTCRayHitNt
{};

RTC_FORCEINLINE RTCRay rtcGetRayFromRayN(RTCRayN* rayN, unsigned int N, unsigned int i)
{}

RTC_FORCEINLINE RTCHit rtcGetHitFromHitN(RTCHitN* hitN, unsigned int N, unsigned int i)
{}

RTC_FORCEINLINE void rtcCopyHitToHitN(RTCHitN* hitN, const RTCHit* hit, unsigned int N, unsigned int i)
{}

RTC_FORCEINLINE RTCRayHit rtcGetRayHitFromRayHitN(RTCRayHitN* rayhitN, unsigned int N, unsigned int i)
{}

#endif

RTC_NAMESPACE_END