BlitzMax

BlitzMax

  • Downloads
  • Docs
  • API
  • Resources
  • About

›BRL.Geometry

BRL.Geometry

  • SVec2
  • SVec3
  • SMat2
  • SMat3
  • SMat4
  • SQuat
Edit

SQuat

A Quaternion.

Quaternions are used to represent rotations. They are compact, don't suffer from gimbal lock and can easily be interpolated.

Constructors

Method New(x:Float, y:Float, z:Float, w:Float)

Creates a new SQuat from the supplied arguments.


Operators

Method Operator*:SQuat(b:SQuat)

Multiplies the quaternion by b, returning a new quaternion.


Method Operator-:SQuat()

Returns the quaternion, negated.


Methods

Method Dot:Float(b:SQuat)

The dot product between two rotations.


Method Invert:SQuat()

Returns the Inverse of rotation.


Method Lerp:SQuat(b:SQuat, t:Float)

Interpolates between the SQuat and b by t and normalizes the result afterwards.


Method Normal:SQuat()

Converts this quaternion to one with the same orientation but with a magnitude of 1.


Method Slerp:SQuat(b:SQuat, t:Float)

Spherically interpolates between this SQuat and b by t.


Method EulerXYZ:SQuat(rot:SVec3)

Returns a rotation that rotates around rot.


Method EulerXZY:SQuat(rot:SVec3)

Returns a rotation that rotates around rot.


Method EulerYXZ:SQuat(rot:SVec3)

Returns a rotation that rotates around rot.


Method EulerYZX:SQuat(rot:SVec3)

Returns a rotation that rotates around rot.


Method EulerZXY:SQuat(rot:SVec3)

Returns a rotation that rotates around rot.


Method EulerZYX:SQuat(rot:SVec3)

Returns a rotation that rotates around rot.


Functions

Function Identity:SQuat()

The identity rotation.


← SMat4
  • Constructors
    • Method New(x:Float, y:Float, z:Float, w:Float)
  • Operators
    • Method Operator*:SQuat(b:SQuat)
    • Method Operator-:SQuat()
  • Methods
    • Method Dot:Float(b:SQuat)
    • Method Invert:SQuat()
    • Method Lerp:SQuat(b:SQuat, t:Float)
    • Method Normal:SQuat()
    • Method Slerp:SQuat(b:SQuat, t:Float)
    • Method EulerXYZ:SQuat(rot:SVec3)
    • Method EulerXZY:SQuat(rot:SVec3)
    • Method EulerYXZ:SQuat(rot:SVec3)
    • Method EulerYZX:SQuat(rot:SVec3)
    • Method EulerZXY:SQuat(rot:SVec3)
    • Method EulerZYX:SQuat(rot:SVec3)
  • Functions
    • Function Identity:SQuat()
BlitzMax
Docs
Getting StartedDownloadsAbout
Community
ResourcesSyntaxBomb Forums
More
NewsGitHubStar
Copyright © 2019 Bruce A Henderson