axmol/tools/tolua++/CCNode.pkg

147 lines
4.8 KiB
Plaintext
Raw Normal View History

enum {
kCCNodeTagInvalid = -1,
};
2011-06-14 14:31:25 +08:00
2012-02-02 15:58:10 +08:00
enum {
kCCNodeOnEnter,
kCCNodeOnExit
};
typedef enum {
2013-07-26 13:50:10 +08:00
// CC_GL_ALL = 0,
} ccGLServerState;
class CCNode : public CCObject
2011-06-14 14:31:25 +08:00
{
2013-07-04 12:50:17 +08:00
int getZOrder() const;
float getVertexZ() const;
2012-02-02 14:26:38 +08:00
void setVertexZ(float var);
2013-07-04 12:50:17 +08:00
float getRotation() const;
float getRotationX() const;
float getRotationY() const;
2012-02-02 14:26:38 +08:00
void setRotation(float newRotation);
2013-07-04 12:50:17 +08:00
float getScale() const;
2012-02-02 14:26:38 +08:00
void setScale(float scale);
2013-07-04 12:50:17 +08:00
float getScaleX() const;
2012-02-02 14:26:38 +08:00
void setScaleX(float newScaleX);
2013-07-04 12:50:17 +08:00
float getScaleY() const;
2012-02-02 14:26:38 +08:00
void setScaleY(float newScaleY);
2013-07-04 12:50:17 +08:00
void getPosition(float* x = 0, float* y = 0) const;
float getPositionX() const;
float getPositionY() const;
2012-02-02 14:26:38 +08:00
void setPosition(float x, float y);
void setPosition(CCPoint pos);
2012-02-02 14:26:38 +08:00
void setPositionX(float x);
void setPositionY(float y);
2013-07-04 12:50:17 +08:00
float getSkewX() const;
2012-02-02 14:26:38 +08:00
void setSkewX(float skewX);
2013-07-04 12:50:17 +08:00
float getSkewY() const;
2012-02-02 14:26:38 +08:00
void setSkewY(float skewY);
2013-07-04 12:50:17 +08:00
bool isVisible() const;
2012-06-15 17:26:11 +08:00
void setVisible(bool var);
2013-07-04 12:50:17 +08:00
CCPoint getAnchorPoint() const;
2012-02-02 14:26:38 +08:00
void setAnchorPoint(CCPoint point);
CCSize getContentSize();
void setContentSize(const CCSize & size);
2012-02-02 14:26:38 +08:00
int getTag();
void setTag(int var);
2011-06-14 14:31:25 +08:00
2012-04-09 00:10:12 +08:00
CCArray* getChildren();
2012-02-02 14:26:38 +08:00
unsigned int getChildrenCount(void);
2011-06-14 14:31:25 +08:00
2012-02-02 14:26:38 +08:00
CCCamera* getCamera();
CCGridBase* getGrid();
void setGrid(CCGridBase* pGrid);
CCPoint getAnchorPointInPoints();
2013-07-04 12:50:17 +08:00
bool isRunning() const;
2012-02-02 14:26:38 +08:00
CCNode* getParent();
void setParent(CCNode * var);
2012-06-15 17:26:11 +08:00
bool isIgnoreAnchorPointForPosition();
void ignoreAnchorPointForPosition(bool newValue);
2012-02-02 14:26:38 +08:00
void* getUserData();
void setUserData(void *var);
CCObject* getUserObject();
void setUserObject(CCObject* pObject);
CCGLProgram* getShaderProgram();
void setShaderProgram(CCGLProgram* pShaderProgram);
2013-07-04 12:50:17 +08:00
int getOrderOfArrival() const;
void setOrderOfArrival(int order);
2013-07-04 12:50:17 +08:00
ccGLServerState getGLServerState() const;
void setGLServerState(ccGLServerState state);
CCActionManager* getActionManager();
void setActionManager(CCActionManager* pActionMgr);
ccGLServerState getGLServerState(void);
void setGLServerState(ccGLServerState state);
CCScheduler* getScheduler();
void setScheduler(CCScheduler* pScheduler);
void addChild(CCNode * child);
void addChild(CCNode * child, int zOrder);
2012-02-02 14:26:38 +08:00
void addChild(CCNode * child, int zOrder, int tag);
void removeChild(CCNode* child, bool cleanup);
void removeAllChildrenWithCleanup(bool cleanup);
void reorderChild(CCNode * child, int zOrder);
void cleanup(void);
void draw(void);
void visit(void);
void transform(void);
void transformAncestors(void);
CCRect getBoundingBox(void) const;
2012-02-02 14:26:38 +08:00
CCAction* runAction(CCAction* action);
2012-02-02 14:26:38 +08:00
void stopAllActions(void);
void stopAction(CCAction* action);
void stopActionByTag(int tag);
CCAction* getActionByTag(int tag);
2013-07-04 12:50:17 +08:00
const char * description(void) const;
2012-02-02 14:26:38 +08:00
CCNode* getChildByTag(int tag);
2011-06-14 14:31:25 +08:00
unsigned int getNumberOfRunningActions(void) const;
2011-06-14 14:31:25 +08:00
2012-02-02 14:26:38 +08:00
CCAffineTransform nodeToParentTransform(void);
CCAffineTransform parentToNodeTransform(void);
CCAffineTransform nodeToWorldTransform(void);
CCAffineTransform worldToNodeTransform(void);
CCPoint convertToNodeSpace(CCPoint worldPoint);
CCPoint convertToWorldSpace(CCPoint nodePoint);
CCPoint convertToNodeSpaceAR(CCPoint worldPoint);
CCPoint convertToWorldSpaceAR(CCPoint nodePoint);
CCPoint convertTouchToNodeSpace(CCTouch * touch);
CCPoint convertTouchToNodeSpaceAR(CCTouch * touch);
2012-02-02 15:58:10 +08:00
void removeFromParentAndCleanup(bool cleanup);
void removeChildByTag(int tag, bool cleanup);
void scheduleUpdateWithPriorityLua(LUA_FUNCTION nHandler, int priority);
void unscheduleUpdate(void);
static CCNode * create(void);
2012-02-02 14:26:38 +08:00
};
class CCNodeRGBA : public CCNode, public CCRGBAProtocol
{
CCNodeRGBA();
virtual ~CCNodeRGBA();
virtual bool init();
2013-07-04 12:50:17 +08:00
virtual GLubyte getOpacity() const;
virtual GLubyte getDisplayedOpacity() const;
virtual void setOpacity(GLubyte opacity);
virtual void updateDisplayedOpacity(GLubyte parentOpacity);
2013-07-04 12:50:17 +08:00
virtual bool isCascadeOpacityEnabled() const;
virtual void setCascadeOpacityEnabled(bool cascadeOpacityEnabled);
2013-07-08 11:34:31 +08:00
virtual const Color3B& getColor(void) const;
virtual const Color3B& getDisplayedColor() const;
virtual void setColor(const Color3B& color);
virtual void updateDisplayedColor(const Color3B& parentColor);
2013-07-04 12:50:17 +08:00
virtual bool isCascadeColorEnabled() const;
virtual void setCascadeColorEnabled(bool cascadeColorEnabled);
virtual void setOpacityModifyRGB(bool bValue);
2013-07-04 12:50:17 +08:00
virtual bool isOpacityModifyRGB() const;
};