Panda3D
dxfVertex.cxx
1 // Filename: dxfVertex.cxx
2 // Created by: drose (04May04)
3 //
4 ////////////////////////////////////////////////////////////////////
5 //
6 // PANDA 3D SOFTWARE
7 // Copyright (c) Carnegie Mellon University. All rights reserved.
8 //
9 // All use of this software is subject to the terms of the revised BSD
10 // license. You should have received a copy of this license along
11 // with this source code in a file named "LICENSE."
12 //
13 ////////////////////////////////////////////////////////////////////
14 
15 #include "dxfVertex.h"
16 
17 ////////////////////////////////////////////////////////////////////
18 // Function: DXFVertex::Ordering operator
19 // Access: Public
20 // Description: This defines a unique ordering for vertices so that
21 // the DXFVertexMap can group identical vertices
22 // together.
23 ////////////////////////////////////////////////////////////////////
24 int DXFVertex::
25 operator < (const DXFVertex &other) const {
26  if (fabs(_p[0] - other._p[0]) > 0.0001) {
27  return _p[0] < other._p[0];
28  } else if (fabs(_p[1] - other._p[1]) > 0.0001) {
29  return _p[1] < other._p[1];
30  } else if (fabs(_p[2] - other._p[2]) > 0.0001) {
31  return _p[2] < other._p[2];
32  }
33 
34  return false;
35 }
36 
Stored within DXFFile, this is the basic Vertex data of a DXF file.
Definition: dxfVertex.h:30
int operator<(const DXFVertex &other) const
This defines a unique ordering for vertices so that the DXFVertexMap can group identical vertices tog...
Definition: dxfVertex.cxx:25