Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:03:49

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 
0027 class Graphic3d_Texture1Dsegment;
0028 DEFINE_STANDARD_HANDLE(Graphic3d_Texture1Dsegment, Graphic3d_Texture1D)
0029 
0030 //! This class provides the implementation
0031 //! of a 1D texture applyable along a segment.
0032 //! You might use the SetSegment() method
0033 //! to set the way the texture is "stretched" on facets.
0034 class Graphic3d_Texture1Dsegment : public Graphic3d_Texture1D
0035 {
0036 
0037 public:
0038 
0039   
0040   //! Creates a texture from a file
0041   Standard_EXPORT Graphic3d_Texture1Dsegment(const TCollection_AsciiString& theFileName);
0042   
0043   //! Creates a texture from a predefined texture name set.
0044   Standard_EXPORT Graphic3d_Texture1Dsegment(const Graphic3d_NameOfTexture1D theNOT);
0045   
0046   //! Creates a texture from the pixmap.
0047   Standard_EXPORT Graphic3d_Texture1Dsegment(const Handle(Image_PixMap)& thePixMap);
0048   
0049   //! Sets the texture application bounds. Defines the way
0050   //! the texture is stretched across facets.
0051   //! Default values are <0.0, 0.0, 0.0> , <0.0, 0.0, 1.0>
0052   Standard_EXPORT void SetSegment (const Standard_ShortReal theX1, const Standard_ShortReal theY1, const Standard_ShortReal theZ1, const Standard_ShortReal theX2, const Standard_ShortReal theY2, const Standard_ShortReal theZ2);
0053   
0054   //! Returns the values of the current segment X1, Y1, Z1 , X2, Y2, Z2.
0055   Standard_EXPORT void Segment (Standard_ShortReal& theX1, Standard_ShortReal& theY1, Standard_ShortReal& theZ1, Standard_ShortReal& theX2, Standard_ShortReal& theY2, Standard_ShortReal& theZ2) const;
0056 
0057 
0058 
0059 
0060   DEFINE_STANDARD_RTTIEXT(Graphic3d_Texture1Dsegment,Graphic3d_Texture1D)
0061 
0062 protected:
0063 
0064 
0065 
0066 
0067 private:
0068 
0069 
0070   Standard_ShortReal myX1;
0071   Standard_ShortReal myY1;
0072   Standard_ShortReal myZ1;
0073   Standard_ShortReal myX2;
0074   Standard_ShortReal myY2;
0075   Standard_ShortReal myZ2;
0076 
0077 
0078 };
0079 
0080 
0081 
0082 
0083 
0084 
0085 
0086 #endif // _Graphic3d_Texture1Dsegment_HeaderFile