public MolMovementEntity(DisplayMode displayMode, AtomEntity[] atoms) { this.displayMode = displayMode; this.atoms = atoms; // calc bounding box Vector3 min = new Vector3(float.MaxValue, float.MaxValue, float.MaxValue); Vector3 max = new Vector3(float.MinValue, float.MinValue, float.MinValue); foreach (AtomEntity item in atoms) { if (item.BoundingBox.Centre.X - item.ItemRadius < min.X) min.X = item.BoundingBox.Centre.X - item.ItemRadius; if (item.BoundingBox.Centre.X + item.ItemRadius > max.X) max.X = item.BoundingBox.Centre.X + item.ItemRadius; if (item.BoundingBox.Centre.Y - item.ItemRadius < min.Y) min.Y = item.BoundingBox.Centre.Y - item.ItemRadius; if (item.BoundingBox.Centre.Y + item.ItemRadius > max.Y) max.Y = item.BoundingBox.Centre.Y + item.ItemRadius; if (item.BoundingBox.Centre.Z - item.ItemRadius < min.Z) min.Z = item.BoundingBox.Centre.Z - item.ItemRadius; if (item.BoundingBox.Centre.Z + item.ItemRadius > max.Z) max.Z = item.BoundingBox.Centre.Z + item.ItemRadius; } bBox = new BoundingBox(min, max); }
public void ChangeAtomElement(AtomEntity atom, string newChemSymbol) { throw new Exception("The method or operation is not implemented."); }
public void RemoveAtom(AtomEntity atom, bool queryUser) { throw new Exception("The method or operation is not implemented."); }
public AtomSymbolEntity(AtomEntity atom) { this.atom = atom; bBox = new BoundingBox((Vector3)atom.Position3D, (Vector3)atom.Position3D); }
public AtomSelectionEntity(AtomEntity atom) { this.atom = atom; atom.SelectionEntity = this; bBox = new BoundingBox((Vector3)atom.Position3D, (Vector3)atom.Position3D); }
public AtomSymbolEntity(AtomEntity atom) { this.atom = atom; bBox = new BoundingBox((Vector3)atom.Position3D, (Vector3)atom.Position3D); }
public AtomSelectionEntity(AtomEntity atom) { this.atom = atom; atom.SelectionEntity = this; bBox = new BoundingBox((Vector3)atom.Position3D, (Vector3)atom.Position3D); }