973c2be1 |
1 | // Copyright (c) 1999-2014 OPEN CASCADE SAS |
b311480e |
2 | // |
973c2be1 |
3 | // This file is part of Open CASCADE Technology software library. |
b311480e |
4 | // |
d5f74e42 |
5 | // This library is free software; you can redistribute it and/or modify it under |
6 | // the terms of the GNU Lesser General Public License version 2.1 as published |
973c2be1 |
7 | // by the Free Software Foundation, with special exception defined in the file |
8 | // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT |
9 | // distribution for complete text of the license and disclaimer of any warranty. |
b311480e |
10 | // |
973c2be1 |
11 | // Alternatively, this file may be used under the terms of Open CASCADE |
12 | // commercial license or contractual agreement. |
b311480e |
13 | |
42cf5bc1 |
14 | |
15 | #include <Vrml_PointSet.hxx> |
7fd59977 |
16 | |
b311480e |
17 | Vrml_PointSet::Vrml_PointSet(const Standard_Integer aStartIndex, |
7fd59977 |
18 | const Standard_Integer aNumPoints) |
19 | { |
20 | myStartIndex = aStartIndex; |
21 | myNumPoints = aNumPoints; |
22 | } |
23 | |
24 | void Vrml_PointSet::SetStartIndex(const Standard_Integer aStartIndex) |
25 | { |
26 | myStartIndex = aStartIndex; |
27 | } |
28 | |
29 | Standard_Integer Vrml_PointSet::StartIndex() const |
30 | { |
31 | return myStartIndex; |
32 | } |
33 | |
34 | void Vrml_PointSet::SetNumPoints(const Standard_Integer aNumPoints) |
35 | { |
36 | myNumPoints = aNumPoints; |
37 | } |
38 | |
39 | Standard_Integer Vrml_PointSet::NumPoints() const |
40 | { |
41 | return myNumPoints; |
42 | } |
43 | |
44 | Standard_OStream& Vrml_PointSet::Print(Standard_OStream& anOStream) const |
45 | { |
586db386 |
46 | anOStream << "PointSet {\n"; |
7fd59977 |
47 | if ( myStartIndex != 0 || myNumPoints !=-1 ) |
48 | { |
49 | if ( myStartIndex != 0) |
50 | { |
586db386 |
51 | anOStream << " startIndex\t"; |
52 | anOStream << myStartIndex << "\n"; |
7fd59977 |
53 | } |
54 | if ( myNumPoints != 0) |
55 | { |
586db386 |
56 | anOStream << " numPoints\t"; |
57 | anOStream << myNumPoints << "\n"; |
7fd59977 |
58 | } |
59 | } |
586db386 |
60 | anOStream << "}\n"; |
7fd59977 |
61 | return anOStream; |
62 | } |
63 | |