| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| DirectXTK | SimpleMath |
|---|
An infinite 2D plane represented as a four component vector modeled after the XNA Game Studio 4 (Microsoft.Xna.Framework.Plane) math library.
#include <SimpleMath.h>using namespace DirectX::SimpleMath;
Plane p; // Creates a plane in XZ at the origin
Plane p(0, 1, 0, 0); // Creates a plane in XZ at the origin
Plane p( Vector3(0,1,0), 0 ); // Creates a plane in XZ at the origin
Plane p( Vector3(1,1,1),
Vector3(1,2,2),
Vector3(1,2,3)); // Creates a plane containing the three points
Plane p( Vector3(1,2,3),
Vector3(0,0,1) ); // Creates a plane at [1,2,3] with the normal [0,0,1]
float arr[4] = { 0, 1, 0, 0 };
Plane p(arr); // Creates a plane in XZ at the originThis is the Cartesian form of the equation of a plane: Ax + By + C*z + D
Planes should be transformed by the inverse transpose of the matrix, which for pure rotations results in the same matrix as the original.
These methods are marked noexcept, and do not throw C++ exceptions.
Plane can freely convert to and from a XMFLOAT4 and XMVECTOR
All content and source code for this package are subject to the terms of the MIT License.
This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.
| Back | FazBrowse Home | New Git URL |