noope.output
Class OutputText

java.lang.Object
  |
  +--noope.laws.Law
        |
        +--noope.output.OutputText

public class OutputText
extends Law

This is a descendant of Law which writes the position of all entities to a text file every so often. The output file format is compatible with povray:

<x1, y1, z2>, <x2, y2, z2>, <x3, y3, z3>...
...
...
Parameters are read from a BlockReader, in this format:
law OutputText
{
file		
interval	
}
file gives the file to which output will be written, and interval gives the number of calls to act() that are ignored between producing output.

Version:
22-Mar-2001
Author:
James Kermode

Fields inherited from class noope.laws.Law
physics
 
Constructor Summary
OutputText(BlockReader br, int lawnumber, Physics phys)
           
 
Method Summary
 void act()
          Make the law act upon the entities.
 
Methods inherited from class noope.laws.Law
constructNewPropertyRecord, dispose, getName, getNumber, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

OutputText

public OutputText(BlockReader br,
                  int lawnumber,
                  Physics phys)
           throws BRLoadingException
Method Detail

act

public void act()
Description copied from class: Law
Make the law act upon the entities. This is called by Physics once in every time interval. This method should calculate the net force due to this Law acting on each Entity and then call Entity.addForce(force) on every Entity to add this law's constribution to the total force acting on the Entity.
Overrides:
act in class Law
Following copied from class: noope.laws.Law
Parameters:
e - the list of entities that the force should act on
See Also:
Entity.addForce(Vector3D)