35 #include <GLviewer/ContextWX.hh>
36 #include <Base/Common/BIASpragmaStart.hh>
38 #include <Base/Common/BIASpragmaEnd.hh>
40 #include <GLviewer/Scenes/SceneThreeDOutWrapper.hh>
41 #include <GLviewer/ThreeDOutOpenSceneGraph.hh>
43 #include <Base/Image/Image.hh>
44 #include <Base/Image/ImageIO.hh>
46 #include <GLviewer/GLProjectionParametersPerspective.hh>
47 #include <GLviewer/Controller/TrackballControl.hh>
58 class CSimpleWxFrame :
public wxFrame
75 CSimpleWxFrame::CSimpleWxFrame()
76 : wxFrame((wxFrame *)NULL, -1, wxT(
"Wx"), wxPoint(0, 0), wxSize(800, 600))
88 tdo_->SetParamsPointSize(100);
89 tdo_->AddPoint(p3d_1,
RGBAuc(255, 0, 0, 128));
90 tdo_->AddPoint(p3d_2,
RGBAuc(0, 255, 0, 128));
91 tdo_->AddPoint(p3d_3,
RGBAuc(0, 0, 255, 128));
92 tdo_->AddPoint(p3d_4,
RGBAuc(255, 255, 0, 128));
95 tdo_->AddLine(p3d_1, p3d_2,
RGBAuc(255, 0, 0, 128));
96 tdo_->AddLine(p3d_2, p3d_3,
RGBAuc(255, 0, 0, 128));
97 tdo_->AddLine(p3d_3, p3d_4,
RGBAuc(255, 0, 0, 128));
98 tdo_->AddLine(p3d_4, p3d_1,
RGBAuc(255, 0, 0, 128));
103 sceneWrapper_.LinkWithThreeDOut(tdo_);
114 proj_->SetSimplePerspectiveCam(60.0,
121 proj_->SubtractFromBackgroundImage(
false);
122 proj_->SetZClippingPlanes(0.1,50000);
125 context_ =
new ContextWX(
this, -1, wxDefaultPosition, wxSize(800,600));
126 context_->SetGLProjectionParametersInterface(proj_);
128 context_->SetClearColor(clearColor);
129 context_->SetControl(control_);
130 context_->SetAutoClipping(
false);
133 wxBoxSizer* mainSizer =
new wxBoxSizer(wxVERTICAL);
134 mainSizer->Add(context_, 1, wxEXPAND|wxALL|wxALIGN_CENTRE, 0);
135 mainSizer->Fit(
this);
142 context_->AppendScene(&sceneWrapper_);
145 context_->InitializationComplete();
152 class CSimpleWxApp :
public wxApp
158 bool CSimpleWxApp::OnInit()
160 wxInitAllImageHandlers();
161 CSimpleWxFrame* mainFrame =
new CSimpleWxFrame();
166 IMPLEMENT_APP(CSimpleWxApp)
rescale internal projection parameters preserving aspect ratio and scale by integer values only...
Context implementation for wxWidgets.
BIAS::Vector4< unsigned char > RGBAuc
a class for exporting ThreeDOut objects to OSG scene graphs
Wrapping ThreeDOut OpenGL-functionality.
class for camera movement in trackball mode.
class for rendering with projection parameters of ProjectionParametersPerspective ...