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


C# ISceneChildEntity.GetWorldRotation方法代码示例

本文整理汇总了C#中ISceneChildEntity.GetWorldRotation方法的典型用法代码示例。如果您正苦于以下问题:C# ISceneChildEntity.GetWorldRotation方法的具体用法?C# ISceneChildEntity.GetWorldRotation怎么用?C# ISceneChildEntity.GetWorldRotation使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ISceneChildEntity的用法示例。


在下文中一共展示了ISceneChildEntity.GetWorldRotation方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: AuroraPhysXPrim

        public AuroraPhysXPrim(ISceneChildEntity entity, AuroraODEPhysicsScene parent_scene, bool pisPhysical, CollisionLocker dode)
        {
            m_vehicle = new AuroraPhysXDynamics ();
            //gc = GCHandle.Alloc(prim_geom, GCHandleType.Pinned);
            ode = dode;

            PID_D = parent_scene.bodyPIDD;
            PID_G = parent_scene.bodyPIDG;

            // correct for changed timestep
            PID_D /= (parent_scene.ODE_STEPSIZE * 50f); // original ode fps of 50
            PID_G /= (parent_scene.ODE_STEPSIZE * 50f);

            // m_tensor = parent_scene.bodyMotorJointMaxforceTensor;
            body_autodisable_frames = parent_scene.bodyFramesAutoDisable;


            prim_geom = IntPtr.Zero;
            prev_geom = IntPtr.Zero;

            _size = entity.Scale;
            _position = entity.AbsolutePosition;
            fakepos = false;
            _orientation = entity.GetWorldRotation ();
            fakeori = false;
            _pbs = entity.Shape;
            _parent_entity = entity;

            _parent_scene = parent_scene;
            m_targetSpace = (IntPtr)0;

            m_isphysical = pisPhysical;
            // If we're physical, we need to be in the master space for now.
            // linksets *should* be in a space together..  but are not currently
            if (m_isphysical)
                m_targetSpace = _parent_scene.space;

            m_forceacc = Vector3.Zero;
            m_angularforceacc = Vector3.Zero;

            m_UpdateTimecntr = 0;
            m_UpdateFPScntr = 2.5f * parent_scene.StepTime; // this parameter needs retunning and possible came from ini file
            if (m_UpdateTimecntr > .1f) // try to keep it under 100ms
                m_UpdateTimecntr = .1f;

            AddChange (changes.Add, null);
        }
开发者ID:LOG123,项目名称:Aurora-Sim-PhysX,代码行数:47,代码来源:PhysX.cs

示例2: AuroraODEPrim

        public AuroraODEPrim (ISceneChildEntity entity, AuroraODEPhysicsScene parent_scene, bool pisPhysical)
        {
            m_vehicle = new AuroraODEDynamics ();
            //gc = GCHandle.Alloc(prim_geom, GCHandleType.Pinned);

            PID_D = parent_scene.bodyPIDD;
            PID_G = parent_scene.bodyPIDG;

            // correct for changed timestep
            PID_D /= (parent_scene.ODE_STEPSIZE * 50f); // original ode fps of 50
            PID_G /= (parent_scene.ODE_STEPSIZE * 50f);

            body_autodisable_frames = parent_scene.bodyFramesAutoDisable;

            prim_geom = IntPtr.Zero;

            _size = entity.Scale;
            _position = entity.AbsolutePosition;
            fakepos = 0;
            _orientation = entity.GetWorldRotation ();
            fakeori = 0;
            _pbs = entity.Shape;
            _parent_entity = entity;

            _parent_scene = parent_scene;
            m_targetSpace = IntPtr.Zero;

            /*
                        m_isphysical = pisPhysical;
                        if (m_isphysical)
                            m_targetSpace = _parent_scene.space;
            */
            m_isphysical = false;

            m_forceacc = Vector3.Zero;
            m_angularforceacc = Vector3.Zero;

            hasOOBoffsetFromMesh = false;
            _triMeshData = IntPtr.Zero;

            CalcPrimBodyData();

            m_UpdateTimecntr = 0;
            m_UpdateFPScntr = 2.5f * parent_scene.StepTime; // this parameter needs retunning and possible came from ini file
            if (m_UpdateTimecntr > .1f) // try to keep it under 100ms
                m_UpdateTimecntr = .1f;

            AddChange (changes.Add, null);
        }
开发者ID:chazzmac,项目名称:Aurora-Sim,代码行数:49,代码来源:AODEPrim.cs

示例3: GetPartRot

 private LSL_Rotation GetPartRot (ISceneChildEntity part)
 {
     Quaternion q;
     if (part.LinkNum == 0 || part.LinkNum == 1) // unlinked or root prim
     {
         if (part.ParentEntity.RootChild.AttachmentPoint != 0)
         {
             IScenePresence avatar = World.GetScenePresence(part.AttachedAvatar);
             if (avatar != null)
             {
                 if ((avatar.AgentControlFlags & (uint)AgentManager.ControlFlags.AGENT_CONTROL_MOUSELOOK) != 0)
                     q = avatar.CameraRotation; // Mouselook
                 else
                     q = avatar.Rotation; // Currently infrequently updated so may be inaccurate
             }
             else
                 q = part.ParentEntity.GroupRotation; // Likely never get here but just in case
         }
         else
             q = part.ParentEntity.GroupRotation; // just the group rotation
         return new LSL_Rotation(q.X, q.Y, q.Z, q.W);
     }
     q = part.GetWorldRotation();
     return new LSL_Rotation(q.X, q.Y, q.Z, q.W);
 }
开发者ID:rknop,项目名称:Aurora-Sim,代码行数:25,代码来源:LSL_Api.cs

示例4: AuroraODEPrim

        private Vector3 showposition; // a temp hack for now rest of code expects position to be changed immediately

        public AuroraODEPrim(ISceneChildEntity entity, AuroraODEPhysicsScene parent_scene, bool pisPhysical)
        {
            m_vehicle = new AuroraODEDynamics();
            //gc = GCHandle.Alloc(prim_geom, GCHandleType.Pinned);

            // correct for changed timestep
            PID_D /= (parent_scene.ODE_STEPSIZE * 50f); // original ode fps of 50
            PID_G /= (parent_scene.ODE_STEPSIZE * 50f);

            body_autodisable_frames = parent_scene.bodyFramesAutoDisable;

            prim_geom = IntPtr.Zero;

            _size = entity.Scale;
            _position = entity.AbsolutePosition;
            fakepos = 0;
            _orientation = entity.GetWorldRotation();
            fakeori = 0;
            _pbs = entity.Shape;
            _parent_entity = entity;

            _parent_scene = parent_scene;
            m_targetSpace = IntPtr.Zero;

            /*
                        m_isphysical = pisPhysical;
                        if (m_isphysical)
                            m_targetSpace = _parent_scene.space;
            */
            m_isphysical = false;

            m_forceacc = Vector3.Zero;
            m_angularforceacc = Vector3.Zero;

            hasOOBoffsetFromMesh = false;
            _triMeshData = IntPtr.Zero;

            CalcPrimBodyData();

            _parent_scene.AddSimulationChange(() => changeadd());
        }
开发者ID:samiam123,项目名称:Aurora-Sim,代码行数:43,代码来源:AODEPrim.cs


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