Panda3D
Loading...
Searching...
No Matches
collisionParabola.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 collisionParabola.I
10 * @author drose
11 * @date 2007-10-11
12 */
13
14/**
15 * Creates an invalid parabola.
16 */
19 _t1(0.0f), _t2(0.0f)
20{
21}
22
23/**
24 * Creates a parabola with the endpoints between t1 and t2 in the parametric
25 * space of the parabola.
26 */
28CollisionParabola(const LParabola &parabola, PN_stdfloat t1, PN_stdfloat t2) :
29 _parabola(parabola),
30 _t1(t1), _t2(t2)
31{
32}
33
34/**
35 *
36 */
39 _parabola(copy._parabola),
40 _t1(copy._t1), _t2(copy._t2)
41{
42}
43
44/**
45 * Replaces the parabola specified by this solid.
46 */
47INLINE void CollisionParabola::
48set_parabola(const LParabola &parabola) {
49 _parabola = parabola;
50 mark_internal_bounds_stale();
51 mark_viz_stale();
52}
53
54/**
55 * Returns the parabola specified by this solid.
56 */
57INLINE const LParabola &CollisionParabola::
58get_parabola() const {
59 return _parabola;
60}
61
62/**
63 * Changes the starting point on the parabola.
64 */
65INLINE void CollisionParabola::
66set_t1(PN_stdfloat t1) {
67 _t1 = t1;
68 mark_internal_bounds_stale();
69 mark_viz_stale();
70}
71
72/**
73 * Returns the starting point on the parabola.
74 */
75INLINE PN_stdfloat CollisionParabola::
76get_t1() const {
77 return _t1;
78}
79
80/**
81 * Changes the ending point on the parabola.
82 */
83INLINE void CollisionParabola::
84set_t2(PN_stdfloat t2) {
85 _t2 = t2;
86 mark_internal_bounds_stale();
87 mark_viz_stale();
88}
89
90/**
91 * Returns the ending point on the parabola.
92 */
93INLINE PN_stdfloat CollisionParabola::
94get_t2() const {
95 return _t2;
96}
This defines a parabolic arc, or subset of an arc, similar to the path of a projectile or falling obj...
get_t1
Returns the starting point on the parabola.
set_t1
Changes the starting point on the parabola.
set_parabola
Replaces the parabola specified by this solid.
get_t2
Returns the ending point on the parabola.
get_parabola
Returns the parabola specified by this solid.
CollisionParabola()
Creates an invalid parabola.
set_t2
Changes the ending point on the parabola.