Blender V2.61 - r43446
|
00001 /* 00002 * ***** BEGIN GPL LICENSE BLOCK ***** 00003 * 00004 * This program is free software; you can redistribute it and/or 00005 * modify it under the terms of the GNU General Public License 00006 * as published by the Free Software Foundation; either version 2 00007 * of the License, or (at your option) any later version. 00008 * 00009 * This program is distributed in the hope that it will be useful, 00010 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00012 * GNU General Public License for more details. 00013 * 00014 * You should have received a copy of the GNU General Public License 00015 * along with this program; if not, write to the Free Software Foundation, 00016 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 00017 * 00018 * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. 00019 * All rights reserved. 00020 * 00021 * The Original Code is: all of this file. 00022 * 00023 * Contributor(s): none yet. 00024 * 00025 * ***** END GPL LICENSE BLOCK ***** 00026 */ 00027 00033 #include <stddef.h> 00034 00035 #include "DummyPhysicsEnvironment.h" 00036 #include "PHY_IMotionState.h" 00037 00038 DummyPhysicsEnvironment::DummyPhysicsEnvironment() 00039 { 00040 // create physicsengine data 00041 } 00042 00043 00044 00045 DummyPhysicsEnvironment::~DummyPhysicsEnvironment() 00046 { 00047 //destroy physicsengine data 00048 } 00049 00050 void DummyPhysicsEnvironment::beginFrame() 00051 { 00052 // beginning of logic frame: apply forces 00053 } 00054 00055 void DummyPhysicsEnvironment::endFrame() 00056 { 00057 // end of logic frame: clear forces 00058 } 00059 00060 00061 00062 bool DummyPhysicsEnvironment::proceedDeltaTime(double curTime,float timeStep,float interval) 00063 { 00064 //step physics simulation, typically perform 00065 00066 //collision detection 00067 //solve constraints 00068 //integrate solution 00069 // return true if an update was done. 00070 return true; 00071 } 00072 void DummyPhysicsEnvironment::setFixedTimeStep(bool useFixedTimeStep,float fixedTimeStep) 00073 { 00074 } 00075 00076 float DummyPhysicsEnvironment::getFixedTimeStep() 00077 { 00078 return 0.f; 00079 } 00080 00081 00082 00083 00084 void DummyPhysicsEnvironment::setGravity(float x,float y,float z) 00085 { 00086 } 00087 00088 00089 00090 00091 00092 00093 00094 int DummyPhysicsEnvironment::createConstraint(class PHY_IPhysicsController* ctrl,class PHY_IPhysicsController* ctrl2,PHY_ConstraintType type, 00095 float pivotX,float pivotY,float pivotZ,float axisX,float axisY,float axisZ, 00096 float axis1X,float axis1Y,float axis1Z, 00097 float axis2X,float axis2Y,float axis2Z,int flag 00098 ) 00099 { 00100 00101 int constraintid = 0; 00102 return constraintid; 00103 00104 } 00105 00106 void DummyPhysicsEnvironment::removeConstraint(int constraintid) 00107 { 00108 if (constraintid) 00109 { 00110 } 00111 } 00112 00113 PHY_IPhysicsController* DummyPhysicsEnvironment::rayTest(PHY_IRayCastFilterCallback &filterCallback,float fromX,float fromY,float fromZ, float toX,float toY,float toZ) 00114 { 00115 //collision detection / raytesting 00116 return NULL; 00117 } 00118