00001 /* 00002 * Copyright (c) 2008, AIST, the University of Tokyo and General Robotix Inc. 00003 * All rights reserved. This program is made available under the terms of the 00004 * Eclipse Public License v1.0 which accompanies this distribution, and is 00005 * available at http://www.eclipse.org/legal/epl-v10.html 00006 * Contributors: 00007 * National Institute of Advanced Industrial Science and Technology (AIST) 00008 */ 00009 00010 #include "ColdetLinkPair.h" 00011 00012 namespace hrp { 00013 00014 class Link; 00015 00016 ColdetLinkPair::ColdetLinkPair(Link* link1, Link* link2, double tolerance) 00017 : ColdetModelPair(link1->coldetModel, link2->coldetModel, tolerance) { 00018 links[0] = link1; 00019 links[1] = link2; 00020 } 00021 00022 ColdetLinkPair::ColdetLinkPair(const ColdetLinkPair& org) 00023 : ColdetModelPair(org) { 00024 links[0] = org.links[0]; 00025 links[1] = org.links[1]; 00026 } 00027 00028 ColdetLinkPair::~ColdetLinkPair() { } 00029 00030 void ColdetLinkPair::updatePositions() { 00031 model(0)->setPosition(links[0]->R, links[0]->p); 00032 model(1)->setPosition(links[1]->R, links[1]->p); 00033 } 00034 00035 hrp::Link* ColdetLinkPair::link(int index) { return links[index]; } 00036 }