Main Page   Modules   Compound List   File List   Compound Members   File Members  

3vectorf.c File Reference

#include <math.h>
#include <gandalf/linalg/2vectorf.h>
#include <gandalf/linalg/3vectorf.h>
#include <gandalf/common/misc_defs.h>
#include <gandalf/common/misc_error.h>
#include <string.h>
#include <gandalf/common/endian_io.h>

Functions

Gan_Bool gan_vec3f_print (Gan_Vector3_f *p, const char *prefix, int indent, const char *fmt)
 Print fixed size vector to standard output.

Gan_Bool gan_vec3f_fwrite (FILE *fp, Gan_Vector3_f *p, gan_ui32 magic_number)
 Write fixed size vector to file stream.

Gan_Bool gan_vec3f_fread (FILE *fp, Gan_Vector3_f *p, gan_ui32 *magic_number)
 Read fixed size vector from file stream.

Gan_Vector3_f gan_vec3f_zero_s (void)
 Set fixed size vector to zero.

Gan_Vector3_f gan_vec3f_copy_s (Gan_Vector3_f *x)
 Return a copy of fixed size vector.

Gan_Vector3_f gan_vec3f_scale_s (Gan_Vector3_f *x, float a)
 Scale fixed size vector.

Gan_Vector3_f gan_vec3f_divide_s (Gan_Vector3_f *x, float a)
 Divide fixed size vector by scalar.

Gan_Vector3_f gan_vec3f_negate_s (Gan_Vector3_f *x)
 Negate fixed size vector.

Gan_Vector3_fgan_vec3f_unit_q (Gan_Vector3_f *x, Gan_Vector3_f *y)
 Scale matrix to unit norm.

Gan_Vector3_f gan_vec3f_unit_s (Gan_Vector3_f *x)
 Scale matrix to unit norm.

Gan_Vector3_f gan_vec3f_add_s (Gan_Vector3_f *x, Gan_Vector3_f *y)
 Add two fixed size vectors.

Gan_Vector3_f gan_vec3f_sub_s (Gan_Vector3_f *x, Gan_Vector3_f *y)
 Subtract two fixed size vectors.

float gan_vec3f_dot_s (Gan_Vector3_f *p, Gan_Vector3_f *q)
 Dot product of fixed size vectors.

float gan_vec3f_sqrlen_s (Gan_Vector3_f *p)
 Returns sum of squares of vector elements.

Gan_Vector3_f gan_vec3f_from_vecf_s (Gan_Vector_f *x)
 Macro: Convert generic vector to fixed size vector.

Gan_Bool gan_vec3f_fprint (FILE *fp, Gan_Vector3_f *p, const char *prefix, int indent, const char *fmt)
 Print 3-vector to file.

Gan_Bool gan_vec3f_fscanf (FILE *fp, Gan_Vector3_f *p, char *prefix, int prefix_len)
 Read 3-vector from file.

Gan_Vector3_f gan_vec3f_fill_s (float X, float Y, float Z)
 Return 3-vector filled with values.

Gan_Vector3_f gan_vec3f_cross_s (Gan_Vector3_f *p, Gan_Vector3_f *q)
 Return the vector product of two 3-vectors.

Gan_Vector2_f gan_vec3f_get_v2t_s (Gan_Vector3_f *p)
 Extract top 2-vector part of 3-vector.

Gan_Vector3_f gan_vec3f_set_parts_s (Gan_Vector2_f *q, float s)
 Build 3-vector from 2-vector and scalar.

Gan_Vector3_fgan_vec3f_from_vecf_q (Gan_Vector_f *x, Gan_Vector3_f *a)
 Convert generic vector to 3-vector structure.


Detailed Description

Module: Size 3 vectors (single precision)

Part of: Gandalf Library

Revision: Last edited: Author:

Copyright: (c) 2000 Imagineer Software Limited


Generated on Mon Oct 13 16:14:36 2003 by doxygen1.3-rc1