Go to the documentation of this file.
6 #define _USE_MATH_DEFINES // for MSVC
22 : m_x(double(p.getX()))
23 , m_y(double(p.getY()))
45 return hypot(
m_x - point.getX(),
m_y - point.getY(),
m_z - point.getZ());
62 kreuz.
m_x = + ((v1.getY() * v2.getZ()) - (v1.getZ() * v2.getY()));
63 kreuz.
m_y = -((v1.getX() * v2.getZ()) - (v1.getZ() * v2.getX()));
64 kreuz.
m_z = + ((v1.getX() * v2.getY()) - (v1.getY() * v2.getX()));
98 double dCos = cos(yawAngle);
99 double dSin = sin(yawAngle);
101 double x =
m_x * dCos -
m_y * dSin;
102 double y =
m_x * dSin +
m_y * dCos;
115 double dCos = cos(rollAngle);
116 double dSin = sin(rollAngle);
118 double y = -
m_z * dSin +
m_y * dCos;
119 double z =
m_z * dCos +
m_y * dSin;
131 double dCos = cos(pitchAngle);
132 double dSin = sin(pitchAngle);
134 double x =
m_z * dSin +
m_x * dCos;
135 double z =
m_z * dCos -
m_x * dSin;
184 angle = std::atan2(
m_y,
m_x);
212 angle = std::atan2(
m_x,
m_z);
240 angle = std::atan2(
m_z,
m_y);
252 return pt1.
dist(pt2);
265 std::ostringstream ostr;
275 os <<
"(" << point.getX() <<
", " << point.getY() <<
", " << point.getZ() <<
")";
295 const Point3D& VectorStartpoint,
296 const Point3D& VectorDirection)
301 nenner = PlaneNormal * VectorDirection;
305 intersectionPoint = VectorStartpoint + ((PlaneNormal * (PlaneStartpoint - VectorStartpoint)) / nenner) * VectorDirection;
313 return intersectionPoint;
static Point3D calcIntersectionPointOfVectorWithPlane(const Point3D &PlaneStartpoint, const Point3D &PlaneNormal, const Point3D &VectorStartpoint, const Point3D &VectorDirection)
static double getDistanceBetweenPoints(const Point3D &pt1, const Point3D &pt2)
Returns the distance between the two point coordinates.
double getAngleAroundX() const
Returns the rotation angle around x (in the z-y-plane)
Point2D toPoint2D() const
Returns the x/y components of this class, converted into a Point2D object.
double getAngleAroundY() const
Returns the rotation angle around y (in the z-x-plane)
void rotateAroundZ(double dYawAngle)
Rotate the point around the Z-axis ("Yaw angle")
bool isZero() const
Check against (near-)zero.
This class defines a point in the three-dimensional plane.
std::ostream & operator<<(std::ostream &os, const EvalCaseResult &result)
void normalize()
Normalizes this vector (point) to length 1.0.
static Point3D vectorProduct(const Point3D &v1, const Point3D &v2)
Returns the vector product ("Kreuzprodukt") of the two vectors.
void rotateAroundX(double rollAngle)
Rotate the point around the X-axis ("Roll angle")
std::string toString() const
Text output for debugging.
double getAngleAroundZ() const
Returns the rotation angle around z (in the x-y-plane)
double dist(const Point3D &point) const
Calculates the distance to the given point.
double distFromOrigin() const
Dist from the point (0,0,0) to this point.
void rotateAroundY(double pitchAngle)
Rotate the point around the Y-axis ("Pitch angle")
double length() const
Length of the vector (identical to distFromOrigin())
libsick_ldmrs
Author(s): SICK AG
, Martin Günther , Jochen Sprickerhof
autogenerated on Wed Oct 26 2022 02:11:57