134 static DVec3d From (
double ax,
double ay,
double az = 0.0);
140 void Init (
double ax,
double ay,
double az);
145 void Init (
double ax,
double ay);
203 bool TryNormalize (
DVec3dCR source,
double &magnitude);
270 static DVec3d FromXYAngleAndMagnitude
281 void InitFromXYAngleAndMagnitude
352 void Multiply (
RotMatrixCR matrix,
double x,
double y,
double z);
360 void MultiplyTranspose (
RotMatrixCR matrix,
double x,
double y,
double z);
481 static DVec3d FromCrossProduct (
double x0,
double y0,
double z0,
double x1,
double y1,
double z1);
488 static DVec3d FromMatrixColumnCrossProduct (
TransformCR transform,
int i,
int j);
670 void Scale (
double scale);
730 double DotProduct (
double ax,
double ay,
double az)
const;
744 double DotProductRow (
RotMatrixCR matrix,
int index)
const;
750 double DotProductColumn (
RotMatrixCR matrix,
int index)
const;
756 double DotProductMatrixRow (
TransformCR matrix,
int index)
const;
762 double DotProductMatrixColumn (
TransformCR matrix,
int index)
const;
796 double SafeOneOverMagnitudeSquared(
double defaultValue)
const;
847 double CrossProductMagnitude (
DVec3dCR other)
const;
914 bool GetNormalizedTriad
925 bool ProjectToVector (
DVec3dCR targetVector,
double &fraction)
const;
942 bool GetPerpendicularParts (
DVec3dCR hypotenuse,
double &fraction,
DVec3dR parallelPart,
DVec3dR perpendicularPart)
const;
973 double AngleFromPerpendicular (
DVec3dCR vector2)
const;
1012 bool AngleAndAxisOfRotationFromVectorToVector
1061 bool IsVectorInCCWXYSector
1077 bool IsPositiveParallelTo (
DVec3dCR vector2)
const;
void SumOf(DPoint3dCR origin, DVec3dCR vector, double scale)
Adds an origin and a scaled vector.
bool IsVectorInCCWSector(DPoint3dCR point0, DPoint3dCR point1, DPoint3dCR upVector) const
Test if the test vector vector is "between" point0 and point1, with CCW direction resolved by an up v...
double SmallerUnorientedAngleTo(DPoint3dCR point2) const
Returns the angle between two vectors, choosing the smaller of the two possible angles when both the ...
static DPoint3d FromArray(const double *pXyz)
Simple initialization from 3 coordinates in array.
static DVec3d UnitX()
unit X vector
Definition: dvec3d.h:119
double Normalize()
Replaces a vector by a unit vector in the same direction, and returns the original length...
double DotProductXY(DPoint3dCR point2) const
Returns the (scalar) dot product of xy parts of two vectors.
void CrossProduct(DPoint3dCR point1, DPoint3dCR point2)
Returns the cross (vector) cross product of two vectors.
double SmallerUnorientedAngleToXY(DPoint3dCR point2) const
Returns the angle between two vectors, considering both the vectors and their negations and choosing ...
void DifferenceOf(DPoint3dCR point1, DPoint3dCR point2)
Subtract coordinates of two vectors or points.
struct DVec2d const & DVec2dCR
Definition: msgeomstructs_typedefs.h:90
void Init(DPoint2dCR source)
Copy from a 2d point setting z to zero.
double TripleProduct(DPoint3dCR point2, DPoint3dCR point3) const
Computes the triple product of three vectors.
void Negate()
Negate a vector in place.
double DistanceSquared(DPoint3dCR point2) const
Computes the squared distance between two points.
bool IsPerpendicularTo(DPoint3dCR point2) const
Tests if two vectors are perpendicular.
void Scale(DPoint3dCR vector, double scale)
Multiplies a vector by a scale factor.
double NormalizedDifference(DPoint3dCR target, DPoint3dCR origin)
Computes a unit vector in the direction of the difference of the points or vectors (Second parameter ...
void CrossProductToPoints(DPoint3dCR origin, DPoint3dCR target1, DPoint3dCR target2)
Returns the (vector) cross product of two vectors.
double DistanceXY(DPoint3dCR point2) const
Computes the distance between two points, using only x and y components.
bool AlmostEqual(DPoint3d const &dataB) const
test if two points are equal.
iterator end()
Definition: stdcxx/bstdmap.h:186
bool IsVectorInSmallerSector(DPoint3dCR point0, DPoint3dCR point1) const
Test a vector is "between" point0 and point1.
struct RotMatrix const & RotMatrixCR
Definition: msgeomstructs_typedefs.h:135
bool IsEqual(DPoint3dCR point2) const
Test for exact equality between all components of two points or vectors.
bool UnitPerpendicularXY(DPoint3dCR vector)
Compute a unit vector perpendicular to the xy parts of given vector.
static DPoint3d From(double x, double y, double z=0.0)
Return a DPoint3d with given xyz.
void RotateXY(DPoint3dCR vector, double theta)
Rotate vector around the z axis, return as calling instance.
void WeightedDifferenceOf(DPoint4dCR point1, DPoint4dCR point2)
Scale each point by the other's weight and subtract, i.e.
#define BEGIN_BENTLEY_NAMESPACE
Definition: Bentley.r.h:24
static DVec3d UnitY()
unit Y vector
Definition: dvec3d.h:121
void InitFromArray(const double *pXyz)
Copies doubles from a 3 component array to the x,y, and z components of a DPoint3d.
static DVec3d UnitZ()
unit Z vector
Definition: dvec3d.h:123
double AngleTo(DPoint3dCR point2) const
Returns the angle between two vectors.
double NormalizedCrossProduct(DPoint3dCR point1, DPoint3dCR point2)
Compute the normalized cross product of two vectors and return the length of the unnormalized cross p...
Templatized type carrying a value type with a boolean indicating if the value is considered valid...
Definition: GeomApi.h:319
void GetComponents(double &xCoord, double &yCoord, double &zCoord) const
Copies x,y,z components from a point to individual variables.
static DVec3d From(double ax, double ay, double az=0.0)
Returns a DVec3d with given x,y, and z components of a vector.
double PlanarAngleTo(DPoint3dCR point2, DPoint3dCR planeNormal) const
Computes the signed angle between the projection of two vectors onto a plane with given normal...
double DotProduct(DPoint3dCR point2) const
Returns the (scalar) dot product of two vectors.
double MagnitudeSquared() const
Computes the squared magnitude of a vector.
void Interpolate(DPoint3dCR point0, double fractionParameter, DPoint3dCR point1)
Computes a point whose position is given by a fractional argument and two endpoints.
double ScaleToLength(DPoint3dCR vector, double length)
Scales a vector to specified length.
3d point coordinates.
Definition: dpoint3d.h:19
double GetComponent(int index) const
Gets a single component of a point.
double SizedCrossProduct(DPoint3dCR point1, DPoint3dCR point2, double productLength)
Computes the cross product of the two parameter vectors and scales it to a given length.
void WeightedDifferenceCrossProduct(DPoint4dCR basePoint, DPoint4dCR target1, DPoint4dCR target2)
Form the cross product of the weighted differences from point0 to point1 and point2.
double MagnitudeXY() const
Computes the magnitude of the xy part of a vector.
bool IsParallelTo(DPoint3dCR point2) const
Tests if two vectors are parallel.
void Add(DVec3dCR vector)
Adds a vector to a pointer or vector, returns the result in place.
static DPoint3d FromInterpolateBilinear(DPoint3dCR point00, DPoint3dCR point10, DPoint3dCR point01, DPoint3dCR point11, double u, double v)
Returns a bilinear interpolation from corners (00)(10)(01)(11)
double AngleToXY(DPoint3dCR point2) const
Returns the angle from Vector1 to Vector2 using only xy parts.
double SignedAngleTo(DPoint3dCR point2, DPoint3dCR orientationVector) const
Computes the signed from one vector to another, in the plane of the two vectors.
bool SafeDivide(DPoint3dCR vector, double denominator)
Try to divide each component of a vector by a scalar.
struct Transform const & TransformCR
Definition: msgeomstructs_typedefs.h:134
double MagnitudeSquaredXY() const
Computes the squared magnitude of the xy part of a vector.
double CrossProductXY(DPoint3dCR point2) const
Return the (scalar) cross product of the xy parts of two vectors.
static DPoint3d FromInterpolate(DPoint3dCR pointA, double fraction, DPoint3dCR pointB)
interpolate between points.
static DPoint3d FromScale(DPoint3d point, double scale)
Returns a scalar multiple of a DPoint3d.
void SetComponent(double a, int index)
Set one of three components (x,y,z) of the point.
#define END_BENTLEY_NAMESPACE
Definition: Bentley.r.h:25
struct DPoint3d const & DPoint3dCR
Definition: msgeomstructs_typedefs.h:79
void Subtract(DPoint3dCR base, DVec3dCR vector)
Subtract a vector from a point.
double MaxAbs() const
Finds the largest absolute value among the components of a point or vector.
struct DVec3d const & DVec3dCR
Definition: msgeomstructs_typedefs.h:89
struct DPoint4d const & DPoint4dCR
Definition: msgeomstructs_typedefs.h:96
double Magnitude() const
Computes the magnitude of a vector.
double GeometricMeanCrossProduct(DPoint3dCR point1, DPoint3dCR point2)
Computes the cross product of two vectors and scales it to the geometric mean of the lengths of the t...
Vector with x,y,z components.
Definition: dvec3d.h:110
static DPoint3d FromSumOf(DPoint3dCR origin, DPoint3dCR vector)
Add a point and a vector.
2d point coordinates.
Definition: dpoint2d.h:23
double Distance(DPoint3dCR point2) const
Computes the (cartesian) distance between two points.
double DistanceSquaredXY(DPoint3dCR point2) const
Computes the squared distance between two points, using only the xy parts.
void XyzOf(DPoint4dCR hPoint)
Sets the x,y, and z components of a DPoint3d structure from the corresponding parts of a DPoint4d...