summary refs log tree commit diff stats
path: root/src/components/transformable.h
blob: 6f3c2ef8561da7afa00de64d253af3eeff2798d5 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#ifndef LOCATABLE_H_39E526CA
#define LOCATABLE_H_39E526CA

#include "component.h"

class TransformableComponent : public Component {
public:

  /**
   * The coordinates of the entity.
   *
   * Note that ponderable entities sometimes have special behavior related to
   * their coordinates, specifically that ferried bodies will behave oddly if
   * their coordinates are changed outside of the PonderingSystem. Before doing
   * so, use PonderingSystem::unferry on the body to ensure that it is not
   * ferried.
   */
  double x;
  double y;

  /**
   * The size of the entity.
   */
  int w;
  int h;

  /**
   * For prototypes, the original coordinates and size of the entity.
   *
   * @managed_by RealizingSystem
   */
  double origX;
  double origY;
  int origW;
  int origH;
};

#endif /* end of include guard: LOCATABLE_H_39E526CA */