## Public API Reference

- Main Page
- Classes
- Files

- Alphabetical List
- Class List
- Class Hierarchy
- Class Members

# iPcSimpleCamera Struct Reference

A class representing a simple camera, with capabilities for both first-person and third-person modes. More...

`#include <propclass/simpcam.h>`

Inheritance diagram for iPcSimpleCamera:

[legend]
List of all members.

## Public Member Functions

virtual void | Draw ()=0
| Render.
virtual void | SetCameraOffset (const csVector3 &offset)=0
| Sets the offset from the center of the mesh's iMovable to the position of the camera.
virtual void | SetDrawMesh (bool draw)=0
| Set a flag to determine whether or not the attached mesh and its children will be drawn in this camera view.
virtual void | SetLookAtOffset (const csVector3 &lookat)=0
| Sets the offset from the center of the mesh's iMovable to the point the camera should look at.
virtual void | SetMesh (iPcMesh *mesh)=0
| Set the mesh to follow.

## Detailed Description

A class representing a simple camera, with capabilities for both first-person and third-person modes.

This property class supports the following actions (add prefix 'cel.action.' to get the ID of the action and add prefix 'cel.parameter.' to get the ID of the parameter):

- InitCamera: parameters 'campos' (vector3), 'lookat' (vector3), 'drawmesh' (bool).
- SetPosition: parameters 'campos' (vector3), 'lookat' (vector3).
- SetMesh: parameters 'meshpctag' (string).

Definition at line 42 of file simpcam.h.

## Member Function Documentation

virtual void iPcSimpleCamera::Draw | ( |  | ) | `[pure virtual]`

| Render. This will clear the screen then draw on top of it. Implements iPcCamera.

virtual void iPcSimpleCamera::SetCameraOffset | ( | const csVector3 & | offset | ) | `[pure virtual]`

Sets the offset from the center of the mesh's iMovable to the position of the camera.

Parameters:

  | offset | the offset from the center of the mesh to the camera position.

virtual void iPcSimpleCamera::SetDrawMesh | ( | bool | draw | ) | `[pure virtual]`

Set a flag to determine whether or not the attached mesh and its children will be drawn in this camera view.

Parameters:

  | draw | if true, the mesh will be drawn in this view.

virtual void iPcSimpleCamera::SetLookAtOffset | ( | const csVector3 & | lookat | ) | `[pure virtual]`

Sets the offset from the center of the mesh's iMovable to the point the camera should look at.

Parameters:

  | lookat | the offset from the center of the mesh to the lookat position.

virtual void iPcSimpleCamera::SetMesh | ( | iPcMesh * | mesh | ) | `[pure virtual]`

Set the mesh to follow.

Parameters:

  | mesh | the mesh property class for the camera to follow.

The documentation for this struct was generated from the following file:

- propclass/simpcam.h