Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:05:31

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 <TColStd_HArray1OfReal.hxx>
0024 #include <gp_Vec.hxx>
0025 #include <Standard_Transient.hxx>
0026 #include <Standard_OStream.hxx>
0027 
0028 
0029 class Vrml_LOD;
0030 DEFINE_STANDARD_HANDLE(Vrml_LOD, Standard_Transient)
0031 
0032 //! defines a LOD (level of detailization) node of VRML specifying properties
0033 //! of geometry  and its appearance.
0034 //! This  group  node  is  used  to  allow  applications  to  switch  between
0035 //! various  representations  of  objects  automatically. The  children  of  this
0036 //! node  typically  represent  the  same  object  or  objects  at  the  varying
0037 //! of  Levels  Of  Detail  (LOD),  from  highest  detail  to  lowest.
0038 //!
0039 //! The  specified  center  point  of  the  LOD  is  transformed  by  current
0040 //! transformation  into  world  space,  and  yhe  distancefrom  the  transformed
0041 //! center  to  the  world-space  eye  point  is  calculated.
0042 //! If  thedistance  is  less  than  the  first  value  in  the  ranges  array,
0043 //! than  the  first  child  of  the  LOD  group  is  drawn.  If  between
0044 //! the  first  and  second  values  in  the  range  array,  the  second  child
0045 //! is  drawn,  etc.
0046 //! If  there  are  N  values  in  the  range  array,  the  LOD  group  should
0047 //! have  N+1  children.
0048 //! Specifying  too  few  children  will  result  in  the  last  child  being
0049 //! used  repeatedly  for  the  lowest  lewels  of  detail;  if  too  many  children
0050 //! are  specified,  the  extra  children  w ll  be  ignored.
0051 //! Each  value  in  the  ranges  array  should  be  greater  than  the previous
0052 //! value,  otherwise  results  are  undefined.
0053 class Vrml_LOD : public Standard_Transient
0054 {
0055 
0056 public:
0057 
0058   
0059   Standard_EXPORT Vrml_LOD();
0060   
0061   Standard_EXPORT Vrml_LOD(const Handle(TColStd_HArray1OfReal)& aRange, const gp_Vec& aCenter);
0062   
0063   Standard_EXPORT void SetRange (const Handle(TColStd_HArray1OfReal)& aRange);
0064   
0065   Standard_EXPORT Handle(TColStd_HArray1OfReal) Range() const;
0066   
0067   Standard_EXPORT void SetCenter (const gp_Vec& aCenter);
0068   
0069   Standard_EXPORT gp_Vec Center() const;
0070   
0071   Standard_EXPORT Standard_OStream& Print (Standard_OStream& anOStream) const;
0072 
0073 
0074 
0075 
0076   DEFINE_STANDARD_RTTIEXT(Vrml_LOD,Standard_Transient)
0077 
0078 protected:
0079 
0080 
0081 
0082 
0083 private:
0084 
0085 
0086   Handle(TColStd_HArray1OfReal) myRange;
0087   gp_Vec myCenter;
0088   Standard_Boolean myRangeFlag;
0089 
0090 
0091 };
0092 
0093 
0094 
0095 
0096 
0097 
0098 
0099 #endif // _Vrml_LOD_HeaderFile