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.

Object : Real

Class description:

A class which is never instantiated--just used as a logical distinction from the Abstract classes. See the child classes Mobile, Link and Stationary for more information. The methods documented here may be used with any of the child classes.

Methods:

  • addDottedLine
  • addLine
  • addMenu
  • addMenuSeparator
  • deleteInstance
  • disableShadows
  • drawAsPoint
  • enableShadows
  • getCollisionShape
  • getColor
  • getDisplayShape
  • getLightExposure
  • getLocation
  • getNeighborhoodSize
  • getNeighbors
  • getRotation
  • getRotationMatrix
  • getShape
  • getWorldObjectPointer
  • handleCollisions
  • hideAxis
  • hideBoundingBox
  • hideNeighborLines
  • ignoreCollisions
  • makeInvisible
  • makeVisible
  • move
  • point
  • raytrace
  • removeAllLines
  • removeLine
  • setBitmap
  • setBitmapHeading
  • setBitmapHeadingPoint
  • setBitmapImage
  • setBitmapTransparency
  • setCollisionShape
  • setColor
  • setDisplayShape
  • setE
  • setET
  • setLightmap
  • setLightmapImage
  • setMu
  • setNeighborhoodSize
  • setRotation
  • setRotationEulerAngles
  • setRotationMatrix
  • setShape
  • setTexture
  • setTextureImage
  • setTextureScale
  • setTextureScaleX
  • setTextureScaleY
  • setTransparency
  • showAxis
  • showBoundingBox
  • showNeighborLines
  • watch
    addDottedLine( self, otherObject, theColor )

    Adds a dotted line to otherObject. See add-line for more information on object lines.


    addLine( self, otherObject, theColor, theStyle )

    Adds a line to be drawn from this object to otherObject. The line can be removed later using remove-line.

    The optional argument theColor specifies the color of the line. The default color is the vector (0, 0, 0), black.

    The optional argument theStyle specifies a pattern for the line. theStyle is a string of 16 spaces and/or dashes which specify the line pattern to be drawn. A dotted line, for example, would use the pattern "- - - - - - - - ". A thickly dashed line would use the pattern "-------- ". If no style is given, a solid line is drawn.

    If a line to otherObject already exists, its color and/or style will be updated.


    addMenu( self, menuName, theMethod )

    Adds a menu named menuName to the application which will result in a call to theMethod for the calling instance.

    If the calling instance is the Controller object, then the menu will become the "main" simulation menu. Otherwise, the menu will become a contextual menu associated with the specific object in the simulation.

    Note that unlike the handle-collision which sets the collision handler for the whole type (class, that is), this method affects only the instance for which it is called, meaning that each instance of a certain class may have a different menu.


    addMenuSeparator( self )

    Adds a separator menu item--really just an empty menu item.


    deleteInstance( self )

    Produces a dialog box (if supported by the current breve engine) asking if the user wants to delete the object. This is typically used in response to a user action like a click or menu callback.


    disableShadows( self )

    If shadow volumes are enabled (see Control), disables shadow volumes for this object. This is the default when shadow volumes have been enabled.


    drawAsPoint( self )

    Draws the object as a single point. This is by far the fastest way to display an agent. Points can be used to draw upwards of 20,000 agents with a reasonable frame rate, while drawing as many spheres or bitmaps would slow down the simulation significantly.


    enableShadows( self )

    If shadow volumes are enabled (see Control), enables shadow volumes for this object. This is the default when shadow volumes have been enabled.


    getCollisionShape( self )

    Returns the Shape used for collisions associated with this Mobile object.


    getColor( self )

    Returns the color of the object.


    getDisplayShape( self )

    Returns the Shape used for display associated with this Mobile object.


    getLightExposure( self )

    When used in conjunction with light exposure detection (OBJECTControl:enable-light-exposure-detection), this method returns the level of light exposure on this object.


    getLocation( self )

    Returns the vector location of this object.


    getNeighborhoodSize( self )

    gets the neighborhood size for the current object.


    getNeighbors( self )

    Returns a list of all real objects in the simulation that are within the "neighborhood" range of this object in the world.


    getRotation( self )

    Deprecated


    getRotationMatrix( self )

    Returns the matrix rotation of this object.


    getShape( self )

    Deprecated


    getWorldObjectPointer( self )

    Used internally.


    handleCollisions( self, theType, theMethod )

    Adds a collision handler for this object. When a collision occurs between an instance of the this type and theType, the breve engine will automatically call theMethod of the colliding instance.


    hideAxis( self )

    Hides the X and Y axes for the object. The axes are hidden by default, so you'll only need this method if you've previously enabled them using show-axis.


    hideBoundingBox( self )

    Hides the bounding box for the object. The bounding box is hidden by default, so you'll only need this method if you've previously enabled them using show-axis.


    hideNeighborLines( self )

    Hides lines to this objects neighbors.


    ignoreCollisions( self, theType )

    Instructs the engine to ignore physical collisions with theType objects. This does not affect collision callbacks specified with handle-collisions.


    makeInvisible( self )

    Makes the object invisible. Can be made visible again later using the method make-visible.


    makeVisible( self )

    Makes the object visible again (if it has previously been hidden using make-invisible.


    move( self, newLocation )

    Moves this object to location newLocation.


    point( self, theVertex, theLocation )

    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".


    raytrace( self, theLocation, theDirection )

    Computes the vector from theLocation towards theDirection that hits the shape of this object.

    If the object was not hit vector (0, 0, 0) will be returned.

    The location and direction vector must be given relative to the world's coordinate frame.


    removeAllLines( self )

    Removes all lines connecting this object to other objects.


    removeLine( self, otherObject )

    Removes the line connecting this object to otherObject.


    setBitmap( self, textureNumber )

    Deprecated.


    setBitmapHeading( self, radianAngle )

    If this object is in 2d bitmap mode, the rotation of the bitmap will be set to radianAngle.


    setBitmapHeadingPoint( self, rotationVector )

    If this object is in 2d bitmap mode, the rotation of the bitmap will be set to degreeAngle degrees.


    setBitmapImage( self, bitmapImage )

    Changes the bitmap of this object to bitmapImage, an instance of class image. If bitmapImage is NULL, bitmapping is turned off for the object.


    setBitmapTransparency( self, alphaValue )

    Sets the transparency to alphaValue, a number between 0.0 (totally transparent) and 1.0 (fully opaque).


    setCollisionShape( self, theShape )

    Associates a Shape object with this object for collision purposes. This shape will not be displayed for this object unless set-display-shape is also called with this shape. Returns this object.


    setColor( self, newColor )

    Sets the color of this object to newColor.


    setDisplayShape( self, theShape )

    Associates a Shape object with this object for display purposes only. This shape will not be used for collision detection unless it is passed to set-collision-shape as well. Returns this object.


    setE( self, newE )

    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).


    setET( self, newET )

    Deprecated.


    setLightmap( self, textureNumber )

    Deprecated.


    setLightmapImage( self, lightmapImage )

    Sets the object to be displayed using a "lightmap". A lightmap uses the texture specified and treats it like a light source. It's hard to explain. Give it a try for yourself.

    set-lightmap only has an effect on sphere shapes. Other shapes can be textured, but only spheres can be made into lightmaps.


    setMu( self, newMu )

    Sets the coefficient of friction to newMu. mu is a parameter controlling friction between two bodies and may be any value between 0 and infinity.


    setNeighborhoodSize( self, size )

    Used in conjunction with get-neighbors, this function will set the neighborhood size for the current object.


    setRotation( self, thisAxis, amount )

    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.


    setRotationEulerAngles( self, angles )

    Sets the rotation of this object to the Euler angles specified by angles (in radians).


    setRotationMatrix( self, theRotation )

    Sets the rotation of this object to the rotation matrix theRotation. Working with matrices can be complicated, so a more simple approach is to use rotate.


    setShape( self, theShape )

    Sets the shape of this object, for both display and collision detection purposes. To set the shape for one purpose, but not the other, use the methods set-display-shape or set-collision-shape.


    setTexture( self, textureNumber )

    Deprecated -- use set-texture-image instead.


    setTextureImage( self, textureImage )

    Changes the texture of this object to textureImage, an instance of class Image. If textureImage is NULL texturing is turned off for the object.


    setTextureScale( self, scaleSize )

    Changes the "scale" of the texture. When a texture is applied over a shape, this value is used to decide how large the texture will be in terms of breve-world units. The default value is 16, meaning that a 16x16 face will have one copy of the textured image. For smaller objects, this number will have to be decreased, or else the texture will be too big and will not be visible.


    setTextureScaleX( self, scaleSize )

    Sets the texture scale in the X dimension. The Y texture scale value is unchanged. See set-texture-scale for more information.


    setTextureScaleY( self, scaleSize )

    Sets the texture scale in the Y dimension. The X texture scale value is unchanged. See set-texture-scale for more information.


    setTransparency( self, alphaValue )

    Sets the transparency of this object to alphaValue, a number between 1.0 (totally opaque) and 0.0 (fully transparent).


    showAxis( self )

    Shows the X and Y axes for the object.


    showBoundingBox( self )

    Shows the bounding box for the object.


    showNeighborLines( self )

    Draws lines to this objects neighbors (when neighbor checking is enabled).


    watch( self )

    Makes the camera follow this object.