KiCad PCB EDA Suite
Loading...
Searching...
No Matches
nl_3d_viewer_plugin_impl.cpp
Go to the documentation of this file.
1/*
2 * This program source code file is part of KiCad, a free EDA CAD application.
3 *
4 * Copyright (C) 2024 3Dconnexion
5 * Copyright The KiCad Developers, see AUTHORS.txt for contributors.
6 *
7 * This program is free software: you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License as published by the
9 * Free Software Foundation, either version 3 of the License, or (at your
10 * option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful, but
13 * WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program. If not, see <https://www.gnu.org/licenses/>.
19 */
20
22
23// 3d-viewer
26
27// KiCad includes
28#include <navlib_safe_init.h>
29#include <tool/action_manager.h>
30#include <tool/tool_manager.h>
31#include <tool/tools_holder.h>
32
33// stdlib
34#include <map>
35#include <string>
36#include <vector>
37
38#include <wx/mstream.h>
39
47const wxChar* NL_3D_VIEWER_PLUGIN_IMPL::m_logTrace = wxT( "KI_TRACE_NL_3D_VIEWER_PLUGIN" );
48
49
58template <glm::length_t L, glm::length_t C, class T, glm::qualifier Q>
59bool equals( glm::mat<L, C, T, Q> const& aFirst, glm::mat<L, C, T, Q> const& aSecond,
60 T aEpsilon = static_cast<T>( FLT_EPSILON * 10 ) )
61{
62 T const* first = glm::value_ptr( aFirst );
63 T const* second = glm::value_ptr( aSecond );
64
65 for( glm::length_t j = 0; j < L * C; ++j )
66 {
67 if( !equals( first[j], second[j], aEpsilon ) )
68 {
69 return false;
70 }
71 }
72
73 return true;
74}
75
76
78 const std::string& aProfileHint ) :
79 NAV_3D( false, false ),
80 m_canvas( aCanvas ),
81 m_capIsMoving( false ),
82 m_newWidth( 0.0 )
83{
84 m_camera = dynamic_cast<TRACK_BALL*>( m_canvas->GetCamera() );
85
86 PutProfileHint( aProfileHint );
87}
88
89
91{
92 if( IsEnabled() )
93 EnableNavigation( false );
94}
95
96
98{
99 wxLogTrace( m_logTrace, wxT( "NL_3D_VIEWER_PLUGIN_IMPL::SetFocus %d" ), aFocus );
100 NAV_3D::Write( navlib::focus_k, aFocus );
101}
102
103
108
109
111{
112 SafeNavlibInit( [this]()
113 {
114 EnableNavigation( true );
115 PutFrameTimingSource( TimingSource::SpaceMouse );
117 } );
118}
119
120
121CATEGORY_STORE::iterator add_category( std::string aCategoryPath, CATEGORY_STORE& aCategoryStore )
122{
123 using TDx::SpaceMouse::CCategory;
124
125 CATEGORY_STORE::iterator parent_iter = aCategoryStore.begin();
126 std::string::size_type pos = aCategoryPath.find_last_of( '.' );
127
128 if( pos != std::string::npos )
129 {
130 std::string parentPath = aCategoryPath.substr( 0, pos );
131 parent_iter = aCategoryStore.find( parentPath );
132
133 if( parent_iter == aCategoryStore.end() )
134 {
135 parent_iter = add_category( parentPath, aCategoryStore );
136 }
137 }
138
139 std::string name = aCategoryPath.substr( pos + 1 );
140 std::unique_ptr<CCategory> categoryNode =
141 std::make_unique<CCategory>( aCategoryPath.c_str(), name.c_str() );
142
143 CATEGORY_STORE::iterator iter = aCategoryStore.insert(
144 aCategoryStore.end(), CATEGORY_STORE::value_type( aCategoryPath, categoryNode.get() ) );
145
146 parent_iter->second->push_back( std::move( categoryNode ) );
147 return iter;
148}
149
150
152{
153 wxLogTrace( m_logTrace, wxT( "NL_3D_VIEWER_PLUGIN_IMPL::exportCommandsAndImages" ) );
154
155 std::list<TOOL_ACTION*> actions = ACTION_MANAGER::GetActionList();
156
157 if( actions.size() == 0 )
158 {
159 return;
160 }
161
162 using TDx::SpaceMouse::CCommand;
163 using TDx::SpaceMouse::CCommandSet;
164
165 // The root action set node
166 CCommandSet commandSet( "EDA_3D_CANVAS", "3D Viewer" );
167
168 // Activate the command set
169 NAV_3D::PutActiveCommands( commandSet.GetId() );
170
171 // temporary store for the categories
172 CATEGORY_STORE categoryStore;
173
174 std::vector<TDx::CImage> vImages;
175
176 // add the action set to the category_store
177 categoryStore.insert( categoryStore.end(), CATEGORY_STORE::value_type( ".", &commandSet ) );
178
179 std::list<TOOL_ACTION*>::const_iterator it;
180
181 for( it = actions.begin(); it != actions.end(); ++it )
182 {
183 const TOOL_ACTION* action = *it;
184 std::string label = action->GetMenuLabel().ToStdString();
185
186 if( label.empty() )
187 {
188 continue;
189 }
190
191 std::string name = action->GetName();
192
193 // Do no export commands for the Pcbnew app.
194 if( name.rfind( "pcbnew.", 0 ) == 0 )
195 {
196 continue;
197 }
198
199 std::string strCategory = action->GetToolName();
200 CATEGORY_STORE::iterator iter = categoryStore.find( strCategory );
201
202 if( iter == categoryStore.end() )
203 {
204 iter = add_category( std::move( strCategory ), categoryStore );
205 }
206
207 std::string description = action->GetDescription().ToStdString();
208
209 // Arbitrary 8-bit data stream
210 wxMemoryOutputStream imageStream;
211
212 if( action->GetIcon() != BITMAPS::INVALID_BITMAP )
213 {
214 wxImage image = KiBitmap( action->GetIcon() ).ConvertToImage();
215 image.SaveFile( imageStream, wxBitmapType::wxBITMAP_TYPE_PNG );
216 image.Destroy();
217
218 if( imageStream.GetSize() )
219 {
220 wxStreamBuffer* streamBuffer = imageStream.GetOutputStreamBuffer();
221 TDx::CImage tdxImage = TDx::CImage::FromData( "", 0, name.c_str() );
222 tdxImage.AssignImage( std::string( reinterpret_cast<const char*>(
223 streamBuffer->GetBufferStart() ),
224 streamBuffer->GetBufferSize() ),
225 0 );
226
227 wxLogTrace( m_logTrace, wxT( "Adding image for : %s" ), name );
228 vImages.push_back( std::move( tdxImage ) );
229 }
230 }
231
232 wxLogTrace( m_logTrace, wxT( "Inserting command: %s, description: %s, in category: %s" ),
233 name, description, iter->first );
234
235 iter->second->push_back(
236 CCommand( std::move( name ), std::move( label ), std::move( description ) ) );
237 }
238
239 NAV_3D::AddCommandSet( commandSet );
240 NAV_3D::AddImages( vImages );
241}
242
243
244long NL_3D_VIEWER_PLUGIN_IMPL::GetCameraMatrix( navlib::matrix_t& matrix ) const
245{
246 // cache the camera matrix so that we can tell if the view has been moved and
247 // calculate a delta transform if required.
248 m_cameraMatrix = m_camera->GetViewMatrix();
249
250 std::copy_n( glm::value_ptr( glm::inverse( m_cameraMatrix ) ), 16, matrix.m );
251
252 return 0;
253}
254
255
256long NL_3D_VIEWER_PLUGIN_IMPL::GetPointerPosition( navlib::point_t& position ) const
257{
258 SFVEC3F origin, direction;
259 m_camera->MakeRayAtCurrentMousePosition( origin, direction );
260
261 position = { origin.x, origin.y, origin.z };
262
263 return 0;
264}
265
266
267long NL_3D_VIEWER_PLUGIN_IMPL::GetViewExtents( navlib::box_t& extents ) const
268{
269 if( m_camera->GetProjection() == PROJECTION_TYPE::PERSPECTIVE )
270 {
271 return navlib::make_result_code( navlib::navlib_errc::invalid_operation );
272 }
273
274 const CAMERA_FRUSTUM& f = m_camera->GetFrustum();
275
276 double half_width = f.fw / 2.;
277 double half_height = f.fh / 2.;
278 extents = { -half_width, -half_height, f.nearD, half_width, half_height, f.farD };
279
280 return 0;
281}
282
283
284long NL_3D_VIEWER_PLUGIN_IMPL::GetViewFOV( double& aFov ) const
285{
286 const CAMERA_FRUSTUM& f = m_camera->GetFrustum();
287
288 aFov = glm::radians( f.angle );
289 return 0;
290}
291
292
293long NL_3D_VIEWER_PLUGIN_IMPL::GetViewFrustum( navlib::frustum_t& aFrustum ) const
294{
295 if( m_camera->GetProjection() != PROJECTION_TYPE::PERSPECTIVE )
296 {
297 return navlib::make_result_code( navlib::navlib_errc::invalid_operation );
298 }
299
300 const CAMERA_FRUSTUM& f = m_camera->GetFrustum();
301 double half_width = f.nw / 2.;
302 double half_height = f.nh / 2.;
303 aFrustum = { -half_width, half_width, -half_height, half_height, f.nearD, f.farD };
304
305 return 0;
306}
307
308
309long NL_3D_VIEWER_PLUGIN_IMPL::GetIsViewPerspective( navlib::bool_t& perspective ) const
310{
311 perspective = m_camera->GetProjection() == PROJECTION_TYPE::PERSPECTIVE ? 1 : 0;
312
313 return 0;
314}
315
316
317long NL_3D_VIEWER_PLUGIN_IMPL::SetCameraMatrix( const navlib::matrix_t& aCameraMatrix )
318{
319 long result = 0;
320
321 glm::mat4 cam, viewMatrix;
322 std::copy_n( aCameraMatrix.m, 16, glm::value_ptr( cam ) );
323 viewMatrix = glm::inverse( cam );
324
325 glm::mat4 camera = m_camera->GetViewMatrix();
326
327 // The navlib does not move the camera in its z-axis in an orthographic projection
328 // as this does not change the viewed object size. However ...
329
330 if( m_camera->GetProjection() == PROJECTION_TYPE::ORTHO )
331 {
332 // ... the CAMERA class couples zoom and distance to the object: we need to
333 // ensure that The CAMERA's z position relative to the lookat_pos is not changed
334 // in an orthographic projection.
335 glm::vec4 lookat( m_camera->GetLookAtPos(), 1.0f );
336 glm::vec4 lookat_new = viewMatrix * lookat;
337 glm::vec4 lookat_old = camera * lookat;
338
339 viewMatrix[3].z += lookat_old.z - lookat_new.z;
340 }
341
342 if( !equals( camera, m_cameraMatrix ) )
343 {
344 // Some other input device has moved the camera. Apply only the intended delta
345 // transform ...
346 m_camera->SetViewMatrix( viewMatrix * glm::inverse( m_cameraMatrix ) * camera );
347 m_camera->Update();
348
349 // .., cache the intended camera matrix so that we can calculate the delta
350 // transform when needed ...
351 m_cameraMatrix = viewMatrix;
352
353 // ... and let the 3DMouse controller know, that something is amiss.
354 return navlib::make_result_code( navlib::navlib_errc::error );
355 }
356
357 m_camera->SetViewMatrix( viewMatrix );
358 m_camera->Update();
359
360 // cache the view matrix so that we know when it has changed.
361 m_cameraMatrix = m_camera->GetViewMatrix();
362
363 // The camera has a constraint on the z position so we need to check that ...
364
365 if( !equals( m_cameraMatrix[3].z, viewMatrix[3].z ) )
366 {
367 // ... and let the 3DMouse controller know, when something is amiss.
368 return navlib::make_result_code( navlib::navlib_errc::error );
369 }
370
371 return 0;
372}
373
374
375long NL_3D_VIEWER_PLUGIN_IMPL::SetViewExtents( const navlib::box_t& extents )
376{
377 const CAMERA_FRUSTUM& f = m_camera->GetFrustum();
378
379 float factor = f.nw / ( extents.max_x - extents.min_x );
380 float zoom = m_camera->GetZoom() / factor;
381
382 m_camera->Zoom( factor );
383
384 // The camera auto positions the camera to match the zoom values. We need to
385 // update our cached camera matrix to match the new z value
386 m_cameraMatrix[3].z = m_camera->GetViewMatrix()[3].z;
387
388 // The camera has a constraint on the zoom factor so we need to check that ...
389 if( zoom != m_camera->GetZoom() )
390 {
391 // ... and let the 3DMouse controller know, when something is amiss.
392 return navlib::make_result_code( navlib::navlib_errc::error );
393 }
394
395 return 0;
396}
397
398
400{
401 return navlib::make_result_code( navlib::navlib_errc::function_not_supported );
402}
403
404
405long NL_3D_VIEWER_PLUGIN_IMPL::SetViewFrustum( const navlib::frustum_t& frustum )
406{
407 return navlib::make_result_code( navlib::navlib_errc::permission_denied );
408}
409
410
411long NL_3D_VIEWER_PLUGIN_IMPL::GetModelExtents( navlib::box_t& extents ) const
412{
413 SFVEC3F min = m_canvas->GetBoardAdapter().GetBBox().Min();
414 SFVEC3F max = m_canvas->GetBoardAdapter().GetBBox().Max();
415
416 extents = { min.x, min.y, min.z, max.x, max.y, max.z };
417
418 return 0;
419}
420
421
422long NL_3D_VIEWER_PLUGIN_IMPL::GetSelectionExtents( navlib::box_t& extents ) const
423{
424 return navlib::make_result_code( navlib::navlib_errc::no_data_available );
425}
426
427
428long NL_3D_VIEWER_PLUGIN_IMPL::GetSelectionTransform( navlib::matrix_t& transform ) const
429{
430 return navlib::make_result_code( navlib::navlib_errc::no_data_available );
431}
432
433
435{
436 empty = true;
437
438 return 0;
439}
440
441
442long NL_3D_VIEWER_PLUGIN_IMPL::SetSelectionTransform( const navlib::matrix_t& matrix )
443{
444 return navlib::make_result_code( navlib::navlib_errc::invalid_operation );
445}
446
447
448long NL_3D_VIEWER_PLUGIN_IMPL::GetPivotPosition( navlib::point_t& position ) const
449{
450 SFVEC3F lap = m_camera->GetLookAtPos();
451
452 position = { lap.x, lap.y, lap.z };
453
454 return 0;
455}
456
457
458long NL_3D_VIEWER_PLUGIN_IMPL::IsUserPivot( navlib::bool_t& userPivot ) const
459{
460 userPivot = false;
461
462 return 0;
463}
464
465
466long NL_3D_VIEWER_PLUGIN_IMPL::SetPivotPosition( const navlib::point_t& position )
467{
468 SFVEC3F pivotPos = SFVEC3F( position.x, position.y, position.z );
469
470 // Set the 3dmouse pivot position.
471 m_canvas->Set3dmousePivotPos( pivotPos );
472
473 // Set the camera lookat pos.
474 m_camera->SetLookAtPos_T1( pivotPos );
475
476 m_canvas->Request_refresh();
477
478 return 0;
479}
480
481
482long NL_3D_VIEWER_PLUGIN_IMPL::GetPivotVisible( navlib::bool_t& visible ) const
483{
484 visible = m_canvas->GetRender3dmousePivot();
485
486 return 0;
487}
488
489
491{
492 m_canvas->SetRender3dmousePivot( visible );
493
494 m_canvas->Request_refresh();
495
496 return 0;
497}
498
499
500long NL_3D_VIEWER_PLUGIN_IMPL::GetHitLookAt( navlib::point_t& position ) const
501{
502 RAY mouseRay;
503 mouseRay.Init( m_rayOrigin, m_rayDirection );
504
505 float hit;
506 glm::vec3 vec;
507
508 // Test it with the board bounding box
509
510 if( m_canvas->GetBoardAdapter().GetBBox().Intersect( mouseRay, &hit ) )
511 {
512 vec = mouseRay.at( hit );
513 position = { vec.x, vec.y, vec.z };
514 return 0;
515 }
516
517 return navlib::make_result_code( navlib::navlib_errc::no_data_available );
518}
519
520
522{
523 return navlib::make_result_code( navlib::navlib_errc::function_not_supported );
524}
525
526
527long NL_3D_VIEWER_PLUGIN_IMPL::SetHitDirection( const navlib::vector_t& direction )
528{
529 m_rayDirection = { direction.x, direction.y, direction.z };
530
531 return 0;
532}
533
534
535long NL_3D_VIEWER_PLUGIN_IMPL::SetHitLookFrom( const navlib::point_t& eye )
536{
537 m_rayOrigin = { eye.x, eye.y, eye.z };
538
539 return 0;
540}
541
542
544{
545 return navlib::make_result_code( navlib::navlib_errc::function_not_supported );
546}
547
548
550{
551 if( commandId.empty() )
552 return 0;
553
554 std::list<TOOL_ACTION*> actions = ACTION_MANAGER::GetActionList();
555 TOOL_ACTION* context = nullptr;
556
557 for( std::list<TOOL_ACTION*>::const_iterator it = actions.begin(); it != actions.end(); it++ )
558 {
559 TOOL_ACTION* action = *it;
560 std::string nm = action->GetName();
561
562 if( commandId == nm )
563 context = action;
564 }
565
566 if( context != nullptr )
567 {
568 wxWindow* parent = m_canvas->GetParent();
569
570 // Only allow command execution if the window is enabled. i.e. there is not a modal dialog
571 // currently active.
572 if( parent && parent->IsEnabled() )
573 {
574 TOOLS_HOLDER* tools_holder = dynamic_cast<TOOLS_HOLDER*>( parent );
575 TOOL_MANAGER* tool_manager = tools_holder ? tools_holder->GetToolManager() : nullptr;
576
577 if( !tool_manager )
578 return navlib::make_result_code( navlib::navlib_errc::invalid_operation );
579
580 // Get the selection to use to test if the action is enabled
581 SELECTION& sel = tool_manager->GetToolHolder()->GetCurrentSelection();
582
583 bool runAction = true;
584
585 if( const ACTION_CONDITIONS* aCond = tool_manager->GetActionManager()->GetCondition( *context ) )
586 runAction = aCond->enableCondition( sel );
587
588 if( runAction )
589 {
590 tool_manager->RunAction( *context );
591 m_canvas->Request_refresh();
592 }
593 }
594 else
595 {
596 return navlib::make_result_code( navlib::navlib_errc::invalid_operation );
597 }
598 }
599
600 return 0;
601}
602
603
605{
606 return 0;
607}
608
609
611{
612 m_capIsMoving = value;
613
614 return 0;
615}
616
617
619{
620 if( value != 0L )
621 {
622 }
623 else
624 {
625 m_canvas->Request_refresh( true );
626 wxLogTrace( m_logTrace, wxT( "End of transaction" ) );
627 }
628
629 return 0;
630}
631
632
633long NL_3D_VIEWER_PLUGIN_IMPL::SetCameraTarget( const navlib::point_t& position )
634{
635 return navlib::make_result_code( navlib::navlib_errc::function_not_supported );
636}
637
638
639long NL_3D_VIEWER_PLUGIN_IMPL::GetFrontView( navlib::matrix_t& matrix ) const
640{
641 matrix = { 1, 0, 0, 0, 0, 0, 1, 0, 0, -1, 0, 0, 0, 0, 0, 1 };
642 return 0;
643}
644
645
646long NL_3D_VIEWER_PLUGIN_IMPL::GetCoordinateSystem( navlib::matrix_t& matrix ) const
647{
648 // Use the right-handed coordinate system X-right, Z-up, Y-in (row vectors)
649 matrix = { 1, 0, 0, 0, 0, 0, -1, 0, 0, 1, 0, 0, 0, 0, 0, 1 };
650 return 0;
651}
652
653
654long NL_3D_VIEWER_PLUGIN_IMPL::GetIsViewRotatable( navlib::bool_t& isRotatable ) const
655{
656 isRotatable = true;
657 return 0;
658}
const char * name
wxBitmap KiBitmap(BITMAPS aBitmap, int aHeightTag)
Construct a wxBitmap from an image identifier Returns the image from the active theme if the image ha...
Definition bitmap.cpp:100
@ INVALID_BITMAP
const ACTION_CONDITIONS * GetCondition(const TOOL_ACTION &aAction) const
Get the conditions to use for a specific tool action.
static std::list< TOOL_ACTION * > & GetActionList()
Return list of TOOL_ACTIONs.
Implement a canvas based on a wxGLCanvas.
long GetViewExtents(navlib::box_t &aExtents) const override
long GetCameraMatrix(navlib::matrix_t &aMatrix) const override
void Connect()
Connect plugin implementation to the driver.
long SetHitLookFrom(const navlib::point_t &aPosition) override
long SetActiveCommand(std::string aCommandId) override
EDA_3D_CANVAS * GetCanvas() const
Get the m_canvas pointer.
long GetPivotPosition(navlib::point_t &aPosition) const override
long GetModelExtents(navlib::box_t &aExtents) const override
long GetPointerPosition(navlib::point_t &aPosition) const override
long SetPivotVisible(bool aVisible) override
long SetTransaction(long aValue) override
long SetViewFOV(double aFov) override
long SetMotionFlag(bool aValue) override
long SetCameraMatrix(const navlib::matrix_t &aMatrix) override
long GetHitLookAt(navlib::point_t &aPosition) const override
long SetHitAperture(double aAperture) override
long SetPivotPosition(const navlib::point_t &aPosition) override
long SetHitDirection(const navlib::vector_t &aDirection) override
long GetSelectionTransform(navlib::matrix_t &aTransform) const override
long SetSelectionTransform(const navlib::matrix_t &aMatrix) override
long SetSettingsChanged(long aChangeNumber) override
long SetHitSelectionOnly(bool aSelectionOnly) override
long GetIsSelectionEmpty(navlib::bool_t &aEmpty) const override
long GetSelectionExtents(navlib::box_t &aExtents) const override
long GetCoordinateSystem(navlib::matrix_t &aMatrix) const override
long IsUserPivot(navlib::bool_t &aUserPivot) const override
long GetViewFOV(double &aFov) const override
long GetPivotVisible(navlib::bool_t &aVisible) const override
long GetFrontView(navlib::matrix_t &aMatrix) const override
NL_3D_VIEWER_PLUGIN_IMPL(EDA_3D_CANVAS *aCanvas, const std::string &aProfileHint)
Initializes a new instance of the NL_3DVIEWER_PLUGIN.
long GetViewFrustum(navlib::frustum_t &aFrustum) const override
long GetIsViewPerspective(navlib::bool_t &aPerspective) const override
long SetViewFrustum(const navlib::frustum_t &aFrustum) override
long SetViewExtents(const navlib::box_t &aExtents) override
virtual void exportCommandsAndImages()
Export the invocable actions and images to the 3Dconnexion UI.
void SetFocus(bool aFocus=true)
Set the connection to the 3Dconnexion driver to the focus state so that 3DMouse data is routed here.
long GetIsViewRotatable(navlib::bool_t &isRotatable) const override
long SetCameraTarget(const navlib::point_t &aPosition) override
TOOL_MANAGER * GetToolManager() const
Return the MVC controller.
virtual SELECTION & GetCurrentSelection()
Get the current selection from the canvas area.
Represent a single user action.
wxString GetMenuLabel() const
Return the translated label for the action.
BITMAPS GetIcon() const
Return an icon associated with the action.
std::string GetToolName() const
Return name of the tool associated with the action.
const std::string & GetName() const
Return name of the action.
wxString GetDescription() const
Master controller class:
bool RunAction(const std::string &aActionName, T aParam)
Run the specified action immediately, pausing the current action to run the new one.
TOOLS_HOLDER * GetToolHolder() const
ACTION_MANAGER * GetActionManager() const
static bool empty(const wxTextEntryBase *aCtrl)
static const wxChar * m_logTrace
Trace mask used to enable or disable the trace output of this class.
bool SafeNavlibInit(const std::function< void()> &aInitFunc)
Attempt to run the given function, recovering from both C++ exceptions and abort() calls triggered by...
Safe initialization wrapper for the 3Dconnexion navlib SDK.
bool equals(glm::mat< L, C, T, Q > const &aFirst, glm::mat< L, C, T, Q > const &aSecond, T aEpsilon=static_cast< T >(FLT_EPSILON *10))
Template to compare two glm::mat<T> values for equality within a required epsilon.
CATEGORY_STORE::iterator add_category(std::string aCategoryPath, CATEGORY_STORE &aCategoryStore)
Add a category to the store.
Declaration of the NL_3D_VIEWER_PLUGIN_IMPL class.
std::map< std::string, TDx::CCommandTreeNode * > CATEGORY_STORE
CATEGORY_STORE::iterator add_category(std::string aCategoryPath, CATEGORY_STORE &aCategoryStore)
Add a category to the store.
TDx::SpaceMouse::Navigation3D::CNavigation3D NAV_3D
Functors that can be used to figure out how the action controls should be displayed in the UI and if ...
Frustum is a implementation based on a tutorial by http://www.lighthouse3d.com/tutorials/view-frustum...
Definition camera.h:46
float angle
Definition camera.h:57
float farD
Definition camera.h:57
float nearD
Definition camera.h:57
Definition ray.h:59
void Init(const SFVEC3F &o, const SFVEC3F &d)
Definition ray.cpp:31
SFVEC3F at(float t) const
Definition ray.h:80
wxString result
Test unit parsing edge cases and error handling.
Declaration for a track ball camera.
glm::vec3 SFVEC3F
Definition xv3d_types.h:40