예제 #1
0
        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));
        }
예제 #2
0
        public override void UpdateEntity(uint entity)
        {
            CPosition  position  = (CPosition)positions[entity];
            CDimension dimension = (CDimension)dimensions[entity];

            partitioner.Add(new PartitionerEntry(entity, position, dimension));
        }
예제 #3
0
        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);
        }
예제 #4
0
 public PartitionerEntry(uint entity, CPosition position, CDimension dimension)
 {
     Identifier = (int)entity;
     Span       = new RectangleF(position.X, position.Y, dimension.Width, dimension.Height);
 }