mirror of
https://github.com/OpenMW/openmw.git
synced 2025-02-22 01:39:42 +00:00
Use floats, not doubles
This commit is contained in:
parent
840e7615f5
commit
23fe3d74ab
2 changed files with 7 additions and 7 deletions
|
@ -307,10 +307,10 @@ bool CSVRender::InstanceMode::primaryEditStartDrag (const QPoint& pos)
|
||||||
if (mSubModeId == "move")
|
if (mSubModeId == "move")
|
||||||
{
|
{
|
||||||
objectTag->mObject->setEdited (Object::Override_Position);
|
objectTag->mObject->setEdited (Object::Override_Position);
|
||||||
double x = objectTag->mObject->getPosition().pos[0];
|
float x = objectTag->mObject->getPosition().pos[0];
|
||||||
double y = objectTag->mObject->getPosition().pos[1];
|
float y = objectTag->mObject->getPosition().pos[1];
|
||||||
double z = objectTag->mObject->getPosition().pos[2];
|
float z = objectTag->mObject->getPosition().pos[2];
|
||||||
osg::Vec3d thisPoint(x, y, z);
|
osg::Vec3f thisPoint(x, y, z);
|
||||||
mDragStart = getMousePlaneCoords(pos, getProjectionSpaceCoords(thisPoint));
|
mDragStart = getMousePlaneCoords(pos, getProjectionSpaceCoords(thisPoint));
|
||||||
mObjectsAtDragStart.emplace_back(thisPoint);
|
mObjectsAtDragStart.emplace_back(thisPoint);
|
||||||
mDragMode = DragMode_Move;
|
mDragMode = DragMode_Move;
|
||||||
|
@ -510,7 +510,7 @@ void CSVRender::InstanceMode::drag (const QPoint& pos, int diffX, int diffY, dou
|
||||||
if (mDragMode == DragMode_Move)
|
if (mDragMode == DragMode_Move)
|
||||||
{
|
{
|
||||||
ESM::Position position = objectTag->mObject->getPosition();
|
ESM::Position position = objectTag->mObject->getPosition();
|
||||||
osg::Vec3d mousePos = getMousePlaneCoords(pos, getProjectionSpaceCoords(mDragStart));
|
osg::Vec3f mousePos = getMousePlaneCoords(pos, getProjectionSpaceCoords(mDragStart));
|
||||||
float addToX = mousePos.x() - mDragStart.x();
|
float addToX = mousePos.x() - mDragStart.x();
|
||||||
float addToY = mousePos.y() - mDragStart.y();
|
float addToY = mousePos.y() - mDragStart.y();
|
||||||
float addToZ = mousePos.z() - mDragStart.z();
|
float addToZ = mousePos.z() - mDragStart.z();
|
||||||
|
|
|
@ -45,8 +45,8 @@ namespace CSVRender
|
||||||
bool mLocked;
|
bool mLocked;
|
||||||
float mUnitScaleDist;
|
float mUnitScaleDist;
|
||||||
osg::ref_ptr<osg::Group> mParentNode;
|
osg::ref_ptr<osg::Group> mParentNode;
|
||||||
osg::Vec3d mDragStart;
|
osg::Vec3f mDragStart;
|
||||||
std::vector<osg::Vec3d> mObjectsAtDragStart;
|
std::vector<osg::Vec3f> mObjectsAtDragStart;
|
||||||
|
|
||||||
int getSubModeFromId (const std::string& id) const;
|
int getSubModeFromId (const std::string& id) const;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue