1 // Created on: 2013-12-20
2 // Created by: Denis BOGOLEPOV
3 // Copyright (c) 2013-2014 OPEN CASCADE SAS
5 // This file is part of Open CASCADE Technology software library.
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
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.
13 // Alternatively, this file may be used under the terms of Open CASCADE
14 // commercial license or contractual agreement.
16 #ifndef _BVH_Properties_Header
17 #define _BVH_Properties_Header
19 #include <BVH_Box.hxx>
21 #include <Standard_Macro.hxx>
23 //! Abstract properties of geometric object.
28 //! Releases resources of object properties.
29 Standard_EXPORT virtual ~BVH_Properties() = 0;
33 //! Stores transform properties of geometric object.
34 template<class T, int N>
35 class BVH_Transform : public BVH_Properties
39 //! Type of transformation matrix.
40 typedef typename BVH::MatrixType<T, N>::Type BVH_MatNt;
44 //! Creates new identity transformation.
47 //! Creates new transformation with specified matrix.
48 BVH_Transform (const BVH_MatNt& theTransform);
50 //! Releases resources of transformation properties.
51 virtual ~BVH_Transform();
53 //! Returns transformation matrix.
54 const BVH_MatNt& Transform() const;
56 //! Sets new transformation matrix.
57 void SetTransform (const BVH_MatNt& theTransform);
59 //! Returns inversed transformation matrix.
60 const BVH_MatNt& Inversed() const;
62 //! Applies transformation matrix to bounding box.
63 BVH_Box<T, N> Apply (const BVH_Box<T, N>& theBox) const;
67 BVH_MatNt myTransform; //!< Transformation matrix
68 BVH_MatNt myTransformInversed; //!< Inversed transformation matrix
72 #include <BVH_Properties.lxx>
74 #endif // _BVH_Properties_Header