OpenSceneGraph/examples/osgconv/OrientationConverter.h
Robert Osfield 3b429134cb Added examples directory, a place for all new OSG demo code.
Added osgcameragroup, osgviewer, osgtext, osgconv to the new examples directory.
2003-02-21 14:05:39 +00:00

30 lines
794 B
C++

#ifndef _ORIENTATION_CONVERTER_H
#define _ORIENTATION_CONVERTER_H
#include <osg/Vec3>
#include <osg/Matrix>
#include <osg/Node>
#include <osg/Geode>
class OrientationConverter {
public :
OrientationConverter(void);
void setRotation( const osg::Vec3 &from,
const osg::Vec3 &to );
void setTranslation( const osg::Vec3 &trans);
void setScale( const osg::Vec3 &trans);
/** return the root of the updated subgraph as the subgraph
* the node passed in my flatten during optimization.*/
osg::Node* convert( osg::Node* node );
private :
OrientationConverter( const OrientationConverter& ) {}
OrientationConverter& operator = (const OrientationConverter& ) { return *this; }
osg::Matrix R, T, S;
bool _trans_set;
};
#endif