19 #ifndef TG_CONNECTOR_INFO_H
20 #define TG_CONNECTOR_INFO_H
42 #include "LinearMath/btVector3.h"
57 (void) btInfinityMask;
93 virtual std::vector<tgConnectorInfo*> createConnectorInfos(
const tgPairs& pairs,
const tgTagSearch& tagSearch);
95 virtual void initConnector(
tgWorld& world) = 0;
100 btVector3& getFrom() {
103 const btVector3& getFrom()
const
109 return m_pair.
getTo();
111 const btVector3& getTo()
const {
112 return m_pair.
getTo();
116 return m_fromRigidInfo;
119 return m_fromRigidInfo;
124 m_fromRigidInfo = rigidInfo;
128 return m_toRigidInfo;
131 return m_toRigidInfo;
136 m_toRigidInfo = rigidInfo;
140 btRigidBody* getToRigidBody();
142 btRigidBody* getFromRigidBody();
146 virtual double getMass() = 0;
150 virtual void chooseRigids(std::set<tgRigidInfo*> rigids);
153 virtual void chooseRigids(std::vector<tgRigidInfo*> rigids)
155 std::set<tgRigidInfo*> s;
156 s.insert(rigids.begin(), rigids.end());
161 tgRigidInfo* chooseRigid(std::set<tgRigidInfo*> rigids,
const btVector3& v);
165 tgRigidInfo* findClosestCenterOfMass(std::set<tgRigidInfo*> rigids,
const btVector3& v);
168 std::set<tgRigidInfo*> findRigidsContaining(std::set<tgRigidInfo*> rigids,
const btVector3& toFind);
171 bool rigidFoundIn(std::set<tgRigidInfo*> rigids,
tgRigidInfo* rigid);
194 os <<
"tgConnectorInfo(";
195 os << n.getFrom() <<
", ";
196 os << n.getTo() <<
", ";
197 os <<
"fromRigidInfo: " << n.getFromRigidInfo() <<
", ";
198 os <<
"toRigidInfo: " << n.getToRigidInfo() <<
", ";
199 os <<
"Tags: " << n.getTags();
Definition of class tgPair.
std::ostream & operator<<(std::ostream &os, const tgConnectorInfo &n)
Contains the definition of class tgTaggable.