Difference between revisions of "Algohol"

From the Oblivion ConstructionSet Wiki
Jump to navigation Jump to search
imported>Speedo
(Changed to template)
imported>UDUN
 
(One intermediate revision by one other user not shown)
Line 2: Line 2:


{{OBSE Plugin
{{OBSE Plugin
|Version    = 0.11
|InternalVer = 0
|Name        = Algohol
|Name        = Algohol
|Author      = [http://www.bethsoft.com/bgsforums/index.php?showuser=255104 entim]
|Author      = [http://www.bethsoft.com/bgsforums/index.php?showuser=255104 entim]
|Version    = 0.11
|InternalVer = 0
|Description =  
|Description =  
Algohol stands for "ALGebraic Operations Helper Oblivion Library"  It provides a library of advanced math functions for Oblivion.
Algohol stands for "ALGebraic Operations Helper Oblivion Library"  It provides a library of advanced math functions for Oblivion.
Line 37: Line 37:
                           vectorB_y:float vectorB_z:float
                           vectorB_y:float vectorB_z:float


* QFromEuler - converts euler angles to quaternion (two euler rotation sequences are available, becouse actors use different sequence than other objects. the default is XYZ, and optionally ZX for actors)
* QFromEuler - converts euler angles to quaternion (two euler rotation sequences are available, because actors use different sequence than other objects. the default is XYZ, and optionally ZX for actors)


  (nothing) QFromEuler out_w:string out_x:string out_y:string out_z:string
  (nothing) QFromEuler out_w:string out_x:string out_y:string out_z:string

Latest revision as of 09:04, 18 October 2008



Algohol
Author(s)

entim

Current Version 0.11 (GetPluginVersion returns 0)
Description

Algohol stands for "ALGebraic Operations Helper Oblivion Library" It provides a library of advanced math functions for Oblivion.

Installation
  • Manual Install:
    1. Browse to the folder Oblivion\Data\obse\plugins
    2. Extract the contents of the downloaded zip into that folder
Download

TES Nexus

Source Code

Source Forge

Discussions
OBSE Name "algohol"

(for use with IsPluginInstalled/GetPluginVersion)


Current Commmands[edit | edit source]

Note that these should all be on one line, and have been split due to wiki limitations (to keep them on the page).

  • V3Length - returns length of a vector3
   (length:float) V3Length vector_x:float vector_y:float vector_z:float
  • V3Normalize - returns normalized vector3
(nothing) V3Normalize out_x:string out_y:string out_z:string vector_x:float
                      vector_y:float vector_z:float
  • V3Crossproduct - returns crossproduct of two vector3s
(nothing) V3Crossproduct out_x:string out_y:string out_z:string vectorA_x:float
                         vectorA_y:float vectorA_z:float vectorB_x:float
                         vectorB_y:float vectorB_z:float
  • QFromEuler - converts euler angles to quaternion (two euler rotation sequences are available, because actors use different sequence than other objects. the default is XYZ, and optionally ZX for actors)
(nothing) QFromEuler out_w:string out_x:string out_y:string out_z:string
                     elevation:float bank:float heading:float flag:bool
  • QFromAxisAngle - converts rotation axis and angle to quaternion
(nothing) QFromAxisAngle out_w:string out_x:string out_y:string out_z:string
                         axis_x:float axis_y:float axis_z:float angle:float
  • QNormalize - returns normalized quaternion
(nothing) QNormalize out_w:string out_x:string out_y:string out_z:string
                     quat_w:float quat_x:float quat_y:float quat_z:float
  • QMultQuat - multiplies two quaternions (Grossmann product). The result is the second quaternion rotated by the first
(nothing) QMultQuat out_w:string out_x:string out_y:string out_z:string
                    quatA_w:float quatA_x:float quatA_y:float quatA_z:float
                    quatB_w:float quatB_x:float quatB_y:float quatB_z:float
  • QMultVector3 - multiplies a vector3 with a quaternion. The result is the vector rotated by the quaternion
(nothing) QMultVector3 out_x:string out_y:string out_z:string quat_w:float
                       quat_x:float quat_y:float quat_z:float vector_x:float
                       vector_y:float vector_z:float
  • QInterpolate - interpolates between two given quaternions (two methods are available: the default is normalized linear interpolation, and optionally spherical linear interpolation)
   (nothing) QInterpolate out_w:string out_x:string out_y:string out_z:string
                          quatA_w:float quatA_x:float quatA_y:float quatA_z:float
                          quatB_w:float quatB_x:float quatB_y:float quatB_z:float
                          ratio:float flag:bool
  • QToEuler - converts a given quaternion to euler angles (again, two different euler rotation sequences available). The quaternion does not need to be normalized.
(nothing) QToEuler elevation:string bank:string heading:string quat_w:float
                   quat_x:float quat_y:float quat_z:float flag:bool

Example[edit | edit source]

float vX
float vY
float vZ
V3Normalize "vX" "vY" "vZ" vX vY vZ

This result will be the normalized (vX; vY; vZ) vector.

Tutorials[edit | edit source]

Version History[edit | edit source]

Changes since 0.1[edit | edit source]

  • Fixed handling of actor angles in QFromEuler
  • Fixed gimbal lock handling in QToEuler