|
AnyCAD Rapid API 2026
Help you to create a better world!
|
平面. 更多...
Public 成员函数 | |
| PlaneF (global::System.IntPtr cPtr, bool cMemoryOwn) | |
| 仅供内部使用 | |
| void | Dispose () |
| PlaneF () | |
| Default constructor - sets everything to 0. | |
| PlaneF (PlaneF rhs) | |
| PlaneF (Vector3 rkNormal, float fConstant) | |
| Construct a plane through a normal, and a distance to move the plane along the normal. | |
| PlaneF (float a, float b, float c, float _d) | |
| Construct a plane using the 4 constants directly * | |
| PlaneF (Vector3 rkNormal, Vector3 rkPoint) | |
| PlaneF (Vector3 rkPoint0, Vector3 rkPoint1, Vector3 rkPoint2) | |
| EnumPlaneSide | getSide (Vector3 rkPoint) |
| EnumPlaneSide | getSide (AABoxF rkBox) |
| EnumPlaneSide | getSide (Vector3 centre, Vector3 halfSize) |
| EnumPlaneSide | getSide (Vector3 centre, float radius) |
| float | getDistance (Vector3 rkPoint) |
| void | redefine (Vector3 rkPoint0, Vector3 rkPoint1, Vector3 rkPoint2) |
| Redefine this plane based on 3 points. | |
| void | redefine (Vector3 rkNormal, Vector3 rkPoint) |
| Redefine this plane based on a normal and a point. | |
| Vector3 | projectVector (Vector3 v) |
| float | normalise () |
| void | applyMatrix (Matrix4 matrix) |
| Vector3 | coplanarPoint () |
| void | applyMatrix (Matrix4 matrix, Matrix3 normalMatrix) |
属性 | |
| Vector3 | normal [get, set] |
| float | d [get, set] |
平面.
A plane is defined in 3D space by the equation Ax + By + Cz + D = 0
Title: This equates to a vector (the normal of the plane, whose x, y and z components equate to the coefficients A, B and C respectively), and a constant (D) which is the distance along the normal you have to go to move the plane back to the origin.
Group: Common
| float AnyCAD.Foundation.PlaneF.getDistance | ( | Vector3 | rkPoint | ) |
This is a pseudodistance. The sign of the return value is positive if the point is on the positive side of the plane, negative if the point is on the negative side, and zero if the point is on the plane. Title: The absolute value of the return value is the true distance only when the plane normal is a unit length vector.
| EnumPlaneSide AnyCAD.Foundation.PlaneF.getSide | ( | AABoxF | rkBox | ) |
Returns the side where the alignedBox is. The flag BOTH_SIDE indicates an intersecting box. One corner ON the plane is sufficient to consider the box and the plane intersecting.
| EnumPlaneSide AnyCAD.Foundation.PlaneF.getSide | ( | Vector3 | centre, |
| Vector3 | halfSize ) |
Returns which side of the plane that the given box lies on. The box is defined as centre/half-size pairs for effectively.
| centre | The centre of the box. |
| halfSize | The half-size of the box. |
| EnumPlaneSide AnyCAD.Foundation.PlaneF.getSide | ( | Vector3 | rkPoint | ) |
The "positive side" of the plane is the half space to which the plane normal points. The "negative side" is the other half space. The flag "no side" indicates the plane itself.
| float AnyCAD.Foundation.PlaneF.normalise | ( | ) |
Normalises the plane.
This method normalises the plane's normal and the length scale of d is as well.
This function will not crash for zero-sized vectors, but there will be no changes made to their components.
Project a vector onto the plane.
This gives you the element of the input vector that is perpendicular to the normal of the plane. You can get the element which is parallel to the normal of the plane by subtracting the result of this method from the original vector, since parallel + perpendicular = original.
| v | The input vector |