Panda3D
|
00001 // Filename: fltCurve.I 00002 // Created by: drose (28Feb01) 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: FltCurve::get_num_control_points 00018 // Access: Public 00019 // Description: Returns the number of control points assigned to the 00020 // curve. 00021 //////////////////////////////////////////////////////////////////// 00022 INLINE int FltCurve:: 00023 get_num_control_points() const { 00024 return _control_points.size(); 00025 } 00026 00027 //////////////////////////////////////////////////////////////////// 00028 // Function: FltCurve::get_control_point 00029 // Access: Public 00030 // Description: Returns the nth control point assigned to the curve. 00031 //////////////////////////////////////////////////////////////////// 00032 INLINE const LPoint3d &FltCurve:: 00033 get_control_point(int n) const { 00034 #ifndef NDEBUG 00035 static LPoint3d bogus(0.0, 0.0, 0.0); 00036 nassertr(n >= 0 && n < (int)_control_points.size(), bogus); 00037 #endif 00038 return _control_points[n]; 00039 }