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


C# IDataReader.ReadSingle方法代码示例

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


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

示例1: Camera

        public Camera(IDataReader state, RenderManager renderManager)
            : base(state)
        {
            addInterface(typeof(ICamera));
            m_renderManager = renderManager;

            m_renderTargetId = new XnaScrapId(state);
            IRenderTarget renderTarget = m_renderManager.getRenderTarget(m_renderTargetId);
            if (renderTarget != null)
            {
                renderTarget.Cameras.Add(this);
            }
            m_fovy = state.ReadSingle();
            m_near = state.ReadSingle();
            m_far = state.ReadSingle();
            m_aspect = state.ReadSingle();

            float f = m_fovy * (float)Math.PI / 180.0f;

            m_projection = Matrix.CreatePerspectiveFieldOfView(f, m_aspect, m_near, m_far);

            m_viewport = new _Viewport(state);

            m_renderManager.Cameras.Add(new XnaScrapId("ImplementCameraNamingYouJerk!"), this);
        }
开发者ID:DelBero,项目名称:XnaScrap,代码行数:25,代码来源:Camera.cs

示例2: Renderable2D

 public Renderable2D(IDataReader state)
     : base(state)
 {
     m_materialName = state.ReadString();
     m_scale.X = state.ReadSingle();
     m_scale.Y = state.ReadSingle();
 }
开发者ID:DelBero,项目名称:XnaScrap,代码行数:7,代码来源:Renderable2D.cs

示例3: CylinderCollider

        public CylinderCollider(IDataReader state)
            : base(state)
        {
            addInterface(typeof(AbstractCollider));

            m_radius = state.ReadSingle();
            m_height = state.ReadSingle();
        }
开发者ID:DelBero,项目名称:XnaScrap,代码行数:8,代码来源:CylinderCollider.cs

示例4: Text3DBillboard

 public Text3DBillboard(IDataReader state)
     : base(state)
 {
     addInterface(typeof(ITextRenderable));
     m_fontName = state.ReadString();
     m_text = state.ReadString();
     m_offset.X = state.ReadSingle(); m_offset.Y = state.ReadSingle(); m_offset.Z = state.ReadSingle();
 }
开发者ID:DelBero,项目名称:XnaScrap,代码行数:8,代码来源:Text3DBillboard.cs

示例5: SkinnedRenderable3D

 public SkinnedRenderable3D(IDataReader state)
     : base(state)
 {
     m_modelName = state.ReadString();
     m_materialName = state.ReadString();
     m_scale.X = state.ReadSingle();
     m_scale.Y = state.ReadSingle();
     m_scale.Z = state.ReadSingle();
 }
开发者ID:DelBero,项目名称:XnaScrap,代码行数:9,代码来源:SkinnedRenderable3D.cs

示例6: StaticScale2D

        public StaticScale2D(IDataReader state)
            : base(state)
        {
            addInterface(typeof(IScale2D));

            m_scale.X = state.ReadSingle();
            m_scale.Y = state.ReadSingle();
            OnChanged();
        }
开发者ID:DelBero,项目名称:XnaScrap,代码行数:9,代码来源:StaticScale2D.cs

示例7: StaticPosition3D

        public StaticPosition3D(IDataReader state)
            : base(state)
        {
            addInterface(typeof(IPosition3D));

            m_position.X = state.ReadSingle();
            m_position.Y = state.ReadSingle();
            m_position.Z = state.ReadSingle();
            OnChanged();
        }
开发者ID:DelBero,项目名称:XnaScrap,代码行数:10,代码来源:StaticPosition3D.cs

示例8: BoxCollider

        public BoxCollider(IDataReader state)
            : base(state)
        {
            addInterface(typeof(AbstractCollider));

            m_scale.X = state.ReadSingle();
            m_scale.Y = state.ReadSingle();
            m_scale.Z = state.ReadSingle();
            m_boundingBox = new Microsoft.Xna.Framework.BoundingBox(new Vector3(-0.5f * m_scale.X, -0.5f * m_scale.Y, -0.5f * m_scale.Z), new Vector3(0.5f * m_scale.X, 0.5f * m_scale.Y, 0.5f * m_scale.Z));
        }
开发者ID:DelBero,项目名称:XnaScrap,代码行数:10,代码来源:BoxCollider.cs

示例9: KeyboardPosition3D

        public KeyboardPosition3D(IDataReader state, IInputManager inputManager)
            : base(state)
        {
            addInterface(typeof(IPosition3D));

            m_inputManager = inputManager;
            m_position.X = state.ReadSingle();
            m_position.Y = state.ReadSingle();
            m_position.Z = state.ReadSingle();
            m_speed = state.ReadSingle();
        }
开发者ID:DelBero,项目名称:XnaScrap,代码行数:11,代码来源:KeyboardPosition3D.cs

示例10: AbstractCollider

 public AbstractCollider(IDataReader state)
     : base(state)
 {
     m_collisionGroupId = new XnaScrapId(state);
     int numCollisionGroups = state.ReadInt32();
     for (int i = 0; i < numCollisionGroups; ++i)
     {
         m_collisionGroupIds.Add( new XnaScrapId(state));
     }
     m_relativePos.X = state.ReadSingle();
     m_relativePos.Y = state.ReadSingle();
     m_relativePos.Z = state.ReadSingle();
 }
开发者ID:DelBero,项目名称:XnaScrap,代码行数:13,代码来源:AbstractCollider.cs

示例11: StaticOrientation3D

        public StaticOrientation3D(IDataReader state)
            : base(state)
        {
            addInterface(typeof(IOrientation3D));

            m_x = state.ReadSingle();
            m_y = state.ReadSingle();
            m_z = state.ReadSingle();
            //float angle = state.ReadSingle();
            //m_orientation = new Quaternion(new Vector3(X,Y,Z),angle);
            m_orientation = Quaternion.CreateFromYawPitchRoll(m_y * (float)Math.PI / 180.0f, m_x * (float)Math.PI / 180.0f, m_z * (float)Math.PI / 180.0f);
            OnChanged();
        }
开发者ID:DelBero,项目名称:XnaScrap,代码行数:13,代码来源:StaticOrientation3D.cs

示例12: AnimationPosition3D

        public AnimationPosition3D(IDataReader state, AnimationService animationService)
            : base(state)
        {
            addInterface(typeof(IPosition3D));

            m_position.X = state.ReadSingle();
            m_position.Y = state.ReadSingle();
            m_position.Z = state.ReadSingle();

            m_animationId = new XnaScrapId(state);
            IAbstractAnimation player = animationService.getAnimation(XnaScrapId.INVALID_ID);

            animationService.animateMe(m_animationId,player, new TimeSpan(0), false, animationChanged);
        }
开发者ID:DelBero,项目名称:XnaScrap,代码行数:14,代码来源:AnimationPosition3D.cs

示例13: SphereCollider

        public SphereCollider(IDataReader state)
            : base(state)
        {
            addInterface(typeof(AbstractCollider));

            m_sphere.Radius = state.ReadSingle();
            m_boundingBox = BoundingBox.CreateFromSphere(m_sphere);
        }
开发者ID:DelBero,项目名称:XnaScrap,代码行数:8,代码来源:SphereCollider.cs

示例14: OrientedBoxCollider

        public OrientedBoxCollider(IDataReader state)
            : base(state)
        {
            addInterface(typeof(AbstractCollider));
            Center.X = state.ReadSingle();
            Center.Y = state.ReadSingle();
            Center.Z = state.ReadSingle();

            HalfExtent.X = state.ReadSingle();
            HalfExtent.Y = state.ReadSingle();
            HalfExtent.Z = state.ReadSingle();

            Orientation.X = state.ReadSingle();
            Orientation.Y = state.ReadSingle();
            Orientation.Z = state.ReadSingle();
            Orientation.W = state.ReadSingle();
        }
开发者ID:DelBero,项目名称:XnaScrap,代码行数:17,代码来源:OrientedBoxCollider.cs

示例15: TouchRotationCircle3D

        public TouchRotationCircle3D(IDataReader state, IInputManager inputManager)
            : base(state)
        {
            addInterface(typeof(IOrientation3D));

            m_inputManager = inputManager;
            m_invertY = state.ReadBoolean();
            m_invertX = state.ReadBoolean();
            m_scale = state.ReadSingle();
        }
开发者ID:DelBero,项目名称:XnaScrap,代码行数:10,代码来源:TouchRotationCircle3D.cs


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