Panda3D

Loading...
Searching...
No Matches
hideInterval.cxx
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 hideInterval.cxx
10 * @author drose
11 * @date 2002-08-27
12 */
13
14#include "hideInterval.h"
15
16 int HideInterval::_unique_index;
17 TypeHandle HideInterval::_type_handle;
18
19/**
20 *
21 */
22HideInterval::
23HideInterval(const NodePath &node, const std::string &name) :
24 CInterval(name, 0.0, true),
25 _node(node)
26{
27 nassertv(!node.is_empty());
28 if (_name.empty()) {
29 std::ostringstream name_strm;
30 name_strm
31 << "HideInterval-" << node.node()->get_name() << "-" << ++_unique_index;
32 _name = name_strm.str();
33 }
34}
35
36/**
37 * This is called in lieu of priv_initialize() .. priv_step() ..
38 * priv_finalize(), when everything is to happen within one frame. The
39 * interval should initialize itself, then leave itself in the final state.
40 */
41 void HideInterval::
42 priv_instant() {
43 check_stopped(get_class_type(), "priv_instant");
44 _node.hide();
45 _state = S_final;
46}
47
48/**
49 * This is called in lieu of priv_reverse_initialize() .. priv_step() ..
50 * priv_reverse_finalize(), when everything is to happen within one frame.
51 * The interval should initialize itself, then leave itself in the initial
52 * state.
53 */
54 void HideInterval::
55 priv_reverse_instant() {
56 check_stopped(get_class_type(), "priv_reverse_instant");
57 _node.show();
58 _state = S_initial;
59}
CInterval
The base class for timeline components.
Definition cInterval.h:36
HideInterval::priv_instant
virtual void priv_instant()
This is called in lieu of priv_initialize() .
Definition hideInterval.cxx:42
HideInterval::priv_reverse_instant
virtual void priv_reverse_instant()
This is called in lieu of priv_reverse_initialize() .
Definition hideInterval.cxx:55
NodePath
NodePath is the fundamental system for disambiguating instances, and also provides a higher-level int...
Definition nodePath.h:159
NodePath::is_empty
bool is_empty() const
Returns true if the NodePath contains no nodes.
Definition nodePath.I:188
NodePath::node
PandaNode * node() const
Returns the referenced node of the path.
Definition nodePath.I:227
TypeHandle
TypeHandle is the identifier used to differentiate C++ class types.
Definition typeHandle.h:81
hideInterval.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.