0026292: Visualization - Parallelize queue-based BVH builders (subclasses of BVH_Queu...
[occt.git] / src / BVH / BVH_Object.hxx
CommitLineData
3c4e78f2 1// Created on: 2013-12-20
2// Created by: Denis BOGOLEPOV
d5f74e42 3// Copyright (c) 2013-2014 OPEN CASCADE SAS
3c4e78f2 4//
5// This file is part of Open CASCADE Technology software library.
6//
d5f74e42 7// This library is free software; you can redistribute it and/or modify it under
8// the terms of the GNU Lesser General Public License version 2.1 as published
3c4e78f2 9// by the Free Software Foundation, with special exception defined in the file
10// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
11// distribution for complete text of the license and disclaimer of any warranty.
12//
13// Alternatively, this file may be used under the terms of Open CASCADE
14// commercial license or contractual agreement.
15
16#ifndef _BVH_Object_Header
17#define _BVH_Object_Header
18
19#include <BVH_Box.hxx>
20#include <BVH_Properties.hxx>
21
22#include <NCollection_Handle.hxx>
23
679d3878 24//! Abstract geometric object bounded by BVH box.
25//! \tparam T Numeric data type
26//! \tparam N Vector dimension
3c4e78f2 27template<class T, int N>
28class BVH_Object
29{
30public:
31
32 //! Creates new abstract geometric object.
33 BVH_Object();
34
35 //! Releases resources of geometric object.
36 virtual ~BVH_Object() = 0;
37
38public:
39
679d3878 40 //! Returns AABB of the geometric object.
3c4e78f2 41 virtual BVH_Box<T, N> Box() const = 0;
42
679d3878 43 //! Returns properties of the geometric object.
3c4e78f2 44 virtual const NCollection_Handle<BVH_Properties>& Properties() const;
45
679d3878 46 //! Sets properties of the geometric object.
3c4e78f2 47 virtual void SetProperties (const NCollection_Handle<BVH_Properties>& theProperties);
48
679d3878 49 //! Marks object state as outdated (needs BVH rebuilding).
3c4e78f2 50 virtual void MarkDirty();
51
52protected:
53
679d3878 54 Standard_Boolean myIsDirty; //!< Marks internal object state as outdated
3c4e78f2 55 NCollection_Handle<BVH_Properties> myProperties; //!< Generic properties assigned to the object
56
57};
58
59#include <BVH_Object.lxx>
60
61#endif // _BVH_Object_Header