45 #ifndef __CU_ORTHOGRAPHIC_CAMERA_H__ 
   46 #define __CU_ORTHOGRAPHIC_CAMERA_H__ 
   67 #pragma mark Constructors 
   75         _zoom = 1; 
_near = 0; _initialized = 
false;
 
  121     bool init(
float width, 
float height, 
bool yDown=
false) {
 
  188     bool initOffset(
float x, 
float y, 
float width, 
float height, 
bool yDown=
false);
 
  191 #pragma mark Static Constructors 
  206     static std::shared_ptr<OrthographicCamera> 
alloc(
const Size& size, 
bool yDown=
false) {
 
  207         std::shared_ptr<OrthographicCamera> result = std::make_shared<OrthographicCamera>();
 
  208         return(result->init(size,yDown) ? result : 
nullptr);
 
  226     static std::shared_ptr<OrthographicCamera> 
alloc(
float width, 
float height, 
bool yDown=
false) {
 
  227         std::shared_ptr<OrthographicCamera> result = std::make_shared<OrthographicCamera>();
 
  228         return (result->init(width,height,yDown) ? result : 
nullptr);
 
  248     static std::shared_ptr<OrthographicCamera> 
allocOffset(
const Rect& rect, 
bool yDown=
false) {
 
  249         std::shared_ptr<OrthographicCamera> result = std::make_shared<OrthographicCamera>();
 
  250         return (result->initOffset(rect,yDown) ? result : 
nullptr);
 
  273         std::shared_ptr<OrthographicCamera> result = std::make_shared<OrthographicCamera>();
 
  274         return (result->initOffset(origin,size,yDown) ? result : 
nullptr);
 
  297     static std::shared_ptr<OrthographicCamera> 
allocOffset(
float x, 
float y, 
float width, 
float height,
 
  299         std::shared_ptr<OrthographicCamera> result = std::make_shared<OrthographicCamera>();
 
  300         return (result->initOffset(x,y,width,height,yDown) ? result : 
nullptr);
 
  317     void set(
const Size& size, 
bool yDown=
false) {
 
  334     void set(
float width, 
float height, 
bool yDown=
false) {
 
  335         set(0,0,width,height,yDown);
 
  353     void set(
const Rect& rect, 
bool yDown=
false) {
 
  373     void set(
const Vec2& origin, 
const Size& size, 
bool yDown=
false) {
 
  395     void set(
float x, 
float y, 
float width, 
float height, 
bool yDown=
false);
 
  406 #pragma mark Attributes 
float getZoom() const 
Definition: CUOrthographicCamera.h:415
 
float x
Definition: CUVec2.h:66
 
float y
Definition: CUVec2.h:68
 
static std::shared_ptr< OrthographicCamera > allocOffset(const Vec2 &origin, const Size &size, bool yDown=false)
Definition: CUOrthographicCamera.h:271
 
float _near
Definition: CUCamera.h:76
 
bool _initialized
Definition: CUOrthographicCamera.h:64
 
static std::shared_ptr< OrthographicCamera > alloc(const Size &size, bool yDown=false)
Definition: CUOrthographicCamera.h:206
 
bool initOffset(const Rect &rect, bool yDown=false)
Definition: CUOrthographicCamera.h:142
 
bool initOffset(const Vec2 &origin, const Size &size, bool yDown=false)
Definition: CUOrthographicCamera.h:164
 
void set(const Vec2 &origin, const Size &size, bool yDown=false)
Definition: CUOrthographicCamera.h:373
 
float _zoom
Definition: CUOrthographicCamera.h:61
 
float width
Definition: CUSize.h:61
 
static std::shared_ptr< OrthographicCamera > allocOffset(float x, float y, float width, float height, bool yDown=false)
Definition: CUOrthographicCamera.h:297
 
bool init(const Size &size, bool yDown=false)
Definition: CUOrthographicCamera.h:102
 
float height
Definition: CUSize.h:63
 
bool init(float width, float height, bool yDown=false)
Definition: CUOrthographicCamera.h:121
 
~OrthographicCamera()
Definition: CUOrthographicCamera.h:81
 
void set(const Size &size, bool yDown=false)
Definition: CUOrthographicCamera.h:317
 
Vec2 origin
Definition: CURect.h:49
 
void set(const Rect &rect, bool yDown=false)
Definition: CUOrthographicCamera.h:353
 
void set(float width, float height, bool yDown=false)
Definition: CUOrthographicCamera.h:334
 
Size size
Definition: CURect.h:51
 
static std::shared_ptr< OrthographicCamera > allocOffset(const Rect &rect, bool yDown=false)
Definition: CUOrthographicCamera.h:248
 
Definition: CUOrthographicCamera.h:57
 
Definition: CUCamera.h:56
 
OrthographicCamera()
Definition: CUOrthographicCamera.h:74
 
static std::shared_ptr< OrthographicCamera > alloc(float width, float height, bool yDown=false)
Definition: CUOrthographicCamera.h:226
 
Definition: CUAction.h:51