C# Class CocosPhysics.Chipmunk.cpVect

Mostrar archivo Open project: Cocos2DXNA/CocosPhysics Class Usage Examples

Public Properties

Property Type Description
x double
y double

Public Methods

Method Description
Add ( cpVect v1, cpVect v2 ) : cpVect
AngleSigned ( cpVect a, cpVect b ) : double
Clamp ( cpVect p, cpVect from, cpVect to ) : cpVect
Clamp ( double value, double min_inclusive, double max_inclusive ) : double
CrossProduct ( cpVect v1, cpVect v2 ) : double
Distance ( cpVect v1, cpVect v2 ) : double
DistanceSQ ( cpVect v2 ) : double
DistanceSQ ( cpVect v1, cpVect v2 ) : double
Dot ( cpVect p1, cpVect p2 ) : double
DotProduct ( cpVect v1, cpVect v2 ) : double
Equal ( cpVect point1, cpVect point2 ) : bool
Equals ( cpVect p ) : bool
Equals ( object obj ) : bool
ForAngle ( double a ) : cpVect
FuzzyEqual ( cpVect a, cpVect b, double variance ) : bool
GetHashCode ( ) : int
IntersectPoint ( cpVect A, cpVect B, cpVect C, cpVect D ) : cpVect
Lerp ( cpVect a, cpVect b, double alpha ) : cpVect
LineIntersect ( cpVect A, cpVect B, cpVect C, cpVect D, double S, double T ) : bool
Midpoint ( cpVect p1, cpVect p2 ) : cpVect
Multiply ( cpVect v1, double v ) : cpVect
MultiplyComponents ( cpVect a, cpVect b ) : cpVect
Normalize ( cpVect p ) : cpVect
Normalize ( ) : double

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.

Offset ( double dx, double dy ) : cpVect
Perp ( cpVect p ) : cpVect
PerpendicularClockwise ( cpVect v ) : cpVect
PerpendicularCounterClockwise ( cpVect v ) : cpVect
Project ( cpVect v1, cpVect v2 ) : cpVect
Rotate ( cpVect v1, cpVect v2 ) : cpVect
RotateByAngle ( cpVect v, cpVect pivot, double angle ) : cpVect
SegmentIntersect ( cpVect A, cpVect B, cpVect C, cpVect D ) : bool
Sub ( cpVect v2 ) : cpVect
Sub ( cpVect v1, cpVect v2 ) : cpVect
ToAngle ( cpVect v ) : double
ToString ( ) : string
Unrotate ( cpVect v1, cpVect v2 ) : cpVect
cpVect ( cpVect pt ) : System
cpVect ( double _x, double _y ) : System
operator ( ) : bool
operator ( ) : cpVect

Private Methods

Method Description
FromSize ( CCSize s ) : cpVect

Method Details

Add() public static method

public static Add ( cpVect v1, cpVect v2 ) : cpVect
v1 cpVect
v2 cpVect
return cpVect

AngleSigned() public static method

public static AngleSigned ( cpVect a, cpVect b ) : double
a cpVect
b cpVect
return double

Clamp() public static method

public static Clamp ( cpVect p, cpVect from, cpVect to ) : cpVect
p cpVect
from cpVect
to cpVect
return cpVect

Clamp() public static method

public static Clamp ( double value, double min_inclusive, double max_inclusive ) : double
value double
min_inclusive double
max_inclusive double
return double

CrossProduct() public static method

public static CrossProduct ( cpVect v1, cpVect v2 ) : double
v1 cpVect
v2 cpVect
return double

Distance() public static method

public static Distance ( cpVect v1, cpVect v2 ) : double
v1 cpVect
v2 cpVect
return double

DistanceSQ() public method

public DistanceSQ ( cpVect v2 ) : double
v2 cpVect
return double

DistanceSQ() public static method

public static DistanceSQ ( cpVect v1, cpVect v2 ) : double
v1 cpVect
v2 cpVect
return double

Dot() public static method

public static Dot ( cpVect p1, cpVect p2 ) : double
p1 cpVect
p2 cpVect
return double

DotProduct() public static method

public static DotProduct ( cpVect v1, cpVect v2 ) : double
v1 cpVect
v2 cpVect
return double

Equal() public static method

public static Equal ( cpVect point1, cpVect point2 ) : bool
point1 cpVect
point2 cpVect
return bool

Equals() public method

public Equals ( cpVect p ) : bool
p cpVect
return bool

Equals() public method

public Equals ( object obj ) : bool
obj object
return bool

ForAngle() public static method

public static ForAngle ( double a ) : cpVect
a double
return cpVect

FuzzyEqual() public static method

public static FuzzyEqual ( cpVect a, cpVect b, double variance ) : bool
a cpVect
b cpVect
variance double
return bool

GetHashCode() public method

public GetHashCode ( ) : int
return int

IntersectPoint() public static method

public static IntersectPoint ( cpVect A, cpVect B, cpVect C, cpVect D ) : cpVect
A cpVect
B cpVect
C cpVect
D cpVect
return cpVect

Lerp() public static method

public static Lerp ( cpVect a, cpVect b, double alpha ) : cpVect
a cpVect
b cpVect
alpha double
return cpVect

LineIntersect() public static method

public static LineIntersect ( cpVect A, cpVect B, cpVect C, cpVect D, double S, double T ) : bool
A cpVect
B cpVect
C cpVect
D cpVect
S double
T double
return bool

Midpoint() public static method

public static Midpoint ( cpVect p1, cpVect p2 ) : cpVect
p1 cpVect
p2 cpVect
return cpVect

Multiply() public static method

public static Multiply ( cpVect v1, double v ) : cpVect
v1 cpVect
v double
return cpVect

MultiplyComponents() public static method

public static MultiplyComponents ( cpVect a, cpVect b ) : cpVect
a cpVect
b cpVect
return cpVect

Normalize() public static method

public static Normalize ( cpVect p ) : cpVect
p cpVect
return cpVect

Normalize() public method

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.
public Normalize ( ) : double
return double

Offset() public method

public Offset ( double dx, double dy ) : cpVect
dx double
dy double
return cpVect

Perp() public static method

public static Perp ( cpVect p ) : cpVect
p cpVect
return cpVect

PerpendicularClockwise() public static method

public static PerpendicularClockwise ( cpVect v ) : cpVect
v cpVect
return cpVect

PerpendicularCounterClockwise() public static method

public static PerpendicularCounterClockwise ( cpVect v ) : cpVect
v cpVect
return cpVect

Project() public static method

public static Project ( cpVect v1, cpVect v2 ) : cpVect
v1 cpVect
v2 cpVect
return cpVect

Rotate() public static method

public static Rotate ( cpVect v1, cpVect v2 ) : cpVect
v1 cpVect
v2 cpVect
return cpVect

RotateByAngle() public static method

public static RotateByAngle ( cpVect v, cpVect pivot, double angle ) : cpVect
v cpVect
pivot cpVect
angle double
return cpVect

SegmentIntersect() public static method

public static SegmentIntersect ( cpVect A, cpVect B, cpVect C, cpVect D ) : bool
A cpVect
B cpVect
C cpVect
D cpVect
return bool

Sub() public method

public Sub ( cpVect v2 ) : cpVect
v2 cpVect
return cpVect

Sub() public static method

public static Sub ( cpVect v1, cpVect v2 ) : cpVect
v1 cpVect
v2 cpVect
return cpVect

ToAngle() public static method

public static ToAngle ( cpVect v ) : double
v cpVect
return double

ToString() public method

public ToString ( ) : string
return string

Unrotate() public static method

public static Unrotate ( cpVect v1, cpVect v2 ) : cpVect
v1 cpVect
v2 cpVect
return cpVect

cpVect() public method

public cpVect ( cpVect pt ) : System
pt cpVect
return System

cpVect() public method

public cpVect ( double _x, double _y ) : System
_x double
_y double
return System

operator() public static method

public static operator ( ) : bool
return bool

operator() public static method

public static operator ( ) : cpVect
return cpVect

Property Details

x public_oe property

public double x
return double

y public_oe property

public double y
return double