Skip to content

Commit

Permalink
Merge branch 'revert-9d1a97ed' into 'master'
Browse files Browse the repository at this point in the history
Revert "Merge branch '11-feature_osg_shadow_qml_wrapper1' into 'master'"

See merge request energid/osgqtquick!11
  • Loading branch information
Justin Keesling committed May 2, 2018
2 parents 9d1a97e + f76d9df commit 5ee57b0
Show file tree
Hide file tree
Showing 23 changed files with 10 additions and 1,314 deletions.
1 change: 0 additions & 1 deletion src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ find_package(OpenSceneGraph 3.0 REQUIRED
osgManipulator
osgUtil
osgViewer
osgShadow
osgText)

# osgQt
Expand Down
2 changes: 0 additions & 2 deletions src/imports/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ add_subdirectory(osgga)
add_subdirectory(osgmanipulator)
add_subdirectory(osgtext)
add_subdirectory(osgviewer)
add_subdirectory(osgshadow)


if(osgQtQuick_WITH_OSGQT)
add_subdirectory(osgqt)
Expand Down
2 changes: 0 additions & 2 deletions src/imports/osgshadow/CMakeLists.txt

This file was deleted.

19 changes: 0 additions & 19 deletions src/imports/osgshadow/plugin.cpp

This file was deleted.

28 changes: 2 additions & 26 deletions src/qml/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -82,11 +82,6 @@ META_Node(osgManipulator CompositeDragger)
META_Node(osgManipulator TabPlaneDragger)
META_Node(osgManipulator TabBoxDragger)

META_Node(osgShadow ShadowedScene)
META_Node(osgShadow ShadowTechnique)
META_Node(osgShadow ShadowMap)


META_Node(osgText Style)
META_Node(osgText Font)
META_Node(osgText FontImplementation)
Expand Down Expand Up @@ -115,7 +110,8 @@ set(_hdrs
osg/lightsourceindex.hpp
osg/lightmodelindex.hpp
osg/stateattributeindex.hpp
osg/osgqtconversion.hpp
osg/osgqtconversion.hpp

osgdb/loader.hpp
osgdb/loaderindex.hpp
osgga/cameramanipulator.hpp
Expand Down Expand Up @@ -152,14 +148,6 @@ list(APPEND _srcs
osgga/module.cpp
# osgManipulator
osgmanipulator/module.cpp
#osgShadow
osgshadow/shadowedscene.cpp
osgshadow/shadowedsceneindex.cpp
osgshadow/shadowtechnique.cpp
osgshadow/shadowtechniqueindex.cpp
osgshadow/shadowmap.cpp
osgshadow/shadowmapindex.cpp
osgshadow/module.cpp
# osgText
osgtext/module.cpp
# osgViewer
Expand Down Expand Up @@ -206,7 +194,6 @@ target_link_libraries(osgQtQml
${OSGMANIPULATOR_LIBRARIES}
${OSGTEXT_LIBRARIES}
${OSGVIEWER_LIBRARIES}
${OSGSHADOW_LIBRARIES}
${OSGEARTHUTIL_LIBRARY}
Qt5::Gui
Qt5::Qml)
Expand Down Expand Up @@ -300,17 +287,6 @@ install(FILES "${CMAKE_CURRENT_LIST_DIR}/osgmanipulator/module.hpp"
install(FILES "${CMAKE_CURRENT_LIST_DIR}/osgmanipulator/module.hpp"
DESTINATION "include/osgManipulator" RENAME "ModuleQtQml" COMPONENT ${PROJECT_NAME}-src)

file(GENERATE OUTPUT "${CMAKE_BINARY_DIR}/include/osgShadow/ModuleQtQml"
CONTENT "#include \"${CMAKE_CURRENT_LIST_DIR}/osgShadow/module.hpp\"\n")
install(FILES "${CMAKE_CURRENT_LIST_DIR}/osgShadow/module.hpp"
DESTINATION "include/osgShadow" RENAME "ModuleQtQml")
install(FILES "${CMAKE_CURRENT_LIST_DIR}/osgShadow/module.hpp"
DESTINATION "include/osgShadow" RENAME "ModuleQtQml" COMPONENT ${PROJECT_NAME}-hdr)
install(FILES "${CMAKE_CURRENT_LIST_DIR}/osgShadow/module.hpp"
DESTINATION "include/osgShadow" RENAME "ModuleQtQml" COMPONENT ${PROJECT_NAME}-lib)
install(FILES "${CMAKE_CURRENT_LIST_DIR}/osgShadow/module.hpp"
DESTINATION "include/osgShadow" RENAME "ModuleQtQml" COMPONENT ${PROJECT_NAME}-src)


file(GENERATE OUTPUT "${CMAKE_BINARY_DIR}/include/osgText/ModuleQtQml"
CONTENT "#include \"${CMAKE_CURRENT_LIST_DIR}/osgtext/module.hpp\"\n")
Expand Down
19 changes: 3 additions & 16 deletions src/qml/osg/lightsource.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,7 @@ void LightSourceQtQml::classBegin
o(this)->setLocalStateSetModes(m_LocalStateSetModes);
}

//------------------------------------------------------------------------------
osg::LightSource* LightSourceQtQml::lightSource
(
)
{
return o(this);
}


//------------------------------------------------------------------------------
const QVariant LightSourceQtQml::light
Expand Down Expand Up @@ -91,7 +85,7 @@ void LightSourceQtQml::setLight
}

//------------------------------------------------------------------------------
const int LightSourceQtQml::localStateSetModes
const quint16 LightSourceQtQml::localStateSetModes
(
)const
{
Expand All @@ -101,7 +95,7 @@ const int LightSourceQtQml::localStateSetModes
//------------------------------------------------------------------------------
void LightSourceQtQml::setLocalStateSetModes
(
const int mode
const quint16 mode
)
{
if(m_LocalStateSetModes == mode)
Expand All @@ -115,11 +109,4 @@ void LightSourceQtQml::setLocalStateSetModes

}


//------------------------------------------------------------------------------
void LightSourceQtQml:: setStateSetModes(StateSetQtQml* stateSet, int mode)
{
o(this)->setStateSetModes(*stateSet->stateSet(), mode);
}

}
17 changes: 5 additions & 12 deletions src/qml/osg/lightsource.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
namespace osg {

class LightQtQml;
class LightSource;

///
/// \brief The LightSourceQtQml class wraps the osg::LightSource item/class provided by the
Expand All @@ -43,7 +42,7 @@ class OSGQTQML_EXPORT LightSourceQtQml :
/// \property localStateSetModes for the Light Source.
///
/// \details
Q_PROPERTY(int localStateSetModes READ localStateSetModes WRITE setLocalStateSetModes NOTIFY localStateSetModesChanged)
Q_PROPERTY(quint16 localStateSetModes READ localStateSetModes WRITE setLocalStateSetModes NOTIFY localStateSetModesChanged)


public:
Expand Down Expand Up @@ -73,10 +72,6 @@ class OSGQTQML_EXPORT LightSourceQtQml :
QObject *parent = 0
);

osg::LightSource* lightSource
(
);

///
/// \brief light Getter for light property
/// \return value
Expand All @@ -89,13 +84,11 @@ class OSGQTQML_EXPORT LightSourceQtQml :
/// \brief localStateSetModes Getter for localStateSetModes property
/// \return value
///
const int localStateSetModes
const quint16 localStateSetModes
(
) const;


Q_INVOKABLE void setStateSetModes(StateSetQtQml* stateSet, int mode);


public Q_SLOTS:
///
Expand All @@ -113,7 +106,7 @@ public Q_SLOTS:
///
void setLocalStateSetModes
(
const int mode
const quint16 mode
);


Expand All @@ -133,14 +126,14 @@ public Q_SLOTS:
///
void localStateSetModesChanged
(
const int mode
const quint16 mode
);


protected:

osg::LightQtQml* m_pLightObject;
int m_LocalStateSetModes;
quint16 m_LocalStateSetModes;

};

Expand Down
11 changes: 0 additions & 11 deletions src/qml/osg/module.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,6 @@
#include "cylinderindex.hpp"
#include "geodeindex.hpp"

#include "light.hpp"
#include "lightsource.hpp"

#include <osg/Group>

#include <osgQtQml/Object>
Expand Down Expand Up @@ -108,14 +105,6 @@ void registerQtQmlTypes(const char *uri)
uri, osgQtQuick_VERSION_MAJOR, osgQtQuick_VERSION_MINOR,
"Cylinder");

qmlRegisterType<LightQtQml>(
uri, osgQtQuick_VERSION_MAJOR, osgQtQuick_VERSION_MINOR,
"Light");

qmlRegisterType<LightSourceQtQml>(
uri, osgQtQuick_VERSION_MAJOR, osgQtQuick_VERSION_MINOR,
"LightSource");

osgQtQml::Index::insertMake(&qtMakeIndex);
osgQtQml::Index::insertMake(&osgMakeIndex);
}
Expand Down
24 changes: 0 additions & 24 deletions src/qml/osg/osgqtconversion.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,8 @@

#include <QtCore/qglobal.h>
#include <osg/Vec4>
#include <osg/Vec2d>
#include <osg/Vec3d>
#include <QtGui/QColor>
#include <QtGui/QVector2D>
#include <QtGui/QVector3D>
#include <QtGui/QVector4D>
//#include <boost/numeric/conversion/cast.hpp>
Expand Down Expand Up @@ -62,19 +60,6 @@ namespace OsgQtConversion
return osg::Vec4(vect[0], vect[1], vect[2], vect[3]);
}

///
/// \brief toOsg Converts a vector of QVector4D to equivalent osg vect3d value
/// \param vector QVector4D value.
/// \return osg::Vec3d value.
///
inline /*OSGQTQML_EXPORT*/ osg::Vec2d toOsg
(
const QVector2D &vect
)
{
return osg::Vec2d(vect[0], vect[1]);
}

///
/// \brief toOsg Converts a vector of QVector3D to equivalent osg vect3d value
/// \param vector QVector3D value.
Expand Down Expand Up @@ -124,15 +109,6 @@ namespace OsgQtConversion
{
return QVector4D(vect.x(), vect.y(), vect.z(), vect.w());
}

/// \brief Returns a QVector4D by value for given osg::Vec4.
inline /*OSGQTQML_EXPORT*/ QVector2D toQt
(
const osg::Vec2d& vect
)
{
return QVector2D(vect.x(), vect.y());
}
}

#endif // OSGQTCONVERSION_H
35 changes: 0 additions & 35 deletions src/qml/osgshadow/module.cpp

This file was deleted.

12 changes: 0 additions & 12 deletions src/qml/osgshadow/module.hpp

This file was deleted.

Loading

0 comments on commit 5ee57b0

Please sign in to comment.