本文整理汇总了C++中boost::optional::x方法的典型用法代码示例。如果您正苦于以下问题:C++ optional::x方法的具体用法?C++ optional::x怎么用?C++ optional::x使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类boost::optional
的用法示例。
在下文中一共展示了optional::x方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: from_ptree
Viewer::Viewer( const QColor4ub& background_color
, double fov
, bool z_up
, bool orthographic
, boost::optional< comma::csv::options > camera_csv, boost::optional< Eigen::Vector3d > cameraposition
, boost::optional< Eigen::Vector3d > cameraorientation
, boost::property_tree::ptree* camera_config
, boost::optional< Eigen::Vector3d > scene_center
, boost::optional< double > scene_radius
, bool output_camera_position )
: qt3d::view( background_color
, fov
, z_up
, orthographic
, scene_center ? boost::optional< QVector3D >( QVector3D( scene_center->x()
, scene_center->y()
, scene_center->z() ) )
: boost::optional< QVector3D >()
, scene_radius )
, m_lookAt( false )
, m_cameraposition( cameraposition )
, m_cameraorientation( cameraorientation )
{
if( output_camera_position ) { camera_position_output_.reset( new camera_position_output( *this ) ); }
QTimer* timer = new QTimer( this );
timer->start( 40 );
connect( timer, SIGNAL( timeout() ), this, SLOT( read() ) );
if( camera_csv ) { m_cameraReader.reset( new CameraReader( *camera_csv ) ); }
if( camera_config )
{
comma::from_ptree from_ptree( *camera_config, true );
comma::visiting::apply( from_ptree ).to( *camera() );
//boost::property_tree::ptree p;
//comma::to_ptree to_ptree( p );
//comma::visiting::apply( to_ptree ).to( *camera() );
//std::cerr << "view-points: camera set to:" << std::endl;
//boost::property_tree::write_json( std::cerr, p );
}
m_cameraFixed = m_cameraposition || m_cameraReader || camera_config;
}