C++ (Qt)Vector3D v1,v2;Vector3D v3 = v1.Cross(v2).Normalized();
C++ (Qt)class Vec3 : public glm::dvec3{public: Vec3(double _x = 0,double _y = 0,double _z = 0) : glm::dvec3(_x,_y,_z){} inline Vec3 operator + (const Vec3 & p){return Vec3(x+p.x,y+p.y,z+p.z);} inline Vec3 operator - (const Vec3 & p){return Vec3(x-p.x,y-p.y,z-p.z);} inline Vec3 operator / (double c){return Vec3(x/c,y/c,z/c);} inline Vec3 operator * (double c){return Vec3(x*c,y*c,z*c);} inline Vec3 Normalized() const{glm::normalize(*this);} inline double Length() const {return glm::length<double>(*this);} inline Vec3 Cross(const Vec3 & p)const{return glm::cross(*this, p);}};
C++ (Qt)D = (p2 - p1).Cross(p3 - p2).Normalized();
C++ (Qt)error C2039: 'Cross' : is not a member of 'glm::detail::tvec3<T>'1> with1> [1> T=glm::highp_float1>
C++ (Qt)class Vec3 : public glm::dvec3{public: using glm::dvec3::dvec3; using glm::dvec3::operator=; using glm::dvec3::operator-; ...};
C++ (Qt)class Vec3 : public glm::dvec3{public: Vec3 operator + (const Vec3 & p) const {return static_cast<const glm::dvec3 &>(*this).operator+(p);}};
C++ (Qt)error C2440: '<function-style-cast>' : cannot convert from 'const Vec3' to 'double'4> No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called
C++ (Qt) template <typename T> template <typename U> GLM_FUNC_QUALIFIER tvec3<T>::tvec3 ( U const & s ) : x(value_type(s)), y(value_type(s)), z(value_type(s)) {}
C++ (Qt)inline Vec3(const Vec3 & v) : glm::dvec3(v.x,v.y,v.z){}
C++ (Qt)Vec3 n = (p2 - p1).Cross(p3 - p2).Normalized();Vec3 n = ((p2 - p1) ^ (p3 - p2)).Normalized();Vec3 n = Vec3::Cross(p2 - p1, p3 - p2).Normalized();
Vec3 v1;glm::dvec3 v2;auto v3 = (v2+v1).Normalized();