Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-09-17 09:20:43

0001 // Created on: 1997-07-28
0002 // Created by: Pierre CHALAMET
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 _Graphic3d_Texture1Dsegment_HeaderFile
0018 #define _Graphic3d_Texture1Dsegment_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 
0022 #include <Graphic3d_Texture1D.hxx>
0023 #include <Graphic3d_NameOfTexture1D.hxx>
0024 class TCollection_AsciiString;
0025 
0026 //! This class provides the implementation
0027 //! of a 1D texture applicable along a segment.
0028 //! You might use the SetSegment() method
0029 //! to set the way the texture is "stretched" on facets.
0030 class Graphic3d_Texture1Dsegment : public Graphic3d_Texture1D
0031 {
0032 
0033 public:
0034   //! Creates a texture from a file
0035   Standard_EXPORT Graphic3d_Texture1Dsegment(const TCollection_AsciiString& theFileName);
0036 
0037   //! Creates a texture from a predefined texture name set.
0038   Standard_EXPORT Graphic3d_Texture1Dsegment(const Graphic3d_NameOfTexture1D theNOT);
0039 
0040   //! Creates a texture from the pixmap.
0041   Standard_EXPORT Graphic3d_Texture1Dsegment(const occ::handle<Image_PixMap>& thePixMap);
0042 
0043   //! Sets the texture application bounds. Defines the way
0044   //! the texture is stretched across facets.
0045   //! Default values are <0.0, 0.0, 0.0> , <0.0, 0.0, 1.0>
0046   Standard_EXPORT void SetSegment(const float theX1,
0047                                   const float theY1,
0048                                   const float theZ1,
0049                                   const float theX2,
0050                                   const float theY2,
0051                                   const float theZ2);
0052 
0053   //! Returns the values of the current segment X1, Y1, Z1 , X2, Y2, Z2.
0054   Standard_EXPORT void Segment(float& theX1,
0055                                float& theY1,
0056                                float& theZ1,
0057                                float& theX2,
0058                                float& theY2,
0059                                float& theZ2) const;
0060 
0061   DEFINE_STANDARD_RTTIEXT(Graphic3d_Texture1Dsegment, Graphic3d_Texture1D)
0062 
0063 private:
0064   float myX1;
0065   float myY1;
0066   float myZ1;
0067   float myX2;
0068   float myY2;
0069   float myZ2;
0070 };
0071 
0072 #endif // _Graphic3d_Texture1Dsegment_HeaderFile