SpectraDefaultRenderer::SpectraDefaultRenderer( SpectraApp& app, const std::shared_ptr<SpectraSharedObjects>& sh_obj, const std::shared_ptr<SpectraVisualisation>& doc_vis, wxGLCanvas* canvas ): SpectraRenderer(app, sh_obj, doc_vis, canvas) , doc_vis_prog(Common().BuildProgram("default_doc_vis.prog")) , doc_vis_projection_matrix(doc_vis_prog, "ProjectionMatrix") , doc_vis_camera_matrix(doc_vis_prog, "CameraMatrix") , doc_vis_stretch_matrix(doc_vis_prog, "StretchMatrix") , doc_vis_transf_matrix(doc_vis_prog, "TransfMatrix") , doc_vis_spectrum_tex(doc_vis_prog, "SpectrumTex") , doc_vis_spectrum_size(doc_vis_prog, "SpectrumSize") , doc_vis_samples_per_unit(doc_vis_prog, "SamplesPerUnit") , doc_vis_selected_time(doc_vis_prog, "SelectedTime") , doc_vis_selection_begin(doc_vis_prog, "SelectionBegin") , doc_vis_selection_end(doc_vis_prog, "SelectionEnd") , spectrum_plane_wrap( Common().SpectrumPlane( GLuint(DocVis().GridSamples()), GLuint(DocVis().SignalSpectrumSize()) ) ), spectrum_plane_vao(spectrum_plane_wrap.VAOForProgram(doc_vis_prog)) , vis_cue_prog(Common().BuildProgram("default_vis_cue.prog")) , vis_cue_projection_matrix(vis_cue_prog, "ProjectionMatrix") , vis_cue_camera_matrix(vis_cue_prog, "CameraMatrix") , vis_cue_stretch_matrix(vis_cue_prog, "StretchMatrix") , vis_cue_transf_matrix(vis_cue_prog, "TransfMatrix") , vis_cue_color(vis_cue_prog, "Color") , vis_cue_alpha(vis_cue_prog, "Alpha") , ground_grid_vao(Common().GroundUnitGrid().VAOForProgram(vis_cue_prog)) , wall_grid_vao(Common().WallUnitGrid().VAOForProgram(vis_cue_prog)) { CacheBgColor(); }
void SpectraDefaultRenderer::RenderVisualCues(SpectraDocumentView& view) { oglplus::Context gl; gl.Enable(oglplus::Capability::LineSmooth); gl.Enable(oglplus::Capability::Blend); gl.BlendFunc( oglplus::BlendFn::SrcAlpha, oglplus::BlendFn::OneMinusSrcAlpha ); vis_cue_prog.Use(); vis_cue_projection_matrix.TrySet(view.ProjectionMatrix()); vis_cue_camera_matrix.TrySet(view.CameraMatrix()); vis_cue_stretch_matrix.TrySet(view.StretchMatrix()); vis_cue_transf_matrix.TrySet(view.TransfMatrix()); vis_cue_color.TrySet(oglplus::Vec3f(color_r, color_g, color_b)); vis_cue_alpha.TrySet(0.5f); gl.DepthMask(false); ground_grid_vao.Bind(); Common().GroundUnitGrid().Draw(view.SegmentCount()); wall_grid_vao.Bind(); Common().WallUnitGrid().Draw(view.SegmentCount()); gl.DepthMask(true); gl.Disable(oglplus::Capability::Blend); gl.Disable(oglplus::Capability::LineSmooth); }
void Statistics::reset() { url = ""; audio = Common(); video = Common(); audio_only = AudioOnly(); video_only = VideoOnly(); }
void Statistics::reset() { url = QString(); audio = Common(); video = Common(); audio_only = AudioOnly(); video_only = VideoOnly(); metadata.clear(); }
void CSkinManager::RefreshAllSkins(bool bReload) { Combo()->Refresh(); MainFrame()->Refresh(); FavorBar()->Refresh(); MenuBar()->Refresh(); Tab()->Refresh(); Category()->Refresh(); Toolbar()->Refresh(); HelpButton()->Refresh(); LoadButton()->Refresh(); LoginButton()->Refresh(); SepButton()->Refresh(); SettingButton()->Refresh(); BigButton()->Refresh(); SSLLockButton()->Refresh(); StatusBar()->Refresh(); Tooltip()->Refresh(); MenuButton()->Refresh(); LogoButton()->Refresh(); Common()->Refresh(bReload); BackButton()->Refresh(); ForwardButton()->Refresh(); RefreshButton()->Refresh(); CoolMenuSkin()->Refresh(); }
HeeksObj* CShape::CommonShapes(std::list<HeeksObj*> &list_in) { // find common solid ( intersect ) with the first one in the list all the others HeeksObj* s1 = NULL; bool s1_set = false; std::list<HeeksObj*> list = list_in; for(std::list<HeeksObj*>::const_iterator It = list.begin(); It != list.end(); It++){ HeeksObj* object = *It; if(object->GetType() == SolidType || object->GetType() == FaceType) { if(!s1_set) { s1 = object; s1_set = true; } else{ s1 = Common(s1, object); } } } wxGetApp().Repaint(); return s1; }
CString Common(CStringArray& aszX)//Giao cua cac tap hop { CString tempS=aszX[0]; for(int i=1; i<aszX.GetSize(); i++) tempS = Common(tempS,aszX[i]); return tempS; }
Common Common::Factory::create(){ JArguments arguments; jobject localRef = newObject(Common::staticGetJavaJniClass(), arguments); Common result = Common(localRef); JNIEnv* env = attach(); deleteLocalRef(env, localRef); return result; }
//Ham tim co so toi thieu roi nhau //Vao: aszX //Ra : aszY void Minimum(CStringArray& aszX, CStringArray& aszY ) { aszY.RemoveAll(); CStringArray aszTemp; int i; aszTemp.Append(aszX); while(aszTemp.GetSize()) { CString tempS1,tempS2,S1,S2,S3; tempS1 = aszTemp[0]; aszTemp.RemoveAt(0); for(i=0; i<aszTemp.GetSize(); i++) { S1 = Common(tempS1,aszTemp[i]); if(!S1.IsEmpty()) break; } if(i==aszTemp.GetSize())//Neu X,Y khong co thuoc tinh chung { if(!tempS1.IsEmpty()) aszY.Add(tempS1); } else { tempS2 = aszTemp[i]; aszTemp.RemoveAt(i); if(!S1.IsEmpty()) aszTemp.Add(S1); S2 = Sub(tempS1,tempS2); if((!S2.IsEmpty())&&(S2 != S1)) aszTemp.Add(S2); S3 = Sub(tempS2,tempS1); if((!S3.IsEmpty())&&(S3 != S1)&&(S3 != S2)) aszTemp.Add(S3); } } }
static inline Common Accept(T value) { return Common(value); }
CString Common(CStringArray& aszX, CString szY)//Giao cua cac tap hop { CString tempS; tempS = Common(Common(aszX),szY); return tempS; }
void Extra() { Common(); std::cout << "Extra" << "\n"; ExtraExtra(); }
void OutGetCurrTimeDate(void) { Common(GetCurrTimeDate(), sizeof(time)); }