August'24: Kamaelia is in maintenance mode and will recieve periodic updates, about twice a year, primarily targeted around Python 3 and ecosystem compatibility. PRs are always welcome. Latest Release: 1.14.32 (2024/3/24)
This is an implementation of a simple supertype particle for 3D topology visualisation.
Subclass it and extend it by adding draw() method to render any shape you want the particle to be.
This object subclasses Kamaelia.Support.Particles.Particle and adds 3D elements.
At initialisation, provide a unique ID, a starting (x,y,z) position tuple, and a name. The name is displayed as a label on top of the particle. For other parameters, such as bgcolour and fgcolour, see its doc string below.
If the particle becomes selected it changes its visual appearance to reflect this.
There are two kinds of textures, i.e. text label and image textures. When the 'image' argument is provided, it uses image textures; otherwise, it uses text label textures in which particle name is used as the caption of the label. Note, the value of the 'image' argument is the uri of the image; it could be a path in local drive, a network address or an internet address.
It only serves as a superclass of 3D particle and has no rendering (draw) method, so it leaves the shape rendering to subclasses.
This is an implementation of a simple cuboid particle for 3D topology visualisation.
A 3D topology viewer where particles of type "-" are rendered by CuboidParticle3D instances:
TopologyViewer3D( particleTypes = {"-":CuboidParticle3D},
laws = Kamaelia.Support.Particles.SimpleLaws(bondLength=2),
).run()
SimpleLaws are used that apply the same simple physics laws for all particle types.
This object subclasses Kamaelia.Visualisation.PhysicsGraph3D.Particles3D.Particle3D and adds methods to support rendering (draw).
This is an implementation of a simple sphere particle for 3D topology visualisation.
Note: it would be much slower than CuboidParticle3D because it uses GLU library.
A 3D topology viewer where particles of type "sphere" are rendered by SphereParticle3D instances:
TopologyViewer3D( particleTypes = {"sphere":SphereParticle3D},
laws = Kamaelia.Support.Particles.SimpleLaws(bondLength=2),
).run()
SimpleLaws are used that apply the same simple physics laws for all particle types.
This object subclasses Kamaelia.Visualisation.PhysicsGraph3D.Particles3D.Particle3D and adds methods to support rendering (draw).
This is an implementation of a simple teapot particle for 3D topology visualisation.
Note: it would be much slower than CuboidParticle3D and SphereParticle3D because it uses GLUT library.
A 3D topology viewer where particles of type "teapot" are rendered by CuboidParticle3D instances:
TopologyViewer3D( particleTypes = {"teapot":TeapotParticle3D},
laws = Kamaelia.Support.Particles.SimpleLaws(bondLength=2),
).run()
SimpleLaws are used that apply the same simple physics laws for all particle types.
This object subclasses Kamaelia.Visualisation.PhysicsGraph3D.Particles3D.Particle3D and adds methods to support rendering (draw).
References: 1. Kamaelia.UI.OpenGL.Button 2. Kamaelia.UI.OpenGL.OpenGLComponent
Got a problem with the documentation? Something unclear that could be clearer? Want to help improve it? Constructive criticism is very welcome - especially if you can suggest a better rewording!
Please leave you feedback here in reply to the documentation thread in the Kamaelia blog.
-- Automatic documentation generator, 05 Jun 2009 at 03:01:38 UTC/GMT