Panda3D
Loading...
Searching...
No Matches
showInterval.h
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 showInterval.h
10 * @author drose
11 * @date 2002-08-27
12 */
13
14#ifndef SHOWINTERVAL_H
15#define SHOWINTERVAL_H
16
17#include "directbase.h"
18#include "cInterval.h"
19#include "nodePath.h"
20
21/**
22 * An interval that calls NodePath::show().
23 */
24class EXPCL_DIRECT_INTERVAL ShowInterval : public CInterval {
25PUBLISHED:
26 explicit ShowInterval(const NodePath &node, const std::string &name = std::string());
27
28 virtual void priv_instant();
29 virtual void priv_reverse_instant();
30
31private:
32 NodePath _node;
33 static int _unique_index;
34
35public:
36 static TypeHandle get_class_type() {
37 return _type_handle;
38 }
39 static void init_type() {
40 CInterval::init_type();
41 register_type(_type_handle, "ShowInterval",
42 CInterval::get_class_type());
43 }
44 virtual TypeHandle get_type() const {
45 return get_class_type();
46 }
47 virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
48
49private:
50 static TypeHandle _type_handle;
51};
52
53#include "showInterval.I"
54
55#endif
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
The base class for timeline components.
Definition cInterval.h:36
virtual void priv_reverse_instant()
This is called in lieu of priv_reverse_initialize() .
virtual void priv_instant()
This is called in lieu of priv_initialize() .
NodePath is the fundamental system for disambiguating instances, and also provides a higher-level int...
Definition nodePath.h:159
An interval that calls NodePath::show().
TypeHandle is the identifier used to differentiate C++ class types.
Definition typeHandle.h:81
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
void register_type(TypeHandle &type_handle, const std::string &name)
This inline function is just a convenient way to call TypeRegistry::register_type(),...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.