Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-09-10 09:15:49

0001 // Copyright (c) 2020 OPEN CASCADE SAS
0002 //
0003 // This file is part of Open CASCADE Technology software library.
0004 //
0005 // This library is free software; you can redistribute it and/or modify it under
0006 // the terms of the GNU Lesser General Public License version 2.1 as published
0007 // by the Free Software Foundation, with special exception defined in the file
0008 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
0009 // distribution for complete text of the license and disclaimer of any warranty.
0010 //
0011 // Alternatively, this file may be used under the terms of Open CASCADE
0012 // commercial license or contractual agreement.
0013 
0014 #ifndef _Aspect_FrustumLRBT_HeaderFile
0015 #define _Aspect_FrustumLRBT_HeaderFile
0016 
0017 //! Structure defining frustum boundaries.
0018 template <typename Elem_t>
0019 struct Aspect_FrustumLRBT
0020 {
0021   Elem_t Left;
0022   Elem_t Right;
0023   Elem_t Bottom;
0024   Elem_t Top;
0025 
0026   //! Empty constructor.
0027   Aspect_FrustumLRBT()
0028       : Left(0),
0029         Right(0),
0030         Bottom(0),
0031         Top(0)
0032   {
0033   }
0034 
0035   //! Copy/cast constructor.
0036   template <typename Other_t>
0037   explicit Aspect_FrustumLRBT(const Aspect_FrustumLRBT<Other_t>& theOther)
0038       : Left(static_cast<Elem_t>(theOther.Left)),
0039         Right(static_cast<Elem_t>(theOther.Right)),
0040         Bottom(static_cast<Elem_t>(theOther.Bottom)),
0041         Top(static_cast<Elem_t>(theOther.Top))
0042   {
0043   }
0044 
0045   //! Apply multiply factor.
0046   void Multiply(Elem_t theScale)
0047   {
0048     Left *= theScale;
0049     Right *= theScale;
0050     Bottom *= theScale;
0051     Top *= theScale;
0052   }
0053 
0054   //! Return multiplied frustum.
0055   Aspect_FrustumLRBT<Elem_t> Multiplied(Elem_t theScale)
0056   {
0057     Aspect_FrustumLRBT<Elem_t> aCopy(*this);
0058     aCopy.Multiply(theScale);
0059     return aCopy;
0060   }
0061 };
0062 
0063 #endif // _Aspect_FrustumLRBT_HeaderFile