Kamaelia docs : 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


Kamaelia is an open source project originated from and guided by BBC Research. For more information browse the site or get in contact.

This is an ongoing community based development site. As a result the contents of this page is the opinions of the contributors of the pages involved not the organisations involved. Specificially, this page may contain personal views which are not the views of the BBC. (the site is powered by a wiki engine)

(C) Copyright 2008 Kamaelia Contributors, including the British Broadcasting Corporation, All Rights Reserved.

This web site is powered by the same code created for the bicker manor project. For more details, contact Michael Sparks at BBC Research directly (cf contact)