Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-09-20 09:19:33

0001 // Created on: 1996-12-26
0002 // Created by: Alexander BRIVIN and Dmitry TARASOV
0003 // Copyright (c) 1996-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_IndexedLineSet_HeaderFile
0018 #define _Vrml_IndexedLineSet_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_Type.hxx>
0022 
0023 #include <Standard_Integer.hxx>
0024 #include <NCollection_Array1.hxx>
0025 #include <NCollection_HArray1.hxx>
0026 #include <Standard_Transient.hxx>
0027 #include <Standard_OStream.hxx>
0028 
0029 //! defines a IndexedLineSet node of VRML specifying geometry shapes.
0030 //! This node represents a 3D shape formed by constructing polylines from vertices
0031 //! located at the current coordinates. IndexedLineSet uses the indices in its coordIndex
0032 //! field to specify the polylines. An index of -1 separates one polyline from the next
0033 //! (thus, a final -1 is optional). the current polyline has ended and the next one begins.
0034 //! Treatment of the current material and normal binding is as follows: The PER_PART binding
0035 //! specifies a material or normal for each segment of the line. The PER_FACE binding
0036 //! specifies a material or normal for each polyline. PER_VERTEX specifies a material or
0037 //! normal for each vertex. The corresponding _INDEXED bindings are the same, but use
0038 //! the materialIndex or normalIndex indices. The DEFAULT material binding is equal
0039 //! to OVERALL. The DEFAULT normal binding is equal to PER_VERTEX_INDEXED;
0040 //! if insufficient normals exist in the state, the lines will be drawn unlit. The same
0041 //! rules for texture coordinate generation as IndexedFaceSet are used.
0042 class Vrml_IndexedLineSet : public Standard_Transient
0043 {
0044 
0045 public:
0046   Standard_EXPORT Vrml_IndexedLineSet(
0047     const occ::handle<NCollection_HArray1<int>>& aCoordIndex,
0048     const occ::handle<NCollection_HArray1<int>>& aMaterialIndex,
0049     const occ::handle<NCollection_HArray1<int>>& aNormalIndex,
0050     const occ::handle<NCollection_HArray1<int>>& aTextureCoordIndex);
0051 
0052   Standard_EXPORT Vrml_IndexedLineSet();
0053 
0054   Standard_EXPORT void SetCoordIndex(const occ::handle<NCollection_HArray1<int>>& aCoordIndex);
0055 
0056   Standard_EXPORT occ::handle<NCollection_HArray1<int>> CoordIndex() const;
0057 
0058   Standard_EXPORT void SetMaterialIndex(
0059     const occ::handle<NCollection_HArray1<int>>& aMaterialIndex);
0060 
0061   Standard_EXPORT occ::handle<NCollection_HArray1<int>> MaterialIndex() const;
0062 
0063   Standard_EXPORT void SetNormalIndex(const occ::handle<NCollection_HArray1<int>>& aNormalIndex);
0064 
0065   Standard_EXPORT occ::handle<NCollection_HArray1<int>> NormalIndex() const;
0066 
0067   Standard_EXPORT void SetTextureCoordIndex(
0068     const occ::handle<NCollection_HArray1<int>>& aTextureCoordIndex);
0069 
0070   Standard_EXPORT occ::handle<NCollection_HArray1<int>> TextureCoordIndex() const;
0071 
0072   Standard_EXPORT Standard_OStream& Print(Standard_OStream& anOStream) const;
0073 
0074   DEFINE_STANDARD_RTTIEXT(Vrml_IndexedLineSet, Standard_Transient)
0075 
0076 private:
0077   occ::handle<NCollection_HArray1<int>> myCoordIndex;
0078   occ::handle<NCollection_HArray1<int>> myMaterialIndex;
0079   occ::handle<NCollection_HArray1<int>> myNormalIndex;
0080   occ::handle<NCollection_HArray1<int>> myTextureCoordIndex;
0081 };
0082 
0083 #endif // _Vrml_IndexedLineSet_HeaderFile