April 2024 - This site, and Kamaelia are being updated. There is significant work needed, and PRs are welcome.

Kamaelia.Visualisation.PhysicsGraph3D.Particles3D

Particle3D: Simple generic/ supertype particle for 3D Topology visualisation

This is an implementation of a simple supertype particle for 3D topology visualisation.

Example Usage

Subclass it and extend it by adding draw() method to render any shape you want the particle to be.

How does it work?

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.

CuboidParticle3D: cuboid rendering particle for 3D Topology visualisation

This is an implementation of a simple cuboid particle for 3D topology visualisation.

Example Usage

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.

How does it work?

This object subclasses Kamaelia.Visualisation.PhysicsGraph3D.Particles3D.Particle3D and adds methods to support rendering (draw).

SphereParticle3D: sphere rendering particle for 3D Topology visualisation

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.

Example Usage

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.

How does it work?

This object subclasses Kamaelia.Visualisation.PhysicsGraph3D.Particles3D.Particle3D and adds methods to support rendering (draw).

TeapotParticle3D: teapot rendering particle for 3D Topology visualisation

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.

Example Usage

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.

How does it work?

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


Feedback

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