These pages are auto-generated from self-documenting comments embedded
in class files.
For more information on breve and steve, refer to the
breve homepage.
Mobile objects are objects in the simulated world which move around and interact with other objects. This is in contrast to Stationary objects which can collide and interact with other objects but which never move.When a Mobile object is created, it will be by default a simple sphere. You can change the appearence of this sphere by using methods in this class, or its parent class Real. Or you can change the shape altogether with the method set-shape.
Setting Up the Mobile Object
Configuring Physics Parameters
Getting the Light Exposure of this Mobile Object
Controlling the Agent's Motion and Position
- get-acceleration
- get-distance
- get-location
- get-rotation
- get-rotational-velocity
- get-velocity
- move
- offset
- point
- relative-rotate
- rotate
- set-acceleration
- set-force
- set-rotation
- set-rotational-acceleration
- set-rotational-velocity
- set-torque
- set-velocity
- transform
Chaning the Object's Appearence
Disables the physical simulation for a Mobile object.
Note that disabling physics for instances of the subclass MultiBody may produce unexpected results and is not recommended.
Enables physical simulation for a Mobile object. This must be used in conjunction with a PhysicalControl object which sets up physical simulation for the entire world.
When physics is enabled for an object, the acceleration can no longer be assigned manually--it will be computed from the forces applied to the object.
Returns the vector acceleration of this object.
Returns the color of the object.
Returns the scalar distance from this object's center to otherObject.
When used in conjunction with light exposure detection (enable-light-exposure-detection (Control)), this method returns the level of light exposure on this object.
Returns the vector location of this object.
Returns the matrix rotation of this object.
Returns the vector angular velocity of this object.
Returns the vector velocity of this object.
Moves this object to location newLocation.
Moves this object by amount.
An easier way to rotate an object--this function rotates an object such that the local point theVertex, points towards the world direction theLocation. In other words, theLocation is where you want the object to face, and theVertex indicates which side of the object is to be considered the "front".
Use of this method is depreciated, use set-shape instead.
Sets the rotation of this object around vector axis thisAxis by scalar amount (in radians). This is a rotation relative to the current position.
Removes the label that would be drawn next to an object.
Sets the rotation of this object around vector axis thisAxis by scalar amount (in radians). This is an "absolute" rotation--the current rotation of the object does not affect how the object will be rotated. For a rotation relative to the current orientation, set relative-rotate.
Sets the acceleration of this object to newAcceleration. This method has no effect if physical simulation is turned on for the object, in which case the physical simulation engine computes acceleration.
Sets the color of this object to newColor.
Sets the "coefficient of restitution" a value which determines the elasticity of the object in a collision. Valid values range from 0.0 to 1.0, with 0.0 representing a totally inelastic collision (such as a lump of clay) while 1.0 represents a totally (and unrealistically) elastic collision (such as a rubber ball).
Sets the "tangential coefficient of restitution", a frictional version of the "coefficient of restitution" described in the documentation for set-e. The value ranges from -1.0 to 1.0. Negative values mean that friction pushes against the sliding object.
Sets the velocity acting on the object to newForce. This force will remain in effect until it is disabled with a new call to set-force.
Sets the label to be drawn along side the object.
Sets the coefficient of friction to newMu.
Sets the rotation of this object to the rotation matrix r. Working with matrices can be complicated, so a more simple approach is to use rotate.
Sets the rotational acceleration of this object to newAcceleration. This method has no effect if physical simulation is turned on for the object, in which case the physical simulation engine computes acceleration.
Sets the rotational velocity of this object to angularVelocity.
Associates a Shape object with this Mobile object. Returns this object.
Sets the torque acting on the object to newTorque. This torque will remain in effect until it is disabled with a new call to set-torque.
Sets the velocity of this object to newVelocity.
Transforms theVector in the world coordinate frame to a vector in the frame of this object. This assumes that the origin of the link is the object itself.