Beispiel #1
0
		private void AddVerticesFromLine(DrawableEntity entity)
		{
			var color = entity.Get<Color>();
			var points = entity.GetInterpolatedList<Vector3D>();
			foreach (Vector3D point in points)
				vertices.Add(new VertexPosition3DColor(point, color));
		}
Beispiel #2
0
		private void AddVerticesFromLine(DrawableEntity entity)
		{
			var color = entity.Get<Color>();
			var points = entity.GetInterpolatedList<Vector2D>();
			foreach (Vector2D point in points)
				vertices.Add(new VertexPosition2DColor(ScreenSpace.Current.ToPixelSpaceRounded(point),
					color));
		}
 private static void ThrowExceptionsWhenInterpolationElementsAreNotFound(
     DrawableEntity drawableEntity)
 {
     Assert.Throws <DrawableEntity.ListWithLerpElementsForInterpolationWasNotFound>(
         () => { drawableEntity.GetInterpolatedList <MockLerp>(); });
     Assert.Throws <DrawableEntity.ArrayWithLerpElementsForInterpolationWasNotFound>(
         () => { drawableEntity.GetInterpolatedArray <MockLerp>(); });
 }
        private void AddVerticesFromLine(DrawableEntity entity)
        {
            var color  = entity.Get <Color>();
            var points = entity.GetInterpolatedList <Vector3D>();

            foreach (Vector3D point in points)
            {
                vertices.Add(new VertexPosition3DColor(point, color));
            }
        }
        private void AddVerticesFromLine(DrawableEntity entity)
        {
            var color  = entity.Get <Color>();
            var points = entity.GetInterpolatedList <Vector2D>();

            foreach (Vector2D point in points)
            {
                vertices.Add(new VertexPosition2DColor(ScreenSpace.Current.ToPixelSpaceRounded(point),
                                                       color));
            }
        }