C# 클래스 Indiefreaks.Xna.Extensions.RandomExtensions

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

공개 메소드들

메소드 설명
GetRandomFloat ( Random dice ) : float
GetRandomFloat ( Random dice, float min, float max ) : float
GetRandomPointInCube ( Random dice, int maxDistanceFromCenter ) : Vector3

Generates a random Vector3 positionned inside a cube.

GetRandomPointInSphere ( Random dice, int maxDistanceFromOrigin ) : Vector3

Generates a random Vector3 positionned inside a sphere.

GetRandomPointOnSphere ( Random dice, float radius ) : Vector3

Generates a random Vector3 on the surface of a sphere.

비공개 메소드들

메소드 설명
GetRandomPolarCoordinates ( Random dice ) : Vector3

Generates a random Vector3 point in a Polar Coordinate System.

메소드 상세

GetRandomFloat() 공개 정적인 메소드

public static GetRandomFloat ( Random dice ) : float
dice System.Random
리턴 float

GetRandomFloat() 공개 정적인 메소드

public static GetRandomFloat ( Random dice, float min, float max ) : float
dice System.Random
min float
max float
리턴 float

GetRandomPointInCube() 정적인 공개 메소드

Generates a random Vector3 positionned inside a cube.
static public GetRandomPointInCube ( Random dice, int maxDistanceFromCenter ) : Vector3
dice System.Random The Random instance to be used when generating data.
maxDistanceFromCenter int The maximum distance from center the point can be generated
리턴 Vector3

GetRandomPointInSphere() 정적인 공개 메소드

Generates a random Vector3 positionned inside a sphere.
static public GetRandomPointInSphere ( Random dice, int maxDistanceFromOrigin ) : Vector3
dice System.Random The Random instance to be used when generating data.
maxDistanceFromOrigin int The maximum distance from origin the point can be generated. Usually, the radius of a sphere.
리턴 Vector3

GetRandomPointOnSphere() 정적인 공개 메소드

Generates a random Vector3 on the surface of a sphere.
static public GetRandomPointOnSphere ( Random dice, float radius ) : Vector3
dice System.Random The Random instance to be used when generating data.
radius float The radius of the Sphere.
리턴 Vector3