1 // File: ModelAPI_AttributeDouble.cxx
3 // Author: Mikhail PONIKAROV
5 #include "GeomData_Point.h"
9 void GeomData_Point::setValue(const double theX, const double theY, const double theZ)
11 myCoords->SetValue(0, theX);
12 myCoords->SetValue(1, theY);
13 myCoords->SetValue(2, theZ);
16 double GeomData_Point::x() const
18 return myCoords->Value(0);
21 double GeomData_Point::y() const
23 return myCoords->Value(1);
26 double GeomData_Point::z() const
28 return myCoords->Value(2);
31 GeomData_Point::GeomData_Point(TDF_Label& theLabel)
33 // check the attribute could be already presented in this doc (after load document)
34 if (!theLabel.FindAttribute(TDataStd_RealArray::GetID(), myCoords)) {
35 // create attribute: not initialized by value yet, just zero
36 myCoords = TDataStd_RealArray::Set(theLabel, 0, 2);