MathUtils

Overview

MathUtils is a class in Aspose.3D FOSS for .NET.

MathUtils.CalcNormal calculates the normal vector of a polygon defined by an array of Vector3 points.

This class provides 7 methods for working with MathUtils objects in .NET programs. Available methods include: CalcNormal, Clamp, FindIntersection, PointInsideTriangle, RayIntersect, ToDegree, ToRadian. All public members are accessible to any .NET application after installing the Aspose.3D FOSS for .NET package.

Methods

SignatureDescription
CalcNormal(points: Vector3[])Calculates the normal vector of a polygon defined by an array of Vector3 points
FindIntersection(p0: Vector2, d0: Vector2, p1: Vector2, d1: Vector2, results: Vector2[])Computes the intersection of two lines (p0+d0 and p1+d1) and stores results in a Vector2 array
PointInsideTriangle(p: Vector2, p0: Vector2, p1: Vector2, p2: Vector2)Returns true if point p lies inside the triangle formed by p0, p1 and p2
RayIntersect(origin: Vector2, dir: Vector2, a: Vector2, b: Vector2)Finds the intersection point between a ray (origin, dir) and the segment a‑b
Clamp(val: double, min: double, max: double)Limits a double value to the inclusive range defined by min and max
ToDegree(radian: Vector3)Converts three double radian values (x, y, z) to a Vector3 of degrees
ToRadian(degree: Vector3)Converts three double degree values (x, y, z) to a Vector3 of radians
ToDegree(radian: float)
ToDegree(radian: double)
ToDegree(x: double, y: double, z: double)
ToRadian(degree: float)
ToRadian(degree: double)
ToRadian(x: double, y: double, z: double)

See Also