1 // ============================================================================= 2 // PROJECT CHRONO - http://projectchrono.org 3 // 4 // Copyright (c) 2014 projectchrono.org 5 // All rights reserved. 6 // 7 // Use of this source code is governed by a BSD-style license that can be found 8 // in the LICENSE file at the top level of the distribution and at 9 // http://projectchrono.org/license-chrono.txt. 10 // 11 // ============================================================================= 12 // Authors: Radu Serban 13 // ============================================================================= 14 // 15 // Base class for a sub-chassis system for wheeled vehicles. 16 // 17 // ============================================================================= 18 19 #include "chrono/physics/ChSystem.h" 20 #include "chrono_vehicle/wheeled_vehicle/ChSubchassis.h" 21 22 namespace chrono { 23 namespace vehicle { 24 ChSubchassis(const std::string & name)25ChSubchassis::ChSubchassis(const std::string& name) : ChPart(name) {} 26 ~ChSubchassis()27ChSubchassis::~ChSubchassis() { 28 auto sys = m_beam[0]->GetSystem(); 29 if (sys) { 30 sys->Remove(m_beam[0]); 31 sys->Remove(m_beam[1]); 32 } 33 } 34 35 } // end namespace vehicle 36 } // end namespace chrono 37