#!/usr/local/bin/php Obsessive Camera Direction

OCD Reference

Reference for OCD version 1.4 for use with Processing (BETA) version 125+. If you see any errors or have any comments, let me know.

Name

attitude()

Examples

import damkjer.ocd.*;

Camera camera1;

void setup() {
  size(100, 100, P3D);

  camera1 = new Camera(this, 100, -125, 150);
}

void draw() {
  background(204);
  lights();
  camera1.feed();

  rotateY(PI/3);
  box(50);
}

void mouseClicked() {
  float[] attitude = camera1.attitude();
  println("Yaw:   " + attitude[0]);
  println("Pitch: " + attitude[1]);
  println("Roll:  " + attitude[2]);
}

Description

Returns the camera orientation, in radians, as a vector of three values: [Yaw, Pitch, Roll].

Syntax

attitude()

Parameters

None

Usage

Web & Application

Related

position()
up()
target()
fov()