Commit b73365c2 authored by Jan Möbius's avatar Jan Möbius

Merge branch 'VS2017-Qt5141_Switch' into 'master'

Vs2017 qt5141 switch

See merge request !176
parents becfd709 97211ff0
......@@ -9,7 +9,7 @@ OpenFlipper.
\section reqlibs Required libraries
<ul>
<li> 5.9 <= Qt <= 5.13 ( http://www.qt.io/download/ ) Use the OpenGL version. If you install Qt, please make sure that QtScript is also installed.</li>
<li> 5.11 <= Qt <= 5.13 ( http://www.qt.io/download/ ) Use the OpenGL version. If you install Qt, please make sure that QtScript is also installed.</li>
</ul>
\section optlibs Optional libraries ( Without these libraries some functionality might not be available)
......
......@@ -39,7 +39,6 @@
* *
\*===========================================================================*/
#include "TypesInternal.hh"
#include "UpdateType.hh"
#include <QCoreApplication>
......@@ -62,13 +61,14 @@ static std::map< UpdateType , size_t > updateTypeToTypeInfo;
*/
static UpdateType firstFreeID_(UPDATE_UNUSED);
UpdateType::UpdateType()
:type_(0)
{
}
UpdateType::UpdateType(const UpdateTypeSet& _set)
: type_(_set)
{
......@@ -76,13 +76,13 @@ UpdateType::UpdateType(const UpdateTypeSet& _set)
}
bool UpdateType::operator==(const UpdateType& _type) const {
return ((type_ & _type.type_).any());
return ( (type_ & _type.type_) != 0);
};
UpdateType
UpdateType::operator|(const UpdateType& _type) const
{
return (type_ | _type.type_);
return UpdateType(type_|_type.type_);
}
......@@ -107,11 +107,19 @@ bool UpdateType::contains( const UpdateType& _type ) const {
return true;
}
return ((type_ & _type.type_).any());
return ( (type_ & _type.type_) != 0 );
}
UpdateType& UpdateType::operator++() {
if ( type_.count() != 1 ) {
UpdateTypeSet check = type_; // count the number of bits set in type_
unsigned int count; // c accumulates the total bits set in v
for (count = 0; check; count++)
{
check &= check - 1; // clear the least significant bit set
}
if ( count != 1 ) {
std::cerr << "Operator ++ for UpdateType which is not atomic!!" << std::endl;
}
......@@ -121,7 +129,7 @@ UpdateType& UpdateType::operator++() {
}
bool UpdateType::operator<( const UpdateType& _i ) const {
return (type_.to_ulong() < _i.type_.to_ulong());
return (type_ < _i.type_);
}
class UpdateTypeInfo {
......
......@@ -42,10 +42,9 @@
#pragma once
#include <OpenFlipper/common/GlobalDefines.hh>
#include <bitset>
#include <QString>
typedef std::bitset<64> UpdateTypeSet;
typedef uint64_t UpdateTypeSet;
/** \brief Update type class
*
......@@ -63,7 +62,7 @@ class DLLEXPORT UpdateType {
UpdateType(const UpdateType& _type) = default;
UpdateType(const UpdateTypeSet& _set);
explicit UpdateType(const UpdateTypeSet& _set);
/// Exact compare operator
bool operator==(const UpdateType& _type) const;
......@@ -79,12 +78,12 @@ class DLLEXPORT UpdateType {
/// Check if this update contains the given UpdateType
bool contains( const UpdateType& _type ) const;
friend std::ostream &operator<< (
std::ostream &os, const UpdateType &type) {
return os << type.type_;
}
// friend std::ostream &operator<< (
// std::ostream &os, const UpdateType &type) {
// return os << type.type_;
// }
protected:
private:
UpdateTypeSet type_;
};
......@@ -101,7 +100,7 @@ const UpdateType UPDATE_NONE( UpdateTypeSet(0) );
const UpdateType UPDATE_ALL( UpdateTypeSet(1) );
/// This is the update identifier for global Object visibility ( show/hide )
const UpdateType UPDATE_VISIBILITY( UpdateTypeSet(1) << 1 );
const UpdateType UPDATE_VISIBILITY( UpdateTypeSet(2) );
/** \brief Geometry updated
......@@ -109,14 +108,14 @@ const UpdateType UPDATE_VISIBILITY( UpdateTypeSet(1) << 1 );
* Updated Geometry ( This update type has to be used if you only modify vertex positions of
* an object. Everything else has to stay as before the update.
*/
const UpdateType UPDATE_GEOMETRY( UpdateTypeSet(1) << 2 );
const UpdateType UPDATE_GEOMETRY( UpdateTypeSet(4) );
/** \brief Topology updated
*
* Updated Topology ( This update type has to be used if you modify the topology
* of an object. This includes adding vertices or removing them! )
*/
const UpdateType UPDATE_TOPOLOGY( UpdateTypeSet(1) << 3 );
const UpdateType UPDATE_TOPOLOGY( UpdateTypeSet(8) );
/** \brief Selection updated
......@@ -124,60 +123,60 @@ const UpdateType UPDATE_TOPOLOGY( UpdateTypeSet(1) << 3 );
* Updated Selection ( This update type has to be used if you modify the internal
* selection of an object. Like selecting a single vertex or a set of faces. ).
*/
const UpdateType UPDATE_SELECTION( UpdateTypeSet(1) << 4 );
const UpdateType UPDATE_SELECTION( UpdateTypeSet(16) );
/** \brief Vertex selection has changed
*
* This is a more fine grained selection update. UPDATE_SELECTION will also match this update type.
*/
const UpdateType UPDATE_SELECTION_VERTICES( UpdateTypeSet(1) << 5 );
const UpdateType UPDATE_SELECTION_VERTICES( UpdateTypeSet(32) );
/** \brief Edge selection has changed
*
* This is a more fine grained selection update. UPDATE_SELECTION will also match this update type.
*/
const UpdateType UPDATE_SELECTION_EDGES( UpdateTypeSet(1) << 6 );
const UpdateType UPDATE_SELECTION_EDGES( UpdateTypeSet(64) );
/** \brief Halfedge selection has changed
*
* This is a more fine grained selection update. UPDATE_SELECTION will also match this update type.
*/
const UpdateType UPDATE_SELECTION_HALFEDGES( UpdateTypeSet(1) << 7 );
const UpdateType UPDATE_SELECTION_HALFEDGES( UpdateTypeSet(128) );
/** \brief Face selection has changed
*
* This is a more fine grained selection update. UPDATE_SELECTION will also match this update type.
*/
const UpdateType UPDATE_SELECTION_FACES( UpdateTypeSet(1) << 8 );
const UpdateType UPDATE_SELECTION_FACES( UpdateTypeSet(256) );
/** \brief Knot selection has changed
*
* This is a more fine grained selection update. UPDATE_SELECTION will also match this update type.
*/
const UpdateType UPDATE_SELECTION_KNOTS( UpdateTypeSet(1) << 9 );
const UpdateType UPDATE_SELECTION_KNOTS( UpdateTypeSet(512) );
/** \brief Colors have changed
*
* Update the colors. This does not have to be called when topology is also updated
*/
const UpdateType UPDATE_COLOR( UpdateTypeSet(1) << 10 );
const UpdateType UPDATE_COLOR( UpdateTypeSet(1024) );
/** \brief Textures have changed
*
* Update the Textures.
*/
const UpdateType UPDATE_TEXTURE( UpdateTypeSet(1) << 11 );
const UpdateType UPDATE_TEXTURE( UpdateTypeSet(2048) );
/** \brief State has changed
*
* The object's state (target, source) has changed
*/
const UpdateType UPDATE_STATE( UpdateTypeSet(1) << 12 );
const UpdateType UPDATE_STATE( UpdateTypeSet(4096) );
/// marks the last used ID
const UpdateType UPDATE_UNUSED ( UpdateTypeSet(1) << 13 );
const UpdateType UPDATE_UNUSED ( UpdateTypeSet(8192) );
/**@}*/
......
......@@ -39,9 +39,11 @@
* *
\*===========================================================================*/
#ifdef _MSC_VER
#if (_MSC_VER <= 1916)
#define QT_NO_FLOAT16_OPERATORS
#endif
#endif
#include <OpenFlipper/ACGHelper/DrawModeConverter.hh>
#include <OpenFlipper/INIFile/INIFile.hh>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment