@@ -7,26 +7,62 @@ Panda3D's Interval system is a sophisticated mechanism for playback of scripted
7
7
actions. With the use of Intervals, you can build up a complex interplay of
8
8
animations, sound effects, or any other actions, and play the script on demand.
9
9
10
- The core of system is the :py:class: `~direct.interval.Interval.Interval ` class.
11
- There are several different kinds of Intervals, which will be discussed in
12
- detail in the following pages, but all of them have in common the following
13
- property: each Interval represents an action (or a series of actions) that
14
- occurs over a specific, finite interval of time (hence the name).
10
+ .. only :: python
11
+
12
+ The core of the system is the :py:class: `~direct.interval.Interval.Interval `
13
+ class. There are several different kinds of Intervals, which will be
14
+ discussed in detail in the following pages, but all of them have in common
15
+ the following property: each Interval represents an action (or a series of
16
+ actions) that occurs over a specific, finite interval of time (hence the
17
+ name).
18
+
19
+ .. only :: cpp
20
+
21
+ The core of the system is the :class: `~.CInterval ` class. There are several
22
+ different kinds of Intervals, which will be discussed in detail in the
23
+ following pages, but all of them have in common the following property: each
24
+ Interval represents an action (or a series of actions) that occurs over a
25
+ specific, finite interval of time (hence the name).
15
26
16
27
The real power of the Interval system comes from :ref: `sequences-and-parallels `,
17
28
which are a special kind of Interval that can contain nested Intervals of any
18
29
kind (including additional Sequences and/or Parallels). By using these grouping
19
30
Intervals, you can easily assemble complex scripts from the basic atoms.
20
31
32
+ .. only :: python
33
+
34
+ The class responsible for keeping track of the intervals that are currently
35
+ playing and updating them periodically is called
36
+ :py:class: `~direct.interval.IntervalManager.IntervalManager `. Normally, you
37
+ do not need to interface with this class directly, but you can use it to
38
+ query the list of running intervals or perform operations on multiple
39
+ intervals at the same time. There is one global instance of this class, which
40
+ can be imported as follows:
41
+
42
+ .. code-block :: python
43
+
44
+ from direct.interval.IntervalManager import ivalMgr
45
+
46
+ .. only :: cpp
47
+
48
+ The class responsible for keeping track of the intervals that are currently
49
+ playing and updating them periodically is called :class: `.CIntervalManager `.
50
+ There is one global instance, available via
51
+ :meth: `.CIntervalManager::get_global_ptr() `. You need to call
52
+ :meth: `~.CIntervalManager::step() ` on this class every frame in order to
53
+ advance the intervals.
54
+
21
55
Using Intervals
22
56
---------------
23
57
24
- In any Panda3D module that uses Intervals, you should first import the interval
25
- module:
58
+ .. only :: python
26
59
27
- .. code-block :: python
60
+ In any Panda3D module that uses Intervals, you should first import the
61
+ interval module:
62
+
63
+ .. code-block :: python
28
64
29
- from direct.interval.IntervalGlobal import *
65
+ from direct.interval.IntervalGlobal import *
30
66
31
67
There are a handful of methods that all Intervals have in common.
32
68
0 commit comments