C++ (Qt)if (model.mSpaceUV) { mSpaceUV->SetPoinr3F(0, (mSpaceUV->GetPoint3F(0) + mSpaceUV->GetPoint3F(1)) * 0.5); }
C++ (Qt)struct base{ viryual ~base() {} template <class Derived, class Point> void set(size_t index, const Point &p) { Derived *d = dynamic_cast<Derived*>(this); if (d) d->vector[index] = p; } template <class Derived, class Point> Point get(size_t index) const { Derived *d = dynamic_cast<Derived*>(this); if (d) return d->vector[index]; return Point(); }};
C++ (Qt)void set(const super_point &sp);
C++ (Qt)set(PointF(1,2,3));set(PointD(3,2,1));...
C++ (Qt)void DrawOpenGL( CoordVec * coord ){ CoordVecT <Point3D> * coordD = dynamic_cast <CoordVecT <Point3D> *> (coord); if (coord) glDrawFunction_d(&coordT[0].x, coordT->size()); else CoordVecF <Point3F> * coordF = dynamic_cast <CoordVecT <Point3F> *> (coord); ...}
C++ (Qt)void Append( CoordVec & dst, const CoordVec & src );CoordVec & operator = ( const CoordVec & src );