NTRT Simulator  v1.1
 All Classes Namespaces Files Functions Variables Typedefs Friends Pages
CraterDeep.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 CraterDeep : public tgSubject<CraterDeep>, public tgModel
48 {
49  public:
50 
54  CraterDeep();
55 
60  CraterDeep(btVector3 origin);
61 
66  virtual ~CraterDeep();
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 
virtual void onVisit(tgModelVisitor &r)
Definition: CraterDeep.cpp:112
Definition of tgSubject class.
virtual ~CraterDeep()
Definition: CraterDeep.cpp:72
virtual void setup(tgWorld &world)
Definition: CraterDeep.cpp:76
Contains the definition of class tgModel.
void teardown()
Definition: CraterDeep.cpp:116
Definition: tgNode.h:45
virtual void step(double dt)
Definition: CraterDeep.cpp:101