C# Class CryEngine.Vec3

Exibir arquivo Open project: PoppermostProductions/CryMono Class Usage Examples

Public Properties

Property Type Description
Down Vec3
Up Vec3
X float
Y float
Z float
Zero Vec3

Public Methods

Method Description
Clamp ( Vec3 value, Vec3 min, Vec3 max ) : Vec3

Restricts a value to be within a specified range.

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

Restricts a value to be within a specified range.

ClampLength ( float maxLength ) : void
ComponentMul ( Vec3 rhs ) : Vec3
CreateLerp ( Vec3 p, Vec3 q, float t ) : Vec3
CreateProjection ( Vec3 i, Vec3 n ) : Vec3
CreateReflection ( Vec3 i, Vec3 n ) : Vec3
CreateSlerp ( Vec3 p, Vec3 q, float t ) : Vec3
Cross ( Vec3 v ) : Vec3
Dot ( Vec3 v ) : float
Dot ( Vec3 v0, Vec3 v1 ) : float
Equals ( object obj ) : bool
Flip ( ) : void
GetDistance ( Vec3 vec1 ) : float
GetDistance2D ( Vec3 v ) : float
GetDistance2DSquared ( Vec3 v ) : float
GetDistanceSquared ( Vec3 vec1 ) : float
GetHashCode ( ) : int
GetRotated ( Vec3 center, Vec3 axis, float angle ) : Vec3
GetRotated ( Vec3 center, Vec3 axis, float cosa, float sina ) : Vec3
GetRotated ( Vec3 axis, float angle ) : Vec3
GetRotated ( Vec3 axis, float cosa, float sina ) : Vec3
IsEquivalent ( Vec3 v1, float epsilon = 0.05f ) : bool
IsUnit ( float epsilon = 0.05f ) : bool
IsZero ( float epsilon = 0f ) : bool
Max ( Vec3 left, Vec3 right ) : Vec3

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

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

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

Min ( Vec3 left, Vec3 right ) : Vec3

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

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

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

Normalize ( ) : void
Parse ( string value ) : Vec3
SetLerp ( Vec3 p, Vec3 q, float t ) : void
SetProjection ( Vec3 i, Vec3 n ) : void

Project a point / vector on a (virtual) plane. Consider we have a plane going through the origin. Because d = 0 we need just the normal. The vector n is assumed to be a unit vector.

SetReflection ( Vec3 i, Vec3 n ) : void

Calculate a reflection vector. Vec3 n is assumed to be a unit-vector.

SetSlerp ( Vec3 p, Vec3 q, float t ) : void
ToString ( ) : string

Returns a System.String that represents this instance.

Vec3 ( Quat q ) : System
Vec3 ( Vec2 v2 ) : System
Vec3 ( float f ) : System
Vec3 ( float vx, float vy, float vz ) : System
operator ( ) : Vec3
operator ( ) : bool
operator ( ) : float

Method Details

Clamp() public static method

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

Clamp() public static method

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

ClampLength() public method

public ClampLength ( float maxLength ) : void
maxLength float
return void

ComponentMul() public method

public ComponentMul ( Vec3 rhs ) : Vec3
rhs Vec3
return Vec3

CreateLerp() public static method

public static CreateLerp ( Vec3 p, Vec3 q, float t ) : Vec3
p Vec3
q Vec3
t float
return Vec3

CreateProjection() public static method

public static CreateProjection ( Vec3 i, Vec3 n ) : Vec3
i Vec3
n Vec3
return Vec3

CreateReflection() public static method

public static CreateReflection ( Vec3 i, Vec3 n ) : Vec3
i Vec3
n Vec3
return Vec3

CreateSlerp() public static method

public static CreateSlerp ( Vec3 p, Vec3 q, float t ) : Vec3
p Vec3
q Vec3
t float
return Vec3

Cross() public method

public Cross ( Vec3 v ) : Vec3
v Vec3
return Vec3

Dot() public method

public Dot ( Vec3 v ) : float
v Vec3
return float

Dot() public static method

public static Dot ( Vec3 v0, Vec3 v1 ) : float
v0 Vec3
v1 Vec3
return float

Equals() public method

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

Flip() public method

public Flip ( ) : void
return void

GetDistance() public method

public GetDistance ( Vec3 vec1 ) : float
vec1 Vec3
return float

GetDistance2D() public method

public GetDistance2D ( Vec3 v ) : float
v Vec3
return float

GetDistance2DSquared() public method

public GetDistance2DSquared ( Vec3 v ) : float
v Vec3
return float

GetDistanceSquared() public method

public GetDistanceSquared ( Vec3 vec1 ) : float
vec1 Vec3
return float

GetHashCode() public method

public GetHashCode ( ) : int
return int

GetRotated() public method

public GetRotated ( Vec3 center, Vec3 axis, float angle ) : Vec3
center Vec3
axis Vec3
angle float
return Vec3

GetRotated() public method

public GetRotated ( Vec3 center, Vec3 axis, float cosa, float sina ) : Vec3
center Vec3
axis Vec3
cosa float
sina float
return Vec3

GetRotated() public method

public GetRotated ( Vec3 axis, float angle ) : Vec3
axis Vec3
angle float
return Vec3

GetRotated() public method

public GetRotated ( Vec3 axis, float cosa, float sina ) : Vec3
axis Vec3
cosa float
sina float
return Vec3

IsEquivalent() public method

public IsEquivalent ( Vec3 v1, float epsilon = 0.05f ) : bool
v1 Vec3
epsilon float
return bool

IsUnit() public method

public IsUnit ( float epsilon = 0.05f ) : bool
epsilon float
return bool

IsZero() public method

public IsZero ( float epsilon = 0f ) : bool
epsilon float
return bool

Max() public static method

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

Max() public static method

Returns a vector containing the smallest components of the specified vectors.
public static Max ( Vec3 &left, Vec3 &right, Vec3 &result ) : void
left Vec3 The first source vector.
right Vec3 The second source vector.
result Vec3 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 ( Vec3 left, Vec3 right ) : Vec3
left Vec3 The first source vector.
right Vec3 The second source vector.
return Vec3

Min() public static method

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

Normalize() public method

public Normalize ( ) : void
return void

Parse() public static method

public static Parse ( string value ) : Vec3
value string
return Vec3

SetLerp() public method

public SetLerp ( Vec3 p, Vec3 q, float t ) : void
p Vec3
q Vec3
t float
return void

SetProjection() public method

Project a point / vector on a (virtual) plane. Consider we have a plane going through the origin. Because d = 0 we need just the normal. The vector n is assumed to be a unit vector.
public SetProjection ( Vec3 i, Vec3 n ) : void
i Vec3
n Vec3
return void

SetReflection() public method

Calculate a reflection vector. Vec3 n is assumed to be a unit-vector.
public SetReflection ( Vec3 i, Vec3 n ) : void
i Vec3
n Vec3
return void

SetSlerp() public method

public SetSlerp ( Vec3 p, Vec3 q, float t ) : void
p Vec3
q Vec3
t float
return void

ToString() public method

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

Vec3() public method

public Vec3 ( Quat q ) : System
q Quat
return System

Vec3() public method

public Vec3 ( Vec2 v2 ) : System
v2 Vec2
return System

Vec3() public method

public Vec3 ( float f ) : System
f float
return System

Vec3() public method

public Vec3 ( float vx, float vy, float vz ) : System
vx float
vy float
vz float
return System

operator() public static method

public static operator ( ) : Vec3
return Vec3

operator() public static method

public static operator ( ) : bool
return bool

operator() public static method

public static operator ( ) : float
return float

Property Details

Down public_oe static_oe property

public static Vec3,CryEngine Down
return Vec3

Up public_oe static_oe property

public static Vec3,CryEngine Up
return Vec3

X public_oe property

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

Y public_oe property

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

Z public_oe property

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

Zero public_oe static_oe property

public static Vec3,CryEngine Zero
return Vec3