Panda3D

eggGroupNode.I

00001 // Filename: eggGroupNode.I
00002 // Created by:  drose (16Jan99)
00003 //
00004 ////////////////////////////////////////////////////////////////////
00005 //
00006 // PANDA 3D SOFTWARE
00007 // Copyright (c) Carnegie Mellon University.  All rights reserved.
00008 //
00009 // All use of this software is subject to the terms of the revised BSD
00010 // license.  You should have received a copy of this license along
00011 // with this source code in a file named "LICENSE."
00012 //
00013 ////////////////////////////////////////////////////////////////////
00014 
00015 
00016 ////////////////////////////////////////////////////////////////////
00017 //     Function: EggGroupNode::is_right
00018 //       Access: Private, Static
00019 //  Description: Returns true if the 2-d v1 is to the right of v2.
00020 ////////////////////////////////////////////////////////////////////
00021 INLINE bool EggGroupNode::
00022 is_right(const LVector2d &v1, const LVector2d &v2) {
00023   return (v1[0] * v2[1] - v1[1] * v2[0]) > 0;
00024 }
00025 
00026 ////////////////////////////////////////////////////////////////////
00027 //     Function: EggGroupNode::TBNVertexValue::operator <
00028 //       Access: Public
00029 //  Description: 
00030 ////////////////////////////////////////////////////////////////////
00031 bool EggGroupNode::TBNVertexValue::
00032 operator < (const TBNVertexValue &other) const {
00033   if (_facing != other._facing) {
00034     return (int)_facing < (int)other._facing;
00035   }
00036   int compare = _pos.compare_to(other._pos);
00037   if (compare != 0) {
00038     return compare < 0;
00039   }
00040   compare = _normal.compare_to(other._normal);
00041   if (compare != 0) {
00042     return compare < 0;
00043   }
00044   compare = _uv.compare_to(other._uv);
00045   if (compare != 0) {
00046     return compare < 0;
00047   }
00048   return _uv_name < other._uv_name;
00049 }
 All Classes Functions Variables Enumerations