private VertexTransform CreateVertexTransform(CPosition position, CDimension dimension, CTransform transform) { Vector3 translation = new Vector3(position.X + transform.Translation.X, position.Y + transform.Translation.Y, position.Z + transform.Translation.Z); Vector3 scale = new Vector3(dimension.Width * transform.Scale.X, dimension.Height * transform.Scale.Y, transform.Scale.Z); return(new VertexTransform(translation, scale, transform.Origin, transform.Rotation)); }
public override void UpdateEntity(uint entity) { CPosition position = (CPosition)positions[entity]; CDimension dimension = (CDimension)dimensions[entity]; partitioner.Add(new PartitionerEntry(entity, position, dimension)); }
public override void UpdateEntity(uint entity) { CPosition position = (CPosition)positions[entity]; CDimension dimension = (CDimension)dimensions[entity]; CTransform transform = (CTransform)transforms[entity]; CColor color = (CColor)colors[entity]; transformData[entity] = CreateVertexTransform(position, dimension, transform); colorData[entity] = new VertexColor(color.Color); }
public PartitionerEntry(uint entity, CPosition position, CDimension dimension) { Identifier = (int)entity; Span = new RectangleF(position.X, position.Y, dimension.Width, dimension.Height); }