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.

## Abstract : Camera

This class is included as part of the file Camera.tz.
To use this class in a simulation, include the line "@use Camera."

### Class description:

> Summary: creates a new rendering perspective in the simulated world.

> The Camera class is used to set up a viewing perspective in a simulation. Creating a new camera object places a viewing area with the new camera perspective in the main viewing window.

> See the Image class to read data from a Camera (or from the main simulation window) into a pixel buffer. This can be useful for implementing vision algorithms.

### Class methods:

> Configuring the Camera

> - disable-smooth-drawing
> - enable-smooth-drawing

> Enabling and Disabling the Camera

> - disable
> - enable

> Enabling and Disabling Text in the Camera's Display

> - disable-text
> - enable-text

> Changing the Size, Position and Perspective of the Viewing Window

> - get-height
> - get-rotation
> - get-width
> - look
> - set-position
> - set-rotation
> - set-size
> - set-z-clip

`disable`

> Disables this camera. The view from this camera will not be updated or drawn to the viewing window.

`disable-smooth-drawing`

> Disable smooth drawing for the main camera. See enable-smooth-drawing for more information.

`disable-text`

> Disables text for this camera.

`enable`

> Enables the camera. The view from this camera will be updated and drawn to the viewing window after each iteration.

`enable-smooth-drawing`

> Enable smooth drawing for the camera. Smooth drawing enables a smoother blending of colors, textures and lighting. This feature is especially noticeable when dealing with spheres or large objects.

> The disadvantage of smooth drawing is a potential performance hit. The degree of this performance hit depends on the number of polygons in the scene. If speed is an issue, it is often best to disable both lighting and smooth drawing.

`enable-text`

> Enables text for this camera.

`get-height`

> Returns the current camera width.

`get-rotation`

> Returns a vector containing the rotation of the camera about the X- and Y-axes return cameraGetRotation(cameraPointer).

`get-width`

> Returns the current camera width.

`look at target (vector) from position (vector)`

> Moves the camera to position and aims it at target. target is is the target's location relative to the camera, not the target's "real-world" location.

`set-position with-x newX (double) with-y newY (double)`

> Sets the position of the camera viewing area inside the main window.

`set-rotation x rx (float) y ry (float)`

> Sets the rotation of the camera about the X- and Y-axes.

`set-size with-height newHeight (double) with-width newWidth (double)`

> Sets the size of the camera viewing area.

`set-z-clip to distance (double)`

> Sets the Z clipping plan to theDistance. The Z clipping plan determines how far the camera can see. A short Z clipping distance means that objects far away will not be drawn.

> The default value is 500.0 and this works well for most simulations, so there is often no need to use this method.

> Using a short Z clipping distance improves drawing quality, avoids unnecessary rendering and can speed up drawing during the simulation. However, it may also cause objects you would like to observe in the simulation to not be drawn because they are too far away.

Documentation created Thu Jul 3 18:18:12 2008