1 // File: VrmlData_Normal.hxx
2 // Created: 26.05.06 18:34:13
3 // Author: Alexander GRIGORIEV
4 // Copyright: Open Cascade 2006
7 #ifndef VrmlData_Normal_HeaderFile
8 #define VrmlData_Normal_HeaderFile
10 #include <VrmlData_ArrayVec3d.hxx>
13 * Implementation of the node Normal
15 class VrmlData_Normal : public VrmlData_ArrayVec3d
18 // ---------- PUBLIC METHODS ----------
23 inline VrmlData_Normal () {}
28 inline VrmlData_Normal (const VrmlData_Scene& theScene,
30 const size_t nVec = 0,
31 const gp_XYZ * arrVec = 0L)
32 : VrmlData_ArrayVec3d (theScene, theName, nVec, arrVec)
38 * index in the array of normals [0 .. N-1]
40 * the normal value for the index. If index irrelevant, returns (0., 0., 0.)
42 inline const gp_XYZ& Normal (const Standard_Integer i) const
46 * Create a copy of this node.
47 * If the parameter is null, a new copied node is created. Otherwise new node
48 * is not created, but rather the given one is modified.
50 Standard_EXPORT virtual Handle(VrmlData_Node)
51 Clone (const Handle(VrmlData_Node)& theOther)const;
54 * Read the Node from input stream.
56 Standard_EXPORT virtual VrmlData_ErrorStatus
57 Read (VrmlData_InBuffer& theBuffer);
60 * Write the Node to the Scene output.
62 Standard_EXPORT virtual VrmlData_ErrorStatus
63 Write (const char * thePrefix) const;
67 // ---------- PRIVATE FIELDS ----------
71 // Declaration of CASCADE RTTI
72 DEFINE_STANDARD_RTTI (VrmlData_Normal)
75 // Definition of HANDLE object using Standard_DefineHandle.hxx
76 DEFINE_STANDARD_HANDLE (VrmlData_Normal, VrmlData_ArrayVec3d)