1 // Created on: 2006-05-26
2 // Created by: Alexander GRIGORIEV
3 // Copyright (c) 2006-2014 OPEN CASCADE SAS
5 // This file is part of Open CASCADE Technology software library.
7 // This library is free software; you can redistribute it and/or modify it under
8 // the terms of the GNU Lesser General Public License version 2.1 as published
9 // by the Free Software Foundation, with special exception defined in the file
10 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
11 // distribution for complete text of the license and disclaimer of any warranty.
13 // Alternatively, this file may be used under the terms of Open CASCADE
14 // commercial license or contractual agreement.
16 #ifndef VrmlData_Coordinate_HeaderFile
17 #define VrmlData_Coordinate_HeaderFile
19 #include <VrmlData_ArrayVec3d.hxx>
22 * Implementation of the node Coordinate
24 class VrmlData_Coordinate : public VrmlData_ArrayVec3d
27 // ---------- PUBLIC METHODS ----------
32 inline VrmlData_Coordinate () {}
37 inline VrmlData_Coordinate (const VrmlData_Scene& theScene,
39 const size_t nPoints = 0,
40 const gp_XYZ * arrPoints = 0L)
41 : VrmlData_ArrayVec3d (theScene, theName, nPoints, arrPoints)
47 * index in the array of points [0 .. N-1]
49 * the coordinate for the index. If index irrelevant, returns (0., 0., 0.)
51 inline const gp_XYZ& Coordinate (const Standard_Integer i) const
55 * Create a copy of this node.
56 * If the parameter is null, a new copied node is created. Otherwise new node
57 * is not created, but rather the given one is modified.
59 Standard_EXPORT virtual Handle(VrmlData_Node)
60 Clone (const Handle(VrmlData_Node)& theOther)const Standard_OVERRIDE;
63 * Read the Node from input stream.
65 Standard_EXPORT virtual VrmlData_ErrorStatus
66 Read (VrmlData_InBuffer& theBuffer) Standard_OVERRIDE;
69 * Write the Node to the Scene output.
71 Standard_EXPORT virtual VrmlData_ErrorStatus
72 Write (const char * thePrefix) const Standard_OVERRIDE;
75 // ---------- PRIVATE FIELDS ----------
78 // Declaration of CASCADE RTTI
79 DEFINE_STANDARD_RTTI_INLINE(VrmlData_Coordinate,VrmlData_ArrayVec3d)
82 // Definition of HANDLE object using Standard_DefineHandle.hxx
83 DEFINE_STANDARD_HANDLE (VrmlData_Coordinate, VrmlData_ArrayVec3d)