NTRT Simulator  v1.1
 All Classes Namespaces Files Functions Variables Typedefs Friends Pages
Wall.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 
19 #ifndef TETRA_COLLISIONS_WALL
20 #define TETRA_COLLISIONS_WALL
21 
30 // This library
31 #include "core/tgModel.h"
32 #include "core/tgSubject.h"
33 // The Bullet Physics Library
34 #include "LinearMath/btVector3.h"
35 // The C++ Standard Library
36 #include <vector>
37 
38 // Forward declarations
39 class tgModelVisitor;
40 class tgStructure;
41 class tgWorld;
42 class tgNode;
43 
47 class Wall : public tgSubject<Wall>, public tgModel
48 {
49  public:
50 
54  Wall();
55 
60  Wall(btVector3 origin);
61 
66  virtual ~Wall();
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 
115 #endif // TETRA_COLLISIONS_WALL
Definition of tgSubject class.
virtual void setup(tgWorld &world)
Definition: Wall.cpp:72
Wall()
Definition: Wall.cpp:62
Contains the definition of class tgModel.
Definition: Wall.h:47
virtual void onVisit(tgModelVisitor &r)
Definition: Wall.cpp:107
virtual void step(double dt)
Definition: Wall.cpp:96
Definition: tgNode.h:45
virtual ~Wall()
Definition: Wall.cpp:70
void teardown()
Definition: Wall.cpp:111