|  | overview |  | wiki |  | api reference |  | download

- Main Page
- Classes

- Class List
- Class Index
- Class Hierarchy
- Class Members

All Classes Functions Variables Typedefs Enumerations Enumerator
Public Member Functions | Protected Member Functions | Protected Attributes
gameplay::Drawable Class Reference

`#include <Drawable.h>`

Inheritance diagram for gameplay::Drawable:

List of all members.

## Public Member Functions

| Drawable ()
virtual | ~Drawable ()
virtual unsigned int | draw (bool wireframe=false)=0
Node * | getNode () const

## Protected Member Functions

virtual Drawable * | clone (NodeCloneContext &context)=0
virtual void | setNode (Node *node)

## Protected Attributes

Node * | _node

## Detailed Description

Defines a drawable object that can be attached to a Node.

## Constructor & Destructor Documentation

gameplay::Drawable::Drawable | ( |  | ) |

Constructor.

virtual gameplay::Drawable::~Drawable | ( |  | ) | `[virtual]`

Destructor.

## Member Function Documentation

virtual Drawable* gameplay::Drawable::clone | ( | NodeCloneContext & | context | ) | `[protected, pure virtual]`

Clones the drawable and returns a new drawable.

Parameters:

  context | The clone context.

Returns:
  The newly created drawable.

Implemented in gameplay::Sprite, gameplay::Terrain, gameplay::Text, and gameplay::TileSet.

virtual unsigned int gameplay::Drawable::draw | ( | bool | wireframe = `false` | ) | `[pure virtual]`

Draws the object.

Parameters:

  wireframe | true if you want to request to draw the wireframe only.

Returns:
  The number of graphics draw calls required to draw the object.

Implemented in gameplay::ParticleEmitter, gameplay::Sprite, gameplay::Terrain, gameplay::Text, gameplay::TileSet, gameplay::Model, and gameplay::Form.

Node* gameplay::Drawable::getNode | ( |  | ) | const

Gets the node this drawable is attached to.

Returns:
  The node this drawable is attached to.

virtual void gameplay::Drawable::setNode | ( | Node * | node | ) | `[protected, virtual]`

Sets the node this drawable is attached to.

Parameters:

  node | The node this drawable is attached to.

Reimplemented in gameplay::Terrain.

## Member Data Documentation

Node* gameplay::Drawable::_node `[protected]`

Node this drawable is attached to.

All Classes Functions Variables Typedefs Enumerations Enumerator