Skip to content

Commit

Permalink
removal of unnecessary comments, minor refactoring, fix weight render…
Browse files Browse the repository at this point in the history
…ing size, typo fixes
  • Loading branch information
JamesMcCrae committed Dec 9, 2024
1 parent 0340ed3 commit 91788a7
Show file tree
Hide file tree
Showing 23 changed files with 1,162 additions and 3,262 deletions.
4 changes: 2 additions & 2 deletions include/beziercurve.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
struct BezierCurvePoint
{
QVector2D point;
int segment; // index to the POINT, so this will be some multile of 3
int segment; // index to the POINT, so this will be some multiple of 3
float t; // t =[0,1]

bool operator<(const BezierCurvePoint & p) const
Expand Down Expand Up @@ -115,7 +115,7 @@ class BezierCurve

bool closed;

// what do segments have
// segments have:
// initial point
// " tangent
// end point
Expand Down
2 changes: 0 additions & 2 deletions include/glutils.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@ class GLutils

// drawing related
static void DrawPointGL(const float x, const float y, const float rad);
// static void DrawTNBFrame(const vec3 & o, const TNBFrame & tnb, const
// float scale);
static void DrawArrow(const QVector3D &p1, const QVector3D &p2);
static void DrawArrowFixedLength(const QVector3D &p1, const QVector3D &p2,
const float len);
Expand Down
7 changes: 1 addition & 6 deletions include/glwidget.h
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,7 @@ enum GenerateState
GENSTATE_GRID,
GENSTATE_BRANCH,
GENSTATE_SURFACE_FACETS,
GENSTATE_NUM // note: enum declaration guaranteed to be in order: 0,
// 1, 2... therefore this enum is the # of previously defined
// enums
GENSTATE_NUM
};

class GLWidget : public QGLWidget
Expand Down Expand Up @@ -305,7 +303,6 @@ public slots:
void StartGenerateRevolve();
void StartGenerateSlices();
void StartGenerateGrid();
// void StartGenerateBranch();

void SetSelectedAsRadial();
void RemoveRadial();
Expand Down Expand Up @@ -351,8 +348,6 @@ public slots:

void QVector3DToArray(const QVector3D &p, double array[3]);

// QTabWidget * sideWidget;

QWidget *editWidget;
QWidget *genWidget;
QWidget *guidesWidget;
Expand Down
1 change: 0 additions & 1 deletion include/mainwindow.h
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,6 @@ private slots:
QAction *removeExternalWeightsAct;

GLWidget glWidget;
// QWidget * sideWidget;
QDockWidget *dockWidget;

QWidget *bottomWidget;
Expand Down
7 changes: 0 additions & 7 deletions include/physics.h
Original file line number Diff line number Diff line change
Expand Up @@ -295,33 +295,27 @@ class CPhysics
// solve one iteration
static void SolveOneIteration(std::vector<CRigidBody>& aRigidBody,
std::vector<CJoint>& aJoint,
////
double damping_ratio,
////
const CVector3D n, const CVector3D gravity,
const double cont_stiff,
const double trans_stiff,
const double rot_stiff);

static void GetPlateLocalForce(
std::vector<CPlate::CLocalForce>& alForce,
////
int irb, const std::vector<CRigidBody>& aRigidBody,
const std::vector<CJoint>& aJoint, const CVector3D& vec_p,
const CVector3D& vec_t, const CVector3D& vec_b, const CVector3D& vec_n,
const std::vector<double>& aXY);

static void AddWeakSection_Inside(CPlate& plate, // (in,out)
///
const std::vector<double>& aXY,
const CRigidBody& rb,
const CVector3D gravity,
////
const std::vector<double>& aDir2D,
const int nH, const double max_stress);

static void AddWeakSection_Slit(CPlate& plt, // (in,out)
////
const std::vector<double>& aXY,
const CRigidBody& rb,
const CVector3D gravity,
Expand All @@ -348,7 +342,6 @@ class CPhysics

int nitr;
double damping_ratio;
////
bool is_draw_force;
bool is_draw_skeleton;
bool is_draw_deformed;
Expand Down
Loading

0 comments on commit 91788a7

Please sign in to comment.