示例#1
0
 public override void compute_global_transforms(Transform3Cache tcache)
 {
     base.compute_global_transforms(tcache);
     foreach (Element.Builder e in _elements)
     {
         e.compute_global_transforms(tcache);
     }
 }
            private Transform3Cache setCoordinates()
            {
                _transform3Cache = new Transform3Cache();
                foreach (Element.Builder e in _elements)
                {
                    e.compute_global_transforms(_transform3Cache);
                }

                return(_transform3Cache);
            }
            public OpticalSystem build()
            {
                generateIds();
                Transform3Cache transform3Cache = setCoordinates();
                List <Element>  elements        = buildElements();
                OpticalSystem   system          = new OpticalSystem(elements, transform3Cache);

                foreach (Element e in system.elements())
                {
                    e.set_system(system);
                }

                return(system);
            }
示例#4
0
            public virtual void compute_global_transforms(Transform3Cache tcache)
            {
                //System.err.println("Computing coordinate for " + this);

                Transform3 t = _transform; // local transform

                Element.Builder p = this._parent;
                while (p != null)
                {
                    t = Transform3.compose(p._transform, t);
                    p = p._parent;
                }

                tcache.put_local_2_global_transform(this._id, t);           // Local to global
                tcache.put_global_2_local_transform(this._id, t.inverse()); // Global to local
            }
 public OpticalSystem(List <Element> elements, Transform3Cache transform3Cache)
 {
     this._elements        = elements;
     this._transform3Cache = transform3Cache;
 }
示例#6
0
 public override void compute_global_transforms(Transform3Cache tcache)
 {
     base.compute_global_transforms(tcache);
 }