public btHingeConstraint(btRigidBody rbA, SWIGTYPE_p_btTransform rbAFrame, bool useReferenceFrameA) : this(BulletDynamicsPINVOKE.new_btHingeConstraint__SWIG_6(btRigidBody.getCPtr(rbA), SWIGTYPE_p_btTransform.getCPtr(rbAFrame), useReferenceFrameA), true) { if (BulletDynamicsPINVOKE.SWIGPendingException.Pending) { throw BulletDynamicsPINVOKE.SWIGPendingException.Retrieve(); } }
public static btRigidBody upcast(SWIGTYPE_p_btCollisionObject colObj) { IntPtr cPtr = BulletDynamicsPINVOKE.btRigidBody_upcast__SWIG_0(SWIGTYPE_p_btCollisionObject.getCPtr(colObj)); btRigidBody ret = (cPtr == IntPtr.Zero) ? null : new btRigidBody(cPtr, false); return(ret); }
public btPoint2PointConstraint(btRigidBody rbA, SWIGTYPE_p_btVector3 pivotInA) : this(BulletDynamicsPINVOKE.new_btPoint2PointConstraint__SWIG_1(btRigidBody.getCPtr(rbA), SWIGTYPE_p_btVector3.getCPtr(pivotInA)), true) { if (BulletDynamicsPINVOKE.SWIGPendingException.Pending) { throw BulletDynamicsPINVOKE.SWIGPendingException.Retrieve(); } }
public btGeneric6DofSpringConstraint(btRigidBody rbB, SWIGTYPE_p_btTransform frameInB, bool useLinearReferenceFrameB) : this(BulletDynamicsPINVOKE.new_btGeneric6DofSpringConstraint__SWIG_1(btRigidBody.getCPtr(rbB), SWIGTYPE_p_btTransform.getCPtr(frameInB), useLinearReferenceFrameB), true) { if (BulletDynamicsPINVOKE.SWIGPendingException.Pending) { throw BulletDynamicsPINVOKE.SWIGPendingException.Retrieve(); } }
public btConeTwistConstraint(btRigidBody rbA, SWIGTYPE_p_btTransform rbAFrame) : this(BulletDynamicsPINVOKE.new_btConeTwistConstraint__SWIG_1(btRigidBody.getCPtr(rbA), SWIGTYPE_p_btTransform.getCPtr(rbAFrame)), true) { if (BulletDynamicsPINVOKE.SWIGPendingException.Pending) { throw BulletDynamicsPINVOKE.SWIGPendingException.Retrieve(); } }
public btGearConstraint(btRigidBody rbA, btRigidBody rbB, SWIGTYPE_p_btVector3 axisInA, SWIGTYPE_p_btVector3 axisInB) : this(BulletDynamicsPINVOKE.new_btGearConstraint__SWIG_1(btRigidBody.getCPtr(rbA), btRigidBody.getCPtr(rbB), SWIGTYPE_p_btVector3.getCPtr(axisInA), SWIGTYPE_p_btVector3.getCPtr(axisInB)), true) { if (BulletDynamicsPINVOKE.SWIGPendingException.Pending) { throw BulletDynamicsPINVOKE.SWIGPendingException.Retrieve(); } }
public btRaycastVehicle(SWIGTYPE_p_btRaycastVehicle__btVehicleTuning tuning, btRigidBody chassis, SWIGTYPE_p_btVehicleRaycaster raycaster) : this(BulletDynamicsPINVOKE.new_btRaycastVehicle(SWIGTYPE_p_btRaycastVehicle__btVehicleTuning.getCPtr(tuning), btRigidBody.getCPtr(chassis), SWIGTYPE_p_btVehicleRaycaster.getCPtr(raycaster)), true) { if (BulletDynamicsPINVOKE.SWIGPendingException.Pending) { throw BulletDynamicsPINVOKE.SWIGPendingException.Retrieve(); } }
public btUniversalConstraint(btRigidBody rbA, btRigidBody rbB, SWIGTYPE_p_btVector3 anchor, SWIGTYPE_p_btVector3 axis1, SWIGTYPE_p_btVector3 axis2) : this(BulletDynamicsPINVOKE.new_btUniversalConstraint(btRigidBody.getCPtr(rbA), btRigidBody.getCPtr(rbB), SWIGTYPE_p_btVector3.getCPtr(anchor), SWIGTYPE_p_btVector3.getCPtr(axis1), SWIGTYPE_p_btVector3.getCPtr(axis2)), true) { if (BulletDynamicsPINVOKE.SWIGPendingException.Pending) { throw BulletDynamicsPINVOKE.SWIGPendingException.Retrieve(); } }
public btHingeConstraint(btRigidBody rbA, SWIGTYPE_p_btVector3 pivotInA, SWIGTYPE_p_btVector3 axisInA, bool useReferenceFrameA) : this(BulletDynamicsPINVOKE.new_btHingeConstraint__SWIG_2(btRigidBody.getCPtr(rbA), SWIGTYPE_p_btVector3.getCPtr(pivotInA), SWIGTYPE_p_btVector3.getCPtr(axisInA), useReferenceFrameA), true) { if (BulletDynamicsPINVOKE.SWIGPendingException.Pending) { throw BulletDynamicsPINVOKE.SWIGPendingException.Retrieve(); } }
public btRigidBody getRigidBody() { IntPtr cPtr = BulletDynamicsPINVOKE.btRaycastVehicle_getRigidBody__SWIG_0(swigCPtr); btRigidBody ret = (cPtr == IntPtr.Zero) ? null : new btRigidBody(cPtr, false); return(ret); }
public float solveLinearAxis(float timeStep, float jacDiagABInv, btRigidBody body1, SWIGTYPE_p_btVector3 pointInA, btRigidBody body2, SWIGTYPE_p_btVector3 pointInB, int limit_index, SWIGTYPE_p_btVector3 axis_normal_on_a, SWIGTYPE_p_btVector3 anchorPos) { float ret = BulletDynamicsPINVOKE.btTranslationalLimitMotor_solveLinearAxis(swigCPtr, timeStep, jacDiagABInv, btRigidBody.getCPtr(body1), SWIGTYPE_p_btVector3.getCPtr(pointInA), btRigidBody.getCPtr(body2), SWIGTYPE_p_btVector3.getCPtr(pointInB), limit_index, SWIGTYPE_p_btVector3.getCPtr(axis_normal_on_a), SWIGTYPE_p_btVector3.getCPtr(anchorPos)); if (BulletDynamicsPINVOKE.SWIGPendingException.Pending) { throw BulletDynamicsPINVOKE.SWIGPendingException.Retrieve(); } return(ret); }
public bool OnBulletCreate() { if( rigidBodyObj != null ) // have created! { return true; } if( CollisionShapeObject == null ) // if user not give a collision, search it on itself first! CollisionShapeObject = GetComponent<BCollisionShape>(); if( CollisionShapeObject == null ) { Debug.LogError("Bullet RigidBody need a collision shape!"); return false; } bool cResult = CollisionShapeObject.OnBulletCreate(); if( cResult == false ) { Debug.LogError("Collision Shape Create Error!"); return false; } btTransform trans = new btTransform(); trans.setIdentity(); btVector3 pos = new btVector3(transform.position.x,transform.position.y,transform.position.z); trans.setOrigin(pos); trans.setRotation(new btQuaternion(transform.rotation.x,transform.rotation.y,transform.rotation.z,transform.rotation.w)); //rigidbody is dynamic if and only if mass is non zero, otherwise static bool isDynamic = (Mass != 0.0f); btVector3 localInertia = new btVector3(0,0,0); if (isDynamic) { CollisionShapeObject.CalculateLocalInertia(Mass,localInertia); } //using motionstate is recommended, it provides interpolation capabilities, and only synchronizes 'active' objects myMotionState = new btDefaultMotionState(trans); rbInfo = new btRigidBodyConstructionInfo(Mass,myMotionState.GetSwigPtr(),CollisionShapeObject.GetCollisionShapePtr(),localInertia.GetSwigPtr()); rigidBodyObj = new btRigidBody(rbInfo); collisionObject = btCollisionObject.GetObjectFromSwigPtr(rigidBodyObj.GetCollisionObject()); collisionObject.setFriction(Friction); return true; }
public btConeTwistConstraint(btRigidBody rbA, SWIGTYPE_p_btTransform rbAFrame) : this(BulletDynamicsPINVOKE.new_btConeTwistConstraint__SWIG_1(btRigidBody.getCPtr(rbA), SWIGTYPE_p_btTransform.getCPtr(rbAFrame)), true) { if (BulletDynamicsPINVOKE.SWIGPendingException.Pending) throw BulletDynamicsPINVOKE.SWIGPendingException.Retrieve(); }
public btRigidBody getRigidBodyA() { btRigidBody ret = new btRigidBody(BulletDynamicsPINVOKE.btConeTwistConstraint_getRigidBodyA(swigCPtr), false); return ret; }
public float solveLinearAxis(float timeStep, float jacDiagABInv, btRigidBody body1, SWIGTYPE_p_btVector3 pointInA, btRigidBody body2, SWIGTYPE_p_btVector3 pointInB, int limit_index, SWIGTYPE_p_btVector3 axis_normal_on_a, SWIGTYPE_p_btVector3 anchorPos) { float ret = BulletDynamicsPINVOKE.btTranslationalLimitMotor_solveLinearAxis(swigCPtr, timeStep, jacDiagABInv, btRigidBody.getCPtr(body1), SWIGTYPE_p_btVector3.getCPtr(pointInA), btRigidBody.getCPtr(body2), SWIGTYPE_p_btVector3.getCPtr(pointInB), limit_index, SWIGTYPE_p_btVector3.getCPtr(axis_normal_on_a), SWIGTYPE_p_btVector3.getCPtr(anchorPos)); if (BulletDynamicsPINVOKE.SWIGPendingException.Pending) throw BulletDynamicsPINVOKE.SWIGPendingException.Retrieve(); return ret; }
public void synchronizeSingleMotionState(btRigidBody body) { BulletDynamicsPINVOKE.btDiscreteDynamicsWorld_synchronizeSingleMotionState(swigCPtr, btRigidBody.getCPtr(body)); }
public virtual void removeRigidBody(btRigidBody body) { BulletDynamicsPINVOKE.btDiscreteDynamicsWorld_removeRigidBody(swigCPtr, btRigidBody.getCPtr(body)); }
public btHingeConstraint(btRigidBody rbA, SWIGTYPE_p_btTransform rbAFrame, bool useReferenceFrameA) : this(BulletDynamicsPINVOKE.new_btHingeConstraint__SWIG_6(btRigidBody.getCPtr(rbA), SWIGTYPE_p_btTransform.getCPtr(rbAFrame), useReferenceFrameA), true) { if (BulletDynamicsPINVOKE.SWIGPendingException.Pending) throw BulletDynamicsPINVOKE.SWIGPendingException.Retrieve(); }
public virtual void addRigidBody(btRigidBody body, short group, short mask) { BulletDynamicsPINVOKE.btSimpleDynamicsWorld_addRigidBody__SWIG_1(swigCPtr, btRigidBody.getCPtr(body), group, mask); }
public btRigidBody getRigidBodyB() { btRigidBody ret = new btRigidBody(BulletDynamicsPINVOKE.btSliderConstraint_getRigidBodyB(swigCPtr), false); return ret; }
public btRigidBody getRigidBodyB() { btRigidBody ret = new btRigidBody(BulletDynamicsPINVOKE.btConeTwistConstraint_getRigidBodyB(swigCPtr), false); return(ret); }
internal static HandleRef getCPtr(btRigidBody obj) { return((obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr); }
public btRaycastVehicle(SWIGTYPE_p_btRaycastVehicle__btVehicleTuning tuning, btRigidBody chassis, SWIGTYPE_p_btVehicleRaycaster raycaster) : this(BulletDynamicsPINVOKE.new_btRaycastVehicle(SWIGTYPE_p_btRaycastVehicle__btVehicleTuning.getCPtr(tuning), btRigidBody.getCPtr(chassis), SWIGTYPE_p_btVehicleRaycaster.getCPtr(raycaster)), true) { if (BulletDynamicsPINVOKE.SWIGPendingException.Pending) throw BulletDynamicsPINVOKE.SWIGPendingException.Retrieve(); }
public btPoint2PointConstraint(btRigidBody rbA, SWIGTYPE_p_btVector3 pivotInA) : this(BulletDynamicsPINVOKE.new_btPoint2PointConstraint__SWIG_1(btRigidBody.getCPtr(rbA), SWIGTYPE_p_btVector3.getCPtr(pivotInA)), true) { if (BulletDynamicsPINVOKE.SWIGPendingException.Pending) throw BulletDynamicsPINVOKE.SWIGPendingException.Retrieve(); }
public float solveAngularLimits(float timeStep, SWIGTYPE_p_btVector3 axis, float jacDiagABInv, btRigidBody body0, btRigidBody body1) { float ret = BulletDynamicsPINVOKE.btRotationalLimitMotor_solveAngularLimits(swigCPtr, timeStep, SWIGTYPE_p_btVector3.getCPtr(axis), jacDiagABInv, btRigidBody.getCPtr(body0), btRigidBody.getCPtr(body1)); if (BulletDynamicsPINVOKE.SWIGPendingException.Pending) { throw BulletDynamicsPINVOKE.SWIGPendingException.Retrieve(); } return(ret); }
public virtual void addRigidBody(btRigidBody body) { BulletDynamicsPINVOKE.btSimpleDynamicsWorld_addRigidBody__SWIG_0(swigCPtr, btRigidBody.getCPtr(body)); }
public btRigidBody getRigidBodyB() { btRigidBody ret = new btRigidBody(BulletDynamicsPINVOKE.btHingeConstraint_getRigidBodyB__SWIG_0(swigCPtr), false); return ret; }
public virtual void removeRigidBody(btRigidBody body) { BulletDynamicsPINVOKE.btSimpleDynamicsWorld_removeRigidBody(swigCPtr, btRigidBody.getCPtr(body)); }
public btHingeConstraint(btRigidBody rbA, SWIGTYPE_p_btVector3 pivotInA, SWIGTYPE_p_btVector3 axisInA, bool useReferenceFrameA) : this(BulletDynamicsPINVOKE.new_btHingeConstraint__SWIG_2(btRigidBody.getCPtr(rbA), SWIGTYPE_p_btVector3.getCPtr(pivotInA), SWIGTYPE_p_btVector3.getCPtr(axisInA), useReferenceFrameA), true) { if (BulletDynamicsPINVOKE.SWIGPendingException.Pending) throw BulletDynamicsPINVOKE.SWIGPendingException.Retrieve(); }
public btRigidBody getRigidBodyA() { btRigidBody ret = new btRigidBody(BulletDynamicsPINVOKE.btSliderConstraint_getRigidBodyA(swigCPtr), false); return(ret); }
public btHinge2Constraint(btRigidBody rbA, btRigidBody rbB, SWIGTYPE_p_btVector3 anchor, SWIGTYPE_p_btVector3 axis1, SWIGTYPE_p_btVector3 axis2) : this(BulletDynamicsPINVOKE.new_btHinge2Constraint(btRigidBody.getCPtr(rbA), btRigidBody.getCPtr(rbB), SWIGTYPE_p_btVector3.getCPtr(anchor), SWIGTYPE_p_btVector3.getCPtr(axis1), SWIGTYPE_p_btVector3.getCPtr(axis2)), true) { if (BulletDynamicsPINVOKE.SWIGPendingException.Pending) throw BulletDynamicsPINVOKE.SWIGPendingException.Retrieve(); }
public btGearConstraint(btRigidBody rbA, btRigidBody rbB, SWIGTYPE_p_btVector3 axisInA, SWIGTYPE_p_btVector3 axisInB) : this(BulletDynamicsPINVOKE.new_btGearConstraint__SWIG_1(btRigidBody.getCPtr(rbA), btRigidBody.getCPtr(rbB), SWIGTYPE_p_btVector3.getCPtr(axisInA), SWIGTYPE_p_btVector3.getCPtr(axisInB)), true) { if (BulletDynamicsPINVOKE.SWIGPendingException.Pending) throw BulletDynamicsPINVOKE.SWIGPendingException.Retrieve(); }
internal static HandleRef getCPtr(btRigidBody obj) { return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr; }
public virtual void addRigidBody(btRigidBody body) { BulletDynamicsPINVOKE.btDiscreteDynamicsWorld_addRigidBody__SWIG_0(swigCPtr, btRigidBody.getCPtr(body)); }
public float solveAngularLimits(float timeStep, SWIGTYPE_p_btVector3 axis, float jacDiagABInv, btRigidBody body0, btRigidBody body1) { float ret = BulletDynamicsPINVOKE.btRotationalLimitMotor_solveAngularLimits(swigCPtr, timeStep, SWIGTYPE_p_btVector3.getCPtr(axis), jacDiagABInv, btRigidBody.getCPtr(body0), btRigidBody.getCPtr(body1)); if (BulletDynamicsPINVOKE.SWIGPendingException.Pending) throw BulletDynamicsPINVOKE.SWIGPendingException.Retrieve(); return ret; }
public virtual void addRigidBody(btRigidBody body, short group, short mask) { BulletDynamicsPINVOKE.btDiscreteDynamicsWorld_addRigidBody__SWIG_1(swigCPtr, btRigidBody.getCPtr(body), group, mask); }
public btGeneric6DofConstraint(btRigidBody rbB, SWIGTYPE_p_btTransform frameInB, bool useLinearReferenceFrameB) : this(BulletDynamicsPINVOKE.new_btGeneric6DofConstraint__SWIG_1(btRigidBody.getCPtr(rbB), SWIGTYPE_p_btTransform.getCPtr(frameInB), useLinearReferenceFrameB), true) { if (BulletDynamicsPINVOKE.SWIGPendingException.Pending) throw BulletDynamicsPINVOKE.SWIGPendingException.Retrieve(); }
public btRigidBody getRigidBodyB() { btRigidBody ret = new btRigidBody(BulletDynamicsPINVOKE.btHingeConstraint_getRigidBodyB__SWIG_0(swigCPtr), false); return(ret); }