Example #1
0
        /// <summary>
        /// Add a single entity
        /// </summary>
        /// <param name="e">the entity</param>
        /// <param name="label">optional label, null if none</param>
        /// <returns>the 2 entity clones actually used in the view</returns>
        public Entity[] Add(Entity e, devDept.Eyeshot.Labels.Label[] labels)
        {
            Entity[] ents = new Entity[2];
            m_viewleft.Entities.Add(ents[0] = (Entity)e.Clone());
            m_viewright.Entities.Add(ents[1] = (Entity)e.Clone());
            ents[0].EntityData = ents[1].EntityData = e.EntityData;
            ents[0].GroupIndex = ents[1].GroupIndex = e.GroupIndex;

            if (e is Mesh)
            {
                e.ColorMethod = colorMethodType.byEntity;
                Color baseColor = e.Color;
                if (e.LayerIndex > 0 && e.LayerIndex < this[0].Layers.Count)
                    baseColor = this[0].Layers[e.LayerIndex].Color;
                e.Color = Color.FromArgb(50, baseColor);
            }
            if (labels != null)
            {
                foreach (devDept.Eyeshot.Labels.Label label in labels)
                {
                    label.Visible = false;
                    m_viewleft.Labels.Add(label);
                    m_viewright.Labels.Add(label);
                }
            }

            return ents;
        }
Example #2
0
 public Entity[][] AddRange(IEnumerable<Entity> e, devDept.Eyeshot.Labels.Label[] label)
 {
     Entity[][] ents = new Entity[e.Count()][];
     int i = 0;
     foreach (Entity ent in e)
     {
         ents[i++] = Add(ent, label);
     }
     return ents;
 }
Example #3
0
 public void TransformBy(devDept.Eyeshot.Geometry.Transformation T)
 {
     Point3Attribute p;
        Point3D p3d;
        foreach (IAttribute a in Attributes)
        {
             p = a as Point3Attribute;
             if (p != null)
             {
                  p3d = new Point3D(p.Pt);
                  p3d = T * p3d;
                  p[0] = p3d.X;
                  p[1] = p3d.Y;
                  p[2] = p3d.Z;
             }
        }
 }