Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-09-26 09:04:28

0001 // Created on: 2014-03-12
0002 // Created by: Kirill GAVRILOV
0003 // Copyright (c) 2014 OPEN CASCADE SAS
0004 //
0005 // This file is part of Open CASCADE Technology software library.
0006 //
0007 // This library is free software; you can redistribute it and/or modify it under
0008 // the terms of the GNU Lesser General Public License version 2.1 as published
0009 // by the Free Software Foundation, with special exception defined in the file
0010 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
0011 // distribution for complete text of the license and disclaimer of any warranty.
0012 //
0013 // Alternatively, this file may be used under the terms of Open CASCADE
0014 // commercial license or contractual agreement.
0015 
0016 #ifndef _Prs3d_PresentationShadow_HeaderFile
0017 #define _Prs3d_PresentationShadow_HeaderFile
0018 
0019 #include <Prs3d_Presentation.hxx>
0020 
0021 //! Defines a "shadow" of existing presentation object with custom aspects.
0022 class Prs3d_PresentationShadow : public Graphic3d_Structure
0023 {
0024   DEFINE_STANDARD_RTTIEXT(Prs3d_PresentationShadow, Graphic3d_Structure)
0025 public:
0026   //! Constructs a shadow of existing presentation object.
0027   Standard_EXPORT Prs3d_PresentationShadow(const occ::handle<Graphic3d_StructureManager>& theViewer,
0028                                            const occ::handle<Graphic3d_Structure>&        thePrs);
0029 
0030   //! Returns the id of the parent presentation
0031   inline int ParentId() const { return myParentStructId; }
0032 
0033   //! Returns view affinity of the parent presentation
0034   inline const occ::handle<Graphic3d_ViewAffinity>& ParentAffinity() const
0035   {
0036     return myParentAffinity;
0037   }
0038 
0039   //! Do nothing - axis-aligned bounding box should be initialized from parent structure.
0040   Standard_EXPORT void CalculateBoundBox() override;
0041 
0042   //! Dumps the content of me into the stream
0043   Standard_EXPORT void DumpJson(Standard_OStream& theOStream, int theDepth = -1) const override;
0044 
0045 private:
0046   occ::handle<Graphic3d_ViewAffinity> myParentAffinity;
0047   int                                 myParentStructId;
0048 };
0049 
0050 #endif // _Prs3d_PresentationShadow_HeaderFile