00001 /* 00002 * Copyright (c) 2004, University of Braunschweig (for members see AUTHORS file) 00003 * Copyright (c) 2007, 2008, 2009, University of Karlsruhe (for members see AUTHORS file) 00004 * 00005 * ISC License 00006 * 00007 * Permission to use, copy, modify, and/or distribute this software for any 00008 * purpose with or without fee is hereby granted, provided that the above 00009 * copyright notice and this permission notice appear in all copies. 00010 * 00011 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 00012 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 00013 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 00014 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 00015 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 00016 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 00017 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 00018 */ 00019 00040 #include "../include/IPSA/SoJointFixed.h" 00041 #include "../include/IPSA/SoPhysics.h" 00042 00043 #include <Inventor/nodes/SoNode.h> 00044 00045 SO_KIT_SOURCE(SoJointFixed); 00046 00049 void SoJointFixed::initClass() 00050 { 00051 SO_KIT_INIT_CLASS(SoJointFixed, SoJoint, "Joint"); 00052 } 00053 00060 SoJointFixed::SoJointFixed(const SbString& BodyOne, const SbString& BodyTwo, const SbString& nodeName) 00061 : SoJoint(BodyOne,BodyTwo,nodeName) 00062 { 00063 SO_KIT_CONSTRUCTOR(SoJointFixed); 00064 isBuiltIn = TRUE; 00065 00066 SO_KIT_ADD_FIELD(soFixed,(true)); 00067 00068 SO_KIT_INIT_INSTANCE(); 00069 } 00070 00071 00077 void SoJointFixed::createOdeJoint(const dWorldID soWorldId) 00078 { 00079 soJointId = dJointCreateFixed(soWorldId, soJointGroupId); 00080 } 00081 00082 00089 void SoJointFixed::updateOdeJointProperties(const SbMatrix& modelMatrix) 00090 { 00091 if (TRUE == soFixed.getValue()) 00092 dJointSetFixed(this->soJointId); 00093 } 00094
Generated on Sat Mar 10 20:00:15 2012 for IPSA by 1.5.8 |