Panda3D
 All Classes Functions Variables Enumerations
nodeVertexTransform.h
1 // Filename: nodeVertexTransform.h
2 // Created by: drose (22eb07)
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 NODEVERTEXTRANSFORM_H
16 #define NODEVERTEXTRANSFORM_H
17 
18 #include "pandabase.h"
19 #include "pandaNode.h"
20 #include "vertexTransform.h"
21 
22 class FactoryParams;
23 
24 ////////////////////////////////////////////////////////////////////
25 // Class : NodeVertexTransform
26 // Description : This VertexTransform gets its matrix from the
27 // Transform stored on a node. It can also compose its
28 // node's transform with another VertexTransform,
29 // allowing you to build up a chain of
30 // NodeVertexTransforms that represent a list of
31 // composed matrices.
32 ////////////////////////////////////////////////////////////////////
33 class EXPCL_PANDA_GRUTIL NodeVertexTransform : public VertexTransform {
34 PUBLISHED:
35  NodeVertexTransform(const PandaNode *node,
36  const VertexTransform *prev = NULL);
37 
38  INLINE const PandaNode *get_node() const;
39  INLINE const VertexTransform *get_prev() const;
40 
41  virtual void get_matrix(LMatrix4 &matrix) const;
42 
43  virtual void output(ostream &out) const;
44 
45 private:
46  CPT(PandaNode) _node;
47  CPT(VertexTransform) _prev;
48 
49 public:
50  static TypeHandle get_class_type() {
51  return _type_handle;
52  }
53  static void init_type() {
54  VertexTransform::init_type();
55  register_type(_type_handle, "NodeVertexTransform",
56  VertexTransform::get_class_type());
57  }
58  virtual TypeHandle get_type() const {
59  return get_class_type();
60  }
61  virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
62 
63 private:
64  static TypeHandle _type_handle;
65 
66  friend class RigidBodyCombiner;
67 };
68 
69 #include "nodeVertexTransform.I"
70 
71 #endif
A basic node of the scene graph or data graph.
Definition: pandaNode.h:72
This is a special node that combines multiple independently-moving rigid nodes into one Geom internal...
This is an abstract base class that holds a pointer to some transform, computed in some arbitrary way...
This is a 4-by-4 transform matrix.
Definition: lmatrix.h:451
An instance of this class is passed to the Factory when requesting it to do its business and construc...
Definition: factoryParams.h:40
TypeHandle is the identifier used to differentiate C++ class types.
Definition: typeHandle.h:85
This VertexTransform gets its matrix from the Transform stored on a node.