Represents the context for an instance of the Flyweight_Class. In this case, the context includes position and velocity. More...
#include <Flyweight_Classes.h>

Public Member Functions | |
| Flyweight_Context () | |
| Default constructor. | |
| Flyweight_Context (int offset_x, int image_width, int image_height, double position_x, double position_y, double velocity_x, double velocity_y) | |
| Constructor. | |
Public Attributes | |
| int | OffsetXToImage |
| int | ImageWidth |
| int | ImageHeight |
| double | Position_X |
| double | Position_Y |
| double | Velocity_X |
| double | Velocity_Y |
Represents the context for an instance of the Flyweight_Class. In this case, the context includes position and velocity.
This context is manipulated outside the Flyweight_Class by the controlling entity (in this case, the exercise in program.cpp). The Flyweight_Class just holds onto the context.
Definition at line 28 of file Flyweight_Classes.h.
|
inline |
Default constructor.
Definition at line 41 of file Flyweight_Classes.h.
|
inline |
Constructor.
| offset_x | Offset from left edge of big resource image to the left edge of the image for this context. |
| image_width | Width of image for this context. |
| image_height | Height of image for this context. |
| position_x | X position of the top left corner of the big resource. |
| position_y | Y position of the top left corner of the big resource. |
| velocity_x | Initial X velocity. |
| velocity_y | Initial Y velocity. |
Definition at line 63 of file Flyweight_Classes.h.
References Flyweight_Context::ImageHeight, Flyweight_Context::ImageWidth, Flyweight_Context::OffsetXToImage, Flyweight_Context::Position_X, Flyweight_Context::Position_Y, Flyweight_Context::Velocity_X, and Flyweight_Context::Velocity_Y.
| int ImageHeight |
Definition at line 32 of file Flyweight_Classes.h.
Referenced by Flyweight_Context::Flyweight_Context(), and Flyweight_Class::ImageHeight().
| int ImageWidth |
Definition at line 31 of file Flyweight_Classes.h.
Referenced by Flyweight_Context::Flyweight_Context(), and Flyweight_Class::ImageWidth().
| int OffsetXToImage |
Definition at line 30 of file Flyweight_Classes.h.
Referenced by Flyweight_Context::Flyweight_Context().
| double Position_X |
Definition at line 33 of file Flyweight_Classes.h.
Referenced by Flyweight_Context::Flyweight_Context().
| double Position_Y |
Definition at line 34 of file Flyweight_Classes.h.
Referenced by Flyweight_Context::Flyweight_Context().
| double Velocity_X |
Definition at line 35 of file Flyweight_Classes.h.
Referenced by Flyweight_Context::Flyweight_Context().
| double Velocity_Y |
Definition at line 36 of file Flyweight_Classes.h.
Referenced by Flyweight_Context::Flyweight_Context().