.NET type for describing a 3D position?

I need a type that can hold the position of an object in a 3D environment - my home.

I need to know which floor it is on and the x and Y coordinates on that floor.

System.Windows.Point (int, int) only represents 2D space, but is .NET a type for 3D space?

I understand that I could do something like

List<int, Point<int, int>>

      

but instead I would like to have a simple type. Something like:

3DPoint<int, int, int>

      

Does the .NET Framework have this?

+1


source to share


2 answers


In managed Direct3D, there is a vector3 type that describes a point in space. It would be trivial to implement it yourself.



public struct Vector3
{
  public float x;
  public float y;
  public float z;
} 

      

+2


source


I don't think there is any built in functionality.



But check out this article CodeProject 3D Geometry Library (Base Classes) and 3D Drawing Using VB.Net

0


source







All Articles