00001 // Filename: collisionParabola.I 00002 // Created by: drose (11Oct07) 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: CollisionParabola::Default Constructor 00018 // Access: Published 00019 // Description: Creates an invalid parabola. 00020 //////////////////////////////////////////////////////////////////// 00021 INLINE CollisionParabola:: 00022 CollisionParabola() : 00023 _t1(0.0f), _t2(0.0f) 00024 { 00025 } 00026 00027 //////////////////////////////////////////////////////////////////// 00028 // Function: CollisionParabola::Constructor 00029 // Access: Published 00030 // Description: Creates a parabola with the endpoints between t1 and 00031 // t2 in the parametric space of the parabola. 00032 //////////////////////////////////////////////////////////////////// 00033 INLINE CollisionParabola:: 00034 CollisionParabola(const LParabola ¶bola, PN_stdfloat t1, PN_stdfloat t2) : 00035 _parabola(parabola), 00036 _t1(t1), _t2(t2) 00037 { 00038 } 00039 00040 //////////////////////////////////////////////////////////////////// 00041 // Function: CollisionParabola::Copy Constructor 00042 // Access: Public 00043 // Description: 00044 //////////////////////////////////////////////////////////////////// 00045 INLINE CollisionParabola:: 00046 CollisionParabola(const CollisionParabola ©) : 00047 _parabola(copy._parabola), 00048 _t1(copy._t1), _t2(copy._t2) 00049 { 00050 } 00051 00052 //////////////////////////////////////////////////////////////////// 00053 // Function: CollisionParabola::set_parabola 00054 // Access: Public 00055 // Description: Replaces the parabola specified by this solid. 00056 //////////////////////////////////////////////////////////////////// 00057 INLINE void CollisionParabola:: 00058 set_parabola(const LParabola ¶bola) { 00059 _parabola = parabola; 00060 mark_internal_bounds_stale(); 00061 mark_viz_stale(); 00062 } 00063 00064 //////////////////////////////////////////////////////////////////// 00065 // Function: CollisionParabola::get_parabola 00066 // Access: Public 00067 // Description: Returns the parabola specified by this solid. 00068 //////////////////////////////////////////////////////////////////// 00069 INLINE const LParabola &CollisionParabola:: 00070 get_parabola() const { 00071 return _parabola; 00072 } 00073 00074 //////////////////////////////////////////////////////////////////// 00075 // Function: CollisionParabola::set_t1 00076 // Access: Public 00077 // Description: Changes the starting point on the parabola. 00078 //////////////////////////////////////////////////////////////////// 00079 INLINE void CollisionParabola:: 00080 set_t1(PN_stdfloat t1) { 00081 _t1 = t1; 00082 mark_internal_bounds_stale(); 00083 mark_viz_stale(); 00084 } 00085 00086 //////////////////////////////////////////////////////////////////// 00087 // Function: CollisionParabola::get_t1 00088 // Access: Public 00089 // Description: Returns the starting point on the parabola. 00090 //////////////////////////////////////////////////////////////////// 00091 INLINE PN_stdfloat CollisionParabola:: 00092 get_t1() const { 00093 return _t1; 00094 } 00095 00096 //////////////////////////////////////////////////////////////////// 00097 // Function: CollisionParabola::set_t2 00098 // Access: Public 00099 // Description: Changes the ending point on the parabola. 00100 //////////////////////////////////////////////////////////////////// 00101 INLINE void CollisionParabola:: 00102 set_t2(PN_stdfloat t2) { 00103 _t2 = t2; 00104 mark_internal_bounds_stale(); 00105 mark_viz_stale(); 00106 } 00107 00108 //////////////////////////////////////////////////////////////////// 00109 // Function: CollisionParabola::get_t2 00110 // Access: Public 00111 // Description: Returns the ending point on the parabola. 00112 //////////////////////////////////////////////////////////////////// 00113 INLINE PN_stdfloat CollisionParabola:: 00114 get_t2() const { 00115 return _t2; 00116 }