14 #include "../BasicDatatypes.hpp" 15 #include "../tools/MathToolbox.hpp" 81 void setX(
double x) { m_x = x; }
82 void setY(
double y) { m_y = y; }
83 void setZ(
double z) { m_z = z; }
84 void setXYZ(
double x,
double y,
double z) { m_x = x; m_y = y; m_z = z; }
109 const Point3D& VectorStartpoint,
110 const Point3D& VectorDirection);
122 std::istream&
read (std::istream& is);
124 std::ostream&
write (std::ostream& os)
const;
void setXYZ(double x, double y, double z)
Sets the coordinates of this point to the given values.
This class defines a point in the three-dimensional plane.
double getY() const
Returns the y-coordinate of this point.
std::string toString() const
Text output for debugging.
static Point3D calcIntersectionPointOfVectorWithPlane(const Point3D &PlaneStartpoint, const Point3D &PlaneNormal, const Point3D &VectorStartpoint, const Point3D &VectorDirection)
void setX(double x)
Sets the x-coordinate of this point to the given value.
double getAngleAroundZ() const
Returns the rotation angle around z (in the x-y-plane)
void normalize()
Normalizes this vector (point) to length 1.0.
Point2D toPoint2D() const
Returns the x/y components of this class, converted into a Point2D object.
double dist(const Point3D &point) const
Calculates the distance to the given point.
void rotateAroundZ(double dYawAngle)
Rotate the point around the Z-axis ("Yaw angle")
double floatingpoint_type
The type of the stored x and y coordinates.
friend const Point3D operator-(const Point3D &, const Point3D &)
friend double operator*(const Point3D &, const Point3D &)
virtual const UINT32 getUsedMemory() const
Point3D & operator+=(const Point3D &point)
Adds the given point to this point and returns a reference to this point.
friend const Point3D operator/(const Point3D &, double)
double distFromOrigin() const
Dist from the point (0,0,0) to this point.
bool isZero() const
Check against (near-)zero.
void setY(double y)
Sets the y-coordinate of this point to the given value.
static Point3D vectorProduct(const Point3D &v1, const Point3D &v2)
Returns the vector product ("Kreuzprodukt") of the two vectors.
double getZ() const
Returns the z-coordinate of this point.
friend const Point3D operator+(const Point3D &, const Point3D &)
double length() const
Length of the vector (identical to distFromOrigin())
double getAngleAroundY() const
Returns the rotation angle around y (in the z-x-plane)
double getX() const
Returns the x-coordinate of this point.
friend bool operator!=(const Point3D &, const Point3D &)
void rotateAroundX(double rollAngle)
Rotate the point around the X-axis ("Roll angle")
static std::streamsize getSerializedSize()
double getAngleAroundX() const
Returns the rotation angle around x (in the z-y-plane)
static double getDistanceBetweenPoints(const Point3D &pt1, const Point3D &pt2)
Returns the distance between the two point coordinates.
Point3D & operator/=(double divisor)
Point3D & operator-=(const Point3D &point)
Subtracts the given point to this point and returns a reference to this point.
void setZ(double z)
Sets the z-coordinate of this point to the given value.
std::ostream & write(std::ostream &os) const
std::istream & read(std::istream &is)
Reads a Point3D from an input stream.
std::ostream & operator<<(std::ostream &os, const EvalCaseResult &result)
Point3D(double x, double y, double z)
friend bool operator==(const Point3D &, const Point3D &)
void rotateAroundY(double pitchAngle)
Rotate the point around the Y-axis ("Pitch angle")