9 characterPosition.characterName = CORBA::string_dup(body->name().c_str());
10 int numLinks = body->numLinks();
11 characterPosition.linkPositions.length(numLinks);
16 for(
unsigned int j=0; j < body->numLinks(); ++j) {
17 LinkPosition &linkPosition = characterPosition.linkPositions[j];
18 Link* link = body->link(j);
35 state.characterPositions.length(world.
numBodies());
42 std::vector<ColdetLinkPairPtr>& pairs)
46 OpenHRP::CollisionSequence& collisions = state.collisions;
48 collisions.length(pairs.size());
49 for(
size_t colIndex=0; colIndex < pairs.size(); ++colIndex){
53 OpenHRP::LinkPair& pair = collisions[colIndex].pair;
54 pair.charName1 = CORBA::string_dup(link0->
body->
name().c_str());
55 pair.charName2 = CORBA::string_dup(link1->
body->
name().c_str());
56 pair.linkName1 = CORBA::string_dup(link0->
name.c_str());
57 pair.linkName2 = CORBA::string_dup(link1->
name.c_str());
void setVector3(const Vector3 &v3, V &v, size_t top=0)
boost::shared_ptr< Body > BodyPtr
void getWorldState(WorldState &state, WorldBase &world)
BodyPtr body(int index)
get body by index
void setMatrix33ToRowMajorArray(const Matrix33 &m33, Array &a, size_t top=0)
void initWorldState(WorldState &state, WorldBase &world)
void setupCharacterPosition(CharacterPosition &characterPosition, BodyPtr body)
double currentTime(void) const
get current time
const std::string & name()
void updateCharacterPosition(CharacterPosition &characterPosition, BodyPtr body)
boost::intrusive_ptr< ColdetLinkPair > ColdetLinkPairPtr
unsigned int numBodies()
get the number of bodies in this world