Panda3D
panda
src
collide
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
*/
17
INLINE
CollisionParabola::
18
CollisionParabola
() :
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
*/
27
INLINE
CollisionParabola::
28
CollisionParabola
(
const
LParabola ¶bola, PN_stdfloat t1, PN_stdfloat t2) :
29
_parabola(parabola),
30
_t1(t1), _t2(t2)
31
{
32
}
33
34
/**
35
*
36
*/
37
INLINE
CollisionParabola::
38
CollisionParabola
(
const
CollisionParabola
©) :
39
_parabola(copy._parabola),
40
_t1(copy._t1), _t2(copy._t2)
41
{
42
}
43
44
/**
45
* Replaces the parabola specified by this solid.
46
*/
47
INLINE
void
CollisionParabola::
48
set_parabola
(
const
LParabola ¶bola) {
49
_parabola = parabola;
50
mark_internal_bounds_stale();
51
mark_viz_stale();
52
}
53
54
/**
55
* Returns the parabola specified by this solid.
56
*/
57
INLINE
const
LParabola &
CollisionParabola::
58
get_parabola
()
const
{
59
return
_parabola;
60
}
61
62
/**
63
* Changes the starting point on the parabola.
64
*/
65
INLINE
void
CollisionParabola::
66
set_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
*/
75
INLINE PN_stdfloat
CollisionParabola::
76
get_t1
()
const
{
77
return
_t1;
78
}
79
80
/**
81
* Changes the ending point on the parabola.
82
*/
83
INLINE
void
CollisionParabola::
84
set_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
*/
93
INLINE PN_stdfloat
CollisionParabola::
94
get_t2
()
const
{
95
return
_t2;
96
}
CollisionParabola
This defines a parabolic arc, or subset of an arc, similar to the path of a projectile or falling obj...
Definition:
collisionParabola.h:32
CollisionParabola::get_parabola
get_parabola
Returns the parabola specified by this solid.
Definition:
collisionParabola.h:64
CollisionParabola::set_t2
set_t2
Changes the ending point on the parabola.
Definition:
collisionParabola.h:66
CollisionParabola::get_t1
get_t1
Returns the starting point on the parabola.
Definition:
collisionParabola.h:65
CollisionParabola::CollisionParabola
CollisionParabola()
Creates an invalid parabola.
Definition:
collisionParabola.I:18
CollisionParabola::get_t2
get_t2
Returns the ending point on the parabola.
Definition:
collisionParabola.h:66
CollisionParabola::set_t1
set_t1
Changes the starting point on the parabola.
Definition:
collisionParabola.h:65
CollisionParabola::set_parabola
set_parabola
Replaces the parabola specified by this solid.
Definition:
collisionParabola.h:64
Generated on Sun Dec 27 2020 13:22:50 for Panda3D by
1.8.20