Panda3D
Loading...
Searching...
No Matches
animChannelFixed.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 animChannelFixed.I
10 * @author drose
11 * @date 1999-02-24
12 */
13
14template<class SwitchType>
16
17/**
18 * Creates a new AnimChannelFixed, just like this one, without copying any
19 * children. The new copy is added to the indicated parent. Intended to be
20 * called by make_copy() only.
21 */
22template<class SwitchType>
25 AnimChannel<SwitchType>(parent, copy),
26 _value(copy._value)
27{
28}
29
30/**
31 *
32 */
33template<class SwitchType>
35AnimChannelFixed(const std::string &name, const ValueType &value)
36 : AnimChannel<SwitchType>(name),
37 _value(value) {
38}
39
40
41/**
42 *
43 */
44template<class SwitchType>
46has_changed(int, double, int, double) {
47 return false;
48}
49
50
51/**
52 *
53 */
54template<class SwitchType>
56get_value(int, ValueType &value) {
57 value = _value;
58}
59
60
61/**
62 *
63 */
64template<class SwitchType>
66output(std::ostream &out) const {
68 out << " = " << _value;
69}
This template class is a special kind of AnimChannel that always returns just one fixed value.
virtual void output(std::ostream &out) const
Writes a one-line description of the group.
virtual bool has_changed(int last_frame, double last_frac, int this_frame, double this_frac)
Returns true if the value has changed since the last call to has_changed().
This template class is the parent class for all kinds of AnimChannels that return different values.
Definition animChannel.h:28
This is the base class for AnimChannel and AnimBundle.
Definition animGroup.h:33
virtual void output(std::ostream &out) const
Writes a one-line description of the group.
TypeHandle is the identifier used to differentiate C++ class types.
Definition typeHandle.h:81