Panda3D
|
00001 // Filename: transform2sg.h 00002 // Created by: drose (12Mar02) 00003 // 00004 //////////////////////////////////////////////////////////////////// 00005 // 00006 // PANDA 3D SOFTWARE 00007 // Copyright (c) Carnegie Mellon University. All rights reserved. 00008 // 00009 // All use of this software is subject to the terms of the revised BSD 00010 // license. You should have received a copy of this license along 00011 // with this source code in a file named "LICENSE." 00012 // 00013 //////////////////////////////////////////////////////////////////// 00014 00015 #ifndef TRANSFORM2SG_H 00016 #define TRANSFORM2SG_H 00017 00018 #include "pandabase.h" 00019 00020 #include "dataNode.h" 00021 #include "pandaNode.h" 00022 00023 //////////////////////////////////////////////////////////////////// 00024 // Class : Transform2SG 00025 // Description : input: Transform (matrix) 00026 // 00027 // output: none, but applies the matrix as the transform 00028 // transition for a given arc of the scene graph. 00029 //////////////////////////////////////////////////////////////////// 00030 class EXPCL_PANDA_TFORM Transform2SG : public DataNode { 00031 PUBLISHED: 00032 Transform2SG(const string &name); 00033 00034 void set_node(PandaNode *node); 00035 PandaNode *get_node() const; 00036 00037 private: 00038 PT(PandaNode) _node; 00039 00040 protected: 00041 // Inherited from DataNode 00042 virtual void do_transmit_data(DataGraphTraverser *trav, 00043 const DataNodeTransmit &input, 00044 DataNodeTransmit &output); 00045 00046 private: 00047 // inputs 00048 int _transform_input; 00049 00050 public: 00051 static TypeHandle get_class_type() { 00052 return _type_handle; 00053 } 00054 static void init_type() { 00055 DataNode::init_type(); 00056 register_type(_type_handle, "Transform2SG", 00057 DataNode::get_class_type()); 00058 } 00059 virtual TypeHandle get_type() const { 00060 return get_class_type(); 00061 } 00062 virtual TypeHandle force_init_type() {init_type(); return get_class_type();} 00063 00064 private: 00065 static TypeHandle _type_handle; 00066 }; 00067 00068 #endif 00069