- Main Page
- Modules
- Namespaces
- Classes
- Files
- Related Pages

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

# osgFX::Cartoon Class Reference

This effect implements a technique called 'Cel-Shading' to produce a cartoon-style (non photorealistic) rendering. More...

Inheritance diagram for osgFX::Cartoon:

[legend]
List of all members.

## Public Member Functions
| Cartoon ()
| Cartoon (const Cartoon &copy, const osg::CopyOp &copyop=osg::CopyOp::SHALLOW_COPY)
| META_Effect (osgFX, Cartoon,"Cartoon","This effect implements a technique called 'Cel-Shading' to produce a ""cartoon-style (non photorealistic) rendering. Two passes are required: ""the first one draws solid surfaces, the second one draws the outlines. ""A vertex program is used to setup texture coordinates for a sharp lighting ""texture on unit 0 which is generated on-the-fly.\n""This effect requires the ARB_vertex_program extension ""or OpenGL Shading Language.","Marco Jez; OGLSL port by Mike Weiblen")
const osg::Vec4 & | getOutlineColor () const
| get the outline color
void | setOutlineColor (const osg::Vec4 &color)
| set the outline color
float | getOutlineLineWidth () const
| get the outline line width
void | setOutlineLineWidth (float w)
| set the outline line width
int | getLightNumber () const
| get the OpenGL light number
void | setLightNumber (int n)
| set the OpenGL light number that will be used in lighting computations
## Protected Member Functions
virtual | ~Cartoon ()
Cartoon & | operator= (const Cartoon &)
bool | define_techniques ()
| abstract method to be implemented in derived classes; its purpose if to create the techniques that can be used for obtaining the desired effect.

## Detailed Description

This effect implements a technique called 'Cel-Shading' to produce a cartoon-style (non photorealistic) rendering.

Two passes are required: the first one draws solid surfaces, the second one draws the outlines. A vertex program is used to setup texture coordinates for a sharp lighting texture on unit 0 which is generated on-the-fly. This effect requires the ARB_vertex_program extension.

## Constructor & Destructor Documentation

Cartoon::Cartoon | ( |  | ) |

Cartoon::Cartoon | ( | const Cartoon & | copy,
|  | const osg::CopyOp & | copyop = `osg::CopyOp::SHALLOW_COPY`
| ) |

virtual osgFX::Cartoon::~Cartoon | ( |  | ) | `[inline, protected, virtual]`

## Member Function Documentation

bool Cartoon::define_techniques | ( |  | ) | `[protected, virtual]`

| abstract method to be implemented in derived classes; its purpose if to create the techniques that can be used for obtaining the desired effect. You will usually call addTechnique() inside this method. Implements osgFX::Effect.

int osgFX::Cartoon::getLightNumber | ( |  | ) | const`[inline]`

| get the OpenGL light number

const osg::Vec4 & osgFX::Cartoon::getOutlineColor | ( |  | ) | const`[inline]`

| get the outline color

float osgFX::Cartoon::getOutlineLineWidth | ( |  | ) | const`[inline]`

| get the outline line width

osgFX::Cartoon::META_Effect | ( | osgFX | ,
|  | Cartoon | ,
|  | "Cartoon" | ,
|  | "This effect implements a technique called 'Cel-Shading' to produce a ""cartoon-style (non photorealistic) rendering. Two passes are required: ""the first one draws solid | surfaces,
|  | the second one draws the outlines.""A vertex program is used to setup texture coordinates for a sharp lighting""texture on unit 0 which is generated on-the-fly.\n""This effect requires the ARB_vertex_program extension""or OpenGL Shading Language." | ,
|  | "Marco Jez; OGLSL port by Mike Weiblen" |
| ) |

Cartoon& osgFX::Cartoon::operator= | ( | const Cartoon & |  | ) | `[inline, protected]`

void osgFX::Cartoon::setLightNumber | ( | int | n | ) | `[inline]`

| set the OpenGL light number that will be used in lighting computations

void osgFX::Cartoon::setOutlineColor | ( | const osg::Vec4 & | color | ) | `[inline]`

| set the outline color

void osgFX::Cartoon::setOutlineLineWidth | ( | float | w | ) | `[inline]`

| set the outline line width

The documentation for this class was generated from the following files:

- Cartoon
- Cartoon.cpp