Пример #1
0
 bool sweep(PxGeometry geometry, PxTransform pose, PxVec3 unitDir, PxReal distance,
            PxSweepCallback hitCall, PxHitFlags hitFlags = PxHitFlags.ePOSITION | PxHitFlags.eNORMAL | PxHitFlags.eDISTANCE,
            PxQueryFilterData filterData = null, PxQueryFilterCallback filterCall = null,
            PxReal inflation             = null)
 {
     return(false);
 }
Пример #2
0
    //void createStack(const PxTransform& t, PxU32 size, PxReal halfExtent){
    void createStack(PxTransform t, uint size, float halfExtent)
    {
        //PxShape* shape = gPhysics->createShape(PxBoxGeometry(halfExtent, halfExtent, halfExtent), *gMaterial);
        PxShapePtr shape = gPhysics.createShape(new PxBoxGeometry(halfExtent, halfExtent, halfExtent), gMaterial);

        //for(PxU32 i=0; i<size;i++){
        // for(PxU32 j=0;j<size-i;j++){
        for (int i = 0; i < size; i++)
        {
            for (int j = 0; j < size - i; j++)
            {
                //PxTransform localTm(PxVec3(PxReal(j*2) - PxReal(size-i), PxReal(i*2+1), 0) * halfExtent);
                //PxRigidDynamic* body = gPhysics->createRigidDynamic(t.transform(localTm));
                //body->attachShape(*shape);
                //PxRigidBodyExt::updateMassAndInertia(*body, 10.0f);
                //gScene->addActor(*body);
                PxTransform       localTm = new PxTransform(new PxVec3(((j * 2) - (size - i)) * halfExtent, (i * 2 + 1) * halfExtent, 0));
                PxRigidDynamicPtr body    = gPhysics.createRigidDynamic(t.transform(localTm));
                body.attachShape(shape);
                PxRigidBodyExt.updateMassAndInertia(body, 10);
                gScene.addActor(body);
            }
        }
        //shape->release();
        shape.release();
    }
Пример #3
0
 public virtual void sweep(PxGeometry geometry, PxTransform pose, PxVec3 unitDir, float distance)
 {
     physxPINVOKE.PxBatchQuery_sweep__SWIG_6(swigCPtr, PxGeometry.getCPtr(geometry), PxTransform.getCPtr(pose), PxVec3.getCPtr(unitDir), distance);
     if (physxPINVOKE.SWIGPendingException.Pending)
     {
         throw physxPINVOKE.SWIGPendingException.Retrieve();
     }
 }
Пример #4
0
 public virtual void sweep(PxGeometry geometry, PxTransform pose, PxVec3 unitDir, float distance, SWIGTYPE_p_uint16_t maxTouchHits, SWIGTYPE_p_physx__PxFlagsT_physx__PxHitFlag__Enum_uint16_t_t hitFlags)
 {
     physxPINVOKE.PxBatchQuery_sweep__SWIG_4(swigCPtr, PxGeometry.getCPtr(geometry), PxTransform.getCPtr(pose), PxVec3.getCPtr(unitDir), distance, SWIGTYPE_p_uint16_t.getCPtr(maxTouchHits), SWIGTYPE_p_physx__PxFlagsT_physx__PxHitFlag__Enum_uint16_t_t.getCPtr(hitFlags));
     if (physxPINVOKE.SWIGPendingException.Pending)
     {
         throw physxPINVOKE.SWIGPendingException.Retrieve();
     }
 }
Пример #5
0
 public virtual void sweep(PxGeometry geometry, PxTransform pose, PxVec3 unitDir, float distance, SWIGTYPE_p_uint16_t maxTouchHits, SWIGTYPE_p_physx__PxFlagsT_physx__PxHitFlag__Enum_uint16_t_t hitFlags, PxQueryFilterData filterData, SWIGTYPE_p_void userData, PxQueryCache cache, float inflation)
 {
     physxPINVOKE.PxBatchQuery_sweep__SWIG_0(swigCPtr, PxGeometry.getCPtr(geometry), PxTransform.getCPtr(pose), PxVec3.getCPtr(unitDir), distance, SWIGTYPE_p_uint16_t.getCPtr(maxTouchHits), SWIGTYPE_p_physx__PxFlagsT_physx__PxHitFlag__Enum_uint16_t_t.getCPtr(hitFlags), PxQueryFilterData.getCPtr(filterData), SWIGTYPE_p_void.getCPtr(userData), PxQueryCache.getCPtr(cache), inflation);
     if (physxPINVOKE.SWIGPendingException.Pending)
     {
         throw physxPINVOKE.SWIGPendingException.Retrieve();
     }
 }
Пример #6
0
 public virtual void overlap(PxGeometry geometry, PxTransform pose)
 {
     physxPINVOKE.PxBatchQuery_overlap__SWIG_4(swigCPtr, PxGeometry.getCPtr(geometry), PxTransform.getCPtr(pose));
     if (physxPINVOKE.SWIGPendingException.Pending)
     {
         throw physxPINVOKE.SWIGPendingException.Retrieve();
     }
 }
Пример #7
0
 public virtual void overlap(PxGeometry geometry, PxTransform pose, SWIGTYPE_p_uint16_t maxTouchHits)
 {
     physxPINVOKE.PxBatchQuery_overlap__SWIG_3(swigCPtr, PxGeometry.getCPtr(geometry), PxTransform.getCPtr(pose), SWIGTYPE_p_uint16_t.getCPtr(maxTouchHits));
     if (physxPINVOKE.SWIGPendingException.Pending)
     {
         throw physxPINVOKE.SWIGPendingException.Retrieve();
     }
 }
Пример #8
0
 public virtual void overlap(PxGeometry geometry, PxTransform pose, SWIGTYPE_p_uint16_t maxTouchHits, PxQueryFilterData filterData, SWIGTYPE_p_void userData, PxQueryCache cache)
 {
     physxPINVOKE.PxBatchQuery_overlap__SWIG_0(swigCPtr, PxGeometry.getCPtr(geometry), PxTransform.getCPtr(pose), SWIGTYPE_p_uint16_t.getCPtr(maxTouchHits), PxQueryFilterData.getCPtr(filterData), SWIGTYPE_p_void.getCPtr(userData), PxQueryCache.getCPtr(cache));
     if (physxPINVOKE.SWIGPendingException.Pending)
     {
         throw physxPINVOKE.SWIGPendingException.Retrieve();
     }
 }
Пример #9
0
 public virtual void setKinematicTarget(PxTransform destination)
 {
     physxPINVOKE.PxRigidDynamic_setKinematicTarget(swigCPtr, PxTransform.getCPtr(destination));
     if (physxPINVOKE.SWIGPendingException.Pending)
     {
         throw physxPINVOKE.SWIGPendingException.Retrieve();
     }
 }
Пример #10
0
 public virtual void visualizeDoubleCone(PxTransform t, float angle, bool active)
 {
     physxPINVOKE.PxConstraintVisualizer_visualizeDoubleCone(swigCPtr, PxTransform.getCPtr(t), angle, active);
     if (physxPINVOKE.SWIGPendingException.Pending)
     {
         throw physxPINVOKE.SWIGPendingException.Retrieve();
     }
 }
Пример #11
0
 public virtual void setChildPose(PxTransform pose)
 {
     physxPINVOKE.PxArticulationJoint_setChildPose(swigCPtr, PxTransform.getCPtr(pose));
     if (physxPINVOKE.SWIGPendingException.Pending)
     {
         throw physxPINVOKE.SWIGPendingException.Retrieve();
     }
 }
Пример #12
0
 public virtual void visualizeAngularLimit(PxTransform t0, float lower, float upper, bool active)
 {
     physxPINVOKE.PxConstraintVisualizer_visualizeAngularLimit(swigCPtr, PxTransform.getCPtr(t0), lower, upper, active);
     if (physxPINVOKE.SWIGPendingException.Pending)
     {
         throw physxPINVOKE.SWIGPendingException.Retrieve();
     }
 }
Пример #13
0
 public virtual void setLocalPose(PxTransform pose)
 {
     physxPINVOKE.PxShape_setLocalPose(swigCPtr, PxTransform.getCPtr(pose));
     if (physxPINVOKE.SWIGPendingException.Pending)
     {
         throw physxPINVOKE.SWIGPendingException.Retrieve();
     }
 }
Пример #14
0
 public virtual void visualizeLinearLimit(PxTransform t0, PxTransform t1, float value, bool active)
 {
     physxPINVOKE.PxConstraintVisualizer_visualizeLinearLimit(swigCPtr, PxTransform.getCPtr(t0), PxTransform.getCPtr(t1), value, active);
     if (physxPINVOKE.SWIGPendingException.Pending)
     {
         throw physxPINVOKE.SWIGPendingException.Retrieve();
     }
 }
Пример #15
0
 public virtual void onAdvance(SWIGTYPE_p_p_physx__PxRigidBody bodyBuffer, PxTransform poseBuffer, SWIGTYPE_p_uint32_t count)
 {
     physxPINVOKE.PxSimulationEventCallback_onAdvance(swigCPtr, SWIGTYPE_p_p_physx__PxRigidBody.getCPtr(bodyBuffer), PxTransform.getCPtr(poseBuffer), SWIGTYPE_p_uint32_t.getCPtr(count));
     if (physxPINVOKE.SWIGPendingException.Pending)
     {
         throw physxPINVOKE.SWIGPendingException.Retrieve();
     }
 }
Пример #16
0
 public virtual void visualizeJointFrames(PxTransform parent, PxTransform child)
 {
     physxPINVOKE.PxConstraintVisualizer_visualizeJointFrames(swigCPtr, PxTransform.getCPtr(parent), PxTransform.getCPtr(child));
     if (physxPINVOKE.SWIGPendingException.Pending)
     {
         throw physxPINVOKE.SWIGPendingException.Retrieve();
     }
 }
Пример #17
0
 public virtual void setGlobalPose(PxTransform pose)
 {
     physxPINVOKE.PxRigidActor_setGlobalPose__SWIG_1(swigCPtr, PxTransform.getCPtr(pose));
     if (physxPINVOKE.SWIGPendingException.Pending)
     {
         throw physxPINVOKE.SWIGPendingException.Retrieve();
     }
 }
Пример #18
0
 public virtual void visualizeLimitCone(PxTransform t, float ySwing, float zSwing, bool active)
 {
     physxPINVOKE.PxConstraintVisualizer_visualizeLimitCone(swigCPtr, PxTransform.getCPtr(t), ySwing, zSwing, active);
     if (physxPINVOKE.SWIGPendingException.Pending)
     {
         throw physxPINVOKE.SWIGPendingException.Retrieve();
     }
 }
Пример #19
0
    static void createGroudPlane()
    {
        PxTransform    pose  = new PxTransform(new PxVec3(0.0f, 0.0f, 0.0f), new PxQuat(MathF.PI * 0.5f, new PxVec3(0.0f, 0.0f, 1.0f)));
        PxRigidStatic *actor = gPhysics->createRigidStatic(pose);
        PxShape *      shape = PxRigidActorExt.createExclusiveShape(ref *actor, new PxPlaneGeometry(), *gMaterial,
                                                                    PxShapeFlags.eVISUALIZATION | PxShapeFlags.eSCENE_QUERY_SHAPE | PxShapeFlags.eSIMULATION_SHAPE); //BIOQUIRK: Missing default

        gScene->addActor(ref *actor);
    }
Пример #20
0
 public virtual PxVolumeCache.FillStatus fill(PxGeometry cacheVolume, PxTransform pose)
 {
     PxVolumeCache.FillStatus ret = (PxVolumeCache.FillStatus)physxPINVOKE.PxVolumeCache_fill(swigCPtr, PxGeometry.getCPtr(cacheVolume), PxTransform.getCPtr(pose));
     if (physxPINVOKE.SWIGPendingException.Pending)
     {
         throw physxPINVOKE.SWIGPendingException.Retrieve();
     }
     return(ret);
 }
Пример #21
0
        static void SetLocalPose(IntPtr shape, PxTransform pxTransform)
        {
            IntPtr transformPtr = Marshal.AllocHGlobal(Marshal.SizeOf(pxTransform));

            Marshal.StructureToPtr(pxTransform, transformPtr, false);

            setLocalPose(shape, transformPtr);

            Marshal.FreeHGlobal(transformPtr);
        }
Пример #22
0
        public virtual bool overlap(PxGeometry geometry, PxTransform pose, SWIGTYPE_p_physx__PxHitCallbackT_physx__PxOverlapHit_t hitCall)
        {
            bool ret = physxPINVOKE.PxVolumeCache_overlap__SWIG_2(swigCPtr, PxGeometry.getCPtr(geometry), PxTransform.getCPtr(pose), SWIGTYPE_p_physx__PxHitCallbackT_physx__PxOverlapHit_t.getCPtr(hitCall));

            if (physxPINVOKE.SWIGPendingException.Pending)
            {
                throw physxPINVOKE.SWIGPendingException.Retrieve();
            }
            return(ret);
        }
Пример #23
0
        public static PxBounds3 transformFast(PxTransform transform, PxBounds3 bounds)
        {
            PxBounds3 ret = new PxBounds3(physxPINVOKE.PxBounds3_transformFast__SWIG_1(PxTransform.getCPtr(transform), PxBounds3.getCPtr(bounds)), true);

            if (physxPINVOKE.SWIGPendingException.Pending)
            {
                throw physxPINVOKE.SWIGPendingException.Retrieve();
            }
            return(ret);
        }
Пример #24
0
        public static PxPlane PxPlaneEquationFromTransform(PxTransform transform)
        {
            PxPlane ret = new PxPlane(physxPINVOKE.PxPlaneEquationFromTransform(PxTransform.getCPtr(transform)), true);

            if (physxPINVOKE.SWIGPendingException.Pending)
            {
                throw physxPINVOKE.SWIGPendingException.Retrieve();
            }
            return(ret);
        }
Пример #25
0
        public static PxTransform PxTransformFromPlaneEquation(PxPlane plane)
        {
            PxTransform ret = new PxTransform(physxPINVOKE.PxTransformFromPlaneEquation(PxPlane.getCPtr(plane)), true);

            if (physxPINVOKE.SWIGPendingException.Pending)
            {
                throw physxPINVOKE.SWIGPendingException.Retrieve();
            }
            return(ret);
        }
Пример #26
0
        public static PxTransform PxTransformFromSegment(PxVec3 p0, PxVec3 p1)
        {
            PxTransform ret = new PxTransform(physxPINVOKE.PxTransformFromSegment__SWIG_1(PxVec3.getCPtr(p0), PxVec3.getCPtr(p1)), true);

            if (physxPINVOKE.SWIGPendingException.Pending)
            {
                throw physxPINVOKE.SWIGPendingException.Retrieve();
            }
            return(ret);
        }
Пример #27
0
        public virtual bool sweep(PxGeometry geometry, PxTransform pose, PxVec3 unitDir, float distance, SWIGTYPE_p_physx__PxHitCallbackT_physx__PxSweepHit_t hitCall)
        {
            bool ret = physxPINVOKE.PxVolumeCache_sweep__SWIG_4(swigCPtr, PxGeometry.getCPtr(geometry), PxTransform.getCPtr(pose), PxVec3.getCPtr(unitDir), distance, SWIGTYPE_p_physx__PxHitCallbackT_physx__PxSweepHit_t.getCPtr(hitCall));

            if (physxPINVOKE.SWIGPendingException.Pending)
            {
                throw physxPINVOKE.SWIGPendingException.Retrieve();
            }
            return(ret);
        }
Пример #28
0
        public static PxBounds3 poseExtent(PxTransform pose, PxVec3 extent)
        {
            PxBounds3 ret = new PxBounds3(physxPINVOKE.PxBounds3_poseExtent(PxTransform.getCPtr(pose), PxVec3.getCPtr(extent)), true);

            if (physxPINVOKE.SWIGPendingException.Pending)
            {
                throw physxPINVOKE.SWIGPendingException.Retrieve();
            }
            return(ret);
        }
Пример #29
0
        public static PxTransform PxTransformFromSegment(PxVec3 p0, PxVec3 p1, SWIGTYPE_p_float halfHeight)
        {
            PxTransform ret = new PxTransform(physxPINVOKE.PxTransformFromSegment__SWIG_0(PxVec3.getCPtr(p0), PxVec3.getCPtr(p1), SWIGTYPE_p_float.getCPtr(halfHeight)), true);

            if (physxPINVOKE.SWIGPendingException.Pending)
            {
                throw physxPINVOKE.SWIGPendingException.Retrieve();
            }
            return(ret);
        }
Пример #30
0
        public virtual bool getKinematicTarget(PxTransform target)
        {
            bool ret = physxPINVOKE.PxRigidDynamic_getKinematicTarget(swigCPtr, PxTransform.getCPtr(target));

            if (physxPINVOKE.SWIGPendingException.Pending)
            {
                throw physxPINVOKE.SWIGPendingException.Retrieve();
            }
            return(ret);
        }