Cocos2d-x Js Draw Circle

Node that draws dots, segments and polygons. More...

Inherits Node.

Public Member Functions

void drawPoint (const Vec2 &bespeak, const float pointSize, const Color4F &color)
Draw a point. More than...
local drawPoint ( local point, local pointSize, local colour)
Draw a signal. More...
void drawPoints (const Vec2 *position, unsigned int numberOfPoints, const Color4F &color)
Draw a group point. More...
void drawPoints (const Vec2 *position, unsigned int numberOfPoints, const float pointSize, const Color4F &color)
Draw a group signal. More...
void drawLine (const Vec2 &origin, const Vec2 &destination, const Color4F &color)
Draw an line from origin to destination with color. More...
void drawRect (const Vec2 &origin, const Vec2 &destination, const Color4F &color)
Draws a rectangle given the origin and destination point measured in points. More...
void drawPoly (const Vec2 *poli, unsigned int numberOfPoints, bool closePolygon, const Color4F &color)
Draws a polygon given a arrow to point coordinates and the number of vertices measured in points. More than...
void drawCircle (const Vec2 &middle, bladder radius, float angle, unsigned int segments, bool drawLineToCenter, float scaleX, float scaleY, const Color4F &color)
Draws a circumvolve given the center, radius and number of segments. More than...
local drawCircle ( local eye, local radius, local angle, local segments, local drawLineToCenter, local scaleX, local scaleY, local color)
Draws a circumvolve given the center, radius and number of segments. More...
void drawCircle (const Vec2 &eye, bladder radius, float angle, unsigned int segments, bool drawLineToCenter, const Color4F &colour)
Draws a circle given the heart, radius and number of segments. More...
local drawCircle ( local heart, local radius, local angle, local segments, local drawLineToCenter, local color)
Draws a circumvolve given the centre, radius and number of segments. More than...
void drawQuadBezier (const Vec2 &origin, const Vec2 &control, const Vec2 &destination, unsigned int segments, const Color4F &colour)
Draws a quad bezier path. More...
void drawCubicBezier (const Vec2 &origin, const Vec2 &control1, const Vec2 &control2, const Vec2 &destination, unsigned int segments, const Color4F &color)
Draw a cubic bezier curve with color and number of segments. More...
local drawCubicBezier ( local origin, local control1, local control2, local destination, local segments, local color)
Draw a cubic bezier curve with color and number of segments. More...
void drawCardinalSpline (PointArray *config, float tension, unsigned int segments, const Color4F &color)
Draws a Primal Spline path. More...
void drawCatmullRom (PointArray *points, unsigned int segments, const Color4F &color)
Draws a Catmull Rom path. More...
void drawDot (const Vec2 &pos, float radius, const Color4F &colour)
draw a dot at a position, with a given radius and color. More...
void drawRect (const Vec2 &p1, const Vec2 &p2, const Vec2 &p3, const Vec2 &p4, const Color4F &color)
Draws a rectangle with 4 points. More...
void drawSolidRect (const Vec2 &origin, const Vec2 &destination, const Color4F &color)
Draws a solid rectangle given the origin and destination point measured in points. More...
void drawSolidPoly (const Vec2 *poli, unsigned int numberOfPoints, const Color4F &color)
Draws a solid polygon given a pointer to CGPoint coordinates, the number of vertices measured in points, and a color. More...
void drawSolidCircle (const Vec2 &center, float radius, bladder angle, unsigned int segments, float scaleX, float scaleY, const Color4F &color)
Draws a solid circumvolve given the center, radius and number of segments. More than...
void drawSolidCircle (const Vec2 &heart, float radius, float angle, unsigned int segments, const Color4F &color)
Draws a solid circle given the center, radius and number of segments. More...
void drawSegment (const Vec2 &from, const Vec2 &to, float radius, const Color4F &color)
draw a segment with a radius and color. More...
void drawPolygon (const Vec2 *verts, int count, const Color4F &fillColor, bladder borderWidth, const Color4F &borderColor)
draw a polygon with a fill color and line color More...
void drawTriangle (const Vec2 &p1, const Vec2 &p2, const Vec2 &p3, const Color4F &color)
describe a triangle with color. More than...
void drawQuadraticBezier (const Vec2 &from, const Vec2 &control, const Vec2 &to, unsigned int segments, const Color4F &color)
draw a quadratic bezier curve with color and number of segments, use drawQuadBezier instead. More...
local drawQuadraticBezier ( local from, local control, local to, local segments, local color)
describe a quadratic bezier bend with colour and number of segments, utilise drawQuadBezier instead. More...
void articulate ()
Articulate the geometry in the node's buffer. More...
var articulate ()
Clear the geometry in the node'south buffer. More...
local clear ()
Clear the geometry in the node's buffer. More...
const BlendFunc & getBlendFunc () const
Get the color mixed way.
void setBlendFunc (const BlendFunc &blendFunc)
Gear up the color mixed way. More...
var setBlendFunc ( var blendFunc)
Prepare the color mixed mode. More...
virtual void depict (Renderer *renderer, const Mat4 &transform, uint32_t flags) override
Override this method to draw your ain node. More...
- Public Member Functions inherited from Node
virtual bool isRunning () const
Returns whether or not the node is "running". More than...
var isRunning ()
Returns whether or not the node is "running". More...
local isRunning ()
Returns whether or not the node is "running". More...
void scheduleUpdateWithPriorityLua (int handler, int priority)
Schedules for lua script. More than...
virtual void cleanup ()
Stops all running actions and schedulers.
virtual void visit (Renderer *renderer, const Mat4 &parentTransform, uint32_t parentFlags)
Visits this node'southward children and draw them recursively. More...
virtual Scene * getScene () const
Returns the Scene that contains the Node. More...
local getScene ()
Returns the Scene that contains the Node. More than...
virtual Rect getBoundingBox () const
Returns an AABB (axis-aligned bounding-box) in its parent'southward coordinate arrangement. More...
virtual Rect boundingBox () const
local boundingBox ()
virtual void setEventDispatcher (EventDispatcher *dispatcher)
Prepare upshot dispatcher for scene. More than...
local setEventDispatcher ( local dispatcher)
Set event dispatcher for scene. More than...
virtual EventDispatcher * getEventDispatcher () const
Get the issue dispatcher of scene. More than...
local getEventDispatcher ()
Get the issue dispatcher of scene. More...
void setPhysicsBody (PhysicsBody *body)
Set the PhysicsBody that let the sprite effect with physics. More...
PhysicsBody * getPhysicsBody () const
Go the PhysicsBody the sprite have. More...
var getPhysicsBody ()
Get the PhysicsBody the sprite have. More...
local getPhysicsBody ()
Get the PhysicsBody the sprite have. More...
void removeFromPhysicsWorld ()
Remove this node from physics globe. More...
var removeFromPhysicsWorld ()
Remove this node from physics earth. More...
local removeFromPhysicsWorld ()
Remove this node from physics globe. More than...
void updateTransformFromPhysics (const Mat4 &parentTransform, uint32_t parentFlags)
Update the transform matrix from physics.
var updateTransformFromPhysics ( var parentTransform, var parentFlags)
Update the transform matrix from physics.
local updateTransformFromPhysics ( local parentTransform, local parentFlags)
Update the transform matrix from physics.
virtual void updatePhysicsBodyTransform (const Mat4 &parentTransform, uint32_t parentFlags, float parentScaleX, bladder parentScaleY)
Update physics body transform matrix.
var updatePhysicsBodyTransform ( var parentTransform, var parentFlags, var parentScaleX, var parentScaleY)
Update physics body transform matrix.
local updatePhysicsBodyTransform ( local parentTransform, local parentFlags, local parentScaleX, local parentScaleY)
Update physics body transform matrix.
unsigned short getCameraMask () const
become & set photographic camera mask, the node is visible by the photographic camera whose camera flag & node's camera mask is truthful
virtual void setLocalZOrder (int localZOrder)
LocalZOrder is the 'key' used to sort the node relative to its siblings. More than...
virtual void setZOrder (int localZOrder)
virtual void _setLocalZOrder (int z)
local _setLocalZOrder ( local z)
virtual int getLocalZOrder () const
Gets the local Z order of this node. More...
var getLocalZOrder ()
Gets the local Z order of this node. More than...
local getLocalZOrder ()
Gets the local Z order of this node. More than...
virtual int getZOrder () const
virtual void setGlobalZOrder (float globalZOrder)
Defines the oder in which the nodes are renderer. More...
local setGlobalZOrder ( local globalZOrder)
Defines the oder in which the nodes are renderer. More than...
virtual float getGlobalZOrder () const
Returns the Node's Global Z Lodge. More...
virtual void setScaleX (bladder scaleX)
Sets the scale (x) of the node. More...
local setScaleX ( local scaleX)
Sets the scale (x) of the node. More...
virtual float getScaleX () const
Returns the scale cistron on X axis of this node. More than...
virtual void setScaleY (float scaleY)
Sets the scale (y) of the node. More...
var setScaleY ( var scaleY)
Sets the calibration (y) of the node. More than...
local setScaleY ( local scaleY)
Sets the scale (y) of the node. More...
virtual float getScaleY () const
Returns the scale factor on Y centrality of this node. More than...
virtual void setScaleZ (bladder scaleZ)
Changes the scale factor on Z axis of this node. More...
var setScaleZ ( var scaleZ)
Changes the scale cistron on Z centrality of this node. More...
local setScaleZ ( local scaleZ)
Changes the scale gene on Z axis of this node. More...
virtual float getScaleZ () const
Returns the scale factor on Z centrality of this node. More...
virtual void setScale (bladder scale)
Sets the scale (x,y,z) of the node. More...
local setScale ( local scale)
Sets the calibration (x,y,z) of the node. More...
virtual bladder getScale () const
Gets the calibration factor of the node, when X and Y have the same scale gene. More...
virtual void setScale (bladder scaleX, float scaleY)
Sets the calibration (x,y) of the node. More than...
local setScale ( local scaleX, local scaleY)
Sets the scale (x,y) of the node. More...
virtual void setPosition (const Vec2 &position)
Sets the position (ten,y) of the node in its parent'southward coordinate system. More...
virtual void setNormalizedPosition (const Vec2 &position)
Sets the position (ten,y) using values between 0 and 1. More...
var setNormalizedPosition ( var position)
Sets the position (ten,y) using values between 0 and 1. More...
local setNormalizedPosition ( local position)
Sets the position (ten,y) using values betwixt 0 and ane. More...
virtual const Vec2 & getPosition () const
Gets the position (x,y) of the node in its parent'southward coordinate system. More...
virtual const Vec2 & getNormalizedPosition () const
Returns the normalized position. More...
local getNormalizedPosition ()
Returns the normalized position. More...
virtual void setPosition (bladder x, float y)
Sets the position (x,y) of the node in its parent's coordinate organization. More...
var setPosition ( var x, var y)
Sets the position (x,y) of the node in its parent'due south coordinate system. More...
local setPosition ( local ten, local y)
Sets the position (10,y) of the node in its parent's coordinate system. More than...
virtual void getPosition (bladder *x, float *y) const
Gets position in a more efficient way, returns two number instead of a Vec2 object. More than...
virtual void setPositionX (float x)
Gets/Sets x or y coordinate individually for position. More than...
virtual bladder getPositionX (void) const
Gets the 10 coordinate of the node in its parent's coordinate organization. More...
virtual void setPositionY (bladder y)
Sets the y coordinate of the node in its parent's coordinate system. More...
virtual bladder getPositionY (void) const
Gets the y coordinate of the node in its parent's coordinate system. More...
virtual void setPosition3D (const Vec3 &position)
Sets the position (10, Y, and Z) in its parent's coordinate system. More than...
virtual Vec3 getPosition3D () const
Returns the position (X,Y,Z) in its parent's coordinate system. More...
virtual void setPositionZ (float positionZ)
Sets the 'z' coordinate in the position. More...
var setVertexZ ( var positionZ)
Sets the 'z' coordinate in the position. More than...
local setPositionZ ( local positionZ)
Sets the 'z' coordinate in the position. More...
virtual void setVertexZ (float vertexZ)
var setVertexZ ( var vertexZ)
local setVertexZ ( local vertexZ)
virtual float getPositionZ () const
Gets position Z coordinate of this node. More...
var getVertexZ ()
Gets position Z coordinate of this node. More than...
local getPositionZ ()
Gets position Z coordinate of this node. More...
virtual float getVertexZ () const
virtual void setSkewX (bladder skewX)
Changes the X skew angle of the node in degrees. More...
local setSkewX ( local skewX)
Changes the X skew angle of the node in degrees. More...
virtual bladder getSkewX () const
Returns the X skew bending of the node in degrees. More...
var getSkewX ()
Returns the X skew bending of the node in degrees. More than...
local getSkewX ()
Returns the X skew angle of the node in degrees. More...
virtual void setSkewY (float skewY)
Changes the Y skew angle of the node in degrees. More than...
var setSkewY ( var skewY)
Changes the Y skew angle of the node in degrees. More...
local setSkewY ( local skewY)
Changes the Y skew angle of the node in degrees. More...
virtual float getSkewY () const
Returns the Y skew angle of the node in degrees. More...
var getSkewY ()
Returns the Y skew angle of the node in degrees. More than...
local getSkewY ()
Returns the Y skew bending of the node in degrees. More...
virtual void setAnchorPoint (const Vec2 &anchorPoint)
Sets the anchor point in per centum. More than...
local setAnchorPoint ( local anchorPoint)
Sets the anchor point in percent. More...
virtual const Vec2 & getAnchorPoint () const
Returns the anchor indicate in percentage. More...
local getAnchorPoint ()
Returns the anchor betoken in percent. More...
virtual const Vec2 & getAnchorPointInPoints () const
Returns the anchorPoint in absolute pixels. More...
local getAnchorPointInPoints ()
Returns the anchorPoint in accented pixels. More...
virtual void setContentSize (const Size &contentSize)
Sets the untransformed size of the node. More than...
local setContentSize ( local contentSize)
Sets the untransformed size of the node. More...
virtual const Size & getContentSize () const
Returns the untransformed size of the node. More than...
virtual void setVisible (bool visible)
Sets whether the node is visible. More...
local setVisible ( local visible)
Sets whether the node is visible. More...
virtual bool isVisible () const
Determines if the node is visible. More...
virtual void setRotation (bladder rotation)
Sets the rotation (bending) of the node in degrees. More than...
local setRotation ( local rotation)
Sets the rotation (angle) of the node in degrees. More...
virtual bladder getRotation () const
Returns the rotation of the node in degrees. More than...
virtual void setRotation3D (const Vec3 &rotation)
Sets the rotation (X,Y,Z) in degrees. More than...
local setRotation3D ( local rotation)
Sets the rotation (X,Y,Z) in degrees. More...
virtual Vec3 getRotation3D () const
Returns the rotation (X,Y,Z) in degrees. More...
virtual void setRotationQuat (const Quaternion &quat)
Set rotation by quaternion. More than...
local setRotationQuat ( local quat)
Set rotation by quaternion. More...
virtual Quaternion getRotationQuat () const
Return the rotation by quaternion, Note that when _rotationZ_X == _rotationZ_Y, the returned quaternion equals to RotationZ_X * RotationY * RotationX, information technology equals to RotationY * RotationX otherwise. More than...
virtual void setRotationSkewX (float rotationX)
Sets the X rotation (angle) of the node in degrees which performs a horizontal rotational skew. More than...
local setRotationSkewX ( local rotationX)
Sets the X rotation (bending) of the node in degrees which performs a horizontal rotational skew. More than...
virtual void setRotationX (float rotationX)
var setRotationX ( var rotationX)
local setRotationX ( local rotationX)
virtual float getRotationSkewX () const
Gets the 10 rotation (angle) of the node in degrees which performs a horizontal rotation skew. More than...
var getRotationX ()
Gets the Ten rotation (bending) of the node in degrees which performs a horizontal rotation skew. More...
local getRotationSkewX ()
Gets the X rotation (angle) of the node in degrees which performs a horizontal rotation skew. More than...
virtual float getRotationX () const
virtual void setRotationSkewY (float rotationY)
Sets the Y rotation (angle) of the node in degrees which performs a vertical rotational skew. More than...
local setRotationSkewY ( local rotationY)
Sets the Y rotation (bending) of the node in degrees which performs a vertical rotational skew. More...
virtual void setRotationY (bladder rotationY)
local setRotationY ( local rotationY)
virtual float getRotationSkewY () const
Gets the Y rotation (angle) of the node in degrees which performs a vertical rotational skew. More...
local getRotationSkewY ()
Gets the Y rotation (angle) of the node in degrees which performs a vertical rotational skew. More...
virtual bladder getRotationY () const
var getRotationY ()
local getRotationY ()
void setOrderOfArrival (int orderOfArrival)
Sets the inflow social club when this node has a aforementioned ZOrder with other children. More...
int getOrderOfArrival () const
Returns the arrival gild, indicates which children is added previously. More...
void setGLServerState (int serverState)
var setGLServerState ( var serverState)
int getGLServerState () const
virtual void ignoreAnchorPointForPosition (bool ignore)
Sets whether the anchor betoken volition exist (0,0) when you position this node. More...
virtual bool isIgnoreAnchorPointForPosition () const
Gets whether the anchor point will exist (0,0) when yous position this node. More...
virtual void addChild (Node *child)
Adds a child to the container with z-order as 0. More...
var addChild ( var child)
Adds a child to the container with z-order as 0. More than...
local addChild ( local child)
Adds a child to the container with z-order equally 0. More...
virtual void addChild (Node *child, int localZOrder)
Adds a child to the container with a local z-order. More...
local addChild ( local child, local localZOrder)
Adds a child to the container with a local z-society. More...
virtual void addChild (Node *child, int localZOrder, int tag)
Adds a child to the container with z guild and tag. More...
local addChild ( local child, local localZOrder, local tag)
Adds a child to the container with z order and tag. More...
virtual void addChild (Node *child, int localZOrder, const std::string &name)
Adds a child to the container with z order and tag. More...
local addChild ( local child, local localZOrder, local name)
Adds a child to the container with z lodge and tag. More than...
virtual Node * getChildByTag (int tag) const
Gets a child from the container with its tag. More than...
var getChildByTag ( var tag)
Gets a kid from the container with its tag. More...
local getChildByTag ( local tag)
Gets a child from the container with its tag. More than...
virtual Node * getChildByName (const std::string &name) const
Gets a child from the container with its name. More...
local getChildByName ( local name)
Gets a child from the container with its name. More...
template<typename T >
T getChildByName (const std::string &name) const
Gets a child from the container with its proper name that tin exist cast to Type T. More...
virtual void enumerateChildren (const std::string &name, std::function< bool(Node *node)> callback) const
Search the children of the receiving node to perform processing for nodes which share a name. More...
virtual Vector< Node * > & getChildren ()
Returns the array of the node's children. More than...
local getChildren ()
Returns the array of the node's children. More than...
virtual const Vector< Node * > & getChildren () const
local getChildren ()
virtual ssize_t getChildrenCount () const
Returns the amount of children. More...
virtual void setParent (Node *parent)
Sets the parent node. More than...
local setParent ( local parent)
Sets the parent node. More...
virtual Node * getParent ()
Returns a arrow to the parent node. More...
virtual const Node * getParent () const
local getParent ()
virtual void removeFromParent ()
Removes this node itself from its parent node with a cleanup. More...
var removeFromParent ()
Removes this node itself from its parent node with a cleanup. More...
local removeFromParent ()
Removes this node itself from its parent node with a cleanup. More than...
virtual void removeFromParentAndCleanup (bool cleanup)
Removes this node itself from its parent node. More...
local removeFromParent ( local cleanup)
Removes this node itself from its parent node. More...
virtual void removeChild (Node *child, bool cleanup=truthful)
Removes a kid from the container. More...
virtual void removeChildByTag (int tag, bool cleanup=true)
Removes a child from the container by tag value. More...
var removeChildByTag ( var tag, var true)
Removes a child from the container past tag value. More than...
local removeChildByTag ( local tag, local true)
Removes a child from the container by tag value. More...
virtual void removeChildByName (const std::string &name, bool cleanup=truthful)
Removes a child from the container by tag value. More than...
var removeChildByName ( var proper noun, var true)
Removes a kid from the container past tag value. More...
local removeChildByName ( local proper noun, local truthful)
Removes a child from the container by tag value. More...
virtual void removeAllChildren ()
Removes all children from the container with a cleanup. More...
var removeAllChildren ()
Removes all children from the container with a cleanup. More...
local removeAllChildren ()
Removes all children from the container with a cleanup. More...
virtual void removeAllChildrenWithCleanup (bool cleanup)
Removes all children from the container, and do a cleanup to all running deportment depending on the cleanup parameter. More...
var removeAllChildren ( var cleanup)
Removes all children from the container, and do a cleanup to all running actions depending on the cleanup parameter. More...
local removeAllChildren ( local cleanup)
Removes all children from the container, and exercise a cleanup to all running deportment depending on the cleanup parameter. More...
virtual void reorderChild (Node *child, int localZOrder)
Reorders a kid according to a new z value. More...
virtual void sortAllChildren ()
Sorts the children array once before drawing, instead of every time when a kid is added or reordered. More...
virtual int getTag () const
Returns a tag that is used to place the node hands. More...
virtual void setTag (int tag)
Changes the tag that is used to identify the node easily. More...
local setTag ( local tag)
Changes the tag that is used to identify the node hands. More...
virtual std::cord getName () const
Returns a string that is used to identify the node. More...
local getName ()
Returns a string that is used to identify the node. More...
virtual void setName (const std::cord &proper noun)
Changes the proper name that is used to identify the node easily. More...
var setName ( var name)
Changes the name that is used to place the node easily. More...
local setName ( local name)
Changes the name that is used to identify the node easily. More...
virtual void * getUserData ()
Returns a custom user data pointer. More...
virtual const void * getUserData () const
virtual void setUserData (void *userData)
Sets a custom user information pointer. More...
virtual Ref * getUserObject ()
Returns a user assigned Object. More than...
virtual const Ref * getUserObject () const
virtual void setUserObject (Ref *userObject)
Returns a user assigned Object. More...
local setUserObject ( local userObject)
Returns a user assigned Object. More than...
GLProgram * getGLProgram () const
Render the GLProgram (shader) currently used for this node. More...
var getGLProgram ()
Return the GLProgram (shader) currently used for this node. More...
local getGLProgram ()
Return the GLProgram (shader) currently used for this node. More...
GLProgram * getShaderProgram () const
var getShaderProgram ()
local getShaderProgram ()
virtual void setGLProgram (GLProgram *glprogram)
Sets the shader plan for this node. More than...
local setGLProgram ( local glprogram)
Sets the shader plan for this node. More...
void setShaderProgram (GLProgram *glprogram)
var setShaderProgram ( var glprogram)
local setShaderProgram ( local glprogram)
GLProgramState * getGLProgramState () const
Render the GLProgramState currently used for this node. More...
var getGLProgramState ()
Render the GLProgramState currently used for this node. More...
local getGLProgramState ()
Render the GLProgramState currently used for this node. More...
virtual void setGLProgramState (GLProgramState *glProgramState)
Prepare the GLProgramState for this node. More than...
local setGLProgramState ( local glProgramState)
Set the GLProgramState for this node. More...
virtual void onEnter ()
Event callback that is invoked every time when Node enters the 'stage'. More...
virtual void onEnterTransitionDidFinish ()
Event callback that is invoked when the Node enters in the 'stage'. More than...
virtual void onExit ()
Event callback that is invoked every time the Node leaves the 'stage'. More...
virtual void onExitTransitionDidStart ()
Upshot callback that is called every time the Node leaves the 'stage'. More...
virtual void setActionManager (ActionManager *actionManager)
Sets the ActionManager object that is used by all deportment. More...
var setActionManager ( var actionManager)
Sets the ActionManager object that is used by all actions. More...
local setActionManager ( local actionManager)
Sets the ActionManager object that is used past all actions. More than...
virtual ActionManager * getActionManager ()
Gets the ActionManager object that is used by all deportment. More than...
local getActionManager ()
Gets the ActionManager object that is used by all deportment. More...
virtual const ActionManager * getActionManager () const
virtual Action * runAction (Action *activeness)
Executes an action, and returns the activeness that is executed. More...
var runAction ( var action)
Executes an action, and returns the action that is executed. More...
local runAction ( local activity)
Executes an action, and returns the action that is executed. More than...
void stopAllActions ()
Stops and removes all deportment from the running action listing .
void stopAction (Action *action)
Stops and removes an action from the running action list. More...
var stopAction ( var action)
Stops and removes an action from the running action list. More...
local stopAction ( local action)
Stops and removes an action from the running action list. More...
void stopActionByTag (int tag)
Removes an activity from the running action list by its tag. More...
var stopActionByTag ( var tag)
Removes an action from the running action list past its tag. More...
local stopActionByTag ( local tag)
Removes an action from the running action list by its tag. More...
void stopAllActionsByTag (int tag)
Removes all actions from the running action list by its tag. More...
var stopAllActionsByTag ( var tag)
Removes all actions from the running action list by its tag. More...
local stopAllActionsByTag ( local tag)
Removes all deportment from the running action list past its tag. More...
void stopActionsByFlags (unsigned int flags)
Removes all actions from the running activeness list by its flags. More than...
Activeness * getActionByTag (int tag)
Gets an action from the running action list by its tag. More...
ssize_t getNumberOfRunningActions () const
Returns the numbers of actions that are running plus the ones that are schedule to run (actions in actionsToAdd and deportment arrays). More...
local getNumberOfRunningActions ()
Returns the numbers of deportment that are running plus the ones that are schedule to run (actions in actionsToAdd and deportment arrays). More...
ssize_t numberOfRunningActions () const
var numberOfRunningActions ()
local numberOfRunningActions ()
virtual void setScheduler (Scheduler *scheduler)
Sets a Scheduler object that is used to schedule all "updates" and timers. More...
virtual Scheduler * getScheduler ()
Gets a Sheduler object. More...
local getScheduler ()
Gets a Sheduler object. More than...
virtual const Scheduler * getScheduler () const
bool isScheduled (SEL_SCHEDULE selector)
Checks whether a selector is scheduled. More...
bool isScheduled (const std::string &key)
Checks whether a lambda function is scheduled. More...
void scheduleUpdate (void)
Schedules the "update" method. More than...
void scheduleUpdateWithPriority (int priority)
Schedules the "update" method with a custom priority. More...
var scheduleUpdateWithPriority ( var priority)
Schedules the "update" method with a custom priority. More...
void unscheduleUpdate (void)
var unscheduleUpdate ()
local unscheduleUpdate ()
void schedule (SEL_SCHEDULE selector, float interval, unsigned int repeat, float delay)
Schedules a custom selector. More...
void schedule (SEL_SCHEDULE selector, bladder interval)
Schedules a custom selector with an interval time in seconds. More than...
void scheduleOnce (SEL_SCHEDULE selector, float filibuster)
Schedules a selector that runs only one time, with a delay of 0 or larger. More...
var scheduleOnce ( var selector, var delay)
Schedules a selector that runs just once, with a delay of 0 or larger. More...
void scheduleOnce (const std::function< void(float)> &callback, float delay, const std::string &primal)
Schedules a lambda function that runs merely in one case, with a delay of 0 or larger. More...
void schedule (SEL_SCHEDULE selector)
Schedules a custom selector, the scheduled selector will exist ticked every frame. More...
void schedule (const std::function< void(float)> &callback, const std::cord &key)
Schedules a lambda function. More...
void schedule (const std::function< void(float)> &callback, float interval, const std::cord &key)
Schedules a lambda function. More than...
void schedule (const std::function< void(float)> &callback, float interval, unsigned int repeat, float delay, const std::string &key)
Schedules a lambda office. More...
void unschedule (SEL_SCHEDULE selector)
Unschedules a custom selector. More...
void unschedule (const std::cord &key)
Unschedules a lambda part. More...
var unschedule ( var cardinal)
Unschedules a lambda function. More than...
void unscheduleAllCallbacks ()
Unschedule all scheduled selectors and lambda functions: custom selectors, and the 'update' selector and lambda functions. More than...
void unscheduleAllSelectors ()
var unscheduleAllSelectors ()
local unscheduleAllSelectors ()
virtual void resume (void)
Resumes all scheduled selectors, deportment and consequence listeners. More...
local resume ()
Resumes all scheduled selectors, actions and event listeners. More...
virtual void intermission (void)
Pauses all scheduled selectors, actions and effect listeners. More...
local pause ()
Pauses all scheduled selectors, actions and event listeners. More than...
void resumeSchedulerAndActions ()
Resumes all scheduled selectors, deportment and effect listeners. More...
void pauseSchedulerAndActions ()
Pauses all scheduled selectors, actions and upshot listeners. More...
var pauseSchedulerAndActions ()
Pauses all scheduled selectors, actions and result listeners. More...
local pauseSchedulerAndActions ()
Pauses all scheduled selectors, deportment and event listeners. More than...
virtual void update (float delta)
Update method will be called automatically every frame if "scheduleUpdate" is called, and the node is "alive". More...
var update ( var delta)
Update method will be chosen automatically every frame if "scheduleUpdate" is chosen, and the node is "live". More than...
local update ( local delta)
Update method will be chosen automatically every frame if "scheduleUpdate" is called, and the node is "live". More...
virtual void updateTransform ()
Calls children's updateTransform() method recursively. More...
var updateTransform ()
Calls children's updateTransform() method recursively. More...
local updateTransform ()
Calls children'south updateTransform() method recursively. More than...
virtual const Mat4 & getNodeToParentTransform () const
Returns the matrix that transform the node's (local) infinite coordinates into the parent'southward space coordinates. More...
virtual AffineTransform getNodeToParentAffineTransform () const
local getNodeToParentAffineTransform ()
virtual Mat4 getNodeToParentTransform (Node *ancestor) const
Returns the matrix that transform the node'south (local) infinite coordinates into the parent's space coordinates. More...
local getNodeToParentTransform ( local antecedent)
Returns the matrix that transform the node's (local) space coordinates into the parent'southward space coordinates. More...
virtual AffineTransform getNodeToParentAffineTransform (Node *ancestor) const
Returns the affline transform matrix that transform the node'due south (local) space coordinates into the parent's space coordinates. More than...
virtual void setNodeToParentTransform (const Mat4 &transform)
Sets the transformation matrix manually. More...
var setNodeToParentTransform ( var transform)
Sets the transformation matrix manually. More...
local setNodeToParentTransform ( local transform)
Sets the transformation matrix manually. More...
virtual AffineTransform nodeToParentTransform () const
local nodeToParentTransform ()
virtual const Mat4 & getParentToNodeTransform () const
Returns the matrix that transform parent's space coordinates to the node'south (local) space coordinates. More...
var getParentToNodeTransform ()
Returns the matrix that transform parent's space coordinates to the node'south (local) infinite coordinates. More than...
local getParentToNodeTransform ()
Returns the matrix that transform parent's space coordinates to the node'due south (local) infinite coordinates. More than...
virtual AffineTransform getParentToNodeAffineTransform () const
local getParentToNodeAffineTransform ()
virtual AffineTransform parentToNodeTransform () const
local parentToNodeTransform ()
virtual Mat4 getNodeToWorldTransform () const
Returns the world affine transform matrix. More...
virtual AffineTransform getNodeToWorldAffineTransform () const
local getNodeToWorldAffineTransform ()
virtual AffineTransform nodeToWorldTransform () const
local nodeToWorldTransform ()
virtual Mat4 getWorldToNodeTransform () const
Returns the inverse world affine transform matrix. More...
var getWorldToNodeTransform ()
Returns the inverse world affine transform matrix. More...
local getWorldToNodeTransform ()
Returns the inverse globe affine transform matrix. More...
virtual AffineTransform getWorldToNodeAffineTransform () const
local getWorldToNodeAffineTransform ()
virtual AffineTransform worldToNodeTransform () const
local worldToNodeTransform ()
Vec2 convertToNodeSpace (const Vec2 &worldPoint) const
Converts a Vec2 to node (local) space coordinates. More...
var convertToNodeSpace ( var worldPoint)
Converts a Vec2 to node (local) space coordinates. More than...
local convertToNodeSpace ( local worldPoint)
Converts a Vec2 to node (local) space coordinates. More than...
Vec2 convertToWorldSpace (const Vec2 &nodePoint) const
Converts a Vec2 to globe infinite coordinates. More...
Vec2 convertToNodeSpaceAR (const Vec2 &worldPoint) const
Converts a Vec2 to node (local) space coordinates. More...
var convertToNodeSpaceAR ( var worldPoint)
Converts a Vec2 to node (local) space coordinates. More...
local convertToNodeSpaceAR ( local worldPoint)
Converts a Vec2 to node (local) space coordinates. More than...
Vec2 convertToWorldSpaceAR (const Vec2 &nodePoint) const
Converts a local Vec2 to world infinite coordinates.The outcome is in Points. More than...
Vec2 convertTouchToNodeSpace (Touch *touch on) const
convenience methods which take a Touch on instead of Vec2. More...
Vec2 convertTouchToNodeSpaceAR (Bear on *touch) const
converts a Touch (world coordinates) into a local coordinate. More...
void setAdditionalTransform (Mat4 *additionalTransform)
Sets an additional transform matrix to the node. More...
void setAdditionalTransform (const AffineTransform &additionalTransform)
var setAdditionalTransform ( var additionalTransform)
local setAdditionalTransform ( local additionalTransform)
Component * getComponent (const std::string &name)
Gets a component by its name. More than...
var getComponent ( var name)
Gets a component by its name. More...
local getComponent ( local proper name)
Gets a component by its proper noun. More...
virtual bool addComponent (Component *component)
Adds a component. More...
local addComponent ( local component)
Adds a component. More than...
virtual bool removeComponent (const std::string &name)
Removes a component past its proper noun. More...
virtual bool removeComponent (Component *component)
Removes a component past its pointer. More than...
virtual void removeAllComponents ()
Removes all components.
virtual std::string getDescription () const
Gets the description string. More than...
- Public Member Functions inherited from Ref
void retain ()
Retains the ownership. More...
void release ()
Releases the ownership immediately. More...
Ref * autorelease ()
Releases the ownership sometime soon automatically. More...
unsigned int getReferenceCount () const
Returns the Ref's current reference count. More...
virtual ~Ref ()
Destructor. More...

Static Public Member Functions

static DrawNode * create ()
creates and initialize a DrawNode node. More...
local create ()
creates and initialize a DrawNode node. More than...
- Static Public Fellow member Functions inherited from Node
static Node * create ()
Allocates and initializes a node. More...
var create ()
Allocates and initializes a node. More than...
local create ()
Allocates and initializes a node. More...

Boosted Inherited Members

- Public Attributes inherited from Ref
unsigned int _ID
object id, ScriptSupport demand public _ID
local _ID
object id, ScriptSupport need public _ID
int _luaID
Lua reference id.
local _luaID
Lua reference id.
void * _scriptObject
scriptObject, back up for swift
local _scriptObject
scriptObject, back up for swift
- Static Public Attributes inherited from Node
static const int INVALID_TAG = -1
Default tag used for all the nodes.
var INVALID_TAG = -1
Default tag used for all the nodes.
local INVALID_TAG = -1
Default tag used for all the nodes.

Node that draws dots, segments and polygons.

Faster than the "drawing primitives" since they draws everything in one single batch.

Since
v2.1

creates and initialize a DrawNode node.

Returns
Return an autorelease object.

creates and initialize a DrawNode node.

Returns
Render an autorelease object.

creates and initialize a DrawNode node.

Returns
Return an autorelease object.
void drawPoint ( const Vec2 & point,
const float pointSize,
const Color4F & color
)

Draw a betoken.

Parameters
signal A Vec2 used to bespeak.
pointSize The point size.
color The point color.
local drawPoint ( local point,
local pointSize,
local color
)

Depict a point.

Parameters
bespeak A Vec2 used to point.
pointSize The indicate size.
color The point color.
void drawPoints ( const Vec2 * position,
unsigned int numberOfPoints,
const Color4F & color
)

Draw a group point.

Parameters
position A Vec2 arrow.
numberOfPoints The number of points.
colour The signal colour.
local drawPoints ( local position,
local numberOfPoints,
local color
)

Draw a grouping signal.

Parameters
position A Vec2 pointer.
numberOfPoints The number of points.
color The point color.
void drawPoints ( const Vec2 * position,
unsigned int numberOfPoints,
const float pointSize,
const Color4F & color
)

Draw a group point.

Parameters
position A Vec2 arrow.
numberOfPoints The number of points.
pointSize The point size.
color The point color.
local drawPoints ( local position,
local numberOfPoints,
local pointSize,
local color
)

Draw a group point.

Parameters
position A Vec2 arrow.
numberOfPoints The number of points.
pointSize The betoken size.
color The point color.
void drawLine ( const Vec2 & origin,
const Vec2 & destination,
const Color4F & color
)

Describe an line from origin to destination with color.

Parameters
origin The line origin.
destination The line destination.
color The line color.
local drawLine ( local origin,
local destination,
local colour
)

Draw an line from origin to destination with colour.

Parameters
origin The line origin.
destination The line destination.
color The line color.
void drawRect ( const Vec2 & origin,
const Vec2 & destination,
const Color4F & color
)

Draws a rectangle given the origin and destination indicate measured in points.

The origin and the destination tin can non have the same x and y coordinate.

Parameters
origin The rectangle origin.
destination The rectangle destination.
color The rectangle colour.
var drawRect ( var origin,
var destination,
var color
)

Draws a rectangle given the origin and destination point measured in points.

The origin and the destination can not take the same ten and y coordinate.

Parameters
origin The rectangle origin.
destination The rectangle destination.
color The rectangle colour.
local drawRect ( local origin,
local destination,
local colour
)

Draws a rectangle given the origin and destination point measured in points.

The origin and the destination tin can not accept the same x and y coordinate.

Parameters
origin The rectangle origin.
destination The rectangle destination.
color The rectangle color.
void drawPoly ( const Vec2 * poli,
unsigned int numberOfPoints,
bool closePolygon,
const Color4F & color
)

Draws a polygon given a pointer to point coordinates and the number of vertices measured in points.

The polygon can exist airtight or open.

Parameters
poli A pointer to point coordinates.
numberOfPoints The number of vertices measured in points.
closePolygon The polygon can be closed or open.
color The polygon color.
var drawPoly ( var poli,
var numberOfPoints,
var closePolygon,
var color
)

Draws a polygon given a pointer to indicate coordinates and the number of vertices measured in points.

The polygon can be closed or open.

Parameters
poli A pointer to point coordinates.
numberOfPoints The number of vertices measured in points.
closePolygon The polygon tin be closed or open.
color The polygon color.
local drawPoly ( local poli,
local numberOfPoints,
local closePolygon,
local color
)

Draws a polygon given a pointer to point coordinates and the number of vertices measured in points.

The polygon can exist closed or open.

Parameters
poli A pointer to point coordinates.
numberOfPoints The number of vertices measured in points.
closePolygon The polygon can be closed or open.
colour The polygon color.
void drawCircle ( const Vec2 & center,
float radius,
float angle,
unsigned int segments,
bool drawLineToCenter,
float scaleX,
float scaleY,
const Color4F & color
)

Draws a circle given the center, radius and number of segments.

Parameters
middle The circumvolve center point.
radius The circumvolve rotate of radius.
angle The circumvolve angle.
segments The number of segments.
drawLineToCenter Whether or not draw the line from the origin to center.
scaleX The scale value in 10.
scaleY The scale value in y.
color Fix the circle color.
var drawCircle ( var middle,
var radius,
var angle,
var segments,
var drawLineToCenter,
var scaleX,
var scaleY,
var color
)

Draws a circle given the centre, radius and number of segments.

Parameters
center The circumvolve middle bespeak.
radius The circle rotate of radius.
bending The circle angle.
segments The number of segments.
drawLineToCenter Whether or not draw the line from the origin to center.
scaleX The scale value in x.
scaleY The scale value in y.
colour Gear up the circle color.
local drawCircle ( local center,
local radius,
local angle,
local segments,
local drawLineToCenter,
local scaleX,
local scaleY,
local color
)

Draws a circle given the center, radius and number of segments.

Parameters
heart The circle center point.
radius The circumvolve rotate of radius.
bending The circumvolve angle.
segments The number of segments.
drawLineToCenter Whether or non describe the line from the origin to center.
scaleX The calibration value in ten.
scaleY The scale value in y.
color Gear up the circle color.
void drawCircle ( const Vec2 & center,
float radius,
float angle,
unsigned int segments,
bool drawLineToCenter,
const Color4F & color
)

Draws a circumvolve given the heart, radius and number of segments.

Parameters
eye The circumvolve center point.
radius The circumvolve rotate of radius.
angle The circle angle.
segments The number of segments.
drawLineToCenter Whether or not draw the line from the origin to center.
color Set the circle color.
var drawCircle ( var centre,
var radius,
var angle,
var segments,
var drawLineToCenter,
var colour
)

Draws a circle given the centre, radius and number of segments.

Parameters
center The circle center betoken.
radius The circle rotate of radius.
bending The circle bending.
segments The number of segments.
drawLineToCenter Whether or not draw the line from the origin to center.
color Set the circle color.
local drawCircle ( local center,
local radius,
local angle,
local segments,
local drawLineToCenter,
local colour
)

Draws a circle given the center, radius and number of segments.

Parameters
centre The circumvolve heart point.
radius The circle rotate of radius.
angle The circle angle.
segments The number of segments.
drawLineToCenter Whether or not draw the line from the origin to center.
colour Set up the circumvolve color.
void drawQuadBezier ( const Vec2 & origin,
const Vec2 & command,
const Vec2 & destination,
unsigned int segments,
const Color4F & color
)

Draws a quad bezier path.

Parameters
origin The origin of the bezier path.
control The control of the bezier path.
destination The destination of the bezier path.
segments The The number of segments.
color Set the quad bezier colour.
var drawQuadBezier ( var origin,
var control,
var destination,
var segments,
var color
)

Draws a quad bezier path.

Parameters
origin The origin of the bezier path.
command The control of the bezier path.
destination The destination of the bezier path.
segments The The number of segments.
colour Set the quad bezier colour.
local drawQuadBezier ( local origin,
local control,
local destination,
local segments,
local colour
)

Draws a quad bezier path.

Parameters
origin The origin of the bezier path.
control The control of the bezier path.
destination The destination of the bezier path.
segments The The number of segments.
color Set the quad bezier colour.
void drawCubicBezier ( const Vec2 & origin,
const Vec2 & control1,
const Vec2 & control2,
const Vec2 & destination,
unsigned int segments,
const Color4F & color
)

Describe a cubic bezier curve with color and number of segments.

Parameters
origin The origin of the bezier path.
control1 The first control of the bezier path.
control2 The second control of the bezier path.
destination The destination of the bezier path.
segments The The number of segments.
color Fix the cubic bezier color.
var drawCubicBezier ( var origin,
var control1,
var control2,
var destination,
var segments,
var color
)

Draw a cubic bezier curve with color and number of segments.

Parameters
origin The origin of the bezier path.
control1 The outset control of the bezier path.
control2 The second control of the bezier path.
destination The destination of the bezier path.
segments The The number of segments.
color Set the cubic bezier color.
local drawCubicBezier ( local origin,
local control1,
local control2,
local destination,
local segments,
local colour
)

Draw a cubic bezier bend with color and number of segments.

Parameters
origin The origin of the bezier path.
control1 The first control of the bezier path.
control2 The second control of the bezier path.
destination The destination of the bezier path.
segments The The number of segments.
color Set the cubic bezier colour.
void drawCardinalSpline ( PointArray * config,
float tension,
unsigned int segments,
const Color4F & color
)

Draws a Fundamental Spline path.

Parameters
config A array betoken.
tension The tension of the spline.
segments The The number of segments.
color Set up the Spline color.
var drawCardinalSpline ( var config,
var tension,
var segments,
var color
)

Draws a Cardinal Spline path.

Parameters
config A array betoken.
tension The tension of the spline.
segments The The number of segments.
colour Gear up the Spline color.
local drawCardinalSpline ( local config,
local tension,
local segments,
local color
)

Draws a Cardinal Spline path.

Parameters
config A array bespeak.
tension The tension of the spline.
segments The The number of segments.
color Set the Spline color.
void drawCatmullRom ( PointArray * points,
unsigned int segments,
const Color4F & colour
)

Draws a Catmull Rom path.

Parameters
points A signal array of control betoken.
segments The The number of segments.
color The Catmull Rom color.
var drawCatmullRom ( var points,
var segments,
var color
)

Draws a Catmull Rom path.

Parameters
points A point array of control point.
segments The The number of segments.
colour The Catmull Rom color.
local drawCatmullRom ( local points,
local segments,
local color
)

Draws a Catmull Rom path.

Parameters
points A signal assortment of control bespeak.
segments The The number of segments.
color The Catmull Rom color.
void drawDot ( const Vec2 & pos,
float radius,
const Color4F & colour
)

draw a dot at a position, with a given radius and colour.

Parameters
pos The dot heart.
radius The dot radius.
color The dot colour.
var drawDot ( var pos,
var radius,
var color
)

draw a dot at a position, with a given radius and color.

Parameters
pos The dot center.
radius The dot radius.
colour The dot color.
local drawDot ( local pos,
local radius,
local color
)

depict a dot at a position, with a given radius and colour.

Parameters
pos The dot middle.
radius The dot radius.
colour The dot colour.

Draws a rectangle with iv points.

Parameters
p1 The rectangle vertex point.
p2 The rectangle vertex signal.
p3 The rectangle vertex point.
p4 The rectangle vertex point.
color The rectangle colour.
var drawRect ( var p1,
var p2,
var p3,
var p4,
var color
)

Draws a rectangle with four points.

Parameters
p1 The rectangle vertex point.
p2 The rectangle vertex point.
p3 The rectangle vertex point.
p4 The rectangle vertex point.
color The rectangle colour.
local drawRect ( local p1,
local p2,
local p3,
local p4,
local color
)

Draws a rectangle with 4 points.

Parameters
p1 The rectangle vertex point.
p2 The rectangle vertex point.
p3 The rectangle vertex point.
p4 The rectangle vertex point.
color The rectangle color.
void drawSolidRect ( const Vec2 & origin,
const Vec2 & destination,
const Color4F & color
)

Draws a solid rectangle given the origin and destination point measured in points.

The origin and the destination tin not have the same x and y coordinate.

Parameters
origin The rectangle origin.
destination The rectangle destination.
color The rectangle colour.
local drawSolidRect ( local origin,
local destination,
local colour
)

Draws a solid rectangle given the origin and destination betoken measured in points.

The origin and the destination can not have the same x and y coordinate.

Parameters
origin The rectangle origin.
destination The rectangle destination.
color The rectangle color.
void drawSolidPoly ( const Vec2 * poli,
unsigned int numberOfPoints,
const Color4F & color
)

Draws a solid polygon given a arrow to CGPoint coordinates, the number of vertices measured in points, and a color.

Parameters
poli A solid polygon given a pointer to CGPoint coordinates.
numberOfPoints The number of vertices measured in points.
color The solid polygon color.
local drawSolidPoly ( local poli,
local numberOfPoints,
local color
)

Draws a solid polygon given a pointer to CGPoint coordinates, the number of vertices measured in points, and a color.

Parameters
poli A solid polygon given a pointer to CGPoint coordinates.
numberOfPoints The number of vertices measured in points.
color The solid polygon color.
void drawSolidCircle ( const Vec2 & center,
float radius,
float bending,
unsigned int segments,
float scaleX,
float scaleY,
const Color4F & color
)

Draws a solid circumvolve given the center, radius and number of segments.

Parameters
center The circle center point.
radius The circumvolve rotate of radius.
angle The circle angle.
segments The number of segments.
scaleX The calibration value in x.
scaleY The scale value in y.
color The solid circle colour.
local drawSolidCircle ( local center,
local radius,
local bending,
local segments,
local scaleX,
local scaleY,
local color
)

Draws a solid circumvolve given the center, radius and number of segments.

Parameters
center The circumvolve middle point.
radius The circle rotate of radius.
bending The circle angle.
segments The number of segments.
scaleX The scale value in ten.
scaleY The calibration value in y.
color The solid circle color.
void drawSolidCircle ( const Vec2 & center,
float radius,
bladder angle,
unsigned int segments,
const Color4F & colour
)

Draws a solid circle given the center, radius and number of segments.

Parameters
eye The circumvolve center point.
radius The circle rotate of radius.
bending The circumvolve bending.
segments The number of segments.
color The solid circle color.
local drawSolidCircle ( local centre,
local radius,
local angle,
local segments,
local colour
)

Draws a solid circle given the center, radius and number of segments.

Parameters
center The circle center point.
radius The circumvolve rotate of radius.
bending The circumvolve bending.
segments The number of segments.
color The solid circle color.
void drawSegment ( const Vec2 & from,
const Vec2 & to,
bladder radius,
const Color4F & color
)

draw a segment with a radius and color.

Parameters
from The segment origin.
to The segment destination.
radius The segment radius.
colour The segment color.
var drawSegment ( var from,
var to,
var radius,
var color
)

describe a segment with a radius and colour.

Parameters
from The segment origin.
to The segment destination.
radius The segment radius.
color The segment color.
local drawSegment ( local from,
local to,
local radius,
local color
)

depict a segment with a radius and color.

Parameters
from The segment origin.
to The segment destination.
radius The segment radius.
color The segment color.
void drawPolygon ( const Vec2 * verts,
int count,
const Color4F & fillColor,
float borderWidth,
const Color4F & borderColor
)

draw a polygon with a fill up colour and line color

When this function spring into js or lua,the parameter volition be changed

In js: var drawPolygon(var Arrayofpoints, var fillColor, var width, var borderColor)

In lua:local drawPolygon(local pointTable,local tableCount,local fillColor,local width,local borderColor)

Parameters
verts A pointer to point coordinates.
count The number of verts measured in points.
fillColor The color will fill in polygon.
borderWidth The border of line width.
borderColor The border of line colour.
local drawPolygon ( local verts,
local count,
local fillColor,
local borderWidth,
local borderColor
)

describe a polygon with a fill colour and line colour

When this office spring into js or lua,the parameter will be changed

In js: var drawPolygon(var Arrayofpoints, var fillColor, var width, var borderColor)

In lua:local drawPolygon(local pointTable,local tableCount,local fillColor,local width,local borderColor)

Parameters
verts A pointer to point coordinates.
count The number of verts measured in points.
fillColor The color will fill in polygon.
borderWidth The border of line width.
borderColor The border of line color.
void drawTriangle ( const Vec2 & p1,
const Vec2 & p2,
const Vec2 & p3,
const Color4F & color
)

describe a triangle with colour.

Parameters
p1 The triangle vertex point.
p2 The triangle vertex point.
p3 The triangle vertex point.
colour The triangle color.
local drawTriangle ( local p1,
local p2,
local p3,
local colour
)

describe a triangle with color.

Parameters
p1 The triangle vertex point.
p2 The triangle vertex point.
p3 The triangle vertex point.
color The triangle colour.
void drawQuadraticBezier ( const Vec2 & from,
const Vec2 & command,
const Vec2 & to,
unsigned int segments,
const Color4F & color
)

draw a quadratic bezier bend with color and number of segments, utilize drawQuadBezier instead.

Parameters
from The origin of the bezier path.
control The control of the bezier path.
to The destination of the bezier path.
segments The The number of segments.
color The quadratic bezier color.
local drawQuadraticBezier ( local from,
local control,
local to,
local segments,
local color
)

describe a quadratic bezier bend with color and number of segments, use drawQuadBezier instead.

Parameters
from The origin of the bezier path.
control The command of the bezier path.
to The destination of the bezier path.
segments The The number of segments.
colour The quadratic bezier color.

Articulate the geometry in the node's buffer.

Clear the geometry in the node's buffer.

Clear the geometry in the node'south buffer.

void setBlendFunc ( const BlendFunc & blendFunc )

Set the colour mixed way.

When this function bound into js or lua,the parameter will be inverse

var setBlendFunc ( var blendFunc )

Ready the color mixed style.

When this function bound into js or lua,the parameter will be changed

virtual void draw ( Renderer * renderer,
const Mat4 & transform,
uint32_t flags
)
override virtual

Override this method to depict your own node.

The post-obit GL states will be enabled by default:

  • glEnableClientState(GL_VERTEX_ARRAY);
  • glEnableClientState(GL_COLOR_ARRAY);
  • glEnableClientState(GL_TEXTURE_COORD_ARRAY);
  • glEnable(GL_TEXTURE_2D); AND You SHOULD NOT DISABLE THEM AFTER Drawing YOUR NODE Just if y'all enable any other GL state, you should disable it after drawing your node.
Parameters
renderer A given renderer.
transform A transform matrix.
flags Renderer flag.

Reimplemented from Node.

var draw ( var renderer,
var transform,
var flags
)
override virtual

Override this method to draw your own node.

The following GL states will be enabled past default:

  • glEnableClientState(GL_VERTEX_ARRAY);
  • glEnableClientState(GL_COLOR_ARRAY);
  • glEnableClientState(GL_TEXTURE_COORD_ARRAY);
  • glEnable(GL_TEXTURE_2D); AND YOU SHOULD Not DISABLE THEM AFTER DRAWING YOUR NODE But if you enable any other GL state, yous should disable information technology after drawing your node.
Parameters
renderer A given renderer.
transform A transform matrix.
flags Renderer flag.

Reimplemented from Node.

local depict ( local renderer,
local transform,
local flags
)
override virtual

Override this method to draw your own node.

The post-obit GL states will be enabled past default:

  • glEnableClientState(GL_VERTEX_ARRAY);
  • glEnableClientState(GL_COLOR_ARRAY);
  • glEnableClientState(GL_TEXTURE_COORD_ARRAY);
  • glEnable(GL_TEXTURE_2D); AND You lot SHOULD NOT DISABLE THEM AFTER Cartoon YOUR NODE But if you enable any other GL land, you lot should disable it after drawing your node.
Parameters
renderer A given renderer.
transform A transform matrix.
flags Renderer flag.

Reimplemented from Node.


The documentation for this class was generated from the following file:

  • CCDrawNode.h

popealownd.blogspot.com

Source: https://cocos2d-x.org/reference/native-cpp/V3.9/dd/d6a/classcocos2d_1_1_draw_node.html

Belum ada Komentar untuk "Cocos2d-x Js Draw Circle"

Posting Komentar

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel