Ejemplo n.º 1
0
bool glc::compare(const GLC_Vector3d& v1, const GLC_Vector3d& v2, double accuracy)
{
    bool compareResult= (qAbs(v1.x() - v2.x()) <= accuracy);
    compareResult= compareResult && (qAbs(v1.y() - v2.y()) <= accuracy);
    compareResult= compareResult && (qAbs(v1.z() - v2.z()) <= accuracy);

    return compareResult;
}
Ejemplo n.º 2
0
bool glc::compare(const GLC_Vector3d& v1, const GLC_Vector3d& v2)
{
	bool compareResult= (qAbs(v1.x() - v2.x()) <= comparedPrecision);
	compareResult= compareResult && (qAbs(v1.y() - v2.y()) <= comparedPrecision);
	compareResult= compareResult && (qAbs(v1.z() - v2.z()) <= comparedPrecision);

	return compareResult;
}
Ejemplo n.º 3
0
GLC_Plane::GLC_Plane(const GLC_Vector3d& normal, const GLC_Point3d& point)
{
	m_Eq[0]= normal.x();
	m_Eq[1]= normal.y();
	m_Eq[2]= normal.z();
	m_Eq[3]= -normal * point;
}
Ejemplo n.º 4
0
GLC_Plane::GLC_Plane(const GLC_Vector3d& normal, double d)
{
	m_Eq[0]= normal.x();
	m_Eq[1]= normal.y();
	m_Eq[2]= normal.z();
	m_Eq[3]= d;
}
Ejemplo n.º 5
0
GLC_Plane::GLC_Plane(const GLC_Point3d& p1, const GLC_Point3d& p2, const GLC_Point3d& p3)
{
	const GLC_Vector3d v1(p2 - p1);
	const GLC_Vector3d v2(p3 - p1);
	const GLC_Vector3d normal((v1 ^ v2).normalize());
	m_Eq[0]= normal.x();
	m_Eq[1]= normal.y();
	m_Eq[2]= normal.z();
	m_Eq[3]= -normal * p1;
}
Ejemplo n.º 6
0
GLC_Vector3d round(const GLC_Vector3d& vector, double accuracy)
{
    GLC_Vector3d subject(glc::round(vector.x(), accuracy), glc::round(vector.y(), accuracy), glc::round(vector.z(), accuracy));

    return subject;
}
Ejemplo n.º 7
0
GLC_Vector3d round(const GLC_Vector3d& vector)
{
	GLC_Vector3d subject(glc::round(vector.x()), glc::round(vector.y()), glc::round(vector.z()));

	return subject;
}