addend constant access funcs

This commit is contained in:
Paolo Cignoni 2004-04-05 11:53:06 +00:00
parent ec3c53d1d5
commit a62ad3cc1b
1 changed files with 7 additions and 0 deletions

View File

@ -24,6 +24,9 @@
History History
$Log: not supported by cvs2svn $ $Log: not supported by cvs2svn $
Revision 1.5 2004/04/03 13:35:51 cignoni
minor changes
Revision 1.4 2004/03/31 13:15:28 cignoni Revision 1.4 2004/03/31 13:15:28 cignoni
Added optional cpmponent Added optional cpmponent
@ -56,6 +59,8 @@ public:
typedef CoordType::ScalarType ScalarType; typedef CoordType::ScalarType ScalarType;
CoordType &P() { static CoordType coord(0, 0, 0); return coord; } CoordType &P() { static CoordType coord(0, 0, 0); return coord; }
const CoordType &P() const { static CoordType coord(0, 0, 0); return coord; }
const CoordType &cP() const { static CoordType coord(0, 0, 0); return coord; }
CoordType &UberP() { static CoordType coord(0, 0, 0); return coord; } CoordType &UberP() { static CoordType coord(0, 0, 0); return coord; }
}; };
@ -64,6 +69,8 @@ public:
typedef A CoordType; typedef A CoordType;
typedef typename CoordType::ScalarType ScalarType; typedef typename CoordType::ScalarType ScalarType;
CoordType &P() { return _coord; } CoordType &P() { return _coord; }
const CoordType &P() const { return _coord; }
const CoordType &cP() const { return _coord; }
CoordType &UberP() { return _coord; } CoordType &UberP() { return _coord; }
private: private:
CoordType _coord; CoordType _coord;