当前位置: 首页>>代码示例>>C#>>正文


C# BulletSPlugin.BulletConstraint类代码示例

本文整理汇总了C#中OpenSim.Region.Physics.BulletSPlugin.BulletConstraint的典型用法代码示例。如果您正苦于以下问题:C# BulletConstraint类的具体用法?C# BulletConstraint怎么用?C# BulletConstraint使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


BulletConstraint类属于OpenSim.Region.Physics.BulletSPlugin命名空间,在下文中一共展示了BulletConstraint类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: BSHingeConstraint

 public BSHingeConstraint(BulletSim world, BulletBody obj1, BulletBody obj2,
                 Vector3 pivotInA, Vector3 pivotInB,
                 Vector3 axisInA, Vector3 axisInB,
                 bool useLinearReferenceFrameA, bool disableCollisionsBetweenLinkedBodies)
 {
     m_world = world;
     m_body1 = obj1;
     m_body2 = obj2;
     m_constraint = new BulletConstraint(
                         BulletSimAPI.CreateHingeConstraint2(m_world.ptr, m_body1.ptr, m_body2.ptr,
                             pivotInA, pivotInB,
                             axisInA, axisInB,
                             useLinearReferenceFrameA, disableCollisionsBetweenLinkedBodies));
     m_enabled = true;
 }
开发者ID:p07r0457,项目名称:opensim,代码行数:15,代码来源:BSHingeConstraint.cs

示例2: BS6DofConstraint

 // Create a btGeneric6DofConstraint
 public BS6DofConstraint(BulletSim world, BulletBody obj1, BulletBody obj2,
                 Vector3 frame1, Quaternion frame1rot,
                 Vector3 frame2, Quaternion frame2rot,
                 bool useLinearReferenceFrameA, bool disableCollisionsBetweenLinkedBodies)
 {
     m_world = world;
     m_body1 = obj1;
     m_body2 = obj2;
     m_constraint = new BulletConstraint(
                         BulletSimAPI.Create6DofConstraint2(m_world.ptr, m_body1.ptr, m_body2.ptr,
                             frame1, frame1rot,
                             frame2, frame2rot,
                             useLinearReferenceFrameA, disableCollisionsBetweenLinkedBodies));
     m_enabled = true;
     world.physicsScene.DetailLog("{0},BS6DofConstraint,createFrame,wID={1}, rID={2}, rBody={3}, cID={4}, cBody={5}",
                         BSScene.DetailLogZero, world.worldID,
                         obj1.ID, obj1.ptr.ToString("X"), obj2.ID, obj2.ptr.ToString("X"));
 }
开发者ID:p07r0457,项目名称:opensim,代码行数:19,代码来源:BS6DofConstraint.cs

示例3: TranslationalLimitMotor

 public abstract bool TranslationalLimitMotor(BulletConstraint constrain, float enable, float targetVel, float maxMotorForce);
开发者ID:KSLcom,项目名称:Aurora-Sim,代码行数:1,代码来源:BSApiTemplate.cs

示例4: SetFrames

 public abstract bool SetFrames(BulletConstraint constrain,
     Vector3 frameA, Quaternion frameArot, Vector3 frameB, Quaternion frameBrot);
开发者ID:KSLcom,项目名称:Aurora-Sim,代码行数:2,代码来源:BSApiTemplate.cs

示例5: SetConstraintNumSolverIterations

 public abstract void SetConstraintNumSolverIterations(BulletConstraint constrain, float iterations);
开发者ID:KSLcom,项目名称:Aurora-Sim,代码行数:1,代码来源:BSApiTemplate.cs

示例6: SetBreakingImpulseThreshold

 public abstract bool SetBreakingImpulseThreshold(BulletConstraint constrain, float threshold);
开发者ID:KSLcom,项目名称:Aurora-Sim,代码行数:1,代码来源:BSApiTemplate.cs

示例7: RemoveConstraintRef

 public abstract void RemoveConstraintRef(BulletBody obj, BulletConstraint constrain);
开发者ID:KSLcom,项目名称:Aurora-Sim,代码行数:1,代码来源:BSApiTemplate.cs

示例8: HasAnisotripicFriction

 public abstract bool HasAnisotripicFriction(BulletConstraint constrain);
开发者ID:KSLcom,项目名称:Aurora-Sim,代码行数:1,代码来源:BSApiTemplate.cs

示例9: AddConstraintToWorld

        public override bool AddConstraintToWorld(BulletWorld pWorld, BulletConstraint pConstraint, bool pDisableCollisionsBetweenLinkedObjects)
        {
            DiscreteDynamicsWorld world = (pWorld as BulletWorldXNA).world;
            TypedConstraint constraint = (pConstraint as BulletConstraintXNA).constrain;
            world.AddConstraint(constraint, pDisableCollisionsBetweenLinkedObjects);

            return true;
        }
开发者ID:BogusCurry,项目名称:WhiteCore-Dev,代码行数:8,代码来源:BSAPIXNA.cs

示例10: AddConstraintRef

 public override void AddConstraintRef(BulletBody pBody, BulletConstraint pConstraint)
 {
     RigidBody body = (pBody as BulletBodyXNA).rigidBody;
     TypedConstraint constrain = (pConstraint as BulletConstraintXNA).constrain;
     body.AddConstraintRef(constrain);
 }
开发者ID:BogusCurry,项目名称:WhiteCore-Dev,代码行数:6,代码来源:BSAPIXNA.cs

示例11: UseFrameOffset

 public override bool UseFrameOffset(BulletConstraint pConstraint, float onOff)
 {
     Generic6DofConstraint constraint = (pConstraint as BulletConstraintXNA).constrain as Generic6DofConstraint;
     constraint.SetUseFrameOffset((onOff == 0) ? false : true);
     return true;
 }
开发者ID:BogusCurry,项目名称:WhiteCore-Dev,代码行数:6,代码来源:BSAPIXNA.cs

示例12: TranslationalLimitMotor

        public override bool TranslationalLimitMotor(BulletConstraint pConstraint, float ponOff, float targetVelocity, float maxMotorForce)
        {
            TypedConstraint tconstrain = (pConstraint as BulletConstraintXNA).constrain;
            bool onOff = ponOff != 0;
            bool ret = false;

            switch (tconstrain.GetConstraintType())
            {
            case TypedConstraintType.D6_CONSTRAINT_TYPE:
                Generic6DofConstraint constrain = tconstrain as Generic6DofConstraint;
                constrain.GetTranslationalLimitMotor().m_enableMotor[0] = onOff;
                constrain.GetTranslationalLimitMotor().m_targetVelocity[0] = targetVelocity;
                constrain.GetTranslationalLimitMotor().m_maxMotorForce[0] = maxMotorForce;
                ret = true;
                break;
            }

            return ret;
        }
开发者ID:BogusCurry,项目名称:WhiteCore-Dev,代码行数:19,代码来源:BSAPIXNA.cs

示例13: SetLinearLimits

 public override bool SetLinearLimits(BulletConstraint pConstraint, Vector3 low, Vector3 high)
 {
     Generic6DofConstraint constraint = (pConstraint as BulletConstraintXNA).constrain as Generic6DofConstraint;
     IndexedVector3 lowlimit = new IndexedVector3(low.X, low.Y, low.Z);
     IndexedVector3 highlimit = new IndexedVector3(high.X, high.Y, high.Z);
     constraint.SetLinearLowerLimit(lowlimit);
     constraint.SetLinearUpperLimit(highlimit);
     return true;
 }
开发者ID:BogusCurry,项目名称:WhiteCore-Dev,代码行数:9,代码来源:BSAPIXNA.cs

示例14: SetFrames

        //SetFrames(m_constraint.ptr, frameA, frameArot, frameB, frameBrot);
        public override bool SetFrames(BulletConstraint pConstraint, Vector3 pframe1, Quaternion pframe1rot, Vector3 pframe2, Quaternion pframe2rot)
        {
            Generic6DofConstraint constraint = (pConstraint as BulletConstraintXNA).constrain as Generic6DofConstraint;
            IndexedVector3 frame1v = new IndexedVector3(pframe1.X, pframe1.Y, pframe1.Z);
            IndexedQuaternion frame1rot = new IndexedQuaternion(pframe1rot.X, pframe1rot.Y, pframe1rot.Z, pframe1rot.W);
            IndexedMatrix frame1 = IndexedMatrix.CreateFromQuaternion(frame1rot);
            frame1._origin = frame1v;

            // 20131224 not used        IndexedVector3 frame2v = new IndexedVector3(pframe2.X, pframe2.Y, pframe2.Z);
            IndexedQuaternion frame2rot = new IndexedQuaternion(pframe2rot.X, pframe2rot.Y, pframe2rot.Z, pframe2rot.W);
            IndexedMatrix frame2 = IndexedMatrix.CreateFromQuaternion(frame2rot);
            frame2._origin = frame1v;
            constraint.SetFrames(ref frame1, ref frame2);
            return true;
        }
开发者ID:BogusCurry,项目名称:WhiteCore-Dev,代码行数:16,代码来源:BSAPIXNA.cs

示例15: DumpConstraint

 public virtual void DumpConstraint(BulletWorld sim, BulletConstraint constrain)
 {
 }
开发者ID:KSLcom,项目名称:Aurora-Sim,代码行数:3,代码来源:BSApiTemplate.cs


注:本文中的OpenSim.Region.Physics.BulletSPlugin.BulletConstraint类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。