godot/thirdparty/embree/kernels/subdiv/catmullrom_curve.h

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

#pragma once

#include "../common/default.h"
#include "bezier_curve.h"
#include "../common/scene_curves.h"

/*

  Implements Catmul Rom curves with control points p0, p1, p2, p3. At
  t=0 the curve goes through p1, with tangent (p2-p0)/2, and for t=1
  the curve goes through p2 with tangent (p3-p2)/2.

 */

namespace embree
{
  class CatmullRomBasis
  {};
  
  struct PrecomputedCatmullRomBasis
  {};
  extern PrecomputedCatmullRomBasis catmullrom_basis0;
  extern PrecomputedCatmullRomBasis catmullrom_basis1;

  template<typename Vertex>
    struct CatmullRomCurveT
    {};

  template<typename Vertex>
    __forceinline void convert(const CatmullRomCurveT<Vertex>& icurve, BezierCurveT<Vertex>& ocurve)
  {}

  template<typename CurveGeometry>
  __forceinline CatmullRomCurveT<Vec3ff> enlargeRadiusToMinWidth(const RayQueryContext* context, const CurveGeometry* geom, const Vec3fa& ray_org, const CatmullRomCurveT<Vec3ff>& curve)
  {}
  
  CatmullRomCurve3fa;
}