30 #include <OgreCamera.h> 31 #include <OgreSceneManager.h> 32 #include <OgreSceneNode.h> 47 : target_scene_node_(
NULL )
50 "TF frame whose motion this view will follow.",
this,
NULL,
true );
97 Ogre::Vector3 new_reference_position;
98 Ogre::Quaternion new_reference_orientation;
101 new_reference_position, new_reference_orientation );
107 return got_transform;
136 if( target_frame.isValid() )
virtual void onTargetFrameChanged(const Ogre::Vector3 &old_reference_position, const Ogre::Quaternion &old_reference_orientation)
Override to implement the change in properties which nullifies the change in target frame...
virtual void mimic(ViewController *source_view)
Configure the settings of this view controller to give, as much as possible, a similar view as that g...
FramePositionTrackingViewController()
void changed()
Emitted by setValue() just after the value has changed.
virtual bool setValue(const QVariant &new_value)
Override from Property to resolve the frame name on the way in.
TfFrameProperty * target_frame_property_
virtual Property * subProp(const QString &sub_name)
Return the first child Property with the given name, or the FailureProperty if no child has the name...
Ogre::Vector3 reference_position_
virtual void update(float dt, float ros_dt)
Called at 30Hz by ViewManager::update() while this view is active. Override with code that needs to r...
std::string getFrameStd() const
Ogre::Quaternion reference_orientation_
virtual FrameManager * getFrameManager() const =0
Return the FrameManager instance.
virtual ~FramePositionTrackingViewController()
virtual Ogre::SceneManager * getSceneManager() const =0
Returns the Ogre::SceneManager used for the main RenderPanel.
virtual void queueRender()=0
Queues a render. Multiple calls before a render happens will only cause a single render.
static const QString FIXED_FRAME_STRING
virtual void updateTargetFrame()
Called when Target Frame property changes while view is active. Purpose is to change values in the vi...
bool getTransform(const Header &header, Ogre::Vector3 &position, Ogre::Quaternion &orientation)
Return the pose for a header, relative to the fixed frame, in Ogre classes.
virtual QVariant getValue() const
Return the value of this Property as a QVariant. If the value has never been set, an invalid QVariant...
void setFrameManager(FrameManager *frame_manager)
virtual void onInitialize()
Do subclass-specific initialization. Called by ViewController::initialize after context_, target_scene_node_, and camera_ are set. This version calls updateTargetSceneNode().
Ogre::SceneNode * target_scene_node_
virtual void updateTargetSceneNode()
Update the position of the target_scene_node_ from the TF frame specified in the Target Frame propert...
DisplayContext * context_
virtual void onActivate()
called by activate().