SpriteAnimation.lua
Tile.lua
Neo3D.lua
QuadTree.lua
Widget.lua
Sprite.lua
Collision.lua
OEntity.lua
Button.lua
Graphics2D.lua
InputField.lua
LuaUnit.lua
Tests.lua
OCamera.lua
Object3d.lua
class.lua
OLight.lua
SpriteSheet.lua
OSound.lua
Utils.lua
Canvas.lua
Label.lua
Api.lua

The OCamera class

An 'OCamera' instance is an camera object in a scene which can be
manipulated.

See also: Widget

OCamera(object3d)

Create a new OCamera object with the given Object3d
as the base. Will return 'nil' if the given object is not of type 'Camera'.

Parameter

object3d

The object to take position, rotation etc. from. (optional)

function OCamera:setClearColor(color)

Sets the clear color

Parameter

color

A vec3

function OCamera:getClearColor()

Returns the clear color

Return: A vec3

function OCamera:setFov(fov)

Changes the FoV

Parameter

fov

A number

function OCamera:getFov()

Returns the FoV

Return: A number

function OCamera:setNearPlane(plane)

Changes the distance to the near plane

Parameter

plane

A number

function OCamera:getNearPlane()

Returns the distance to the near plane

Return: A number

function OCamera:setFarPlane(plane)

Changes the distance to the far plane

Parameter

plane

A number

function OCamera:getFarPlane()

Returns the distance to the far plane

Return: A number

function OCamera:setFogDistance(distance)

Changes the distance to the fog
@distance A number

function OCamera:getFogDistance()

Returns the distance to the fog

Return: A number

function OCamera:enableOrtho(value)

Makes the camera ortho according to the value

Parameter

value

A boolean value

function OCamera:isOrtho()

Returns if the camera is ortho

Return: A boolean

function OCamera:enableFog(value)

Turns on the camera fog according to the value

Parameter

value

A boolean value

function OCamera:hasFog()

Returns if the camera has fog

Return: A boolean