C# Class Fractrace.Geometry.VecRotation

Mostra file Open project: trafassel/Gestaltlupe Class Usage Examples

Public Properties

Property Type Description
Angle double
X double
Y double
Z double

Public Methods

Method Description
FromEuler ( double heading, double attitude, double bank ) : void

constructor to create vecRotation from euler angles.

Normalize ( ) : void
VecRotation ( ) : System

Default constructor - initializes all fields to default values

VecRotation ( double x, double y, double z, double angle ) : System
combine ( VecRotation r ) : void

calculate total rotation by taking current rotation and then apply rotation r if both angles are quaternions then this is a multiplication

combine ( double heading, double attitude, double bank ) : void

combine a rotation expressed as euler angle with current rotation. first convert both values to quaternoins then combine and convert back to axis angle. Theory about these conversions shown here: http://www.martinb.com/maths/geometry/rotations/conversions/index.htm

getTransform ( Fractrace.Geometry.Vec3 p1 ) : Fractrace.Geometry.Vec3

calculates the effect of this rotation on a point the new point is given by=q * P1 * q' this version does not alter P1 but returns the result. for theory see: http://www.martinb.com/maths/algebra/realNormedAlgebra/quaternions/transforms/index.htm

toEuler ( double &heading, double &attitude, double &bank ) : void

Converts the Rotation in Euler Axis

Protected Methods

Method Description
toAxisAngle ( ) : void

if this rotation is not already coded as axis angle then convert it to axis angle

toQuaternion ( ) : void

if this rotation is not already coded as quaternion then convert it to quaternion

Method Details

FromEuler() public method

constructor to create vecRotation from euler angles.
public FromEuler ( double heading, double attitude, double bank ) : void
heading double rotation about z axis
attitude double rotation about y axis
bank double rotation about x axis
return void

Normalize() public method

public Normalize ( ) : void
return void

VecRotation() public method

Default constructor - initializes all fields to default values
public VecRotation ( ) : System
return System

VecRotation() public method

public VecRotation ( double x, double y, double z, double angle ) : System
x double
y double
z double
angle double
return System

combine() public method

calculate total rotation by taking current rotation and then apply rotation r if both angles are quaternions then this is a multiplication
public combine ( VecRotation r ) : void
r VecRotation
return void

combine() public method

combine a rotation expressed as euler angle with current rotation. first convert both values to quaternoins then combine and convert back to axis angle. Theory about these conversions shown here: http://www.martinb.com/maths/geometry/rotations/conversions/index.htm
public combine ( double heading, double attitude, double bank ) : void
heading double angle about x axis
attitude double angle about y axis
bank double angle about z axis
return void

getTransform() public method

calculates the effect of this rotation on a point the new point is given by=q * P1 * q' this version does not alter P1 but returns the result. for theory see: http://www.martinb.com/maths/algebra/realNormedAlgebra/quaternions/transforms/index.htm
public getTransform ( Fractrace.Geometry.Vec3 p1 ) : Fractrace.Geometry.Vec3
p1 Fractrace.Geometry.Vec3
return Fractrace.Geometry.Vec3

toAxisAngle() protected method

if this rotation is not already coded as axis angle then convert it to axis angle
protected toAxisAngle ( ) : void
return void

toEuler() public method

Converts the Rotation in Euler Axis
public toEuler ( double &heading, double &attitude, double &bank ) : void
heading double The heading.
attitude double The attitude.
bank double The bank.
return void

toQuaternion() protected method

if this rotation is not already coded as quaternion then convert it to quaternion
protected toQuaternion ( ) : void
return void

Property Details

Angle public_oe property

Winkel in Bogenmaß
public double Angle
return double

X public_oe property

x-Komponente der Drehachse
public double X
return double

Y public_oe property

y-Komponente der Drehachse
public double Y
return double

Z public_oe property

z-Komponente der Drehachse
public double Z
return double