mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-30 03:32:36 +00:00
Merge remote-tracking branch 'cc9cii/fix-hide-overload-warn'
This commit is contained in:
commit
cf077dcf5d
@ -33,7 +33,7 @@ namespace ESM
|
|||||||
|
|
||||||
namespace Files
|
namespace Files
|
||||||
{
|
{
|
||||||
class ConfigurationManager;
|
struct ConfigurationManager;
|
||||||
}
|
}
|
||||||
|
|
||||||
namespace CSMWorld
|
namespace CSMWorld
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
|
|
||||||
namespace Files
|
namespace Files
|
||||||
{
|
{
|
||||||
class ConfigurationManager;
|
struct ConfigurationManager;
|
||||||
}
|
}
|
||||||
|
|
||||||
namespace CSMDoc
|
namespace CSMDoc
|
||||||
|
@ -90,7 +90,7 @@ void CSMDoc::WriteHeaderStage::perform (int stage, Messages& messages)
|
|||||||
|
|
||||||
CSMDoc::WriteDialogueCollectionStage::WriteDialogueCollectionStage (Document& document,
|
CSMDoc::WriteDialogueCollectionStage::WriteDialogueCollectionStage (Document& document,
|
||||||
SavingState& state, bool journal)
|
SavingState& state, bool journal)
|
||||||
: mDocument (document), mState (state),
|
: mState (state),
|
||||||
mTopics (journal ? document.getData().getJournals() : document.getData().getTopics()),
|
mTopics (journal ? document.getData().getJournals() : document.getData().getTopics()),
|
||||||
mInfos (journal ? document.getData().getJournalInfos() : document.getData().getTopicInfos())
|
mInfos (journal ? document.getData().getJournalInfos() : document.getData().getTopicInfos())
|
||||||
{}
|
{}
|
||||||
|
@ -126,7 +126,6 @@ namespace CSMDoc
|
|||||||
|
|
||||||
class WriteDialogueCollectionStage : public Stage
|
class WriteDialogueCollectionStage : public Stage
|
||||||
{
|
{
|
||||||
Document& mDocument;
|
|
||||||
SavingState& mState;
|
SavingState& mState;
|
||||||
const CSMWorld::IdCollection<ESM::Dialogue>& mTopics;
|
const CSMWorld::IdCollection<ESM::Dialogue>& mTopics;
|
||||||
CSMWorld::InfoCollection& mInfos;
|
CSMWorld::InfoCollection& mInfos;
|
||||||
|
@ -20,7 +20,7 @@ namespace CSMWorld
|
|||||||
{
|
{
|
||||||
class IdTable;
|
class IdTable;
|
||||||
class IdTable;
|
class IdTable;
|
||||||
class RecordBase;
|
struct RecordBase;
|
||||||
|
|
||||||
class ModifyCommand : public QUndoCommand
|
class ModifyCommand : public QUndoCommand
|
||||||
{
|
{
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
namespace CSMWorld
|
namespace CSMWorld
|
||||||
{
|
{
|
||||||
class CollectionBase;
|
class CollectionBase;
|
||||||
class RecordBase;
|
struct RecordBase;
|
||||||
|
|
||||||
class IdTable : public IdTableBase
|
class IdTable : public IdTableBase
|
||||||
{
|
{
|
||||||
|
@ -26,7 +26,7 @@ void CSMWorld::InfoCollection::load (const Info& record, bool base)
|
|||||||
|
|
||||||
if (!record2.get().mPrev.empty())
|
if (!record2.get().mPrev.empty())
|
||||||
{
|
{
|
||||||
index = getIndex (record2.get().mPrev, topic);
|
index = getInfoIndex (record2.get().mPrev, topic);
|
||||||
|
|
||||||
if (index!=-1)
|
if (index!=-1)
|
||||||
++index;
|
++index;
|
||||||
@ -34,7 +34,7 @@ void CSMWorld::InfoCollection::load (const Info& record, bool base)
|
|||||||
|
|
||||||
if (index==-1 && !record2.get().mNext.empty())
|
if (index==-1 && !record2.get().mNext.empty())
|
||||||
{
|
{
|
||||||
index = getIndex (record2.get().mNext, topic);
|
index = getInfoIndex (record2.get().mNext, topic);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (index==-1)
|
if (index==-1)
|
||||||
@ -60,7 +60,7 @@ void CSMWorld::InfoCollection::load (const Info& record, bool base)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int CSMWorld::InfoCollection::getIndex (const std::string& id, const std::string& topic) const
|
int CSMWorld::InfoCollection::getInfoIndex (const std::string& id, const std::string& topic) const
|
||||||
{
|
{
|
||||||
std::string fullId = Misc::StringUtils::lowerCase (topic) + "#" + id;
|
std::string fullId = Misc::StringUtils::lowerCase (topic) + "#" + id;
|
||||||
|
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
namespace ESM
|
namespace ESM
|
||||||
{
|
{
|
||||||
class Dialogue;
|
struct Dialogue;
|
||||||
}
|
}
|
||||||
|
|
||||||
namespace CSMWorld
|
namespace CSMWorld
|
||||||
@ -22,7 +22,7 @@ namespace CSMWorld
|
|||||||
|
|
||||||
void load (const Info& record, bool base);
|
void load (const Info& record, bool base);
|
||||||
|
|
||||||
int getIndex (const std::string& id, const std::string& topic) const;
|
int getInfoIndex (const std::string& id, const std::string& topic) const;
|
||||||
///< Return index for record \a id or -1 (if not present; deleted records are considered)
|
///< Return index for record \a id or -1 (if not present; deleted records are considered)
|
||||||
///
|
///
|
||||||
/// \param id info ID without topic prefix
|
/// \param id info ID without topic prefix
|
||||||
|
@ -5,8 +5,6 @@
|
|||||||
|
|
||||||
namespace CSMWorld
|
namespace CSMWorld
|
||||||
{
|
{
|
||||||
class Cell;
|
|
||||||
|
|
||||||
/// \brief Wrapper for CellRef sub record
|
/// \brief Wrapper for CellRef sub record
|
||||||
struct CellRef : public ESM::CellRef
|
struct CellRef : public ESM::CellRef
|
||||||
{
|
{
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
namespace CSMWorld
|
namespace CSMWorld
|
||||||
{
|
{
|
||||||
struct Cell;
|
struct Cell;
|
||||||
struct UniversalId;
|
class UniversalId;
|
||||||
|
|
||||||
/// \brief References in cells
|
/// \brief References in cells
|
||||||
class RefCollection : public Collection<CellRef>
|
class RefCollection : public Collection<CellRef>
|
||||||
|
@ -9,7 +9,7 @@ namespace CSMWorld
|
|||||||
{
|
{
|
||||||
class RefIdColumn;
|
class RefIdColumn;
|
||||||
class RefIdData;
|
class RefIdData;
|
||||||
class RecordBase;
|
struct RecordBase;
|
||||||
|
|
||||||
class RefIdAdapter
|
class RefIdAdapter
|
||||||
{
|
{
|
||||||
|
@ -17,7 +17,7 @@ namespace Ogre
|
|||||||
namespace CSMWorld
|
namespace CSMWorld
|
||||||
{
|
{
|
||||||
class Data;
|
class Data;
|
||||||
class CellRef;
|
struct CellRef;
|
||||||
}
|
}
|
||||||
|
|
||||||
namespace CSVWorld
|
namespace CSVWorld
|
||||||
|
@ -30,7 +30,7 @@ void CSVTools::ReportTable::contextMenuEvent (QContextMenuEvent *event)
|
|||||||
void CSVTools::ReportTable::mouseMoveEvent (QMouseEvent *event)
|
void CSVTools::ReportTable::mouseMoveEvent (QMouseEvent *event)
|
||||||
{
|
{
|
||||||
if (event->buttons() & Qt::LeftButton)
|
if (event->buttons() & Qt::LeftButton)
|
||||||
startDrag (*this);
|
startDragFromTable (*this);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CSVTools::ReportTable::mouseDoubleClickEvent (QMouseEvent *event)
|
void CSVTools::ReportTable::mouseDoubleClickEvent (QMouseEvent *event)
|
||||||
|
@ -40,8 +40,12 @@ QAbstractItemDelegate(parent),
|
|||||||
mTable(table)
|
mTable(table)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
void CSVWorld::NotEditableSubDelegate::setEditorData (QLabel* editor, const QModelIndex& index) const
|
void CSVWorld::NotEditableSubDelegate::setEditorData (QWidget* editor, const QModelIndex& index) const
|
||||||
{
|
{
|
||||||
|
QLabel* label = qobject_cast<QLabel*>(editor);
|
||||||
|
if(!label)
|
||||||
|
return;
|
||||||
|
|
||||||
QVariant v = index.data(Qt::EditRole);
|
QVariant v = index.data(Qt::EditRole);
|
||||||
if (!v.isValid())
|
if (!v.isValid())
|
||||||
{
|
{
|
||||||
@ -54,16 +58,17 @@ void CSVWorld::NotEditableSubDelegate::setEditorData (QLabel* editor, const QMod
|
|||||||
|
|
||||||
if (QVariant::String == v.type())
|
if (QVariant::String == v.type())
|
||||||
{
|
{
|
||||||
editor->setText(v.toString());
|
label->setText(v.toString());
|
||||||
} else //else we are facing enums
|
}
|
||||||
|
else //else we are facing enums
|
||||||
{
|
{
|
||||||
int data = v.toInt();
|
int data = v.toInt();
|
||||||
std::vector<std::string> enumNames (CSMWorld::Columns::getEnums (static_cast<CSMWorld::Columns::ColumnId> (mTable->getColumnId (index.column()))));
|
std::vector<std::string> enumNames (CSMWorld::Columns::getEnums (static_cast<CSMWorld::Columns::ColumnId> (mTable->getColumnId (index.column()))));
|
||||||
editor->setText(QString::fromUtf8(enumNames.at(data).c_str()));
|
label->setText(QString::fromUtf8(enumNames.at(data).c_str()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void CSVWorld::NotEditableSubDelegate::setModelData (QWidget* editor, QAbstractItemModel* model, const QModelIndex& index, CSMWorld::ColumnBase::Display display) const
|
void CSVWorld::NotEditableSubDelegate::setModelData(QWidget* editor, QAbstractItemModel* model, const QModelIndex& index) const
|
||||||
{
|
{
|
||||||
//not editable widgets will not save model data
|
//not editable widgets will not save model data
|
||||||
}
|
}
|
||||||
@ -80,8 +85,7 @@ QSize CSVWorld::NotEditableSubDelegate::sizeHint (const QStyleOptionViewItem& op
|
|||||||
|
|
||||||
QWidget* CSVWorld::NotEditableSubDelegate::createEditor (QWidget *parent,
|
QWidget* CSVWorld::NotEditableSubDelegate::createEditor (QWidget *parent,
|
||||||
const QStyleOptionViewItem& option,
|
const QStyleOptionViewItem& option,
|
||||||
const QModelIndex& index,
|
const QModelIndex& index) const
|
||||||
CSMWorld::ColumnBase::Display display) const
|
|
||||||
{
|
{
|
||||||
return new QLabel(parent);
|
return new QLabel(parent);
|
||||||
}
|
}
|
||||||
@ -224,6 +228,11 @@ void CSVWorld::DialogueDelegateDispatcher::setEditorData (QWidget* editor, const
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CSVWorld::DialogueDelegateDispatcher::setModelData(QWidget* editor, QAbstractItemModel* model, const QModelIndex& index) const
|
||||||
|
{
|
||||||
|
setModelData(editor, model, index, CSMWorld::ColumnBase::Display_None);
|
||||||
|
}
|
||||||
|
|
||||||
void CSVWorld::DialogueDelegateDispatcher::setModelData(QWidget* editor, QAbstractItemModel* model, const QModelIndex& index, CSMWorld::ColumnBase::Display display) const
|
void CSVWorld::DialogueDelegateDispatcher::setModelData(QWidget* editor, QAbstractItemModel* model, const QModelIndex& index, CSMWorld::ColumnBase::Display display) const
|
||||||
{
|
{
|
||||||
std::map<int, CommandDelegate*>::const_iterator delegateIt(mDelegates.find(display));
|
std::map<int, CommandDelegate*>::const_iterator delegateIt(mDelegates.find(display));
|
||||||
@ -258,7 +267,7 @@ QWidget* CSVWorld::DialogueDelegateDispatcher::makeEditor(CSMWorld::ColumnBase::
|
|||||||
QWidget* editor = NULL;
|
QWidget* editor = NULL;
|
||||||
if (! (mTable->flags (index) & Qt::ItemIsEditable))
|
if (! (mTable->flags (index) & Qt::ItemIsEditable))
|
||||||
{
|
{
|
||||||
return mNotEditableDelegate.createEditor(qobject_cast<QWidget*>(mParent), QStyleOptionViewItem(), index, display);
|
return mNotEditableDelegate.createEditor(qobject_cast<QWidget*>(mParent), QStyleOptionViewItem(), index);
|
||||||
}
|
}
|
||||||
|
|
||||||
std::map<int, CommandDelegate*>::iterator delegateIt(mDelegates.find(display));
|
std::map<int, CommandDelegate*>::iterator delegateIt(mDelegates.find(display));
|
||||||
|
@ -40,9 +40,9 @@ namespace CSVWorld
|
|||||||
public:
|
public:
|
||||||
NotEditableSubDelegate(const CSMWorld::IdTable* table, QObject * parent = 0);
|
NotEditableSubDelegate(const CSMWorld::IdTable* table, QObject * parent = 0);
|
||||||
|
|
||||||
virtual void setEditorData (QLabel* editor, const QModelIndex& index) const;
|
virtual void setEditorData (QWidget* editor, const QModelIndex& index) const;
|
||||||
|
|
||||||
virtual void setModelData (QWidget* editor, QAbstractItemModel* model, const QModelIndex& index, CSMWorld::ColumnBase::Display display) const;
|
virtual void setModelData (QWidget* editor, QAbstractItemModel* model, const QModelIndex& index) const;
|
||||||
|
|
||||||
virtual void paint (QPainter* painter, const QStyleOptionViewItem& option, const QModelIndex& index) const;
|
virtual void paint (QPainter* painter, const QStyleOptionViewItem& option, const QModelIndex& index) const;
|
||||||
///< does nothing
|
///< does nothing
|
||||||
@ -52,8 +52,7 @@ namespace CSVWorld
|
|||||||
|
|
||||||
virtual QWidget *createEditor (QWidget *parent,
|
virtual QWidget *createEditor (QWidget *parent,
|
||||||
const QStyleOptionViewItem& option,
|
const QStyleOptionViewItem& option,
|
||||||
const QModelIndex& index,
|
const QModelIndex& index) const;
|
||||||
CSMWorld::ColumnBase::Display display = CSMWorld::ColumnBase::Display_None) const;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
//this can't be nested into the DialogueDelegateDispatcher, because it needs to emit signals
|
//this can't be nested into the DialogueDelegateDispatcher, because it needs to emit signals
|
||||||
@ -119,6 +118,8 @@ namespace CSVWorld
|
|||||||
|
|
||||||
virtual void setEditorData (QWidget* editor, const QModelIndex& index) const;
|
virtual void setEditorData (QWidget* editor, const QModelIndex& index) const;
|
||||||
|
|
||||||
|
virtual void setModelData (QWidget* editor, QAbstractItemModel* model, const QModelIndex& index) const;
|
||||||
|
|
||||||
virtual void setModelData (QWidget* editor, QAbstractItemModel* model, const QModelIndex& index, CSMWorld::ColumnBase::Display display) const;
|
virtual void setModelData (QWidget* editor, QAbstractItemModel* model, const QModelIndex& index, CSMWorld::ColumnBase::Display display) const;
|
||||||
|
|
||||||
virtual void paint (QPainter* painter, const QStyleOptionViewItem& option, const QModelIndex& index) const;
|
virtual void paint (QPainter* painter, const QStyleOptionViewItem& option, const QModelIndex& index) const;
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
#include "../../model/world/tablemimedata.hpp"
|
#include "../../model/world/tablemimedata.hpp"
|
||||||
#include "dragrecordtable.hpp"
|
#include "dragrecordtable.hpp"
|
||||||
|
|
||||||
void CSVWorld::DragRecordTable::startDrag (const CSVWorld::DragRecordTable& table)
|
void CSVWorld::DragRecordTable::startDragFromTable (const CSVWorld::DragRecordTable& table)
|
||||||
{
|
{
|
||||||
CSMWorld::TableMimeData* mime = new CSMWorld::TableMimeData (table.getDraggedRecords(), mDocument);
|
CSMWorld::TableMimeData* mime = new CSMWorld::TableMimeData (table.getDraggedRecords(), mDocument);
|
||||||
|
|
||||||
|
@ -33,7 +33,7 @@ namespace CSVWorld
|
|||||||
void setEditLock(bool locked);
|
void setEditLock(bool locked);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void startDrag(const DragRecordTable& table);
|
void startDragFromTable(const DragRecordTable& table);
|
||||||
|
|
||||||
void dragEnterEvent(QDragEnterEvent *event);
|
void dragEnterEvent(QDragEnterEvent *event);
|
||||||
|
|
||||||
|
@ -46,7 +46,6 @@ QWidget *CSVWorld::EnumDelegate::createEditor(QWidget *parent,
|
|||||||
const QModelIndex& index) const
|
const QModelIndex& index) const
|
||||||
{
|
{
|
||||||
return createEditor(parent, option, index, CSMWorld::ColumnBase::Display_None);
|
return createEditor(parent, option, index, CSMWorld::ColumnBase::Display_None);
|
||||||
//overloading virtual functions is HARD
|
|
||||||
}
|
}
|
||||||
|
|
||||||
QWidget *CSVWorld::EnumDelegate::createEditor(QWidget *parent, const QStyleOptionViewItem& option,
|
QWidget *CSVWorld::EnumDelegate::createEditor(QWidget *parent, const QStyleOptionViewItem& option,
|
||||||
|
@ -345,7 +345,7 @@ void CSVWorld::RegionMap::viewInTable()
|
|||||||
|
|
||||||
void CSVWorld::RegionMap::mouseMoveEvent (QMouseEvent* event)
|
void CSVWorld::RegionMap::mouseMoveEvent (QMouseEvent* event)
|
||||||
{
|
{
|
||||||
startDrag(*this);
|
startDragFromTable(*this);
|
||||||
}
|
}
|
||||||
|
|
||||||
std::vector< CSMWorld::UniversalId > CSVWorld::RegionMap::getDraggedRecords() const
|
std::vector< CSMWorld::UniversalId > CSVWorld::RegionMap::getDraggedRecords() const
|
||||||
|
@ -635,7 +635,7 @@ void CSVWorld::Table::mouseMoveEvent (QMouseEvent* event)
|
|||||||
{
|
{
|
||||||
if (event->buttons() & Qt::LeftButton)
|
if (event->buttons() & Qt::LeftButton)
|
||||||
{
|
{
|
||||||
startDrag(*this);
|
startDragFromTable(*this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -139,6 +139,12 @@ void CSVWorld::CommandDelegate::setModelData (QWidget *editor, QAbstractItemMode
|
|||||||
///< \todo provide some kind of feedback to the user, indicating that editing is currently not possible.
|
///< \todo provide some kind of feedback to the user, indicating that editing is currently not possible.
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QWidget *CSVWorld::CommandDelegate::createEditor (QWidget *parent, const QStyleOptionViewItem& option,
|
||||||
|
const QModelIndex& index) const
|
||||||
|
{
|
||||||
|
return createEditor (parent, option, index, CSMWorld::ColumnBase::Display_None);
|
||||||
|
}
|
||||||
|
|
||||||
QWidget *CSVWorld::CommandDelegate::createEditor (QWidget *parent, const QStyleOptionViewItem& option,
|
QWidget *CSVWorld::CommandDelegate::createEditor (QWidget *parent, const QStyleOptionViewItem& option,
|
||||||
const QModelIndex& index, CSMWorld::ColumnBase::Display display) const
|
const QModelIndex& index, CSMWorld::ColumnBase::Display display) const
|
||||||
{
|
{
|
||||||
@ -230,6 +236,11 @@ bool CSVWorld::CommandDelegate::isEditLocked() const
|
|||||||
return mEditLock;
|
return mEditLock;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CSVWorld::CommandDelegate::setEditorData (QWidget *editor, const QModelIndex& index) const
|
||||||
|
{
|
||||||
|
setEditorData (editor, index, false);
|
||||||
|
}
|
||||||
|
|
||||||
void CSVWorld::CommandDelegate::setEditorData (QWidget *editor, const QModelIndex& index, bool tryDisplay) const
|
void CSVWorld::CommandDelegate::setEditorData (QWidget *editor, const QModelIndex& index, bool tryDisplay) const
|
||||||
{
|
{
|
||||||
QVariant v = index.data(Qt::EditRole);
|
QVariant v = index.data(Qt::EditRole);
|
||||||
|
@ -130,10 +130,14 @@ namespace CSVWorld
|
|||||||
virtual void setModelData (QWidget *editor, QAbstractItemModel *model,
|
virtual void setModelData (QWidget *editor, QAbstractItemModel *model,
|
||||||
const QModelIndex& index) const;
|
const QModelIndex& index) const;
|
||||||
|
|
||||||
|
virtual QWidget *createEditor (QWidget *parent,
|
||||||
|
const QStyleOptionViewItem& option,
|
||||||
|
const QModelIndex& index) const;
|
||||||
|
|
||||||
virtual QWidget *createEditor (QWidget *parent,
|
virtual QWidget *createEditor (QWidget *parent,
|
||||||
const QStyleOptionViewItem& option,
|
const QStyleOptionViewItem& option,
|
||||||
const QModelIndex& index,
|
const QModelIndex& index,
|
||||||
CSMWorld::ColumnBase::Display display = CSMWorld::ColumnBase::Display_None) const;
|
CSMWorld::ColumnBase::Display display) const;
|
||||||
|
|
||||||
void setEditLock (bool locked);
|
void setEditLock (bool locked);
|
||||||
|
|
||||||
@ -141,8 +145,9 @@ namespace CSVWorld
|
|||||||
|
|
||||||
///< \return Does column require update?
|
///< \return Does column require update?
|
||||||
|
|
||||||
virtual void setEditorData (QWidget *editor, const QModelIndex& index, bool tryDisplay = false) const;
|
virtual void setEditorData (QWidget *editor, const QModelIndex& index) const;
|
||||||
|
|
||||||
|
virtual void setEditorData (QWidget *editor, const QModelIndex& index, bool tryDisplay) const;
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
|
|
||||||
|
@ -29,7 +29,7 @@ namespace MWWorld
|
|||||||
virtual bool eraseStatic(const std::string &id) {return false;}
|
virtual bool eraseStatic(const std::string &id) {return false;}
|
||||||
virtual void clearDynamic() {}
|
virtual void clearDynamic() {}
|
||||||
|
|
||||||
virtual void write (ESM::ESMWriter& writer) const {}
|
virtual void write (ESM::ESMWriter& writer, Loading::Listener& progress) const {}
|
||||||
|
|
||||||
virtual void read (ESM::ESMReader& reader, const std::string& id) {}
|
virtual void read (ESM::ESMReader& reader, const std::string& id) {}
|
||||||
///< Read into dynamic storage
|
///< Read into dynamic storage
|
||||||
@ -234,7 +234,7 @@ namespace MWWorld
|
|||||||
|
|
||||||
int getDynamicSize() const
|
int getDynamicSize() const
|
||||||
{
|
{
|
||||||
return mDynamic.size();
|
return static_cast<int> (mDynamic.size()); // truncated from unsigned __int64 if _MSC_VER && _WIN64
|
||||||
}
|
}
|
||||||
|
|
||||||
void listIdentifier(std::vector<std::string> &list) const {
|
void listIdentifier(std::vector<std::string> &list) const {
|
||||||
|
@ -117,6 +117,13 @@ BulletShapePtr BulletShapeManager::create (const Ogre::String& name, const Ogre:
|
|||||||
return createResource(name,group,isManual,loader,createParams).staticCast<BulletShape>();
|
return createResource(name,group,isManual,loader,createParams).staticCast<BulletShape>();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Ogre::ResourcePtr BulletShapeManager::load(const Ogre::String &name, const Ogre::String &group,
|
||||||
|
bool isManual, Ogre::ManualResourceLoader *loader, const Ogre::NameValuePairList *loadParams,
|
||||||
|
bool backgroundThread)
|
||||||
|
{
|
||||||
|
return this->load(name, group);
|
||||||
|
}
|
||||||
|
|
||||||
BulletShapePtr BulletShapeManager::load(const Ogre::String &name, const Ogre::String &group)
|
BulletShapePtr BulletShapeManager::load(const Ogre::String &name, const Ogre::String &group)
|
||||||
{
|
{
|
||||||
BulletShapePtr textf = getByName(name);
|
BulletShapePtr textf = getByName(name);
|
||||||
|
@ -92,6 +92,11 @@ private:
|
|||||||
/** \brief Private operator= . This is a forbidden operation. */
|
/** \brief Private operator= . This is a forbidden operation. */
|
||||||
BulletShapeManager& operator=(const BulletShapeManager &);
|
BulletShapeManager& operator=(const BulletShapeManager &);
|
||||||
|
|
||||||
|
// Not intended to be used, declared here to keep the compiler from complaining
|
||||||
|
// about hidden virtual methods.
|
||||||
|
virtual Ogre::ResourcePtr load(const Ogre::String &name, const Ogre::String &group,
|
||||||
|
bool isManual, Ogre::ManualResourceLoader *loader, const Ogre::NameValuePairList *loadParams,
|
||||||
|
bool backgroundThread);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
@ -101,7 +106,8 @@ public:
|
|||||||
|
|
||||||
/// Get a resource by name
|
/// Get a resource by name
|
||||||
/// @see ResourceManager::getByName
|
/// @see ResourceManager::getByName
|
||||||
BulletShapePtr getByName(const Ogre::String& name, const Ogre::String& groupName = Ogre::ResourceGroupManager::AUTODETECT_RESOURCE_GROUP_NAME);
|
BulletShapePtr getByName(const Ogre::String& name,
|
||||||
|
const Ogre::String& groupName = Ogre::ResourceGroupManager::AUTODETECT_RESOURCE_GROUP_NAME);
|
||||||
|
|
||||||
/// Create a new shape
|
/// Create a new shape
|
||||||
/// @see ResourceManager::createResource
|
/// @see ResourceManager::createResource
|
||||||
|
@ -828,7 +828,7 @@ namespace Physic
|
|||||||
if (callback.hasHit())
|
if (callback.hasHit())
|
||||||
return std::make_pair(true, callback.m_closestHitFraction);
|
return std::make_pair(true, callback.m_closestHitFraction);
|
||||||
else
|
else
|
||||||
return std::make_pair(false, 1);
|
return std::make_pair(false, 1.0f);
|
||||||
}
|
}
|
||||||
|
|
||||||
std::vector< std::pair<float, std::string> > PhysicEngine::rayTest2(const btVector3& from, const btVector3& to, int filterGroup)
|
std::vector< std::pair<float, std::string> > PhysicEngine::rayTest2(const btVector3& from, const btVector3& to, int filterGroup)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user