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