NTRT Simulator  Version: Master
 All Classes Namespaces Files Functions Variables Typedefs Friends Pages
tgBoxMoreAnchors.h
Go to the documentation of this file.
1 /*
2  * Copyright © 2012, 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 TG_BOX_MORE_ANCHORS_H
20 #define TG_BOX_MORE_ANCHORS_H
21 
29 // This application
30 #include "tgBox.h"
31 // The Bullet Physics library
32 #include "LinearMath/btVector3.h"
33 // The C++ Standard Library
34 #include <vector>
35 
44 class tgBoxMoreAnchors : public tgBox
45 {
46 public:
47 
52  tgBoxMoreAnchors(btRigidBody* pRigidBody,
53  const tgTags& tags,
54  const double length);
55 
57  virtual ~tgBoxMoreAnchors();
58 
64  // We do need to be able to have a rendering for this specific type
65  // of box, though.
66  virtual void onVisit(const tgModelVisitor& v) const;
67 
75  double length() const { return m_length; }
76 
77 
78 private:
79 
81  bool invariant() const;
82 
83 private:
84 
86  const double m_length;
87 };
88 
89 #endif // TG_BOX_MORE_ANCHORS_H
Create a box shape as an obstacle or add it to your tensegrity.
virtual ~tgBoxMoreAnchors()
Definition: tgBox.h:43
virtual void onVisit(const tgModelVisitor &v) const
tgBoxMoreAnchors(btRigidBody *pRigidBody, const tgTags &tags, const double length)
double length() const
Definition: tgTags.h:44