*/
#include "selection.h"
+#include "globaldefs.h"
#include "debugging/debugging.h"
}
-#if defined( _DEBUG )
+#if GDEF_DEBUG
class test_quat
{
public:
class Rotatable
{
public:
+virtual ~Rotatable() = default;
virtual void rotate( const Quaternion& rotation ) = 0;
};
class Translatable
{
public:
+virtual ~Translatable() = default;
virtual void translate( const Vector3& translation ) = 0;
};
class Scalable
{
public:
+virtual ~Scalable() = default;
virtual void scale( const Vector3& scaling ) = 0;
};
}
};
-#if defined( _DEBUG )
+#if GDEF_DEBUG
#define DEBUG_SELECTION
#endif
bool contains( const Plane3& plane ) const {
return PlaneSet_contains( m_selectedPlanes, plane );
}
-typedef MemberCaller1<SelectedPlaneSet, const Plane3&, &SelectedPlaneSet::insert> InsertCaller;
+typedef MemberCaller<SelectedPlaneSet, void(const Plane3&), &SelectedPlaneSet::insert> InsertCaller;
};
class SelectionCounter
{
public:
-typedef const Selectable& first_argument_type;
+using func = void(const Selectable &);
SelectionCounter( const SelectionChangeCallback& onchanged )
: m_count( 0 ), m_onchanged( onchanged ){
m_pivotChanged = true;
SceneChangeNotify();
}
-typedef ConstMemberCaller<RadiantSelectionSystem, &RadiantSelectionSystem::pivotChanged> PivotChangedCaller;
+typedef ConstMemberCaller<RadiantSelectionSystem, void(), &RadiantSelectionSystem::pivotChanged> PivotChangedCaller;
void pivotChangedSelection( const Selectable& selectable ){
pivotChanged();
}
-typedef MemberCaller1<RadiantSelectionSystem, const Selectable&, &RadiantSelectionSystem::pivotChangedSelection> PivotChangedSelectionCaller;
+typedef MemberCaller<RadiantSelectionSystem, void(const Selectable&), &RadiantSelectionSystem::pivotChangedSelection> PivotChangedSelectionCaller;
void SetMode( EMode mode ){
if ( m_mode != mode ) {
SelectionChangeCallback getObserver( EMode mode ){
if ( mode == ePrimitive ) {
- return makeCallback1( m_count_primitive );
+ return makeCallback( m_count_primitive );
}
else
{
- return makeCallback1( m_count_component );
+ return makeCallback( m_count_component );
}
}
std::size_t countSelected() const {
void selectionChanged( const Selectable& selectable ){
m_selectionChanged_callbacks( selectable );
}
-typedef MemberCaller1<RadiantSelectionSystem, const Selectable&, &RadiantSelectionSystem::selectionChanged> SelectionChangedCaller;
+typedef MemberCaller<RadiantSelectionSystem, void(const Selectable&), &RadiantSelectionSystem::selectionChanged> SelectionChangedCaller;
void startMove(){
g_RadiantSelectionSystem = new RadiantSelectionSystem;
- SelectionSystem_boundsChanged = GlobalSceneGraph().addBoundsChangedCallback( FreeCaller<SelectionSystem_OnBoundsChanged>() );
+ SelectionSystem_boundsChanged = GlobalSceneGraph().addBoundsChangedCallback( FreeCaller<void(), SelectionSystem_OnBoundsChanged>() );
GlobalShaderCache().attachRenderable( getSelectionSystem() );
}
return WindowVector( window_constrained( window.x(), x, width ), window_constrained( window.y(), y, height ) );
}
-typedef Callback1<DeviceVector> MouseEventCallback;
+typedef Callback<void(DeviceVector)> MouseEventCallback;
Single<MouseEventCallback> g_mouseMovedCallback;
Single<MouseEventCallback> g_mouseUpCallback;
m_current = device_constrained( position );
draw_area();
}
-typedef MemberCaller1<Selector_, DeviceVector, &Selector_::mouseMoved> MouseMovedCaller;
+typedef MemberCaller<Selector_, void(DeviceVector), &Selector_::mouseMoved> MouseMovedCaller;
void mouseUp( DeviceVector position ){
testSelect( device_constrained( position ) );
g_mouseMovedCallback.clear();
g_mouseUpCallback.clear();
}
-typedef MemberCaller1<Selector_, DeviceVector, &Selector_::mouseUp> MouseUpCaller;
+typedef MemberCaller<Selector_, void(DeviceVector), &Selector_::mouseUp> MouseUpCaller;
};
void mouseMoved( DeviceVector position ){
getSelectionSystem().MoveSelected( *m_view, &position[0] );
}
-typedef MemberCaller1<Manipulator_, DeviceVector, &Manipulator_::mouseMoved> MouseMovedCaller;
+typedef MemberCaller<Manipulator_, void(DeviceVector), &Manipulator_::mouseMoved> MouseMovedCaller;
void mouseUp( DeviceVector position ){
getSelectionSystem().endMove();
g_mouseMovedCallback.clear();
g_mouseUpCallback.clear();
}
-typedef MemberCaller1<Manipulator_, DeviceVector, &Manipulator_::mouseUp> MouseUpCaller;
+typedef MemberCaller<Manipulator_, void(DeviceVector), &Manipulator_::mouseUp> MouseUpCaller;
};
void Scene_copyClosestTexture( SelectionTest& test );