COFFEE (Cinema 4D)

COFFEE (Cinema 4D)

COFFEE (often written as "C.O.F.F.E.E") is a computer scripting language that forms part of Cinema 4D, a proprietary 3D graphics application. Although presented as an acronym the letters of the word COFFEE do not appear to stand for anything, but are rather a comic reference to Java, a considerably more famous computer language.

Purpose

Like most scripting languages, COFFEE is used to extend or modify the functionality of the host software. This technique is preferable to writing a so-called "plug-in" module using a traditional language such as C for a number of reasons, among them:

* The scripting language implicitly handles memory management on the user's behalf where C does not;
* The language interpreter does not require programs to be compiled as a separate step before they can be used;
* A purpose-built scripting language can be tailored so that it lends itself to its intended usage. For example, COFFEE has built-in mathematical functions that are necessary for 3D graphics programming.

There are several different aspects of Cinema 4D's operation that can be customised using COFFEE scripts, notably additions to the user interface and extensions for reading and writing new file formats and creating texture shaders. Almost all the main functionality of the application can be accessed from a COFFEE program and so customised features can look and behave much like those supplied as standard.

yntax and Language Features

COFFEE is a fairly typical "curly bracket" language and so it would look familiar to any previous user of C/C++, Java, Perl or anything along those lines. The function and object class definitions are closely modelled after those of C++. However, COFFEE is dynamically typed and so variables are defined with a simple "var" keyword without any reference to their type. Unlike similar scripting languages such as Squirrel and JavaScript, COFFEE does not use a "function" keyword to introduce functions, nor does it require a return type or "void" return like C/C++ - the function definition simply begins with the function name.

COFFEE's memory management is handled entirely by a garbage collection process; essentially this means that it looks after itself and the programmer seldom need worry about it. However, it is possible to control the process explicitly when necessary.

3D graphics programming makes extensive use of certain mathematical techniques, notably trigonometry and vector arithmetic. COFFEE is well equipped in this area, with a good set of mathematical functions and a built-in vector datatype.

Interface with Cinema 4D

Since COFFEE is used to extend Cinema 4D, it clearly needs to make use of the host program's features to some extent. Through the application programming interface (API) it is possible to locate 3D objects created by the user and access their internal data structures. For example, a new object can be created or an existing one modified or distorted from a script. Since a major purpose of COFFEE is to allow new file formats to be used, the Cinema API provides features useful for the task; a file input/output class is available and this allows individual items of binary data (such as integers and floating point numbers) to be read and written.

External links

* [http://www.maxon.de/index_e.html Maxon website] - the makers of Cinema 4D and COFFEE.
* [http://ruimac.com/coffee_book/ COFFEE Book] - a comprehensive book teaching COFFEE from the basics to producing fully working plug-ins.


Wikimedia Foundation. 2010.

Игры ⚽ Нужна курсовая?

Look at other dictionaries:

  • Coffee (disambiguation) — Coffee is a widely consumed beverage made from coffee beans. Instant coffee is a soluble powder form of the drink Coffee may also refer to: In computers: COFFEE (Cinema 4D), a computer scripting language CoFFEE, the Collaborative Face to Face… …   Wikipedia

  • Coffee and Cigarettes — est un film indépendant réalisé par Jim Jarmusch et sorti en 2003. Les acteurs principaux sont Roberto Benigni, Steven Wright, Tom Waits, Steve Buscemi, Meg White et Jack White du groupe The White Stripes, Joie Lee et Cinqué Lee. Le film se… …   Wikipédia en Français

  • Coffee with Lahiru and Muditha — Promotional image of Coffee with Lahiru and Muditha Format Talk show Starring Lahiru Mudalige and Muditha Wijesundara …   Wikipedia

  • Coffee production in Colombia — A Colombian coffee plantation in Quimbaya, Quindío, Colombia …   Wikipedia

  • Coffee production in Guatemala — Las Merceditas coffee plantation, San Rafael Pie de la Cuesta, Guatemala. The coffee production in Guatemala is important for the Guatemalan economy. While until recently it was Central America s top producer of coffee, the coffee production in… …   Wikipedia

  • Coffee production in Honduras — Drying organic coffee produced in San Juancito, Honduras. The coffee production in Honduras played a role in the country s history and is important for the Honduran economy. In 2011, the country became Central America s top producer of coffee.[1] …   Wikipedia

  • Cinema of Romania — Part of a series on the Culture of Romania Topics …   Wikipedia

  • Coffee & Cigarettes — Filmdaten Deutscher Titel: Coffee and Cigarettes Originaltitel: Coffee and Cigarettes Produktionsland: USA Erscheinungsjahr: 2003 Länge: 96 Minuten Originalsprache: Englisch …   Deutsch Wikipedia

  • Cinema of Colombia — Latin American cinema Cinema of Argentina Cinema of Bolivia Cinema of Brazil Cinema of Chile Cinema of Colombia Cinema of Cuba Cinema of Ecuador …   Wikipedia

  • Cinema 4D —  Ne doit pas être confondu avec Cinéma 4 D. CINEMA 4D …   Wikipédia en Français

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”