PathDisplay::PathDisplay() { style_property_ = new EnumProperty( "Line Style", "Lines", "The rendering operation to use to draw the grid lines.", this, SLOT( updateStyle() )); style_property_->addOption( "Lines", LINES ); style_property_->addOption( "Billboards", BILLBOARDS ); line_width_property_ = new FloatProperty( "Line Width", 0.03, "The width, in meters, of each path line." "Only works with the 'Billboards' style.", this, SLOT( updateLineWidth() ), this ); line_width_property_->setMin( 0.001 ); line_width_property_->hide(); color_property_ = new ColorProperty( "Color", QColor( 25, 255, 0 ), "Color to draw the path.", this ); alpha_property_ = new FloatProperty( "Alpha", 1.0, "Amount of transparency to apply to the path.", this ); buffer_length_property_ = new IntProperty( "Buffer Length", 1, "Number of paths to display.", this, SLOT( updateBufferLength() )); buffer_length_property_->setMin( 1 ); offset_property_ = new VectorProperty( "Offset", Ogre::Vector3::ZERO, "Allows you to offset the path from the origin of the reference frame. In meters.", this, SLOT( updateOffset() )); }
PathDisplay::PathDisplay() { color_property_ = new ColorProperty( "Color", QColor( 25, 255, 0 ), "Color to draw the path.", this ); alpha_property_ = new FloatProperty( "Alpha", 1.0, "Amount of transparency to apply to the path.", this ); buffer_length_property_ = new IntProperty( "Buffer Length", 1, "Number of paths to display.", this, SLOT( updateBufferLength() )); buffer_length_property_->setMin( 1 ); }
void PathDisplay::updateStyle() { LineStyle style = (LineStyle) style_property_->getOptionInt(); switch( style ) { case LINES: default: line_width_property_->hide(); break; case BILLBOARDS: line_width_property_->show(); break; } updateBufferLength(); }
void PathDisplay::reset() { MFDClass::reset(); updateBufferLength(); }
void PathDisplay::onInitialize() { MFDClass::onInitialize(); updateBufferLength(); }