33 void Init (
double ax,
double ay);
90 void Scale (
double scale);
207 bool SafeDivide (
DVec2dCR vector,
double denominator);
254 bool UnitPerpendicular (
DVec2dCR vector);
339 double DotProduct (
double ax,
double ay)
const;
355 double CrossProductSquared (
DVec2dCR vector2)
const;
374 double SmallerUnorientedAngleTo (
DVec2dCR vector2)
const;
double AngleTo(DPoint2dCR vector2) const
Returns (signed, counterclockwise) angle between two vectors.
double MaxAbs() const
Finds the largest absolute value among the components of a point or vector.
struct DVec2d const & DVec2dCR
Definition: msgeomstructs_typedefs.h:90
void Add(DPoint2dCR vector)
Add a vector to the instance.
double Magnitude() const
Returns the magnitude (length) of a vector.
double GetComponent(int index) const
Gets a single component of a point.
double DotProduct(DPoint2dCR vector2) const
Returns the (scalar) dot product of two vectors.
void GetComponents(double &xCoord, double &yCoord) const
static DPoint2d FromInterpolate(DPoint2dCR point0, double fraction, DPoint2dCR point1)
Returns an interpolated point.
void Init(double x, double y)
Initialize with given components.
iterator end()
Definition: stdcxx/bstdmap.h:186
void Subtract(DPoint2dCR vector)
Subtract one vector from another in place.
Vector with x,y components.
Definition: dvec2d.h:25
void SetComponent(double a, int index)
Sets a single component of a point.
#define BEGIN_BENTLEY_NAMESPACE
Definition: Bentley.r.h:24
double Distance(DPoint2dCR point1) const
Returns the distance between 2 points.
double Normalize()
normalizes pVector1 in place, and returns the original magnitude.
void Negate(DPoint2dCR vector)
returns the negative of a vector.
static DPoint2d FromScale(DPoint2d point, double scale)
Returns a scalar multiple of a DPoint2d.
struct DPoint2d const & DPoint2dCR
Definition: msgeomstructs_typedefs.h:78
void DifferenceOf(DPoint2dCR point1, DPoint2dCR point2)
Return the difference of two points or vectors.
double CrossProduct(DPoint2dCR vector1) const
Returns the (scalar) cross product of two vectors.
static DPoint2d From(double ax, double ay)
Returns a DPoint2d with 2 components (xy) from given components.
bool AlmostEqual(DPoint2d const &dataB) const
test if two points are equal.
bool IsPerpendicularTo(DPoint2dCR vector2) const
Test if two vectors are perpendicular.
double DistanceSquared(DPoint2dCR point2) const
Return the squared distance between two points or vectors.
void Scale(DPoint2dCR source, double s)
Scale the instance coordinates from source.
void RotateCCW(DPoint2dCR vec, double radians)
void SumOf(DPoint2dCR point1, DPoint2dCR point2)
Compute the sum of two points or vectors.
bool IsParallelTo(DPoint2dCR vector2) const
Test if two vectors are parallel.
#define END_BENTLEY_NAMESPACE
Definition: Bentley.r.h:25
double ScaleToLength(DPoint2dCR source, double length)
Scales a vector to specified length.
void Interpolate(DPoint2dCR point0, double s, DPoint2dCR point1)
Compute the point at an interpolated (fractional) position between a start and end point...
void Zero()
Sets all components of a point or vector to zero.
static DPoint2d FromSumOf(DPoint2dCR point0, double scale0, DPoint2dCR point1, double scale1)
Returns a linear combination of points.
struct DPoint4d const & DPoint4dCR
Definition: msgeomstructs_typedefs.h:96
bool IsEqual(DPoint2dCR vector2) const
Test if two points or vectors are exactly equal.
double MagnitudeSquared() const
static DPoint2d FromInterpolateBilinear(DPoint2dCR point00, DPoint2dCR point10, DPoint2dCR point01, DPoint2dCR point11, double u, double v)
Returns a bilinear interpolation from corners (00)(10)(01)(11)
void One()
Returns a point or vector with all components 1.0.
2d point coordinates.
Definition: dpoint2d.h:23