Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Nov 26, 2010, 1:25:56 PM (13 years ago)
Author:
dafrick
Message:

Adding yet another class of ForceFields and using it in The Time Machine.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/trunk/src/modules/objects/ForceField.h

    r7676 r7677  
    5454        enum Value {
    5555            tube, //!< The ForceField has a tube shape.
    56             sphere //!< The ForceField has a spherical shape.
     56            sphere, //!< The ForceField has a spherical shape.
     57            invertedSphere //!< The ForceField has a spherical shape but "inverted" behavior.
    5758        };
    5859    }
     
    6768        - @b length The length of the ForceField. Default is 2000.
    6869        - @b mode The mode the ForceField is in. For mode:
    69             - <em>tube</em> A ForceField which exerts force only in the direction it is oriented. The force is only exerted on objects that are in a tube of length <em>length</em> and diameter <em>diameter</em>. The magintude of the force is proportional to the <em>velocity</em>, being highest when an object is in the middle of the tube (radius-wise), linearly decreasing with greater radii and finally reaching zero, when the object is <code>diameter/2</code> away from the orientation vector.
     70            - <em>tube</em> A ForceField which exerts force only in the direction it is oriented. The force is only exerted on objects that are in a tube of length <em>length</em> and diameter <em>diameter</em> (with rounded start and end faces, so in fact the <em>length</em> parameter specifies a ball with <code>origin + length/2</code> as the center and <code>length/2</code> as the radius). The magintude of the force is proportional to the <em>velocity</em>, being highest when an object is in the middle of the tube (radius-wise), linearly decreasing with greater radii and finally reaching zero, when the object is <code>diameter/2</code> away from the orientation vector.
    7071            - <em>sphere</em> A Force Field which exerts force radially away from itself, with the greatest magnitude (proportional to <em>velocity</em>) being in the origin of the ForceField, linearly decreasing with respect to the distance to the origin and finally reaching zero at distance <code>diameter/2</code>.
    7172            Default is <em>tube</em>.
     73            - <em>invertedSphere</em>
    7274
    7375    @author
     
    134136            static const std::string modeTube_s;
    135137            static const std::string modeSphere_s;
     138            static const std::string modeInvertedSphere_s;
    136139
    137140            float velocity_; //!< The velocity of the ForceField.
Note: See TracChangeset for help on using the changeset viewer.