Panda3D
 All Classes Functions Variables Enumerations
cConstrainTransformInterval.h
1 // Filename: cConstrainTransformInterval.h
2 // Created by: pratt (29Sep06)
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 CCONSTRAINTRANSFORMINTERVAL_H
16 #define CCONSTRAINTRANSFORMINTERVAL_H
17 
18 #include "directbase.h"
19 #include "cConstraintInterval.h"
20 #include "nodePath.h"
21 
22 ////////////////////////////////////////////////////////////////////
23 // Class : CConstrainTransformInterval
24 // Description : A constraint interval that will constrain the
25 // transform of one node to the transform of another.
26 ////////////////////////////////////////////////////////////////////
27 class EXPCL_DIRECT CConstrainTransformInterval : public CConstraintInterval {
28 PUBLISHED:
29  CConstrainTransformInterval(const string &name, double duration,
30  const NodePath &node, const NodePath &target,
31  bool wrt);
32 
33  INLINE const NodePath &get_node() const;
34  INLINE const NodePath &get_target() const;
35 
36  virtual void priv_step(double t);
37  virtual void output(ostream &out) const;
38 
39 private:
40  NodePath _node;
41  NodePath _target;
42  bool _wrt;
43 
44 public:
45  static TypeHandle get_class_type() {
46  return _type_handle;
47  }
48  static void init_type() {
49  CConstraintInterval::init_type();
50  register_type(_type_handle, "CConstrainTransformInterval",
51  CConstraintInterval::get_class_type());
52  }
53  virtual TypeHandle get_type() const {
54  return get_class_type();
55  }
56  virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
57 
58 private:
59  static TypeHandle _type_handle;
60 };
61 
62 #include "cConstrainTransformInterval.I"
63 
64 #endif
65 
virtual void priv_step(double t)
Advances the time on the interval.
Definition: cInterval.cxx:407
A constraint interval that will constrain the transform of one node to the transform of another...
The base class for a family of intervals that constrain some property to a value over time...
TypeHandle is the identifier used to differentiate C++ class types.
Definition: typeHandle.h:85
NodePath is the fundamental system for disambiguating instances, and also provides a higher-level int...
Definition: nodePath.h:165