Main Page Modules Namespace List Class Hierarchy Alphabetical List Compound List File List Namespace Members Compound Members File Members Related Pages

# Vector Mathematics

## Typedefs
typedef float | Lib3dsVector [3]
## Functions
Lib3dsBool | lib3ds_io_read_vector (Lib3dsIo *io, Lib3dsVector v)
Lib3dsBool | lib3ds_io_write_vector (Lib3dsIo *io, Lib3dsVector v)
void | lib3ds_vector_zero (Lib3dsVector c)
void | lib3ds_vector_copy (Lib3dsVector dest, Lib3dsVector src)
void | lib3ds_vector_neg (Lib3dsVector c)
void | lib3ds_vector_add (Lib3dsVector c, Lib3dsVector a, Lib3dsVector b)
void | lib3ds_vector_sub (Lib3dsVector c, Lib3dsVector a, Lib3dsVector b)
void | lib3ds_vector_scalar (Lib3dsVector c, Lib3dsFloat k)
void | lib3ds_vector_cross (Lib3dsVector c, Lib3dsVector a, Lib3dsVector b)
Lib3dsFloat | lib3ds_vector_dot (Lib3dsVector a, Lib3dsVector b)
Lib3dsFloat | lib3ds_vector_squared (Lib3dsVector c)
Lib3dsFloat | lib3ds_vector_length (Lib3dsVector c)
void | lib3ds_vector_normalize (Lib3dsVector c)
void | lib3ds_vector_normal (Lib3dsVector n, Lib3dsVector a, Lib3dsVector b, Lib3dsVector c)
void | lib3ds_vector_transform (Lib3dsVector c, Lib3dsMatrix m, Lib3dsVector a)
void | lib3ds_vector_cubic (Lib3dsVector c, Lib3dsVector a, Lib3dsVector p, Lib3dsVector q, Lib3dsVector b, Lib3dsFloat t)
void | lib3ds_vector_min (Lib3dsVector c, Lib3dsVector a)
void | lib3ds_vector_max (Lib3dsVector c, Lib3dsVector a)
void | lib3ds_vector_dump (Lib3dsVector c)

## Detailed Description

Author:
  J.E. Hoffmann <je-h@gmx.net>

## Typedef Documentation

Lib3dsVector

## Function Documentation

Lib3dsBool lib3ds_io_read_vector | ( | Lib3dsIo * | io,
|  | Lib3dsVector | v
| ) |

  | Read a vector from a file stream in little endian format. Parameters:
  io | IO input handle.
  v | The vector to store the data.

Lib3dsBool lib3ds_io_write_vector | ( | Lib3dsIo * | io,
|  | Lib3dsVector | v
| ) |

| Writes a vector into a file stream in little endian format.

void lib3ds_vector_add | ( | Lib3dsVector | c,
|  | Lib3dsVector | a,
|  | Lib3dsVector | b
| ) |

void lib3ds_vector_copy | ( | Lib3dsVector | dest,
|  | Lib3dsVector | src
| ) |

void lib3ds_vector_cross | ( | Lib3dsVector | c,
|  | Lib3dsVector | a,
|  | Lib3dsVector | b
| ) |

void lib3ds_vector_cubic | ( | Lib3dsVector | c,
|  | Lib3dsVector | a,
|  | Lib3dsVector | p,
|  | Lib3dsVector | q,
|  | Lib3dsVector | b,
|  | Lib3dsFloat | t
| ) |

Lib3dsFloat lib3ds_vector_dot | ( | Lib3dsVector | a,
|  | Lib3dsVector | b
| ) |

void lib3ds_vector_dump | ( | Lib3dsVector | c | ) |

Lib3dsFloat lib3ds_vector_length | ( | Lib3dsVector | c | ) |

void lib3ds_vector_max | ( | Lib3dsVector | c,
|  | Lib3dsVector | a
| ) |

| c[i] = max(c[i], a[i]);

void lib3ds_vector_min | ( | Lib3dsVector | c,
|  | Lib3dsVector | a
| ) |

| c[i] = min(c[i], a[i]);

void lib3ds_vector_neg | ( | Lib3dsVector | c | ) |

void lib3ds_vector_normal | ( | Lib3dsVector | n,
|  | Lib3dsVector | a,
|  | Lib3dsVector | b,
|  | Lib3dsVector | c
| ) |

void lib3ds_vector_normalize | ( | Lib3dsVector | c | ) |

void lib3ds_vector_scalar | ( | Lib3dsVector | c,
|  | Lib3dsFloat | k
| ) |

Lib3dsFloat lib3ds_vector_squared | ( | Lib3dsVector | c | ) |

void lib3ds_vector_sub | ( | Lib3dsVector | c,
|  | Lib3dsVector | a,
|  | Lib3dsVector | b
| ) |

void lib3ds_vector_transform | ( | Lib3dsVector | c,
|  | Lib3dsMatrix | m,
|  | Lib3dsVector | a
| ) |

void lib3ds_vector_zero | ( | Lib3dsVector | c | ) |