[FEM] ViewProviderFemConstrain*: remove unused includes - part 1
- also sort includes - also fix warnings about too long lines
This commit is contained in:
@@ -21,27 +21,23 @@
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
|
||||
#include "PreCompiled.h"
|
||||
|
||||
#ifndef _PreComp_
|
||||
# include <Standard_math.hxx>
|
||||
# include <Precision.hxx>
|
||||
|
||||
# include <Inventor/nodes/SoSeparator.h>
|
||||
# include <Inventor/nodes/SoTranslation.h>
|
||||
# include <Inventor/nodes/SoRotation.h>
|
||||
# include <Inventor/nodes/SoMultipleCopy.h>
|
||||
|
||||
# include <QMessageBox>
|
||||
# include <Precision.hxx>
|
||||
# include <Inventor/SbRotation.h>
|
||||
# include <Inventor/SbVec3f.h>
|
||||
# include <Inventor/nodes/SoMultipleCopy.h>
|
||||
# include <Inventor/nodes/SoSeparator.h>
|
||||
#endif
|
||||
|
||||
#include "ViewProviderFemConstraintForce.h"
|
||||
#include <Mod/Fem/App/FemConstraintForce.h>
|
||||
#include "TaskFemConstraintForce.h"
|
||||
#include "Gui/Control.h"
|
||||
|
||||
#include <Base/Console.h>
|
||||
#include "ViewProviderFemConstraintForce.h"
|
||||
#include "TaskFemConstraintForce.h"
|
||||
|
||||
|
||||
using namespace FemGui;
|
||||
|
||||
@@ -109,7 +105,7 @@ bool ViewProviderFemConstraintForce::setEdit(int ModNum)
|
||||
}
|
||||
|
||||
#define ARROWLENGTH (4)
|
||||
#define ARROWHEADRADIUS (ARROWLENGTH/3.0f)
|
||||
#define ARROWHEADRADIUS (ARROWLENGTH / 3.0f)
|
||||
//#define USE_MULTIPLE_COPY //OvG: MULTICOPY fails to update scaled arrows on initial drawing - so disable
|
||||
|
||||
void ViewProviderFemConstraintForce::updateData(const App::Property* prop)
|
||||
@@ -153,13 +149,15 @@ void ViewProviderFemConstraintForce::updateData(const App::Property* prop)
|
||||
SbVec3f dir(forceDirection.x, forceDirection.y, forceDirection.z);
|
||||
SbRotation rot(SbVec3f(0,1,0), dir);
|
||||
|
||||
for (std::vector<Base::Vector3d>::const_iterator p = points.begin(); p != points.end(); p++) {
|
||||
for (std::vector<Base::Vector3d>::const_iterator p = points.begin(); p != points.end();
|
||||
p++) {
|
||||
SbVec3f base(p->x, p->y, p->z);
|
||||
if (forceDirection.GetAngle(normal) < M_PI_2) // Move arrow so it doesn't disappear inside the solid
|
||||
if (forceDirection.GetAngle(normal)
|
||||
< M_PI_2)// Move arrow so it doesn't disappear inside the solid
|
||||
base = base + dir * scaledlength; //OvG: Scaling
|
||||
#ifdef USE_MULTIPLE_COPY
|
||||
SbMatrix m;
|
||||
m.setTransform(base, rot, SbVec3f(1,1,1));
|
||||
m.setTransform(base, rot, SbVec3f(1, 1, 1));
|
||||
matrices[idx] = m;
|
||||
idx++;
|
||||
#else
|
||||
@@ -181,7 +179,7 @@ void ViewProviderFemConstraintForce::updateData(const App::Property* prop)
|
||||
forceDirection = normal;
|
||||
|
||||
SbVec3f dir(forceDirection.x, forceDirection.y, forceDirection.z);
|
||||
SbRotation rot(SbVec3f(0,1,0), dir);
|
||||
SbRotation rot(SbVec3f(0, 1, 0), dir);
|
||||
|
||||
const std::vector<Base::Vector3d>& points = pcConstraint->Points.getValues();
|
||||
|
||||
@@ -192,13 +190,14 @@ void ViewProviderFemConstraintForce::updateData(const App::Property* prop)
|
||||
#endif
|
||||
int idx = 0;
|
||||
|
||||
for (std::vector<Base::Vector3d>::const_iterator p = points.begin(); p != points.end(); p++) {
|
||||
for (std::vector<Base::Vector3d>::const_iterator p = points.begin(); p != points.end();
|
||||
p++) {
|
||||
SbVec3f base(p->x, p->y, p->z);
|
||||
if (forceDirection.GetAngle(normal) < M_PI_2)
|
||||
base = base + dir * scaledlength; //OvG: Scaling
|
||||
#ifdef USE_MULTIPLE_COPY
|
||||
SbMatrix m;
|
||||
m.setTransform(base, rot, SbVec3f(1,1,1));
|
||||
m.setTransform(base, rot, SbVec3f(1, 1, 1));
|
||||
matrices[idx] = m;
|
||||
#else
|
||||
SoSeparator* sep = static_cast<SoSeparator*>(pShapeSep->getChild(idx));
|
||||
|
||||
Reference in New Issue
Block a user