コード例 #1
0
 public Vector2D(Vector2F copy)
 {
     x = copy.x; y = copy.y;
 }
コード例 #2
0
 public float Project(Vector2F p)
 {
     return((p - Center).Dot(Direction));
 }
コード例 #3
0
 void update_from_endpoints(Vector2F p0, Vector2F p1)
 {
     Center    = 0.5f * (p0 + p1);
     Direction = p1 - p0;
     Extent    = 0.5f * Direction.Normalize();
 }
コード例 #4
0
 public Segment2f(Vector2F center, Vector2F direction, float extent)
 {
     Center = center; Direction = direction; Extent = extent;
 }