Panda3D
panda
src
chan
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
14
template
<
class
SwitchType>
15
TypeHandle
AnimChannelFixed<SwitchType>::_type_handle
;
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
*/
22
template
<
class
SwitchType>
23
INLINE
AnimChannelFixed<SwitchType>::
24
AnimChannelFixed
(
AnimGroup
*parent,
const
AnimChannelFixed<SwitchType>
©) :
25
AnimChannel
<SwitchType>(parent, copy),
26
_value(copy._value)
27
{
28
}
29
30
/**
31
*
32
*/
33
template
<
class
SwitchType>
34
INLINE
AnimChannelFixed<SwitchType>::
35
AnimChannelFixed
(
const
std::string &name,
const
ValueType &value)
36
:
AnimChannel
<SwitchType>(name),
37
_value(value) {
38
}
39
40
41
/**
42
*
43
*/
44
template
<
class
SwitchType>
45
bool
AnimChannelFixed<SwitchType>::
46
has_changed
(
int
,
double
,
int
,
double
) {
47
return
false
;
48
}
49
50
51
/**
52
*
53
*/
54
template
<
class
SwitchType>
55
void
AnimChannelFixed<SwitchType>::
56
get_value
(
int
, ValueType &value) {
57
value = _value;
58
}
59
60
61
/**
62
*
63
*/
64
template
<
class
SwitchType>
65
void
AnimChannelFixed<SwitchType>::
66
output
(std::ostream &out)
const
{
67
AnimChannel<SwitchType>::output
(out);
68
out <<
" = "
<< _value;
69
}
AnimChannelFixed::output
virtual void output(std::ostream &out) const
Writes a one-line description of the group.
Definition:
animChannelFixed.I:66
AnimChannelFixed
This template class is a special kind of AnimChannel that always returns just one fixed value.
Definition:
animChannelFixed.h:29
TypeHandle
TypeHandle is the identifier used to differentiate C++ class types.
Definition:
typeHandle.h:81
AnimChannelFixed::has_changed
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().
Definition:
animChannelFixed.I:46
AnimGroup
This is the base class for AnimChannel and AnimBundle.
Definition:
animGroup.h:33
AnimGroup::output
virtual void output(std::ostream &out) const
Writes a one-line description of the group.
Definition:
animGroup.cxx:184
AnimChannel
This template class is the parent class for all kinds of AnimChannels that return different values.
Definition:
animChannel.h:28
Generated on Mon Sep 14 2020 15:06:44 for Panda3D by
1.8.20