Exemplo n.º 1
0
//---------------------------------------------------------
CPoints_View_Dialog::CPoints_View_Dialog(CSG_PointCloud *pPoints)
	: CSGDI_Dialog(_TL("Point Cloud Viewer"), SGDI_DLG_STYLE_START_MAXIMISED)
{
	SetWindowStyle(wxDEFAULT_FRAME_STYLE|wxNO_FULL_REPAINT_ON_RESIZE);

	//-----------------------------------------------------
	m_Settings.Create(NULL, _TL("Point Cloud Viewer Settings"), _TL(""));

	m_pView		= new CPoints_View_Control	(this, pPoints, m_Settings);
	m_pExtent	= new CPoints_View_Extent	(this, pPoints, m_Settings, wxSize(200, 200));

	//-----------------------------------------------------
	wxArrayString	Attributes;

	for(int i=0; i<pPoints->Get_Field_Count(); i++)
	{
		Attributes.Add(pPoints->Get_Field_Name(i));
	}

	//-----------------------------------------------------
	Add_Button(_TL("Close"), wxID_OK);

	m_pBtn_Prop			= Add_Button	(_TL("Advanced Settings")	, wxID_ANY);

	Add_Spacer();
	m_pField_Z			= Add_Choice	(_TL("Z Attribute")			, Attributes, m_pView->m_zField);
	m_pField_Color		= Add_Choice	(_TL("Color Attribute")		, Attributes, m_pView->m_cField);

	Add_Spacer();
	m_pCheck_Central	= Add_CheckBox	(_TL("Central Projection")	, m_pView->m_bCentral);
	m_pCheck_Stereo		= Add_CheckBox	(_TL("Anaglyph")			, m_pView->m_bStereo);
	m_pCheck_Scale		= Add_CheckBox	(_TL("Scale Point Size")	, m_pView->m_bScale);

	Add_Spacer();
	m_pSlide_xRotate	= Add_Slider	(_TL("X-Rotation")			, m_pView->m_xRotate * M_RAD_TO_DEG, -180.0, 180.0);
	m_pSlide_yRotate	= Add_Slider	(_TL("Y-Rotation")			, m_pView->m_yRotate * M_RAD_TO_DEG, -180.0, 180.0);
	m_pSlide_zRotate	= Add_Slider	(_TL("Z-Rotation")			, m_pView->m_zRotate * M_RAD_TO_DEG, -180.0, 180.0);

	m_pSlide_Central	= Add_Slider	(_TL("Eye Distance")		, m_pView->m_dCentral, 1.0, 2000.0);

	m_pSlide_Detail		= Add_Slider	(_TL("Level of Detail")		, m_pView->m_Detail, 0.0, 1.0);

//	Add_Spacer();
//	m_pParameters		= Add_TextCtrl	(_TL("Function Parameters"), wxTE_MULTILINE|wxTE_READONLY);

	Add_Spacer();
	Add_CustomCtrl(_TL("Extent"), m_pExtent);

	Add_Output(m_pView);
}
Exemplo n.º 2
0
//---------------------------------------------------------
CDLG_Parameters::CDLG_Parameters(CSG_Parameters *pParameters)
	: CDLG_Base(-1, pParameters ? pParameters->Get_Name() : LNG("[CAP] Parameters"))
{
	m_pControl		= new CParameters_Control(this, true);

	m_pParameters	= pParameters;

	g_pACTIVE->Get_Parameters()->Update_Parameters(m_pParameters, true);

	m_pControl->Set_Parameters(m_pParameters);

	Add_Button(ID_BTN_LOAD);
	Add_Button(ID_BTN_SAVE);

	Set_Positions();
}
//---------------------------------------------------------
CDLG_Parameters::CDLG_Parameters(CSG_Parameters *pParameters, const wxString &Caption, const wxString &Info)
	: CDLG_Base(-1, Caption)
{
	if( Caption.IsEmpty() )
	{
		if( pParameters && !pParameters->Get_Name().is_Empty() )
		{
			SetTitle(pParameters->Get_Name().c_str());
		}
		else
		{
			SetTitle(_TL("Parameters"));
		}
	}

	m_pControl		= new CParameters_Control(this, true);

	m_pParameters	= pParameters;

	g_pActive->Get_Parameters()->Update_Parameters(m_pParameters, true);

	m_pControl->Set_Parameters(m_pParameters);

	Add_Button(ID_BTN_LOAD);
	Add_Button(ID_BTN_SAVE);
	Add_Button(ID_BTN_DEFAULTS);

	if( Info.IsEmpty() )
	{
		m_pInfo_Button	= NULL;
		m_pInfo			= NULL;
	}
	else
	{
		Add_Button(0);

		wxString	_Info(Info); _Info.Replace("\n", "<br>");

		m_pInfo_Button	= Add_Button(ID_BTN_DESCRIPTION);
		m_pInfo			= new CActive_Description(this);
		m_pInfo->SetPage(_Info);

		Show_Info(m_bInfo);
	}

	Set_Positions();
}
Exemplo n.º 4
0
//---------------------------------------------------------
bool CSG_3DView_Dialog::Create(CSG_3DView_Panel *pPanel)
{
	m_pPanel		= pPanel;

	m_pCommands		= Add_Button  (_TL("Commands"    ), wxID_ANY);

//	Add_Spacer();
//	m_pBox			= Add_CheckBox(_TL("Bounding Box"), m_pPanel->m_Parameters("DRAW_BOX"  )->asBool());
//	m_pStereo		= Add_CheckBox(_TL("Anaglyph"    ), m_pPanel->m_Parameters("STEREO"    )->asBool());

	Add_Spacer();
	m_pRotate_X		= Add_Slider  (_TL("X-Rotation"  ), m_pPanel->Get_Projector().Get_xRotation() * M_RAD_TO_DEG, -180.0, 180.0);
	m_pRotate_Z		= Add_Slider  (_TL("Z-Rotation"  ), m_pPanel->Get_Projector().Get_zRotation() * M_RAD_TO_DEG, -180.0, 180.0);
	m_pCentral		= Add_Slider  (_TL("Eye Distance"), m_pPanel->Get_Projector().Get_Central_Distance(), 1.0, 2000.0);

	Add_Output(m_pPanel);

	return( true );
}
Exemplo n.º 5
0
void BattleMenu::show()
{
	m_bIsEnabled = true;
	setTouchEnabled(true);
	removeAllChildren();
	m_vBtns.clear();


	m_fHeight = 1;
	m_fWidth =	1;

	int tiFlag = 1;
	for(int i = NUM_BTN; i >= 1; --i){
		if(bitLock&tiFlag){
			Add_Button((CCString::createWithFormat("bmbtn_%d",i))->getCString(),tiFlag);
			m_fHeight += 30;
		}
		tiFlag = tiFlag<<1;
	}

	Refresh_Button();

	CCSprite* sback = CCSprite::create("Images/hud_menu_back.png"); 
	sback->setContentSize(CCSize(105,m_fHeight+5));
	sback->setAnchorPoint(ccp(0,0));
	sback->setPosition(ccp(-26,-25));
	//sback->setOpacity(199);
	addChild(sback,-1);

	CCSprite* nback = CCSprite::create("Images/hud_menu_base.png"); 
	nback->setContentSize(CCSize(105,m_fHeight+5));
	nback->setAnchorPoint(ccp(0,0));
	nback->setPosition(ccp(-26,-25));
	//nback->setOpacity(199);
	addChild(nback,3);

}