1 // Created on: 1996-12-26
2 // Created by: Alexander BRIVIN and Dmitry TARASOV
3 // Copyright (c) 1996-1999 Matra Datavision
4 // Copyright (c) 1999-2014 OPEN CASCADE SAS
5 //
6 // This file is part of Open CASCADE Technology software library.
7 //
8 // This library is free software; you can redistribute it and/or modify it under
9 // the terms of the GNU Lesser General Public License version 2.1 as published
10 // by the Free Software Foundation, with special exception defined in the file
11 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
12 // distribution for complete text of the license and disclaimer of any warranty.
13 //
14 // Alternatively, this file may be used under the terms of Open CASCADE
15 // commercial license or contractual agreement.
16 
17 #ifndef _Vrml_IndexedLineSet_HeaderFile
18 #define _Vrml_IndexedLineSet_HeaderFile
19 
20 #include <Standard.hxx>
21 #include <Standard_Type.hxx>
22 
23 #include <TColStd_HArray1OfInteger.hxx>
24 #include <Standard_Transient.hxx>
25 #include <Standard_OStream.hxx>
26 
27 
28 class Vrml_IndexedLineSet;
29 DEFINE_STANDARD_HANDLE(Vrml_IndexedLineSet, Standard_Transient)
30 
31 //! defines a IndexedLineSet node of VRML specifying geometry shapes.
32 //! This node represents a 3D shape formed by constructing polylines from vertices
33 //! located at the current coordinates. IndexedLineSet uses the indices in its coordIndex
34 //! field to specify the polylines. An index of -1 separates one polyline from the next
35 //! (thus, a final -1 is optional). the current polyline has ended and the next one begins.
36 //! Treatment of the current material and normal binding is as follows: The PER_PART binding
37 //! specifies a material or normal for each segment of the line. The PER_FACE binding
38 //! specifies a material or normal for each polyline. PER_VERTEX specifies a material or
39 //! normal for each vertex. The corresponding _INDEXED bindings are the same, but use
40 //! the materialIndex or normalIndex indices. The DEFAULT material binding is equal
41 //! to OVERALL. The DEFAULT normal binding is equal to  PER_VERTEX_INDEXED;
42 //! if insufficient normals exist in the state, the lines will be drawn unlit. The same
43 //! rules for texture coordinate generation as IndexedFaceSet are used.
44 class Vrml_IndexedLineSet : public Standard_Transient
45 {
46 
47 public:
48 
49 
50   Standard_EXPORT Vrml_IndexedLineSet(const Handle(TColStd_HArray1OfInteger)& aCoordIndex, const Handle(TColStd_HArray1OfInteger)& aMaterialIndex, const Handle(TColStd_HArray1OfInteger)& aNormalIndex, const Handle(TColStd_HArray1OfInteger)& aTextureCoordIndex);
51 
52   Standard_EXPORT Vrml_IndexedLineSet();
53 
54   Standard_EXPORT void SetCoordIndex (const Handle(TColStd_HArray1OfInteger)& aCoordIndex);
55 
56   Standard_EXPORT Handle(TColStd_HArray1OfInteger) CoordIndex() const;
57 
58   Standard_EXPORT void SetMaterialIndex (const Handle(TColStd_HArray1OfInteger)& aMaterialIndex);
59 
60   Standard_EXPORT Handle(TColStd_HArray1OfInteger) MaterialIndex() const;
61 
62   Standard_EXPORT void SetNormalIndex (const Handle(TColStd_HArray1OfInteger)& aNormalIndex);
63 
64   Standard_EXPORT Handle(TColStd_HArray1OfInteger) NormalIndex() const;
65 
66   Standard_EXPORT void SetTextureCoordIndex (const Handle(TColStd_HArray1OfInteger)& aTextureCoordIndex);
67 
68   Standard_EXPORT Handle(TColStd_HArray1OfInteger) TextureCoordIndex() const;
69 
70   Standard_EXPORT Standard_OStream& Print (Standard_OStream& anOStream) const;
71 
72 
73 
74 
75   DEFINE_STANDARD_RTTIEXT(Vrml_IndexedLineSet,Standard_Transient)
76 
77 protected:
78 
79 
80 
81 
82 private:
83 
84 
85   Handle(TColStd_HArray1OfInteger) myCoordIndex;
86   Handle(TColStd_HArray1OfInteger) myMaterialIndex;
87   Handle(TColStd_HArray1OfInteger) myNormalIndex;
88   Handle(TColStd_HArray1OfInteger) myTextureCoordIndex;
89 
90 
91 };
92 
93 
94 
95 
96 
97 
98 
99 #endif // _Vrml_IndexedLineSet_HeaderFile
100