const SGPropertyNode * table_node = props->getNode("interpolation");
if (table_node != 0) {
SGInterpTable * table = new SGInterpTable();
- vector<const SGPropertyNode *> entries = table_node->getChildren("entry");
+ vector<SGPropertyNode_ptr> entries = table_node->getChildren("entry");
for (int i = 0; i < entries.size(); i++)
table->addEntry(entries[i]->getDoubleValue("ind", 0.0),
entries[i]->getDoubleValue("dep", 0.0));
_location = (FGLocation *) new FGLocation;
// Load animations
- vector<SGPropertyNode *> animation_nodes = props.getChildren("animation");
+ vector<SGPropertyNode_ptr> animation_nodes = props.getChildren("animation");
unsigned int i;
for (i = 0; i < animation_nodes.size(); i++) {
- vector<SGPropertyNode *> name_nodes =
+ vector<SGPropertyNode_ptr> name_nodes =
animation_nodes[i]->getChildren("object-name");
if (name_nodes.size() < 1) {
Animation * animation = make_animation(0, animation_nodes[i]);
}
void
-FG3DModel::update (int dt)
+FG3DModel::update (double dt)
{
unsigned int i;
bool
FG3DModel::getVisible () const
{
- return _selector->getSelect();
+ return (_selector->getSelect() != 0);
}
void
}
void
-FG3DModel::NullAnimation::update (int dt)
+FG3DModel::NullAnimation::update (double dt)
{
}
}
void
-FG3DModel::RangeAnimation::update (int dt)
+FG3DModel::RangeAnimation::update (double dt)
{
}
}
void
-FG3DModel::BillboardAnimation::update (int dt)
+FG3DModel::BillboardAnimation::update (double dt)
{
}
}
void
-FG3DModel::SelectAnimation::update (int dt)
+FG3DModel::SelectAnimation::update (double dt)
{
if (_condition != 0 && _condition->test())
_selector->select(0xffff);
}
void
-FG3DModel::SpinAnimation::update (int dt)
+FG3DModel::SpinAnimation::update (double dt)
{
- float velocity_rpms = (_prop->getDoubleValue() * _factor / 60000.0);
+ float velocity_rpms = (_prop->getDoubleValue() * _factor / 60.0);
_position_deg += (dt * velocity_rpms * 360);
while (_position_deg < 0)
_position_deg += 360.0;
}
void
-FG3DModel::RotateAnimation::update (int dt)
+FG3DModel::RotateAnimation::update (double dt)
{
if (_table == 0) {
_position_deg = (_prop->getDoubleValue() + _offset_deg) * _factor;
}
void
-FG3DModel::TranslateAnimation::update (int dt)
+FG3DModel::TranslateAnimation::update (double dt)
{
if (_table == 0) {
_position_m = (_prop->getDoubleValue() + _offset_m) * _factor;