Skip to content

nzain/SharpGeometry

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

43 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SharpGeometry

Build status codecov.io

This is a 3D geometry package for .NET, written in C#. The three core structs

  • Vector3D
  • Point3D
  • Matrix3D

support intuitive mathematical notation by operator overloading. This allows you to write things like

Vector3D a = new Vector3D(1, 2, 3);
Vector3D b = 2.5 * a;
WriteLine(b);
// [2.500 5.000 7.500]

Vector3D rotationAxis = Vector3D.ZAxis;
double angle = Math.PI/2;
Matrix3D m = Matrix3D.Rotate(rotationAxis, angle);
WriteLine(m);
// [ 0.000 -1.000  0.000]
// [ 1.000  0.000  0.000]
// [ 0.000  0.000  1.000]

Vector3D c = m * b;
WriteLine(c);
// [-5.000 2.500 7.500]

About

Open Source 3D Geometry Library for Vector and Matrix Math

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published