構造体 Rectangle

rectangle [詳細]

すべてのメンバ一覧

Public メソッド

 Rectangle (float x, float y, float width, float height)
 constructor taking 4 floats
 Rectangle (Vector2 position, Vector2 size)
 constructor taking a two Vector2s
 Rectangle (Vector4 v)
 constructor taking a Vector4
Rectangle Inverse ()
 rectangle inverse
void Inverse (out Rectangle result)
 rectangle inverse
Rectangle Lerp (Rectangle r, float f)
 lerp between 2 rectangles
void Lerp (ref Rectangle r, float f, out Rectangle result)
 lerp between 2 rectangles
Vector2 TransformPoint (Vector2 v)
 return this * v (X,Y,0,1)
void TransformPoint (ref Vector2 v, out Vector2 result)
 result = this * v (X,Y,0,1)
Vector2 TransformVector (Vector2 v)
 return this * v (X,Y,0,0)
void TransformVector (ref Vector2 v, out Vector2 result)
 result = this * v (X,Y,0,0)
Rectangle Add (Rectangle r)
 return this + r
void Add (ref Rectangle r, out Rectangle result)
 result = this + r
Rectangle Subtract (Rectangle r)
 return this - r
void Subtract (ref Rectangle r, out Rectangle result)
 result = this - r
Rectangle Multiply (Rectangle r)
 return this * r
void Multiply (ref Rectangle r, out Rectangle result)
 result = this * r
Rectangle Multiply (float f)
 return this * f
void Multiply (float f, out Rectangle result)
 result = this * f
Rectangle Divide (float f)
 return this / f
void Divide (float f, out Rectangle result)
 result = this / f
Rectangle Negate ()
 return -this
void Negate (out Rectangle result)
 result = -this
Vector4 ToVector4 ()
 return the rectangle as a Vector4
void ToVector4 (out Vector4 result)
 return the rectangle as a Vector4
Matrix4 ToMatrix4 ()
 convert this rectangle to a Matrix4
void ToMatrix4 (out Matrix4 result)
 convert this rectangle to a Matrix4
bool IsIdentity ()
 test if this is an identity rectangle
bool IsInfinity ()
 test if any elements of this are Infinity
bool IsNaN ()
 test if any elements of this are NaN
bool Equals (Rectangle r, float epsilon)
 equality test with an epsilon
bool Equals (Rectangle r)
 equality test
override bool Equals (Object o)
 equality test
override string ToString ()
 get the string representation of this rectangle
override int GetHashCode ()
 gets the hash code for this vector

Static Public メソッド

static Rectangle FromMatrix4 (Matrix4 m)
 return a rectangle representing a 2D translation/scale matrix
static void FromMatrix4 (ref Matrix4 m, out Rectangle result)
 return a rectangle representing a 2D translation/scale matrix
static Rectangle Inverse (Rectangle r)
 static function equivalent to Inverse()
static void Inverse (ref Rectangle r, out Rectangle result)
 static function equivalent to Inverse(out Rectangle)
static Rectangle Lerp (Rectangle r1, Rectangle r2, float f)
 static function equivalent to Lerp(Rectangle, float)
static void Lerp (ref Rectangle r1, ref Rectangle r2, float f, out Rectangle result)
 static function equivalent to Lerp(ref Rectangle, float, out Rectangle)
static Vector2 TransformPoint (Rectangle r, Vector2 v)
 static function equivalent to TransformPoint(Vector2)
static void TransformPoint (ref Rectangle r, ref Vector2 v, out Vector2 result)
 static function equivalent to TransformPoint(ref Vector2, out Vector2)
static Vector2 TransformVector (Rectangle r, Vector2 v)
 static function equivalent to TransformVector(Vector2)
static void TransformVector (ref Rectangle r, ref Vector2 v, out Vector2 result)
 static function equivalent to TransformVector(ref Vector2, out Vector2)
static Rectangle Add (Rectangle r1, Rectangle r2)
 static function equivalent to Add(Rectangle)
static void Add (ref Rectangle r1, ref Rectangle r2, out Rectangle result)
 static function equivalent to Add(ref Rectangle, out Rectangle)
static Rectangle Subtract (Rectangle r1, Rectangle r2)
 static function equivalent to Subtract(Rectangle)
static void Subtract (ref Rectangle r1, ref Rectangle r2, out Rectangle result)
 static function equivalent to Subtract(ref Rectangle, out Rectangle)
static Rectangle Multiply (Rectangle r1, Rectangle r2)
 static function equivalent to Multiply(Rectangle)
static void Multiply (ref Rectangle r1, ref Rectangle r2, out Rectangle result)
 static function equivalent to Multiply(ref Rectangle, out Rectangle)
static Rectangle Multiply (Rectangle r, float f)
 static function equivalent to Multiply(float)
static void Multiply (ref Rectangle r, float f, out Rectangle result)
 static function equivalent to Multiply(float, out Rectangle)
static Rectangle Divide (Rectangle r, float f)
 static function equivalent to Divide(float)
static void Divide (ref Rectangle r, float f, out Rectangle result)
 static function equivalent to Divide(float, out Rectangle)
static Rectangle Negate (Rectangle r)
 static function equivalent to Negate()
static void Negate (ref Rectangle r, out Rectangle result)
 static function equivalent to Negate(out Rectangle)
static bool operator== (Rectangle r1, Rectangle r2)
 equality operator
static bool operator!= (Rectangle r1, Rectangle r2)
 not equals operator
static Rectangle operator+ (Rectangle r1, Rectangle r2)
 addition operator
static Rectangle operator- (Rectangle r1, Rectangle r2)
 subtraction operator
static Rectangle operator- (Rectangle r)
 unary minus operator
static Rectangle operator* (Rectangle r1, Rectangle r2)
 multiplication operator
static Rectangle operator* (Rectangle r, float f)
 multiply a rectangle by a scalar float
static Rectangle operator* (float f, Rectangle r)
 multiply a rectangle by a scalar float
static Rectangle operator/ (Rectangle r, float f)
 division operator

Public 変数

float X
 X.
float Y
 Y.
float Width
 Width.
float Height
 Height.

Static Public 変数

static readonly Rectangle Zero = new Rectangle(0.0f, 0.0f, 0.0f, 0.0f)
 a rectangle of all zeroes
static readonly Rectangle Identity = new Rectangle(0.0f, 0.0f, 1.0f, 1.0f)
 identity rectangle

プロパティ

Vector2 Position [get, set]
 the base position of the rectangle
Vector2 Size [get, set]
 the size dimensions of the rectangle

説明

rectangle


コンストラクタとデストラクタ

Rectangle ( float  x,
float  y,
float  width,
float  height 
)

constructor taking 4 floats

引数:
xx value to init with
yy value to init with
widthwidth value to init with
heightheight value to init with
Rectangle ( Vector2  position,
Vector2  size 
)

constructor taking a two Vector2s

引数:
positionthe x, y values to init with
sizethe width, height value to init with

constructor taking a Vector4

引数:
vthe vector to init with

メソッド

Rectangle Add ( Rectangle  r)

return this + r

引数:
rrectangle
戻り値:
this + r
void Add ( ref Rectangle  r,
out Rectangle  result 
)

result = this + r

引数:
rrectangle
resultthis + r
static Rectangle Add ( Rectangle  r1,
Rectangle  r2 
) [static]

static function equivalent to Add(Rectangle)

引数:
r1rectangle 1
r2rectangle 2
戻り値:
r1 + r2
static void Add ( ref Rectangle  r1,
ref Rectangle  r2,
out Rectangle  result 
) [static]

static function equivalent to Add(ref Rectangle, out Rectangle)

引数:
r1rectangle 1
r2rectangle 2
resultr1 + r2
Rectangle Divide ( float  f)

return this / f

引数:
fscalar
戻り値:
this / f
void Divide ( float  f,
out Rectangle  result 
)

result = this / f

引数:
fscalar
resultthis / f
static Rectangle Divide ( Rectangle  r,
float  f 
) [static]

static function equivalent to Divide(float)

引数:
rrectangle
fscalar
戻り値:
r / f
static void Divide ( ref Rectangle  r,
float  f,
out Rectangle  result 
) [static]

static function equivalent to Divide(float, out Rectangle)

引数:
rrectangle
fscalar
resultr / f
bool Equals ( Rectangle  r,
float  epsilon 
)

equality test with an epsilon

引数:
rthe rectangle to compare this to
epsilonthe epsilon to use in comparison
戻り値:
true if for every element n, abs(this[n] - r[n]) <= epsilon, false otherwise
bool Equals ( Rectangle  r)

equality test

引数:
rthe rectangle to compare this to
戻り値:
true if this == r, false otherwise
override bool Equals ( Object  o)

equality test

引数:
othe object to compare this to
戻り値:
true if this == o, false otherwise
static Rectangle FromMatrix4 ( Matrix4  m) [static]

return a rectangle representing a 2D translation/scale matrix

引数:
mmatrix to form the rectangle out of
戻り値:
a rectangle representing a rectangle matrix
static void FromMatrix4 ( ref Matrix4  m,
out Rectangle  result 
) [static]

return a rectangle representing a 2D translation/scale matrix

引数:
mmatrix to form the rectangle out of
resulta rectangle representing a rotation matrix
override int GetHashCode ( )

gets the hash code for this vector

戻り値:
integer hash code
void Inverse ( out Rectangle  result)

rectangle inverse

引数:
resultrectangle inverse
static Rectangle Inverse ( Rectangle  r) [static]

static function equivalent to Inverse()

引数:
rrectangle
戻り値:
rectangle inverse
static void Inverse ( ref Rectangle  r,
out Rectangle  result 
) [static]

static function equivalent to Inverse(out Rectangle)

引数:
rrectangle
resultrectangle inverse
Rectangle Inverse ( )

rectangle inverse

戻り値:
rectangle inverse
bool IsIdentity ( )

test if this is an identity rectangle

戻り値:
true if this is an identity rectangle, false otherwise
bool IsInfinity ( )

test if any elements of this are Infinity

戻り値:
true if any elements of this are Infinity, false otherwise
bool IsNaN ( )

test if any elements of this are NaN

戻り値:
true if any elements of this are NaN, false otherwise
void Lerp ( ref Rectangle  r,
float  f,
out Rectangle  result 
)

lerp between 2 rectangles

引数:
rsecond rectangle
flerp amount
resultlerp between this and r
static Rectangle Lerp ( Rectangle  r1,
Rectangle  r2,
float  f 
) [static]

static function equivalent to Lerp(Rectangle, float)

引数:
r1rectangle 1
r2rectangle 2
flerp amount
戻り値:
lerp between r1 and r2
static void Lerp ( ref Rectangle  r1,
ref Rectangle  r2,
float  f,
out Rectangle  result 
) [static]

static function equivalent to Lerp(ref Rectangle, float, out Rectangle)

引数:
r1rectangle 1
r2rectangle 2
flerp amount
resultlerp between r1 and r2
Rectangle Lerp ( Rectangle  r,
float  f 
)

lerp between 2 rectangles

引数:
rsecond rectangle
flerp amount
戻り値:
lerp between this and r
static void Multiply ( ref Rectangle  r,
float  f,
out Rectangle  result 
) [static]

static function equivalent to Multiply(float, out Rectangle)

引数:
rrectangle
fscalar
resultr * f
void Multiply ( float  f,
out Rectangle  result 
)

result = this * f

引数:
fscalar
resultthis * f
static Rectangle Multiply ( Rectangle  r1,
Rectangle  r2 
) [static]

static function equivalent to Multiply(Rectangle)

引数:
r1rectangle 1
r2rectangle 2
戻り値:
r1 * r2
static void Multiply ( ref Rectangle  r1,
ref Rectangle  r2,
out Rectangle  result 
) [static]

static function equivalent to Multiply(ref Rectangle, out Rectangle)

引数:
r1rectangle 1
r2rectangle 2
resultr1 * r2
static Rectangle Multiply ( Rectangle  r,
float  f 
) [static]

static function equivalent to Multiply(float)

引数:
rrectangle
fscalar
戻り値:
r * f
Rectangle Multiply ( Rectangle  r)

return this * r

引数:
rrectangle
戻り値:
this * r
void Multiply ( ref Rectangle  r,
out Rectangle  result 
)

result = this * r

引数:
rrectangle
resultthis * r
Rectangle Multiply ( float  f)

return this * f

引数:
fscalar
戻り値:
this * f
Rectangle Negate ( )

return -this

戻り値:
-this
void Negate ( out Rectangle  result)

result = -this

引数:
result-this
static Rectangle Negate ( Rectangle  r) [static]

static function equivalent to Negate()

引数:
rrectangle
戻り値:
-r
static void Negate ( ref Rectangle  r,
out Rectangle  result 
) [static]

static function equivalent to Negate(out Rectangle)

引数:
rrectangle
result-r
static bool operator!= ( Rectangle  r1,
Rectangle  r2 
) [static]

not equals operator

引数:
r1first rectangle to compare
r2second rectangle to compare
戻り値:
true if r1 != r2, false otherwise
static Rectangle operator* ( Rectangle  r1,
Rectangle  r2 
) [static]

multiplication operator

引数:
r1first value to multiply
r2second value to multiply
戻り値:
r1 * r2
static Rectangle operator* ( Rectangle  r,
float  f 
) [static]

multiply a rectangle by a scalar float

引数:
rrectangle to multiply
ffloat to multiply by
戻り値:
r * f
static Rectangle operator* ( float  f,
Rectangle  r 
) [static]

multiply a rectangle by a scalar float

引数:
ffloat to multiply by
rrectangle to multiply
戻り値:
f * r
static Rectangle operator+ ( Rectangle  r1,
Rectangle  r2 
) [static]

addition operator

引数:
r1first rectangle to add
r2second rectangle to add
戻り値:
r1 + r2
static Rectangle operator- ( Rectangle  r1,
Rectangle  r2 
) [static]

subtraction operator

引数:
r1value to subtract from
r2value to subtract
戻り値:
r1 - r2
static Rectangle operator- ( Rectangle  r) [static]

unary minus operator

引数:
rrectangle to negate
戻り値:
unary minus applied to each member of r
static Rectangle operator/ ( Rectangle  r,
float  f 
) [static]

division operator

引数:
rrectangle to divide
fscalar float value to divide by
戻り値:
r / f
static bool operator== ( Rectangle  r1,
Rectangle  r2 
) [static]

equality operator

引数:
r1first rectangle to compare
r2second rectangle to compare
戻り値:
true if r1 == r2, false otherwise
static void Subtract ( ref Rectangle  r1,
ref Rectangle  r2,
out Rectangle  result 
) [static]

static function equivalent to Subtract(ref Rectangle, out Rectangle)

引数:
r1rectangle 1
r2rectangle 2
resultr1 - r2
void Subtract ( ref Rectangle  r,
out Rectangle  result 
)

result = this - r

引数:
rrectangle
resultthis - r
Rectangle Subtract ( Rectangle  r)

return this - r

引数:
rrectangle
戻り値:
this - r
static Rectangle Subtract ( Rectangle  r1,
Rectangle  r2 
) [static]

static function equivalent to Subtract(Rectangle)

引数:
r1rectangle 1
r2rectangle 2
戻り値:
r1 - r2
Matrix4 ToMatrix4 ( )

convert this rectangle to a Matrix4

戻り値:
Matrix4 representation of this rectangle
void ToMatrix4 ( out Matrix4  result)

convert this rectangle to a Matrix4

引数:
resultMatrix4 representation of this rectangle
override string ToString ( )

get the string representation of this rectangle

戻り値:
the string representation of this rectangle
Vector4 ToVector4 ( )

return the rectangle as a Vector4

戻り値:
the rectangle as a Vector4
void ToVector4 ( out Vector4  result)

return the rectangle as a Vector4

引数:
resultthe rectangle as a Vector4
void TransformPoint ( ref Vector2  v,
out Vector2  result 
)

result = this * v (X,Y,0,1)

引数:
vvector
resultthis * v (X,Y,0,1)
Vector2 TransformPoint ( Vector2  v)

return this * v (X,Y,0,1)

引数:
vvector
戻り値:
this * v (X,Y,0,1)
static void TransformPoint ( ref Rectangle  r,
ref Vector2  v,
out Vector2  result 
) [static]

static function equivalent to TransformPoint(ref Vector2, out Vector2)

引数:
rrectangle
vvector
resultr * v (X,Y,0,1)
static Vector2 TransformPoint ( Rectangle  r,
Vector2  v 
) [static]

static function equivalent to TransformPoint(Vector2)

引数:
rrectangle
vvector
戻り値:
r * v (X,Y,0,1)
static void TransformVector ( ref Rectangle  r,
ref Vector2  v,
out Vector2  result 
) [static]

static function equivalent to TransformVector(ref Vector2, out Vector2)

引数:
rrectangle
vvector
resultr * v (X,Y,0,0)
Vector2 TransformVector ( Vector2  v)

return this * v (X,Y,0,0)

引数:
vvector
戻り値:
this * v (X,Y,0,0)
static Vector2 TransformVector ( Rectangle  r,
Vector2  v 
) [static]

static function equivalent to TransformVector(Vector2)

引数:
rrectangle
vvector
戻り値:
r * v (X,Y,0,0)
void TransformVector ( ref Vector2  v,
out Vector2  result 
)

result = this * v (X,Y,0,0)

引数:
vvector
resultthis * v (X,Y,0,0)

変数

float Height

Height.

readonly Rectangle Identity = new Rectangle(0.0f, 0.0f, 1.0f, 1.0f) [static]

identity rectangle

float Width

Width.

float X

X.

float Y

Y.

readonly Rectangle Zero = new Rectangle(0.0f, 0.0f, 0.0f, 0.0f) [static]

a rectangle of all zeroes


プロパティ

Vector2 Position [get, set]

the base position of the rectangle

Vector2 Size [get, set]

the size dimensions of the rectangle