// Copyright 2019 Intel Corporation
// SPDX-License-Identifier: Apache-2.0

#pragma once

#include "common.isph"

typedef uniform VKLObject VKLVolume;

VKL_API void vklGetBoundingBoxRef(const VKLVolume *uniform volume,
                                  vkl_box3f *uniform boundingBox);

VKL_FORCEINLINE uniform vkl_box3f vklGetBoundingBox(VKLVolume volume)
{
  uniform vkl_box3f result;
  vklGetBoundingBoxRef(&volume, &result);
  return result;
}

VKL_API uniform unsigned int vklGetNumAttributesRef(
    const VKLVolume *uniform volume);

VKL_FORCEINLINE uniform unsigned int vklGetNumAttributes(VKLVolume volume)
{
  return vklGetNumAttributesRef(&volume);
}

VKL_API void vklGetValueRangeRef(const VKLVolume *uniform volume,
                                 uniform unsigned int attributeIndex,
                                 vkl_range1f *uniform valueRange);

VKL_FORCEINLINE uniform vkl_range1f
vklGetValueRange(VKLVolume volume, uniform unsigned int attributeIndex = 0)
{
  uniform vkl_range1f result;
  vklGetValueRangeRef(&volume, attributeIndex, &result);
  return result;
}
