3ds Max C++ API Reference
|
Classes | |
class | DPoint2 |
Description: This class describes a 2D point using double precision x and y coordinates. More... | |
class | DRay2 |
This class describes a vector in space using an origin point p, and a unit direction vector in double precision. More... | |
Functions | |
double | Length (const DPoint2 &p) |
Returns the 'Length' of the point. More... | |
constexpr double | LengthSquared (const DPoint2 &p) |
The 'Length' squared of this point. More... | |
int | MaxComponent (const DPoint2 &p) |
Returns the component with the maximum absolute value. More... | |
int | MinComponent (const DPoint2 &p) |
Returns the component with the minimum absolute value. More... | |
DPoint2 | Normalize (const DPoint2 &p) |
Returns a unit vector. More... | |
constexpr double | DotProd (const DPoint2 &a, const DPoint2 &b) |
Returns the dot product of two DPoint2s. More... | |
constexpr DPoint2 | operator* (const DPoint2 &a, double f) |
Multiply a DPoint2 by a scalar. More... | |
constexpr DPoint2 | operator* (double f, const DPoint2 &a) |
constexpr DPoint2 | operator+ (const DPoint2 &a, double f) |
constexpr DPoint2 | operator+ (double f, const DPoint2 &a) |
constexpr DPoint2 | operator- (const DPoint2 &a, float f) |
DPoint2 | operator/ (const DPoint2 &a, double f) |
Divide a DPoint2 by a scalar. More... | |
constexpr Point2 | Point2FromDPoint2 (const DPoint2 &from) |
int | DoublePrecisionLineSegmentIntersection (const DPoint2 &seg1Start, const DPoint2 &seg1End, const DPoint2 &seg2Start, const DPoint2 &seg2End, DPoint2 &intersectPoint) |
Double-Precision Line Segment Intersection test. More... | |
int | DoublePrecisionLineIntersection (const DPoint2 &line1PointA, const DPoint2 &line1PointB, const DPoint2 &line2PointA, const DPoint2 &line2PointB, DPoint2 &intersectPoint) |
Double-Precision Line Intersection test. More... | |
|
inline |
Returns the 'Length' of the point.
This is sqrt(v.x*v.x+v.y*v.y)
p | the DPoint2 to test |
|
constexpr |
The 'Length' squared of this point.
This is v.x*v.x+v.y*v.y.
p | the DPoint2 to test |
Returns the component with the maximum absolute value.
p | the DPoint2 to test |
Returns the component with the minimum absolute value.
0=x, 1=y.
p | the DPoint2 to test |
int DoublePrecisionLineSegmentIntersection | ( | const DPoint2 & | seg1Start, |
const DPoint2 & | seg1End, | ||
const DPoint2 & | seg2Start, | ||
const DPoint2 & | seg2End, | ||
DPoint2 & | intersectPoint | ||
) |
Double-Precision Line Segment Intersection test.
Determines if two line segments intersect.
seg1Start | endpoint 1 for the first line segment |
seg1End | endpoint 2 for the first line segment |
seg2Start | endpoint 1 for the second line segment |
seg2End | endpoint 2 for the second line segment |
intersectPoint | if the lines intersect, this will return the intersection point. |
int DoublePrecisionLineIntersection | ( | const DPoint2 & | line1PointA, |
const DPoint2 & | line1PointB, | ||
const DPoint2 & | line2PointA, | ||
const DPoint2 & | line2PointB, | ||
DPoint2 & | intersectPoint | ||
) |
Double-Precision Line Intersection test.
Determines if two infinite lines cross, and if so, where.
line1PointA | point 1 on the first line |
line1PointB | point 2 on the first line |
line2PointA | point 1 on the second line |
line2PointB | point 2 on the second line |
intersectPoint | if the lines intersect, this will return the intersection point. |