Panda3D

movingPartScalar.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 movingPartScalar.h
10 * @author drose
11 * @date 1999-02-23
12 */
13
14 #ifndef MOVINGPARTSCALAR_H
15 #define MOVINGPARTSCALAR_H
16
17 #include "pandabase.h"
18
19 #include "movingPart.h"
20 #include "animChannel.h"
21 #include "animChannelFixed.h"
22
23 EXPORT_TEMPLATE_CLASS(EXPCL_PANDA_CHAN, EXPTP_PANDA_CHAN, MovingPart<ACScalarSwitchType>);
24
25 /**
26 * This is a particular kind of MovingPart that accepts a scalar each frame.
27 */
28 class EXPCL_PANDA_CHAN MovingPartScalar : public MovingPart<ACScalarSwitchType> {
29 protected:
30 INLINE MovingPartScalar(const MovingPartScalar &copy);
31
32 public:
33 INLINE MovingPartScalar(PartGroup *parent, const std::string &name,
34 const PN_stdfloat &default_value = 0);
35 virtual ~MovingPartScalar();
36
37 virtual void get_blend_value(const PartBundle *root);
38
39 virtual bool apply_freeze_scalar(PN_stdfloat value);
40 virtual bool apply_control(PandaNode *node);
41
42 protected:
43 INLINE MovingPartScalar();
44
45 public:
46 static void register_with_read_factory();
47
48 static TypedWritable *make_MovingPartScalar(const FactoryParams &params);
49
50 public:
51 virtual TypeHandle get_type() const {
52 return get_class_type();
53 }
54 virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
55 PUBLISHED:
56 static TypeHandle get_class_type() {
57 return _type_handle;
58 }
59 public:
60 static void init_type() {
61 MovingPart<ACScalarSwitchType>::init_type();
62 AnimChannelFixed<ACScalarSwitchType>::init_type();
63 register_type(_type_handle, "MovingPartScalar",
64 MovingPart<ACScalarSwitchType>::get_class_type());
65 }
66
67 private:
68 static TypeHandle _type_handle;
69 };
70
71 #include "movingPartScalar.I"
72
73 #endif
animChannelFixed.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
animChannel.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
AnimChannelFixed
This template class is a special kind of AnimChannel that always returns just one fixed value.
Definition: animChannelFixed.h:29
FactoryParams
An instance of this class is passed to the Factory when requesting it to do its business and construc...
Definition: factoryParams.h:36
MovingPartScalar
This is a particular kind of MovingPart that accepts a scalar each frame.
Definition: movingPartScalar.h:28
MovingPart< ACScalarSwitchType >
PandaNode
A basic node of the scene graph or data graph.
Definition: pandaNode.h:65
PartBundle
This is the root of a MovingPart hierarchy.
Definition: partBundle.h:46
PartGroup
This is the base class for PartRoot and MovingPart.
Definition: partGroup.h:43
PartGroup::apply_freeze_scalar
virtual bool apply_freeze_scalar(PN_stdfloat value)
Freezes this particular joint so that it will always hold the specified transform.
Definition: partGroup.cxx:211
PartGroup::apply_control
virtual bool apply_control(PandaNode *node)
Specifies a node to influence this particular joint so that it will always hold the node's transform.
Definition: partGroup.cxx:225
PartGroup::register_with_read_factory
static void register_with_read_factory()
Factory method to generate a PartGroup object.
Definition: partGroup.cxx:695
TypeHandle
TypeHandle is the identifier used to differentiate C++ class types.
Definition: typeHandle.h:81
TypedWritable
Base class for objects that can be written to and read from Bam files.
Definition: typedWritable.h:35
movingPartScalar.I
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
movingPart.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
pandabase.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
register_type
void register_type(TypeHandle &type_handle, const std::string &name)
This inline function is just a convenient way to call TypeRegistry::register_type(),...
Definition: register_type.I:22