Skip to main content

CCPoint

CCPoint

Cocos2D

Type: Struct

Constructors

CCPoint(CCPoint)

CCPoint(Point)

CCPoint(Vector2)

CCPoint(float, float)

Fields

AnchorLowerLeft(Cocos2D.CCPoint)
AnchorLowerRight(Cocos2D.CCPoint)
AnchorMiddle(Cocos2D.CCPoint)
AnchorMiddleBottom(Cocos2D.CCPoint)
AnchorMiddleLeft(Cocos2D.CCPoint)
AnchorMiddleRight(Cocos2D.CCPoint)
AnchorMiddleTop(Cocos2D.CCPoint)
AnchorUpperLeft(Cocos2D.CCPoint)
AnchorUpperRight(Cocos2D.CCPoint)
X(System.Single)
Y(System.Single)
Zero(Cocos2D.CCPoint)

Propertys

Angle(System.Single)
InvertY(Cocos2D.CCPoint)

Inverts the direction or location of the Y component.

Length(System.Single)

Computes the length of this point as if it were a vector with XY components relative to the origin. This is computed each time this property is accessed, so cache the value that is returned.

LengthSquared(System.Single)
Reverse(Cocos2D.CCPoint)

Methods

AngleSigned(CCPoint, CCPoint)

System.Single AngleSigned(CCPoint, CCPoint)(Cocos2D.CCPoint a, Cocos2D.CCPoint b)
Parameters:
a (Cocos2D.CCPoint)
b (Cocos2D.CCPoint)
Returns:
System.Single
Example

Clamp(CCPoint, CCPoint, CCPoint)

Cocos2D.CCPoint Clamp(CCPoint, CCPoint, CCPoint)(Cocos2D.CCPoint p, Cocos2D.CCPoint from, Cocos2D.CCPoint to)
Parameters:
p (Cocos2D.CCPoint)
from (Cocos2D.CCPoint)
to (Cocos2D.CCPoint)
Returns:
Cocos2D.CCPoint
Example

Clamp(float, float, float)

System.Single Clamp(float, float, float)(System.Single value, System.Single min_inclusive, System.Single max_inclusive)
Parameters:
value (System.Single)
min_inclusive (System.Single)
max_inclusive (System.Single)
Returns:
System.Single
Example

ComputationOperation(CCPoint, ComputationOperationDelegate)

Cocos2D.CCPoint ComputationOperation(CCPoint, ComputationOperationDelegate)(Cocos2D.CCPoint p, Cocos2D.CCPoint.ComputationOperationDelegate del)
Parameters:
p (Cocos2D.CCPoint)
del (Cocos2D.CCPoint.ComputationOperationDelegate)
Returns:
Cocos2D.CCPoint

CrossProduct(CCPoint, CCPoint)

System.Single CrossProduct(CCPoint, CCPoint)(Cocos2D.CCPoint v1, Cocos2D.CCPoint v2)
Parameters:
v1 (Cocos2D.CCPoint)
v2 (Cocos2D.CCPoint)
Returns:
System.Single
Example

Distance(CCPoint, CCPoint)

System.Single Distance(CCPoint, CCPoint)(Cocos2D.CCPoint v1, Cocos2D.CCPoint v2)
Parameters:
v1 (Cocos2D.CCPoint)
v2 (Cocos2D.CCPoint)
Returns:
System.Single

DistanceSquared(ref CCPoint)

System.Single DistanceSquared(ref CCPoint)(Cocos2D.CCPoint v2)
Parameters:
v2 (Cocos2D.CCPoint)
Returns:
System.Single

Dot(CCPoint, CCPoint)

System.Single Dot(CCPoint, CCPoint)(Cocos2D.CCPoint p1, Cocos2D.CCPoint p2)
Parameters:
p1 (Cocos2D.CCPoint)
p2 (Cocos2D.CCPoint)
Returns:
System.Single

DotProduct(CCPoint, CCPoint)

System.Single DotProduct(CCPoint, CCPoint)(Cocos2D.CCPoint v1, Cocos2D.CCPoint v2)
Parameters:
v1 (Cocos2D.CCPoint)
v2 (Cocos2D.CCPoint)
Returns:
System.Single

Equal(ref CCPoint, ref CCPoint)

System.Boolean Equal(ref CCPoint, ref CCPoint)(Cocos2D.CCPoint point1, Cocos2D.CCPoint point2)
Parameters:
point1 (Cocos2D.CCPoint)
point2 (Cocos2D.CCPoint)
Returns:
System.Boolean

Equals(CCPoint)

System.Boolean Equals(CCPoint)(Cocos2D.CCPoint p)
Parameters:
p (Cocos2D.CCPoint)
Returns:
System.Boolean

Equals(object)

System.Boolean Equals(object)(System.Object obj)
Parameters:
obj (System.Object)
Returns:
System.Boolean
Example

ForAngle(float)

Cocos2D.CCPoint ForAngle(float)(System.Single a)
Parameters:
a (System.Single)
Returns:
Cocos2D.CCPoint
Example

FuzzyEqual(CCPoint, CCPoint, float)

System.Boolean FuzzyEqual(CCPoint, CCPoint, float)(Cocos2D.CCPoint a, Cocos2D.CCPoint b, System.Single variance)
Parameters:
a (Cocos2D.CCPoint)
b (Cocos2D.CCPoint)
variance (System.Single)
Returns:
System.Boolean
Example

GetHashCode()

System.Int32 GetHashCode()()
Returns:
System.Int32
Example

IntersectPoint(CCPoint, CCPoint, CCPoint, CCPoint)

Cocos2D.CCPoint IntersectPoint(CCPoint, CCPoint, CCPoint, CCPoint)(Cocos2D.CCPoint A, Cocos2D.CCPoint B, Cocos2D.CCPoint C, Cocos2D.CCPoint D)
Parameters:
A (Cocos2D.CCPoint)
B (Cocos2D.CCPoint)
C (Cocos2D.CCPoint)
D (Cocos2D.CCPoint)
Returns:
Cocos2D.CCPoint

IsNear(CCPoint, CCPoint, float)

System.Boolean IsNear(CCPoint, CCPoint, float)(Cocos2D.CCPoint p1, Cocos2D.CCPoint p2, System.Single dist)
Parameters:
p1 (Cocos2D.CCPoint)
p2 (Cocos2D.CCPoint)
dist (System.Single)
Returns:
System.Boolean

IsNear(CCPoint, float)

System.Boolean IsNear(CCPoint, float)(Cocos2D.CCPoint p2, System.Single dist)
Parameters:
p2 (Cocos2D.CCPoint)
dist (System.Single)
Returns:
System.Boolean
Example

Lerp(CCPoint, CCPoint, float)

Cocos2D.CCPoint Lerp(CCPoint, CCPoint, float)(Cocos2D.CCPoint a, Cocos2D.CCPoint b, System.Single alpha)
Parameters:
a (Cocos2D.CCPoint)
b (Cocos2D.CCPoint)
alpha (System.Single)
Returns:
Cocos2D.CCPoint
Example

LineIntersect(CCPoint, CCPoint, CCPoint, CCPoint, ref float, ref float)

System.Boolean LineIntersect(CCPoint, CCPoint, CCPoint, CCPoint, ref float, ref float)(Cocos2D.CCPoint A, Cocos2D.CCPoint B, Cocos2D.CCPoint C, Cocos2D.CCPoint D, System.Single S, System.Single T)
Parameters:
A (Cocos2D.CCPoint)
B (Cocos2D.CCPoint)
C (Cocos2D.CCPoint)
D (Cocos2D.CCPoint)
S (System.Single)
T (System.Single)
Returns:
System.Boolean

Midpoint(CCPoint, CCPoint)

Cocos2D.CCPoint Midpoint(CCPoint, CCPoint)(Cocos2D.CCPoint p1, Cocos2D.CCPoint p2)
Parameters:
p1 (Cocos2D.CCPoint)
p2 (Cocos2D.CCPoint)
Returns:
Cocos2D.CCPoint

MultiplyComponents(CCPoint, CCPoint)

Cocos2D.CCPoint MultiplyComponents(CCPoint, CCPoint)(Cocos2D.CCPoint a, Cocos2D.CCPoint b)
Parameters:
a (Cocos2D.CCPoint)
b (Cocos2D.CCPoint)
Returns:
Cocos2D.CCPoint
Example

Normalize()

System.Single Normalize()()

Normalizes the components of this point (convert to mag 1), and returns the orignial magnitude of the vector defined by the XY components of this point.

Returns:
System.Single
Example

Normalize(CCPoint)

Cocos2D.CCPoint Normalize(CCPoint)(Cocos2D.CCPoint p)
Parameters:
p (Cocos2D.CCPoint)
Returns:
Cocos2D.CCPoint

Offset(float, float)

Cocos2D.CCPoint Offset(float, float)(System.Single dx, System.Single dy)
Parameters:
dx (System.Single)
dy (System.Single)
Returns:
Cocos2D.CCPoint

Parse(string)

Cocos2D.CCPoint Parse(string)(System.String s)
Parameters:
s (System.String)
Returns:
Cocos2D.CCPoint

Perp(CCPoint)

Cocos2D.CCPoint Perp(CCPoint)(Cocos2D.CCPoint p)
Parameters:
p (Cocos2D.CCPoint)
Returns:
Cocos2D.CCPoint

PerpendicularClockwise(CCPoint)

Cocos2D.CCPoint PerpendicularClockwise(CCPoint)(Cocos2D.CCPoint v)
Parameters:
v (Cocos2D.CCPoint)
Returns:
Cocos2D.CCPoint

PerpendicularCounterClockwise(CCPoint)

Cocos2D.CCPoint PerpendicularCounterClockwise(CCPoint)(Cocos2D.CCPoint v)
Parameters:
v (Cocos2D.CCPoint)
Returns:
Cocos2D.CCPoint
Example

Project(CCPoint, CCPoint)

Cocos2D.CCPoint Project(CCPoint, CCPoint)(Cocos2D.CCPoint v1, Cocos2D.CCPoint v2)
Parameters:
v1 (Cocos2D.CCPoint)
v2 (Cocos2D.CCPoint)
Returns:
Cocos2D.CCPoint
Example

Rotate(CCPoint, CCPoint)

Cocos2D.CCPoint Rotate(CCPoint, CCPoint)(Cocos2D.CCPoint v1, Cocos2D.CCPoint v2)
Parameters:
v1 (Cocos2D.CCPoint)
v2 (Cocos2D.CCPoint)
Returns:
Cocos2D.CCPoint
Example

RotateByAngle(CCPoint, CCPoint, float)

Cocos2D.CCPoint RotateByAngle(CCPoint, CCPoint, float)(Cocos2D.CCPoint v, Cocos2D.CCPoint pivot, System.Single angle)
Parameters:
v (Cocos2D.CCPoint)
pivot (Cocos2D.CCPoint)
angle (System.Single)
Returns:
Cocos2D.CCPoint
Example

SegmentIntersect(CCPoint, CCPoint, CCPoint, CCPoint)

System.Boolean SegmentIntersect(CCPoint, CCPoint, CCPoint, CCPoint)(Cocos2D.CCPoint A, Cocos2D.CCPoint B, Cocos2D.CCPoint C, Cocos2D.CCPoint D)
Parameters:
A (Cocos2D.CCPoint)
B (Cocos2D.CCPoint)
C (Cocos2D.CCPoint)
D (Cocos2D.CCPoint)
Returns:
System.Boolean

Sub(ref CCPoint)

Cocos2D.CCPoint Sub(ref CCPoint)(Cocos2D.CCPoint v2)
Parameters:
v2 (Cocos2D.CCPoint)
Returns:
Cocos2D.CCPoint

ToAngle(CCPoint)

System.Single ToAngle(CCPoint)(Cocos2D.CCPoint v)
Parameters:
v (Cocos2D.CCPoint)
Returns:
System.Single
Example

ToString()

System.String ToString()()
Returns:
System.String
Example

Unrotate(CCPoint, CCPoint)

Cocos2D.CCPoint Unrotate(CCPoint, CCPoint)(Cocos2D.CCPoint v1, Cocos2D.CCPoint v2)
Parameters:
v1 (Cocos2D.CCPoint)
v2 (Cocos2D.CCPoint)
Returns:
Cocos2D.CCPoint
Example

Operators

operator +(CCPoint, CCPoint)

operator +(CCPoint, CCSize)

operator /(CCPoint, float)

operator ==(CCPoint, CCPoint)

explicit operator CCPoint(CCSize)

implicit operator Vector2(CCPoint)

implicit operator Vector3(CCPoint)

implicit operator CCPoint(Vector2)

operator !=(CCPoint, CCPoint)

operator *(CCPoint, CCPoint)

operator *(CCPoint, float)

operator -(CCPoint, CCPoint)

operator -(CCPoint, CCSize)

operator -(CCPoint)

operator +(CCPoint)