|
|
|||
File indexing completed on 2026-10-24 09:15:44
0001 // Created on: 1997-02-10 0002 // Created by: Alexander BRIVIN 0003 // Copyright (c) 1997-1999 Matra Datavision 0004 // Copyright (c) 1999-2014 OPEN CASCADE SAS 0005 // 0006 // This file is part of Open CASCADE Technology software library. 0007 // 0008 // This library is free software; you can redistribute it and/or modify it under 0009 // the terms of the GNU Lesser General Public License version 2.1 as published 0010 // by the Free Software Foundation, with special exception defined in the file 0011 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT 0012 // distribution for complete text of the license and disclaimer of any warranty. 0013 // 0014 // Alternatively, this file may be used under the terms of Open CASCADE 0015 // commercial license or contractual agreement. 0016 0017 #ifndef _Vrml_LOD_HeaderFile 0018 #define _Vrml_LOD_HeaderFile 0019 0020 #include <Standard.hxx> 0021 #include <Standard_Type.hxx> 0022 0023 #include <NCollection_Array1.hxx> 0024 #include <NCollection_HArray1.hxx> 0025 #include <gp_Vec.hxx> 0026 #include <Standard_Transient.hxx> 0027 #include <Standard_OStream.hxx> 0028 0029 //! defines a LOD (level of detailization) node of VRML specifying properties 0030 //! of geometry and its appearance. 0031 //! This group node is used to allow applications to switch between 0032 //! various representations of objects automatically. The children of this 0033 //! node typically represent the same object or objects at the varying 0034 //! of Levels Of Detail (LOD), from highest detail to lowest. 0035 //! 0036 //! The specified center point of the LOD is transformed by current 0037 //! transformation into world space, and the distance from the transformed 0038 //! center to the world-space eye point is calculated. 0039 //! If thedistance is less than the first value in the ranges array, 0040 //! than the first child of the LOD group is drawn. If between 0041 //! the first and second values in the range array, the second child 0042 //! is drawn, etc. 0043 //! If there are N values in the range array, the LOD group should 0044 //! have N+1 children. 0045 //! Specifying too few children will result in the last child being 0046 //! used repeatedly for the lowest levels of detail; if too many children 0047 //! are specified, the extra children will be ignored. 0048 //! Each value in the ranges array should be greater than the previous 0049 //! value, otherwise results are undefined. 0050 class Vrml_LOD : public Standard_Transient 0051 { 0052 0053 public: 0054 Standard_EXPORT Vrml_LOD(); 0055 0056 Standard_EXPORT Vrml_LOD(const occ::handle<NCollection_HArray1<double>>& aRange, 0057 const gp_Vec& aCenter); 0058 0059 Standard_EXPORT void SetRange(const occ::handle<NCollection_HArray1<double>>& aRange); 0060 0061 Standard_EXPORT occ::handle<NCollection_HArray1<double>> Range() const; 0062 0063 Standard_EXPORT void SetCenter(const gp_Vec& aCenter); 0064 0065 Standard_EXPORT gp_Vec Center() const; 0066 0067 Standard_EXPORT Standard_OStream& Print(Standard_OStream& anOStream) const; 0068 0069 DEFINE_STANDARD_RTTIEXT(Vrml_LOD, Standard_Transient) 0070 0071 private: 0072 occ::handle<NCollection_HArray1<double>> myRange; 0073 gp_Vec myCenter; 0074 bool myRangeFlag; 0075 }; 0076 0077 #endif // _Vrml_LOD_HeaderFile
| [ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
|
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
|