Class: Aims::Atom
- Inherits:
-
Object
- Object
- Aims::Atom
- Defined in:
- lib/aims_project/atom.rb
Overview
Adds display behavior to atoms.
Constant Summary collapse
- @@black =
nil
- @@white =
nil
- @@blue =
nil
- @@red =
nil
- @@green =
nil
- @@dark =
nil
- @@light =
nil
- @@yellow =
nil
- @@orange =
nil
- @@graypurple =
nil
Instance Method Summary collapse
Instance Method Details
#material ⇒ Object
34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 |
# File 'lib/aims_project/atom.rb', line 34 def material unless @@yellow @@yellow = AimsProject::Material.new(1,1,0,1) end unless @@black @@lback = AimsProject::Material.new(0,0,0,1) end unless @@white @@lback = AimsProject::Material.new(1,1,1,1) end unless @@blue @@blue = AimsProject::Material.new(0,0,1,1) end unless @@red @@red = AimsProject::Material.new(1,0.4,0.4,1) end unless @@green @@green = AimsProject::Material.new(0,1,0,1) end unless @@orange @@orange = AimsProject::Material.new(1, 0.5, 0, 1) end unless @@graypurple @@graypurple = AimsProject::Material.new(0.45, 0.55, 0.55, 1) end unless @@dark @@dark = AimsProject::Material.new(0.2,0.2,0.2,1) end unless @@light @@light = AimsProject::Material.new(1,1,1,1) end case self.species when /Ga/ @@dark when /As/ @@light when /In/ @@graypurple when /P/ @@orange when /Si/ @@yellow when /C/ @@red else @@blue end end |