NTRT Simulator  Version: Master
 All Classes Namespaces Files Functions Variables Typedefs Friends Pages
tgGhostInfo.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_GHOST_INFO_H
20 #define TG_GHOST_INFO_H
21 
30 // The C++ Standard Library
31 #include <set>
32 // This library
33 #include "core/tgTaggable.h"
34 #include "core/tgModel.h"
35 #include "tgcreator/tgRigidInfo.h"
36 #include "tgcreator/tgBoxInfo.h"
37 //Bullet Physics
38 #include "LinearMath/btVector3.h"
39 #include "LinearMath/btQuaternion.h"
40 
41 // Forward references
43 class tgNode;
44 class tgNodes;
45 class tgPair;
46 class tgPairs;
47 class tgTagSearch;
48 class tgWorld;
49 
50 class btRigidBody;
51 class btCollisionShape;
52 class btTransform;
53 
60 class tgGhostInfo : public tgBoxInfo {
61 public:
62 
68  tgGhostInfo(const tgBox::Config& config);
69 
75  tgGhostInfo(const tgBox::Config& config, tgTags tags);
76 
84  tgGhostInfo(const tgBox::Config& config, const tgPair& pair);
85 
93  tgGhostInfo(const tgBox::Config& config, tgTags tags, const tgPair& pair);
94 
98  virtual ~tgGhostInfo() {}
99 
103  tgRigidInfo* createRigidInfo(const tgPair& pair);
104 
105  virtual void initRigidBody(tgWorld& world);
106 
107  virtual tgModel* createModel(tgWorld& world);
108 
109 #if (0) // Default to box's com so we can do compounding
110 
115  virtual double getMass() const
116  {
117  return 0;
118  }
119 #endif
120 };
121 
128 inline std::ostream& operator<<(std::ostream& os, const tgGhostInfo& casper)
129 {
130  os << "tgGhostInfo(" << casper.getFrom() << ", " << casper.getTo() <<")";
131  return os;
132 }
133 
134 
135 #endif
Definition of abstract class tgRigidInfo.
virtual double getMass() const
Definition: tgBoxInfo.cpp:119
tgGhostInfo(const tgBox::Config &config)
Definition: tgGhostInfo.cpp:47
const btVector3 & getFrom() const
Definition: tgBoxInfo.h:110
Class that interfaces with Bullet to build the boxes.
Contains the definition of class tgModel.
const btVector3 & getTo() const
Definition: tgBoxInfo.h:113
virtual ~tgGhostInfo()
Definition: tgGhostInfo.h:98
Definition: tgPair.h:48
Definition: tgNode.h:45
tgRigidInfo * createRigidInfo(const tgPair &pair)
Definition: tgGhostInfo.cpp:63
Contains the definition of class tgTaggable.
std::ostream & operator<<(std::ostream &os, const tgGhostInfo &casper)
Definition: tgGhostInfo.h:128
virtual void initRigidBody(tgWorld &world)
Definition: tgGhostInfo.cpp:70
Definition: tgTags.h:44