@@ -7,26 +7,62 @@ Panda3D's Interval system is a sophisticated mechanism for playback of scripted
77actions. With the use of Intervals, you can build up a complex interplay of
88animations, sound effects, or any other actions, and play the script on demand.
99
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).
1526
1627The real power of the Interval system comes from :ref: `sequences-and-parallels `,
1728which are a special kind of Interval that can contain nested Intervals of any
1829kind (including additional Sequences and/or Parallels). By using these grouping
1930Intervals, you can easily assemble complex scripts from the basic atoms.
2031
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+
2155Using Intervals
2256---------------
2357
24- In any Panda3D module that uses Intervals, you should first import the interval
25- module:
58+ .. only :: python
2659
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
2864
29- from direct.interval.IntervalGlobal import *
65+ from direct.interval.IntervalGlobal import *
3066
3167 There are a handful of methods that all Intervals have in common.
3268
0 commit comments