Panda3D
eggGroupNode.I
Go to the documentation of this file.
1 /**
2  * PANDA 3D SOFTWARE
3  * Copyright (c) Carnegie Mellon University. All rights reserved.
4  *
5  * All use of this software is subject to the terms of the revised BSD
6  * license. You should have received a copy of this license along
7  * with this source code in a file named "LICENSE."
8  *
9  * @file eggGroupNode.I
10  * @author drose
11  * @date 1999-01-16
12  */
13 
14 /**
15  * Returns true if the 2-d v1 is to the right of v2.
16  */
17 INLINE bool EggGroupNode::
18 is_right(const LVector2d &v1, const LVector2d &v2) {
19  return (v1[0] * v2[1] - v1[1] * v2[0]) > 0;
20 }
21 
22 /**
23  *
24  */
25 bool EggGroupNode::TBNVertexValue::
26 operator < (const TBNVertexValue &other) const {
27  if (_facing != other._facing) {
28  return (int)_facing < (int)other._facing;
29  }
30  int compare = _pos.compare_to(other._pos);
31  if (compare != 0) {
32  return compare < 0;
33  }
34  compare = _normal.compare_to(other._normal);
35  if (compare != 0) {
36  return compare < 0;
37  }
38  compare = _uv.compare_to(other._uv);
39  if (compare != 0) {
40  return compare < 0;
41  }
42  return _uv_name < other._uv_name;
43 }
static bool is_right(const LVector2d &v1, const LVector2d &v2)
Returns true if the 2-d v1 is to the right of v2.
Definition: eggGroupNode.I:18