Difference between revisions of "Algohol"

From the Oblivion ConstructionSet Wiki
Jump to navigation Jump to search
imported>Haama
(Added tutorial)
imported>Speedo
(Changed to template)
Line 1: Line 1:
{{Update}}
{{Update}}
'''Algohol''' (latest version is Beta v011) is a plugin for OBSE that provides advanced math functions. Algohol stands for "ALGebraic Operations Helper Oblivion Library"


You can download it from [http://tesnexus.com/downloads/file.php?id=13337 TESNexus], discuss it in the Bethesda Forums thread [http://www.bethsoft.com/bgsforums/index.php?showtopic=758652 "(WIPz)(OBSE)(PLUGIN)ALGOHOL Project"], and check the source code at [http://obse-plugins.svn.sourceforge.net/viewvc/obse-plugins/ Source Forge].
{{OBSE Plugin
|Name        = Algohol
|Author      = [http://www.bethsoft.com/bgsforums/index.php?showuser=255104 entim]
|Version    = 0.11
|InternalVer = 0
|Description =
Algohol stands for "ALGebraic Operations Helper Oblivion Library"  It provides a library of advanced math functions for Oblivion.
|Install    =
*'''Manual Install:'''
*#Browse to the folder Oblivion\Data\obse\plugins
*#Extract the contents of the downloaded zip into that folder
|Download    = [http://tesnexus.com/downloads/file.php?id=13337 TES Nexus]
|Source      =
[http://obse-plugins.svn.sourceforge.net/viewvc/obse-plugins/ Source Forge]
|Discussions =
*[http://www.bethsoft.com/bgsforums/index.php?showtopic=758652 "(WIPz)(OBSE)(PLUGIN)ALGOHOL Project"]
|OBSEname    = algohol
}}


==Current Commmands==
==Current Commmands==
Line 75: Line 91:
*Fixed gimbal lock handling in QToEuler
*Fixed gimbal lock handling in QToEuler


[[Category:OBSE Plug-ins]]
[[Category:Functions]]
[[Category:Functions]]
[[Category:Functions (OBSE)]]
[[Category:Functions (OBSE)]]

Revision as of 03:32, 30 March 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

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, becouse 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

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

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

Tutorials

Version History

Changes since 0.1

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