ShmupHUD::ShmupHUD() : Cistron::Component("HUD"), health_(0), health_bar_background_(NULL), health_bar_(NULL), button_pause_(NULL), button_debug_(NULL) { setTouchEnabled(true); setAccelerometerEnabled(true); SetupViewer(); }
SkirmishHUD::SkirmishHUD() : Cistron::Component("HUD") , label_stage_background_(NULL) , stage_(0) , label_stage_(NULL) , button_pause_(NULL) , button_debug_(NULL) , title_("") { setTouchEnabled(true); setAccelerometerEnabled(true); SetupViewer(); }
PauseGameLayer::PauseGameLayer() { setTouchEnabled(true); setAccelerometerEnabled(true); SetupViewer(); scheduleUpdate(); // Swallow all input below cocos2d::CCDirector::sharedDirector()->getTouchDispatcher()->addTargetedDelegate( this, kLayerPriority, true); }
BattleHUD::BattleHUD() : Cistron::Component("HUD"), health_(0), combo_(0), total_kills_background_(NULL), total_kills_(0), label_combo_(NULL), label_total_kills_(NULL), health_bar_background_(NULL), health_bar_(NULL), button_pause_(NULL), button_debug_(NULL) { setTouchEnabled(true); setAccelerometerEnabled(true); SetupViewer(); }
NS_IMETHODIMP SVGDocumentWrapper::OnStartRequest(nsIRequest* aRequest, nsISupports* ctxt) { nsresult rv = SetupViewer(aRequest, getter_AddRefs(mViewer), getter_AddRefs(mLoadGroup)); if (NS_SUCCEEDED(rv) && NS_SUCCEEDED(mListener->OnStartRequest(aRequest, nullptr))) { mViewer->GetDocument()->SetIsBeingUsedAsImage(); StopAnimation(); // otherwise animations start automatically in helper doc rv = mViewer->Init(nullptr, nsIntRect(0, 0, 0, 0)); if (NS_SUCCEEDED(rv)) { rv = mViewer->Open(nullptr, nullptr); } } return rv; }
int main(int argc, char** argv) { if (argc < 2) { PCL_ERROR("Usage: %s gt.pcd\n", argv[0]); exit(1); } pcl::PointCloud<pcl::PointXYZ>::Ptr cloudp (new pcl::PointCloud<pcl::PointXYZ>); if (pcl::io::loadPCDFile<pcl::PointXYZ> (argv[1], *cloudp) == -1) { PCL_ERROR("Failed to load file %s\n", argv[1]); exit(1); } else PCL_WARN("Loaded PCD %s\n", argv[1]); pcl::ModelCoefficients::Ptr coeff (new pcl::ModelCoefficients ()); pcl::PointIndices::Ptr inlier = RansacMethod(cloudp, coeff); // RaycostMethod(cloudp, center); printf("%lf %lf %lf %lf\n", coeff->values[0], coeff->values[1], coeff->values[2], coeff->values[3]); #if 0 // Separate and colorize inliers and outliers pcl::PointCloud<pcl::PointXYZRGB>::Ptr clr_cloud = ColorizeCloud(cloudp, inlier); // Display the final result boost::shared_ptr<pcl::visualization::PCLVisualizer> viewer; viewer = SetupViewer(clr_cloud, coeff); while( !viewer->wasStopped()) { viewer->spinOnce(100); boost::this_thread::sleep (boost::posix_time::microseconds (100000)); } #endif return 0; }