+template<>
+std::ostream& SGRawBase<SGVec3d>::printOn(std::ostream& stream) const
+{
+ const SGVec3d vec
+ = static_cast<const SGRawValue<SGVec3d>*>(this)->getValue();
+ for (int i = 0; i < 3; ++i) {
+ stream << vec[i];
+ if (i < 2)
+ stream << ' ';
+ }
+ return stream;
+}
+
+namespace simgear
+{
+template<>
+std::istream& readFrom<SGVec3d>(std::istream& stream, SGVec3d& result)
+{
+ for (int i = 0; i < 3; ++i) {
+ stream >> result[i];
+ }
+ return stream;
+}
+}
+template<>
+std::ostream& SGRawBase<SGVec4d>::printOn(std::ostream& stream) const
+{
+ const SGVec4d vec
+ = static_cast<const SGRawValue<SGVec4d>*>(this)->getValue();
+ for (int i = 0; i < 4; ++i) {
+ stream << vec[i];
+ if (i < 3)
+ stream << ' ';
+ }
+ return stream;
+}
+
+namespace simgear
+{
+template<>
+std::istream& readFrom<SGVec4d>(std::istream& stream, SGVec4d& result)
+{
+ for (int i = 0; i < 4; ++i) {
+ stream >> result[i];
+ }
+ return stream;
+}
+}