YASIM add method multiplyLiftRatio to class Wing
This commit is contained in:
parent
6feca92060
commit
3809137f7d
3 changed files with 9 additions and 4 deletions
|
@ -815,13 +815,13 @@ void Airplane::applyLiftRatio(float factor)
|
|||
float applied = Math::pow(factor, SOLVE_TWEAK);
|
||||
_liftRatio *= applied;
|
||||
if(_wing)
|
||||
_wing->setLiftRatio(_wing->getLiftRatio() * applied);
|
||||
_wing->multiplyLiftRatio(applied);
|
||||
if(_tail)
|
||||
_tail->setLiftRatio(_tail->getLiftRatio() * applied);
|
||||
_tail->multiplyLiftRatio(applied);
|
||||
int i;
|
||||
for(i=0; i<_vstabs.size(); i++) {
|
||||
Wing* w = (Wing*)_vstabs.get(i);
|
||||
w->setLiftRatio(w->getLiftRatio() * applied);
|
||||
w->multiplyLiftRatio(applied);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -256,6 +256,11 @@ void Wing::compile()
|
|||
writeInfoToProptree();
|
||||
}
|
||||
|
||||
void Wing::multiplyLiftRatio(float factor)
|
||||
{
|
||||
setLiftRatio(_liftRatio * factor);
|
||||
}
|
||||
|
||||
void Wing::addSurface(Surface* s, float weight, float twist)
|
||||
{
|
||||
SurfRec *sr = new SurfRec();
|
||||
|
|
|
@ -109,7 +109,7 @@ public:
|
|||
// The ratio of force along the Z (lift) direction of each wing
|
||||
// segment to that along the X (drag) direction.
|
||||
void setLiftRatio(float ratio);
|
||||
float getLiftRatio() const { return _liftRatio; }
|
||||
void multiplyLiftRatio(float factor);
|
||||
|
||||
void setPropertyNode(SGPropertyNode_ptr n) { _wingN = n; };
|
||||
float updateModel(Model* model);
|
||||
|
|
Loading…
Add table
Reference in a new issue