Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a Cocoa type for representing a 3D point

In Cocoa there is a NSPoint type to represent points in 2d-space. I can't find a way to represent a 3D type. Is there one and in that case what is it called? Or should I roll my own?

like image 602
vidstige Avatar asked May 16 '11 12:05

vidstige


1 Answers

Right, make your own. I use something like this:

typedef struct Point3D_ {
  CGFloat x, y, z;
} Point3D;
like image 121
petert Avatar answered Sep 29 '22 11:09

petert