C# Class SharpDX.Int3

Exibir arquivo Open project: sselecirPyM/RTUGame Class Usage Examples

Public Properties

Property Type Description
One Int3
SizeInBytes int
UnitX Int3
UnitY Int3
UnitZ Int3
X int
Y int
Z int
Zero Int3

Public Methods

Method Description
Add ( left, right ) : Int3

Adds two vectors.

Add ( &left, &right, &result ) : void

Adds two vectors.

Clamp ( value, min, max ) : Int3

Restricts a value to be within a specified range.

Clamp ( &value, &min, &max, &result ) : void

Restricts a value to be within a specified range.

Divide ( value, int scale ) : Int3

Scales a vector by the given value.

Divide ( &value, int scale, &result ) : void

Scales a vector by the given value.

Equals ( object value ) : bool

Determines whether the specified System.Object is equal to this instance.

GetHashCode ( ) : int

Returns a hash code for this instance.

Int3 ( Array values ) : System

Initializes a new instance of the Int3 struct.

Int3 ( int value ) : System

Initializes a new instance of the Int3 struct.

Int3 ( int x, int y, int z ) : System

Initializes a new instance of the Int3 struct.

Max ( left, right ) : Int3

Returns a vector containing the largest components of the specified vectors.

Max ( &left, &right, &result ) : void

Returns a vector containing the smallest components of the specified vectors.

Min ( left, right ) : Int3

Returns a vector containing the smallest components of the specified vectors.

Min ( &left, &right, &result ) : void

Returns a vector containing the smallest components of the specified vectors.

Modulate ( left, right ) : Int3

Modulates a vector with another by performing component-wise multiplication.

Modulate ( &left, &right, &result ) : void

Modulates a vector with another by performing component-wise multiplication.

Multiply ( value, int scale ) : Int3

Scales a vector by the given value.

Multiply ( &value, int scale, &result ) : void

Scales a vector by the given value.

Negate ( value ) : Int3

Reverses the direction of a given vector.

Negate ( &value, &result ) : void

Reverses the direction of a given vector.

Subtract ( left, right ) : Int3

Subtracts two vectors.

Subtract ( &left, &right, &result ) : void

Subtracts two vectors.

ToArray ( ) : int[]

Creates an array containing the elements of the vector.

ToString ( ) : string

Returns a System.String that represents this instance.

ToString ( IFormatProvider formatProvider ) : string

Returns a System.String that represents this instance.

ToString ( string format ) : string

Returns a System.String that represents this instance.

ToString ( string format, IFormatProvider formatProvider ) : string

Returns a System.String that represents this instance.

operator ( ) : Int3

Adds two vectors.

this ( int index ) : int

Gets or sets the component at the specified index.

Private Methods

Method Description
Equals ( &other ) : bool
operator ( ) : bool

Method Details

Add() public static method

Adds two vectors.
public static Add ( left, right ) : Int3
left The first vector to add.
right The second vector to add.
return Int3

Add() public static method

Adds two vectors.
public static Add ( &left, &right, &result ) : void
left The first vector to add.
right The second vector to add.
result When the method completes, contains the sum of the two vectors.
return void

Clamp() public static method

Restricts a value to be within a specified range.
public static Clamp ( value, min, max ) : Int3
value The value to clamp.
min The minimum value.
max The maximum value.
return Int3

Clamp() public static method

Restricts a value to be within a specified range.
public static Clamp ( &value, &min, &max, &result ) : void
value The value to clamp.
min The minimum value.
max The maximum value.
result When the method completes, contains the clamped value.
return void

Divide() public static method

Scales a vector by the given value.
public static Divide ( value, int scale ) : Int3
value The vector to scale.
scale int The amount by which to scale the vector.
return Int3

Divide() public static method

Scales a vector by the given value.
public static Divide ( &value, int scale, &result ) : void
value The vector to scale.
scale int The amount by which to scale the vector.
result When the method completes, contains the scaled vector.
return void

Equals() public method

Determines whether the specified System.Object is equal to this instance.
public Equals ( object value ) : bool
value object The to compare with this instance.
return bool

GetHashCode() public method

Returns a hash code for this instance.
public GetHashCode ( ) : int
return int

Int3() public method

Initializes a new instance of the Int3 struct.
Thrown when is null. Thrown when contains more or less than four elements.
public Int3 ( Array values ) : System
values Array The values to assign to the X, Y, Z, and W components of the vector. This must be an array with four elements.
return System

Int3() public method

Initializes a new instance of the Int3 struct.
public Int3 ( int value ) : System
value int The value that will be assigned to all components.
return System

Int3() public method

Initializes a new instance of the Int3 struct.
public Int3 ( int x, int y, int z ) : System
x int Initial value for the X component of the vector.
y int Initial value for the Y component of the vector.
z int Initial value for the Z component of the vector.
return System

Max() public static method

Returns a vector containing the largest components of the specified vectors.
public static Max ( left, right ) : Int3
left The first source vector.
right The second source vector.
return Int3

Max() public static method

Returns a vector containing the smallest components of the specified vectors.
public static Max ( &left, &right, &result ) : void
left The first source vector.
right The second source vector.
result When the method completes, contains an new vector composed of the largest components of the source vectors.
return void

Min() public static method

Returns a vector containing the smallest components of the specified vectors.
public static Min ( left, right ) : Int3
left The first source vector.
right The second source vector.
return Int3

Min() public static method

Returns a vector containing the smallest components of the specified vectors.
public static Min ( &left, &right, &result ) : void
left The first source vector.
right The second source vector.
result When the method completes, contains an new vector composed of the smallest components of the source vectors.
return void

Modulate() public static method

Modulates a vector with another by performing component-wise multiplication.
public static Modulate ( left, right ) : Int3
left The first vector to modulate.
right The second vector to modulate.
return Int3

Modulate() public static method

Modulates a vector with another by performing component-wise multiplication.
public static Modulate ( &left, &right, &result ) : void
left The first vector to modulate.
right The second vector to modulate.
result When the method completes, contains the modulated vector.
return void

Multiply() public static method

Scales a vector by the given value.
public static Multiply ( value, int scale ) : Int3
value The vector to scale.
scale int The amount by which to scale the vector.
return Int3

Multiply() public static method

Scales a vector by the given value.
public static Multiply ( &value, int scale, &result ) : void
value The vector to scale.
scale int The amount by which to scale the vector.
result When the method completes, contains the scaled vector.
return void

Negate() public static method

Reverses the direction of a given vector.
public static Negate ( value ) : Int3
value The vector to negate.
return Int3

Negate() public static method

Reverses the direction of a given vector.
public static Negate ( &value, &result ) : void
value The vector to negate.
result When the method completes, contains a vector facing in the opposite direction.
return void

Subtract() public static method

Subtracts two vectors.
public static Subtract ( left, right ) : Int3
left The first vector to subtract.
right The second vector to subtract.
return Int3

Subtract() public static method

Subtracts two vectors.
public static Subtract ( &left, &right, &result ) : void
left The first vector to subtract.
right The second vector to subtract.
result When the method completes, contains the difference of the two vectors.
return void

ToArray() public method

Creates an array containing the elements of the vector.
public ToArray ( ) : int[]
return int[]

ToString() public method

Returns a System.String that represents this instance.
public ToString ( ) : string
return string

ToString() public method

Returns a System.String that represents this instance.
public ToString ( IFormatProvider formatProvider ) : string
formatProvider IFormatProvider The format provider.
return string

ToString() public method

Returns a System.String that represents this instance.
public ToString ( string format ) : string
format string The format.
return string

ToString() public method

Returns a System.String that represents this instance.
public ToString ( string format, IFormatProvider formatProvider ) : string
format string The format.
formatProvider IFormatProvider The format provider.
return string

operator() public static method

Adds two vectors.
public static operator ( ) : Int3
return Int3

this() public method

Gets or sets the component at the specified index.
Thrown when the is out of the range [0, 3].
public this ( int index ) : int
index int The index of the component to access. Use 0 for the X component, 1 for the Y component, 2 for the Z component, and 3 for the W component.
return int

Property Details

One public_oe static_oe property

A Int3 with all of its components set to one.
public static Int3,SharpDX One
return Int3

SizeInBytes public_oe static_oe property

The size of the Int3 type, in bytes.
public static int SizeInBytes
return int

UnitX public_oe static_oe property

The X unit Int3 (1, 0, 0).
public static Int3,SharpDX UnitX
return Int3

UnitY public_oe static_oe property

The Y unit Int3 (0, 1, 0).
public static Int3,SharpDX UnitY
return Int3

UnitZ public_oe static_oe property

The Z unit Int3 (0, 0, 1).
public static Int3,SharpDX UnitZ
return Int3

X public_oe property

The X component of the vector.
public int X
return int

Y public_oe property

The Y component of the vector.
public int Y
return int

Z public_oe property

The Z component of the vector.
public int Z
return int

Zero public_oe static_oe property

A Int3 with all of its components set to zero.
public static Int3,SharpDX Zero
return Int3