C# 클래스 FlatRedBall.Math.Geometry.Segment

파일 보기 프로젝트 열기: vchelaru/FlatRedBall 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
Point1 Point
Point2 Point
ZeroLength Segment

공개 메소드들

메소드 설명
AsRay ( ) : Microsoft.Xna.Framework.Ray
ClosestPointTo ( Point point ) : Point
CollideAgainst ( Polygon polygon ) : bool
DistanceTo ( AxisAlignedRectangle rectangle ) : float
DistanceTo ( Microsoft.Xna.Framework.Circle circle ) : float
DistanceTo ( Point point ) : float
DistanceTo ( Point point, Segment &connectingSegment ) : float
DistanceTo ( Point point, Microsoft.Xna.Framework.Vector3 &connectingVector ) : float

Returns the distance to the argument point as well as the connectin Vector3 from the Point to this.

DistanceTo ( Polygon polygon ) : float
DistanceTo ( Segment otherSegment ) : float
DistanceTo ( Microsoft.Xna.Framework.Vector3 vector ) : float
DistanceTo ( double x, double y ) : float
DistanceToSquared ( Microsoft.Xna.Framework.Vector3 &vector, Segment &connectingSegment ) : float
GetLength ( ) : double

Returns the length of the segment.

GetLengthSquared ( ) : double
IntersectionPoint ( Segment &s2, Point &intersectionPoint ) : void

Returns the point where this segment intersects the argument segment.

Intersects ( Segment s2 ) : bool

Determines whether this segment intersects the argument segment.

Intersects ( Segment s2, Point &intersectionPoint ) : bool
IsClosestPointOnEndpoint ( Point &point ) : bool

Determines whether the closest point on the segment lies on one of the endpoints.

IsParallelAndTouching ( Segment s2, Point &intersectionPoint ) : bool
MoveBy ( float x, float y ) : void

Shifts the segment by moving both points by the argument x,y values.

Normalize ( ) : void

Sets the length of the segment to 1 unit by moving the 2nd point.

If the segment has 0 length (the endpoints are equal), the method does not change the segment; length will remain 0.

ScaleBy ( float amountToScaleBy ) : void
Segment ( Microsoft.Xna.Framework.Graphics.VertexPositionColor &point1, Microsoft.Xna.Framework.Graphics.VertexPositionColor &point2 ) : System
Segment ( Point point1, Point point2 ) : System

Creates a new Segment with the argument points as the endpoints.

Segment ( Microsoft.Xna.Framework.Vector3 point1, Microsoft.Xna.Framework.Vector3 point2 ) : System
Segment ( double point1X, double point1Y, double point2X, double point2Y ) : System
SetPoints ( Microsoft.Xna.Framework.Graphics.VertexPositionColor &point1, Microsoft.Xna.Framework.Graphics.VertexPositionColor &point2 ) : void
SetPoints ( float x1, float y1, float x2, float y2 ) : void
ToString ( ) : string
ToVector3 ( ) : Microsoft.Xna.Framework.Vector3

메소드 상세

AsRay() 공개 메소드

public AsRay ( ) : Microsoft.Xna.Framework.Ray
리턴 Microsoft.Xna.Framework.Ray

ClosestPointTo() 공개 메소드

public ClosestPointTo ( Point point ) : Point
point Point
리턴 Point

CollideAgainst() 공개 메소드

public CollideAgainst ( Polygon polygon ) : bool
polygon Polygon
리턴 bool

DistanceTo() 공개 메소드

public DistanceTo ( AxisAlignedRectangle rectangle ) : float
rectangle AxisAlignedRectangle
리턴 float

DistanceTo() 공개 메소드

public DistanceTo ( Microsoft.Xna.Framework.Circle circle ) : float
circle Microsoft.Xna.Framework.Circle
리턴 float

DistanceTo() 공개 메소드

public DistanceTo ( Point point ) : float
point Point
리턴 float

DistanceTo() 공개 메소드

public DistanceTo ( Point point, Segment &connectingSegment ) : float
point Point
connectingSegment Segment
리턴 float

DistanceTo() 공개 메소드

Returns the distance to the argument point as well as the connectin Vector3 from the Point to this.
public DistanceTo ( Point point, Microsoft.Xna.Framework.Vector3 &connectingVector ) : float
point Point The point to get the distance to.
connectingVector Microsoft.Xna.Framework.Vector3 The connecting vector from the argument Pointn to this.
리턴 float

DistanceTo() 공개 메소드

public DistanceTo ( Polygon polygon ) : float
polygon Polygon
리턴 float

DistanceTo() 공개 메소드

public DistanceTo ( Segment otherSegment ) : float
otherSegment Segment
리턴 float

DistanceTo() 공개 메소드

public DistanceTo ( Microsoft.Xna.Framework.Vector3 vector ) : float
vector Microsoft.Xna.Framework.Vector3
리턴 float

DistanceTo() 공개 메소드

public DistanceTo ( double x, double y ) : float
x double
y double
리턴 float

DistanceToSquared() 공개 메소드

public DistanceToSquared ( Microsoft.Xna.Framework.Vector3 &vector, Segment &connectingSegment ) : float
vector Microsoft.Xna.Framework.Vector3
connectingSegment Segment
리턴 float

GetLength() 공개 메소드

Returns the length of the segment.
public GetLength ( ) : double
리턴 double

GetLengthSquared() 공개 메소드

public GetLengthSquared ( ) : double
리턴 double

IntersectionPoint() 공개 메소드

Returns the point where this segment intersects the argument segment.
public IntersectionPoint ( Segment &s2, Point &intersectionPoint ) : void
s2 Segment The segment to test for intersection.
intersectionPoint Point
리턴 void

Intersects() 공개 메소드

Determines whether this segment intersects the argument segment.
public Intersects ( Segment s2 ) : bool
s2 Segment The segment to test for intersection.
리턴 bool

Intersects() 공개 메소드

public Intersects ( Segment s2, Point &intersectionPoint ) : bool
s2 Segment
intersectionPoint Point
리턴 bool

IsClosestPointOnEndpoint() 공개 메소드

Determines whether the closest point on the segment lies on one of the endpoints.
public IsClosestPointOnEndpoint ( Point &point ) : bool
point Point The point to test to.
리턴 bool

IsParallelAndTouching() 공개 메소드

public IsParallelAndTouching ( Segment s2, Point &intersectionPoint ) : bool
s2 Segment
intersectionPoint Point
리턴 bool

MoveBy() 공개 메소드

Shifts the segment by moving both points by the argument x,y values.
public MoveBy ( float x, float y ) : void
x float The number of units to shift the segment by on the x axis.
y float The number of units to shift the segment by on the y axis.
리턴 void

Normalize() 공개 메소드

Sets the length of the segment to 1 unit by moving the 2nd point.
If the segment has 0 length (the endpoints are equal), the method does not change the segment; length will remain 0.
public Normalize ( ) : void
리턴 void

ScaleBy() 공개 메소드

public ScaleBy ( float amountToScaleBy ) : void
amountToScaleBy float
리턴 void

Segment() 공개 메소드

public Segment ( Microsoft.Xna.Framework.Graphics.VertexPositionColor &point1, Microsoft.Xna.Framework.Graphics.VertexPositionColor &point2 ) : System
point1 Microsoft.Xna.Framework.Graphics.VertexPositionColor
point2 Microsoft.Xna.Framework.Graphics.VertexPositionColor
리턴 System

Segment() 공개 메소드

Creates a new Segment with the argument points as the endpoints.
public Segment ( Point point1, Point point2 ) : System
point1 Point The first Point.
point2 Point The second Point.
리턴 System

Segment() 공개 메소드

public Segment ( Microsoft.Xna.Framework.Vector3 point1, Microsoft.Xna.Framework.Vector3 point2 ) : System
point1 Microsoft.Xna.Framework.Vector3
point2 Microsoft.Xna.Framework.Vector3
리턴 System

Segment() 공개 메소드

public Segment ( double point1X, double point1Y, double point2X, double point2Y ) : System
point1X double
point1Y double
point2X double
point2Y double
리턴 System

SetPoints() 공개 메소드

public SetPoints ( Microsoft.Xna.Framework.Graphics.VertexPositionColor &point1, Microsoft.Xna.Framework.Graphics.VertexPositionColor &point2 ) : void
point1 Microsoft.Xna.Framework.Graphics.VertexPositionColor
point2 Microsoft.Xna.Framework.Graphics.VertexPositionColor
리턴 void

SetPoints() 공개 메소드

public SetPoints ( float x1, float y1, float x2, float y2 ) : void
x1 float
y1 float
x2 float
y2 float
리턴 void

ToString() 공개 메소드

public ToString ( ) : string
리턴 string

ToVector3() 공개 메소드

public ToVector3 ( ) : Microsoft.Xna.Framework.Vector3
리턴 Microsoft.Xna.Framework.Vector3

프로퍼티 상세

Point1 공개적으로 프로퍼티

The first point of the segment.
public Point Point1
리턴 Point

Point2 공개적으로 프로퍼티

The second point of the segment.
public Point Point2
리턴 Point

ZeroLength 공개적으로 정적으로 프로퍼티

public static Segment,FlatRedBall.Math.Geometry ZeroLength
리턴 Segment