tags:

views:

83

answers:

2

I need a type which can contain a position of an object in a 3D environment - my house.

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

The System.Windows.Point(int, int) only represent a two-dimensional space, but does .NET have a type for three-dimensional space?

I realize that I could do something like

List<int, Point<int, int>>

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

3DPoint<int, int, int>

Does the .NET Framework have this?

A: 

I don't think there is built in functionality like that.

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

Slav
+2  A: 

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

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