Panda3D
 All Classes Functions Variables Enumerations
movingPartScalar.h
1 // Filename: movingPartScalar.h
2 // Created by: drose (23Feb99)
3 //
4 ////////////////////////////////////////////////////////////////////
5 //
6 // PANDA 3D SOFTWARE
7 // Copyright (c) Carnegie Mellon University. All rights reserved.
8 //
9 // All use of this software is subject to the terms of the revised BSD
10 // license. You should have received a copy of this license along
11 // with this source code in a file named "LICENSE."
12 //
13 ////////////////////////////////////////////////////////////////////
14 
15 #ifndef MOVINGPARTSCALAR_H
16 #define MOVINGPARTSCALAR_H
17 
18 #include "pandabase.h"
19 
20 #include "movingPart.h"
21 #include "animChannel.h"
22 #include "animChannelFixed.h"
23 
24 EXPORT_TEMPLATE_CLASS(EXPCL_PANDA_CHAN, EXPTP_PANDA_CHAN, MovingPart<ACScalarSwitchType>);
25 
26 ////////////////////////////////////////////////////////////////////
27 // Class : MovingPartScalar
28 // Description : This is a particular kind of MovingPart that accepts
29 // a scalar each frame.
30 ////////////////////////////////////////////////////////////////////
31 class EXPCL_PANDA_CHAN MovingPartScalar : public MovingPart<ACScalarSwitchType> {
32 protected:
33  INLINE MovingPartScalar(const MovingPartScalar &copy);
34 
35 public:
36  INLINE MovingPartScalar(PartGroup *parent, const string &name,
37  const PN_stdfloat &default_value = 0);
38  virtual ~MovingPartScalar();
39 
40  virtual void get_blend_value(const PartBundle *root);
41 
42  virtual bool apply_freeze_scalar(PN_stdfloat value);
43  virtual bool apply_control(PandaNode *node);
44 
45 protected:
46  INLINE MovingPartScalar();
47 
48 public:
49  static void register_with_read_factory();
50 
51  static TypedWritable *make_MovingPartScalar(const FactoryParams &params);
52 
53 public:
54  virtual TypeHandle get_type() const {
55  return get_class_type();
56  }
57  virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
58 PUBLISHED:
59  static TypeHandle get_class_type() {
60  return _type_handle;
61  }
62 public:
63  static void init_type() {
66  register_type(_type_handle, "MovingPartScalar",
68  }
69 
70 private:
71  static TypeHandle _type_handle;
72 };
73 
74 #include "movingPartScalar.I"
75 
76 // Tell GCC that we'll take care of the instantiation explicitly here.
77 #ifdef __GNUC__
78 #pragma interface
79 #endif
80 
81 #endif
82 
83 
84 
A basic node of the scene graph or data graph.
Definition: pandaNode.h:72
Base class for objects that can be written to and read from Bam files.
Definition: typedWritable.h:37
This template class is a special kind of AnimChannel that always returns just one fixed value...
An instance of this class is passed to the Factory when requesting it to do its business and construc...
Definition: factoryParams.h:40
virtual bool apply_control(PandaNode *node)
Specifies a node to influence this particular joint so that it will always hold the node&#39;s transform...
Definition: partGroup.cxx:263
static void register_with_read_factory()
Factory method to generate a PartGroup object.
Definition: partGroup.cxx:790
This is a particular kind of MovingPart that accepts a scalar each frame.
This is the root of a MovingPart hierarchy.
Definition: partBundle.h:49
TypeHandle is the identifier used to differentiate C++ class types.
Definition: typeHandle.h:85
virtual bool apply_freeze_scalar(PN_stdfloat value)
Freezes this particular joint so that it will always hold the specified transform.
Definition: partGroup.cxx:245
This is the base class for PartRoot and MovingPart.
Definition: partGroup.h:45