1 // File: GeomData_Dir.cxx
3 // Author: Mikhail PONIKAROV
5 #include "GeomData_Dir.h"
9 void GeomData_Dir::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_Dir::x() const
18 return myCoords->Value(0);
21 double GeomData_Dir::y() const
23 return myCoords->Value(1);
26 double GeomData_Dir::z() const
28 return myCoords->Value(2);
31 GeomData_Dir::GeomData_Dir(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);