9 #ifndef GEPETTO_VIEWER_TRANSFORM_WRITER_VISITOR_HH 10 #define GEPETTO_VIEWER_TRANSFORM_WRITER_VISITOR_HH 31 : filename_ (filename)
38 virtual void writeTransform (
const char* objName,
41 std::ofstream&
out () {
return file_; }
44 file_.open (filename_.c_str(),
45 std::ofstream::out | std::ofstream::app);
46 if (!file_.is_open ())
47 throw std::ios_base::failure (
"Unable to open file " + filename_);
54 virtual void writeNewFrame () = 0;
101 void captureFrame (
Node& node);
103 template <
typename Iterator>
104 void captureFrame (Iterator begin, Iterator end);
106 virtual void apply (
Node& node);
112 template <
typename Iterator>
115 writer_->openFile ();
116 writer_->newFrame ();
117 for (Iterator it = begin; it != end; ++it) apply (**it);
118 writer_->closeFile ();
::osg::Vec3f osgVector3
Definition: config-osg.h:109
::osg::Quat osgQuat
Definition: config-osg.h:112
Definition: node-visitor.h:35
Definition: action-search-bar.hh:27
#define DEF_CLASS_SMART_PTR(className)
Definition: macros.h:50
Definition: config-osg.h:52
Abstract base class of 3D objects in a scene.
Definition: node.h:27