Ejemplo n.º 1
0
        /// <summary>
        /// 座標とサイズ、向きが同じコピーを返す
        /// </summary>
        /// <returns>S3DPanel</returns>
        public S3DPanel CopyFrom()
        {
            var panel = new S3DPanel(new S3DPoint(pos.x, pos.y, pos.z), new SDPoint(size.x, size.y));

            panel.direction = this.direction;
            return(panel);
        }
Ejemplo n.º 2
0
        public S3DCube(S3DPoint pos, S3DPoint size)
        {
            this.pos  = pos;
            this.size = size;

            panels[0] = new S3DPanel(new S3DPoint(pos.x, pos.y + size.y / 2.0, pos.z), new SDPoint(size.x, size.z), S3DPanel.Direction.Top);
            panels[1] = new S3DPanel(new S3DPoint(pos.x, pos.y - size.y / 2.0, pos.z), new SDPoint(size.x, size.z), S3DPanel.Direction.Top);
            panels[2] = new S3DPanel(new S3DPoint(pos.x, pos.y, pos.z - size.z / 2.0), new SDPoint(size.x, size.y), S3DPanel.Direction.Wall_NS);
            panels[3] = new S3DPanel(new S3DPoint(pos.x, pos.y, pos.z + size.z / 2.0), new SDPoint(size.x, size.y), S3DPanel.Direction.Wall_NS);
            panels[4] = new S3DPanel(new S3DPoint(pos.x - size.x / 2.0, pos.y, pos.z), new SDPoint(size.z, size.y), S3DPanel.Direction.Wall_EW);
            panels[5] = new S3DPanel(new S3DPoint(pos.x + size.x / 2.0, pos.y, pos.z), new SDPoint(size.z, size.y), S3DPanel.Direction.Wall_EW);
        }