Seed7 - The extensible programming language
Seed7 FAQ Manual Screenshots Examples Libraries Algorithms Download Links
Libraries AES ARC4 Array ASN.1 Bigfile Bigint Bigrat Bin32 Bin64 Bitdata Bitmapfont Bitset Bitsetof Boolean Browser Bstring Bytedata Cards Category CC config Cgi Cgi dialog Char Charsets Cipher Clib_file Color CLI Commands Complex Console Crc32 Deflate DES Dialog Dir Draw Duration Echo Editline Enable_input Enable_io Enable_output Encoding Environment External_file File File system Float Font Forloop Ftp Getf Gethttp Gethttps Graph Graph_file Gzip Hash Hashsetof Hmac Html_ent Httpserv Idxarray Image Inflate Inflate file Inifile Integer Keybd Line Listener LZW Make Math Msgdigest Null_file Osfiles Picture utility Pixmap_file Pixmapfont PKCS #1 Poll Process Progs Propertyfile Rational Reference Ref_list Scanfile Scanstri Set Shell Smtp Sockbase Socket SQL base Stdio Strifile String Stritext Subrange Tar Text Time TLS/SSL Triple DES Unicode Utf16 Utf8 Vectorfont 3D Vector Window Wrinum X.509 Xmldom Xml_ent Zip
Libraries
3D Vector Source Code
 previous   up   next 

Types
vector3d
3D vectors represented with float values for the three dimensions.

vector3d

const type: vector3d

3D vectors represented with float values for the three dimensions. 3D vector literals do not exist.


Operator Summary
boolean
(in vector3d: a) = (in vector3d: b)
Check if two 3D vectors are equal.
boolean
(in vector3d: a) <> (in vector3d: b)
Check if two 3D vectors are not equal.
vector3d
- (in vector3d: a)
Minus sign, negate a 3D vector.
vector3d
(in vector3d: a) + (in vector3d: b)
Add two 3D vectors.
vector3d
(in vector3d: a) - (in vector3d: b)
Subtract two 3D vectors.
vector3d
(in vector3d: v) * (in float: num)
Multiply a 3D vector with a float number.
vector3d
(in vector3d: v) / (in float: num)
Divide a 3D vector by a float number.
void
(inout vector3d: vect) +:= (in float: delta)
Increment a 3D vector by a float delta.
void
(inout vector3d: vect) -:= (in float: delta)
Decrement a 3D vector by a float delta.
void
(inout vector3d: vect) *:= (in float: number)
Multiply a 3D vector by a float factor and assign the result back.
void
(inout vector3d: vect) /:= (in float: number)
Divide a 3D vector by a float factor and assign the result back.

Function Summary
vector3d
vector3d (in float: x, in float: y, in float: z)
Create a 3D vector from its x, y and z values.
float
abs (in vector3d: v)
Compute the absolute value of a 3D vector.
float
sqrAbs (in vector3d: v)
Compute the square of the absolute value of a 3D vector.
float
dot (in vector3d: a, in vector3d: b)
Inner product of two 3D vectors.
vector3d
cross (in vector3d: a, in vector3d: b)
Cross product of two 3D vectors.
vector3d
reflect (in vector3d: vect, in vector3d: normal)
Reflect the vector vect at a surface defined by normal.
vector3d
unitVector (in vector3d: v)
Unit vector of a given 3D vector.
integer
compare (in vector3d: vect1, in vector3d: vect2)
Compare two 3D vectors in lexicographic order.
integer
hashCode (in vector3d: vect)
Compute the hash value of a 3D vector.
string
str (in vector3d: a)
Convert a 3D vector to a string.

Operator Detail

=

const func boolean: (in vector3d: a) = (in vector3d: b)

Check if two 3D vectors are equal.

Returns:
TRUE if both 3D vectors are equal, FALSE otherwise.

<>

const func boolean: (in vector3d: a) <> (in vector3d: b)

Check if two 3D vectors are not equal.

Returns:
FALSE if both 3D vectors are equal, TRUE otherwise.

-

const func vector3d: - (in vector3d: a)

Minus sign, negate a 3D vector.

Returns:
the negated value of the 3D vector.

+

const func vector3d: (in vector3d: a) + (in vector3d: b)

Add two 3D vectors.

Returns:
the sum of the two 3D vectors.

-

const func vector3d: (in vector3d: a) - (in vector3d: b)

Subtract two 3D vectors.

Returns:
the difference of the two 3D vectors.

*

const func vector3d: (in vector3d: v) * (in float: num)

Multiply a 3D vector with a float number.

Returns:
the product of the multiplication.

/

const func vector3d: (in vector3d: v) / (in float: num)

Divide a 3D vector by a float number.

Returns:
the quotient of the division.

+:=

const proc: (inout vector3d: vect) +:= (in float: delta)

Increment a 3D vector by a float delta.


-:=

const proc: (inout vector3d: vect) -:= (in float: delta)

Decrement a 3D vector by a float delta.


*:=

const proc: (inout vector3d: vect) *:= (in float: number)

Multiply a 3D vector by a float factor and assign the result back.


/:=

const proc: (inout vector3d: vect) /:= (in float: number)

Divide a 3D vector by a float factor and assign the result back.


Function Detail

vector3d

const func vector3d: vector3d (in float: x, in float: y, in float: z)

Create a 3D vector from its x, y and z values.

Returns:
the created 3D vector.

abs

const func float: abs (in vector3d: v)

Compute the absolute value of a 3D vector.

Returns:
the absolute value.

sqrAbs

const func float: sqrAbs (in vector3d: v)

Compute the square of the absolute value of a 3D vector.

Returns:
the square of the absolute value.

dot

const func float: dot (in vector3d: a, in vector3d: b)

Inner product of two 3D vectors.

Returns:
the inner product of the two 3D vectors.

cross

const func vector3d: cross (in vector3d: a, in vector3d: b)

Cross product of two 3D vectors.

Returns:
the cross product of the two 3D vectors.

reflect

const func vector3d: reflect (in vector3d: vect, in vector3d: normal)

Reflect the vector vect at a surface defined by normal. The surface is representing by its normal at the intersection point.

Returns:
the reflected vector.

unitVector

const func vector3d: unitVector (in vector3d: v)

Unit vector of a given 3D vector.


compare

const func integer: compare (in vector3d: vect1, in vector3d: vect2)

Compare two 3D vectors in lexicographic order.

Returns:
-1, 0 or 1 if the first argument is considered to be respectively less than, equal to, or greater than the second.

hashCode

const func integer: hashCode (in vector3d: vect)

Compute the hash value of a 3D vector.

Returns:
the hash value.

str

const func string: str (in vector3d: a)

Convert a 3D vector to a string.

Returns:
the string result of the conversion.


 previous   up   next