Path: blob/master/thirdparty/embree/common/math/obbox.h
9912 views
// Copyright 2009-2021 Intel Corporation1// SPDX-License-Identifier: Apache-2.023#pragma once45#include "bbox.h"6#include "linearspace3.h"78namespace embree9{10/*! Oriented bounding box */11template<typename T>12struct OBBox13{14public:1516__forceinline OBBox () {}1718__forceinline OBBox (EmptyTy)19: space(one), bounds(empty) {}2021__forceinline OBBox (const BBox<T>& bounds)22: space(one), bounds(bounds) {}2324__forceinline OBBox (const LinearSpace3<T>& space, const BBox<T>& bounds)25: space(space), bounds(bounds) {}2627friend embree_ostream operator<<(embree_ostream cout, const OBBox& p) {28return cout << "{ space = " << p.space << ", bounds = " << p.bounds << "}";29}3031public:32LinearSpace3<T> space; //!< orthonormal transformation33BBox<T> bounds; //!< bounds in transformed space34};3536typedef OBBox<Vec3f> OBBox3f;37typedef OBBox<Vec3fa> OBBox3fa;38}394041