1 // Created on: 1997-02-10
2 // Created by: Alexander BRIVIN
3 // Copyright (c) 1997-1999 Matra Datavision
4 // Copyright (c) 1999-2014 OPEN CASCADE SAS
6 // This file is part of Open CASCADE Technology software library.
8 // This library is free software; you can redistribute it and/or modify it under
9 // the terms of the GNU Lesser General Public License version 2.1 as published
10 // by the Free Software Foundation, with special exception defined in the file
11 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
12 // distribution for complete text of the license and disclaimer of any warranty.
14 // Alternatively, this file may be used under the terms of Open CASCADE
15 // commercial license or contractual agreement.
17 #ifndef _Vrml_LOD_HeaderFile
18 #define _Vrml_LOD_HeaderFile
20 #include <Standard.hxx>
21 #include <Standard_Type.hxx>
23 #include <TColStd_HArray1OfReal.hxx>
25 #include <Standard_Boolean.hxx>
26 #include <Standard_Transient.hxx>
27 #include <Standard_OStream.hxx>
32 DEFINE_STANDARD_HANDLE(Vrml_LOD, Standard_Transient)
34 //! defines a LOD (level of detailization) node of VRML specifying properties
35 //! of geometry and its appearance.
36 //! This group node is used to allow applications to switch between
37 //! various representations of objects automatically. The children of this
38 //! node typically represent the same object or objects at the varying
39 //! of Levels Of Detail (LOD), from highest detail to lowest.
41 //! The specified center point of the LOD is transformed by current
42 //! transformation into world space, and yhe distancefrom the transformed
43 //! center to the world-space eye point is calculated.
44 //! If thedistance is less than the first value in the ranges array,
45 //! than the first child of the LOD group is drawn. If between
46 //! the first and second values in the range array, the second child
48 //! If there are N values in the range array, the LOD group should
49 //! have N+1 children.
50 //! Specifying too few children will result in the last child being
51 //! used repeatedly for the lowest lewels of detail; if too many children
52 //! are specified, the extra children w ll be ignored.
53 //! Each value in the ranges array should be greater than the previous
54 //! value, otherwise results are undefined.
55 class Vrml_LOD : public Standard_Transient
61 Standard_EXPORT Vrml_LOD();
63 Standard_EXPORT Vrml_LOD(const Handle(TColStd_HArray1OfReal)& aRange, const gp_Vec& aCenter);
65 Standard_EXPORT void SetRange (const Handle(TColStd_HArray1OfReal)& aRange);
67 Standard_EXPORT Handle(TColStd_HArray1OfReal) Range() const;
69 Standard_EXPORT void SetCenter (const gp_Vec& aCenter);
71 Standard_EXPORT gp_Vec Center() const;
73 Standard_EXPORT Standard_OStream& Print (Standard_OStream& anOStream) const;
78 DEFINE_STANDARD_RTTIEXT(Vrml_LOD,Standard_Transient)
88 Handle(TColStd_HArray1OfReal) myRange;
90 Standard_Boolean myRangeFlag;
101 #endif // _Vrml_LOD_HeaderFile