0024171: Eliminate CLang compiler warning -Wreorder
[occt.git] / src / VrmlData / VrmlData_Sphere.hxx
CommitLineData
b311480e 1// Created on: 2006-05-26
2// Created by: Alexander GRIGORIEV
3// Copyright (c) 2006-2012 OPEN CASCADE SAS
4//
5// The content of this file is subject to the Open CASCADE Technology Public
6// License Version 6.5 (the "License"). You may not use the content of this file
7// except in compliance with the License. Please obtain a copy of the License
8// at http://www.opencascade.org and read it completely before using this file.
9//
10// The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
11// main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
12//
13// The Original Code and all software distributed under the License is
14// distributed on an "AS IS" basis, without warranty of any kind, and the
15// Initial Developer hereby disclaims all such warranties, including without
16// limitation, any warranties of merchantability, fitness for a particular
17// purpose or non-infringement. Please see the License for the specific terms
18// and conditions governing the rights and limitations under the License.
19
7fd59977 20
21
22#ifndef VrmlData_Sphere_HeaderFile
23#define VrmlData_Sphere_HeaderFile
24
25#include <VrmlData_Geometry.hxx>
26
27/**
28 * Implementation of the Sphere node.
29 */
30class VrmlData_Sphere : public VrmlData_Geometry
31{
32 public:
33 // ---------- PUBLIC METHODS ----------
34
35 /**
36 * Empty constructor
37 */
38 inline VrmlData_Sphere ()
39 : myRadius (1.)
40 {}
41
42 /**
43 * Constructor
44 */
45 inline VrmlData_Sphere (const VrmlData_Scene& theScene,
46 const char * theName,
47 const Standard_Real theRadius = 1.)
48 : VrmlData_Geometry (theScene, theName),
49 myRadius (theRadius)
50 {}
51
52 /**
53 * Query the sphere radius
54 */
55 inline Standard_Real Radius () const { return myRadius; }
56
57 /**
58 * Set the spere radius
59 */
60 inline void SetRadius (const Standard_Real theRadius)
61 { myRadius = theRadius; SetModified(); }
62
63 /**
64 * Query the primitive topology. This method returns a Null shape if there
65 * is an internal error during the primitive creation (zero radius, etc.)
66 */
67 Standard_EXPORT virtual const Handle(TopoDS_TShape)& TShape ();
68
69 /**
70 * Create a copy of this node.
71 * If the parameter is null, a new copied node is created. Otherwise new node
72 * is not created, but rather the given one is modified.
73 */
74 Standard_EXPORT virtual Handle(VrmlData_Node)
75 Clone (const Handle(VrmlData_Node)& theOther)const;
76
77 /**
78 * Fill the Node internal data from the given input stream.
79 */
80 Standard_EXPORT virtual VrmlData_ErrorStatus
81 Read (VrmlData_InBuffer& theBuffer);
82
83 /**
84 * Write the Node to output stream.
85 */
86 Standard_EXPORT virtual VrmlData_ErrorStatus
87 Write (const char * thePrefix) const;
88
89 private:
90 // ---------- PRIVATE FIELDS ----------
91
92 Standard_Real myRadius;
93
94 public:
95// Declaration of CASCADE RTTI
96DEFINE_STANDARD_RTTI (VrmlData_Sphere)
97};
98
99// Definition of HANDLE object using Standard_DefineHandle.hxx
100DEFINE_STANDARD_HANDLE (VrmlData_Sphere, VrmlData_Geometry)
101
102
103#endif