本文整理汇总了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);
}
示例2: Renderable2D
public Renderable2D(IDataReader state)
: base(state)
{
m_materialName = state.ReadString();
m_scale.X = state.ReadSingle();
m_scale.Y = state.ReadSingle();
}
示例3: CylinderCollider
public CylinderCollider(IDataReader state)
: base(state)
{
addInterface(typeof(AbstractCollider));
m_radius = state.ReadSingle();
m_height = state.ReadSingle();
}
示例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();
}
示例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();
}
示例6: StaticScale2D
public StaticScale2D(IDataReader state)
: base(state)
{
addInterface(typeof(IScale2D));
m_scale.X = state.ReadSingle();
m_scale.Y = state.ReadSingle();
OnChanged();
}
示例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();
}
示例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));
}
示例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();
}
示例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();
}
示例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();
}
示例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);
}
示例13: SphereCollider
public SphereCollider(IDataReader state)
: base(state)
{
addInterface(typeof(AbstractCollider));
m_sphere.Radius = state.ReadSingle();
m_boundingBox = BoundingBox.CreateFromSphere(m_sphere);
}
示例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();
}
示例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();
}