NTRT Simulator  Version: Master
 All Classes Namespaces Files Functions Variables Typedefs Friends Pages
tgCraterDeep.h
Go to the documentation of this file.
1 /*
2  * Copyright © 2014, United States Government, as represented by the
3  * Administrator of the National Aeronautics and Space Administration.
4  * All rights reserved.
5  *
6  * The NASA Tensegrity Robotics Toolkit (NTRT) v1 platform is licensed
7  * under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  * http://www.apache.org/licenses/LICENSE-2.0.
11  *
12  * Unless required by applicable law or agreed to in writing,
13  * software distributed under the License is distributed on an
14  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
15  * either express or implied. See the License for the specific language
16  * governing permissions and limitations under the License.
17  */
18 
29 // This library
30 #include "core/tgModel.h"
31 #include "core/tgSubject.h"
32 // The Bullet Physics Library
33 #include "LinearMath/btVector3.h"
34 // The C++ Standard Library
35 #include <vector>
36 
37 // Forward declarations
38 class tgLinearString;
39 class tgModelVisitor;
40 class tgStructure;
41 class tgWorld;
42 class tgNode;
43 
47 class tgCraterDeep : public tgSubject<tgCraterDeep>, public tgModel
48 {
49  public:
50 
54  tgCraterDeep();
55 
60  tgCraterDeep(btVector3 origin);
61 
66  virtual ~tgCraterDeep();
67 
72  virtual void setup(tgWorld& world);
73 
78  virtual void step(double dt);
79 
87  virtual void onVisit(tgModelVisitor& r);
88 
93  void teardown();
94 
95  private:
96 
103  void addNodes(tgStructure& s);
104 
109  void addBoxNodes();
110 
111  std::vector <tgNode> nodes;
112  btVector3 origin;
113 };
114 
Definition of tgSubject class.
virtual void onVisit(tgModelVisitor &r)
virtual ~tgCraterDeep()
Contains the definition of class tgModel.
Definition: tgNode.h:45
virtual void setup(tgWorld &world)
virtual void step(double dt)