Main Page | Modules | Class List | File List | Class Members | File Members

2vectorf.h File Reference

#include <stdlib.h>
#include <stdio.h>
#include <gandalf/common/misc_defs.h>
#include <gandalf/linalg/vecf_gen.h>

Go to the source code of this file.

Classes

struct  Gan_Vector2_f
 Structure definition for single precision floating point 2-vector. More...

Defines

#define GAN_REP2_AS(a, b, p1, p2)   (a p1 b, a p2 b)
#define GAN_REP2_A(a, p1, p2)   (a p1, a p2)
#define GAN_REP2_AS_C(a, b)   GAN_REP2_AS(a,b,x,y)
#define GAN_REP2_A_C(a)   GAN_REP2_A(a,x,y)
#define GAN_FREP2_A(a, b, p1, p2, q1, q2)   (a p1 b q1, a p2 b q2)
#define GAN_FREP2_A_C(a, b, p1, p2)   GAN_FREP2_A(a,b,x,y,p1,p2)
#define GAN_REP2_AB(a, b, p1, p2, q1, q2)   (a p1 b q1, a p2 b q2)
#define GAN_REP2_AA(a, b, p1, p2)   GAN_REP2_AB(a,b,p1,p2,p1,p2)
#define GAN_REP2_AA_C(a, b)   GAN_REP2_AA(a,b,x,y)
#define GAN_REP2_ABS(a, b, c, p1, p2, q1, q2)   (a p1 b q1 c, a p2 b q2 c)
#define GAN_REP2_AAS(a, b, c, p1, p2)   GAN_REP2_ABS(a,b,c,p1,p2,p1,p2)
#define GAN_REP2_AAS_C(a, b, c)   GAN_REP2_AAS(a,b,c,x,y)
#define GAN_REP2_AB(a, b, p1, p2, q1, q2)   (a p1 b q1, a p2 b q2)
#define GAN_REP2_AA(a, b, p1, p2)   GAN_REP2_AB(a,b,p1,p2,p1,p2)
#define GAN_REP2_AA_C(a, b)   GAN_REP2_AA(a,b,x,y)
#define GAN_REP2_ABCS(a, b, c, d, p1, p2, q1, q2, r1, r2)   (a p1 b q1 c r1 d, a p2 b q2 c r2 d)
#define GAN_REP2_ABC(a, b, c, p1, p2, q1, q2, r1, r2)   (a p1 b q1 c r1, a p2 b q2 c r2)
#define GAN_REP2_AAA(a, b, c, p1, p2)   GAN_REP2_ABC(a,b,c,p1,p2,p1,p2,p1,p2)
#define GAN_REP2_AAA_C(a, b, c)   GAN_REP2_AAA(a,b,c,x,y)
#define GAN_REP2_OP_AB(a, b, p1, p2, q1, q2, op)   (a p1 b q1 op a p2 b q2)
#define GAN_REP2_OP_AA(a, b, p1, p2, op)   GAN_REP2_OP_AB(a,b,p1,p2,p1,p2,op)
#define GAN_REP2_OP_AA_C(a, b, op)   GAN_REP2_OP_AA(a,b,x,y,op)
#define GAN_TEST_OP1(A, typeA)   assert(sizeof(*(A))==sizeof(typeA))
#define GAN_TEST_OP2(A, B, typeA, typeB)   (assert(sizeof(*(A))==sizeof(typeA)&&sizeof(*(B))==sizeof(typeB)))
#define GAN_TEST_OP3(A, B, C, typeA, typeB, typeC)
#define GAN_TEST_OP4(A, B, C, D, typeA, typeB, typeC, typeD)
#define GAN_TEST_OP5(A, B, C, D, E, typeA, typeB, typeC, typeD, typeE)
#define GAN_VECTYPE   Gan_Vector2_f
#define GAN_VECTOR_TYPE   Gan_Vector_f
#define GAN_VEC_ELEMENT_TYPE   GAN_FLOAT
#define GAN_REALTYPE   float
#define GAN_FWRITE_LENDIAN   gan_fwrite_lendian_f32
#define GAN_FREAD_LENDIAN   gan_fread_lendian_f32
#define GAN_VEC_FPRINT   gan_vec2f_fprint
#define GAN_VEC_PRINT   gan_vec2f_print
#define GAN_VEC_FSCANF   gan_vec2f_fscanf
#define GAN_VEC_FWRITE   gan_vec2f_fwrite
#define GAN_VEC_FREAD   gan_vec2f_fread
#define GAN_VEC_ZERO_Q   gan_vec2f_zero_q
#define GAN_VEC_ZERO_S   gan_vec2f_zero_s
#define GAN_VEC_COPY_Q   gan_vec2f_copy_q
#define GAN_VEC_COPY_S   gan_vec2f_copy_s
#define GAN_VEC_SCALE_Q   gan_vec2f_scale_q
#define GAN_VEC_SCALE_S   gan_vec2f_scale_s
#define GAN_VEC_SCALE_I   gan_vec2f_scale_i
#define GAN_VEC_DIVIDE_Q   gan_vec2f_divide_q
#define GAN_VEC_DIVIDE_S   gan_vec2f_divide_s
#define GAN_VEC_DIVIDE_I   gan_vec2f_divide_i
#define GAN_VEC_NEGATE_Q   gan_vec2f_negate_q
#define GAN_VEC_NEGATE_S   gan_vec2f_negate_s
#define GAN_VEC_NEGATE_I   gan_vec2f_negate_i
#define GAN_VEC_UNIT_Q   gan_vec2f_unit_q
#define GAN_VEC_UNIT_S   gan_vec2f_unit_s
#define GAN_VEC_UNIT_I   gan_vec2f_unit_i
#define GAN_VEC_ADD_Q   gan_vec2f_add_q
#define GAN_VEC_ADD_I1   gan_vec2f_add_i1
#define GAN_VEC_ADD_I2   gan_vec2f_add_i2
#define GAN_VEC_INCREMENT   gan_vec2f_increment
#define GAN_VEC_ADD_S   gan_vec2f_add_s
#define GAN_VEC_SUB_Q   gan_vec2f_sub_q
#define GAN_VEC_SUB_I1   gan_vec2f_sub_i1
#define GAN_VEC_SUB_I2   gan_vec2f_sub_i2
#define GAN_VEC_DECREMENT   gan_vec2f_decrement
#define GAN_VEC_SUB_S   gan_vec2f_sub_s
#define GAN_VEC_DOT_Q   gan_vec2f_dot_q
#define GAN_VEC_DOT_S   gan_vec2f_dot_s
#define GAN_VEC_SQRLEN_Q   gan_vec2f_sqrlen_q
#define GAN_VEC_SQRLEN_S   gan_vec2f_sqrlen_s
#define GAN_VEC_FROM_VEC_Q   gan_vec2f_from_vecf_q
#define GAN_VEC_FROM_VEC_S   gan_vec2f_from_vecf_s

Typedefs

typedef Gan_Vector2_f Gan_Vector2_f
 Structure definition for single precision floating point 2-vector.

Functions

Gan_Vector2_fgan_vec2f_fill_q (Gan_Vector2_f *p, float X, float Y)
 Macro: Fill 2-vector with values.
Gan_Vector2_fgan_vec2f_zero_q (Gan_Vector2_f *p)
 Macro: Fill fixed size vector with zero.
Gan_Vector2_fgan_vec2f_copy_q (Gan_Vector2_f *p, Gan_Vector2_f *q)
 Macro: Copy fixed size vector.
Gan_Vector2_fgan_vec2f_scale_q (Gan_Vector2_f *p, float a, Gan_Vector2_f *q)
 Macro: Scale fixed size vector.
Gan_Vector2_fgan_vec2f_scale_i (Gan_Vector2_f *p, float a)
 Macro: Scale fixed size vector.
Gan_Vector2_fgan_vec2f_divide_q (Gan_Vector2_f *p, float a, Gan_Vector2_f *q)
 Macro: Divide fixed size vector by scalar.
Gan_Vector2_fgan_vec2f_divide_i (Gan_Vector2_f *p, float a)
 Macro: Divide fixed size vector by scalar.
Gan_Vector2_fgan_vec2f_negate_q (Gan_Vector2_f *p, Gan_Vector2_f *q)
 Macro: Negate fixed size vector.
Gan_Vector2_fgan_vec2f_negate_i (Gan_Vector2_f *p)
 Macro: Negate fixed size vector.
Gan_Vector2_fgan_vec2f_unit_i (Gan_Vector2_f *p)
 Macro: Scale vector to unit norm.
Gan_Vector2_fgan_vec2f_add_q (Gan_Vector2_f *p, Gan_Vector2_f *q, Gan_Vector2_f *r)
 Macro: Add two fixed size vectors.
Gan_Vector2_fgan_vec2f_add_i1 (Gan_Vector2_f *p, Gan_Vector2_f *q)
 Macro: Add two fixed size vectors.
Gan_Vector2_fgan_vec2f_add_i2 (Gan_Vector2_f *p, Gan_Vector2_f *q)
 Macro: Add two fixed size vectors.
Gan_Vector2_fgan_vec2f_increment (Gan_Vector2_f *p, Gan_Vector2_f *q)
 Macro: Increment a fixed size vector by another.
Gan_Vector2_fgan_vec2f_sub_q (Gan_Vector2_f *p, Gan_Vector2_f *q, Gan_Vector2_f *r)
 Macro: Subtract two fixed size vectors.
Gan_Vector2_fgan_vec2f_sub_i1 (Gan_Vector2_f *p, Gan_Vector2_f *q)
 Macro: Subtract two fixed size vectors.
Gan_Vector2_fgan_vec2f_sub_i2 (Gan_Vector2_f *p, Gan_Vector2_f *q)
 Macro: Subtract two fixed size vectors.
Gan_Vector2_fgan_vec2f_decrement (Gan_Vector2_f *p, Gan_Vector2_f *q)
 Macro: Decrement a fixed size vector by another.
float gan_vec2f_dot_q (const Gan_Vector2_f *p, const Gan_Vector2_f *q)
 Macro: Dot product of fixed size vectors.
float gan_vec2f_sqrlen_q (const Gan_Vector2_f *p)
 Macro: Returns sum of squares of vector elements.


Detailed Description

Module: Size 2 vectors (single precision)

Part of: Gandalf Library

Version:
1.10
Date:
2005/04/15 02:15:23
Author:
pm
Copyright: (c) 2000 Imagineer Software Limited

Define Documentation

#define GAN_REP2_AS a,
b,
p1,
p2   )     (a p1 b, a p2 b)
 

File:

RCSfile
repeat2_noc.h,v
Module: Macros for 2-fold repetition of vector/matrix operations Part of: Gandalf Library

Revision:

Revision
1.5
Last edited:
Date
2002/04/18 14:56:25
Author:
Author
pm
Copyright: (c) 2000 Imagineer Software Limited

Notes: Not to be compiled separately

#define GAN_TEST_OP1 A,
typeA   )     assert(sizeof(*(A))==sizeof(typeA))
 

File:

RCSfile
matvecf_macros_noc.h,v
Module: Matrix/vector macros Part of: Gandalf Library

Revision:

Revision
1.6
Last edited:
Date
2002/04/18 14:56:25
Author:
Author
pm
Copyright: (c) 2000 Imagineer Software Limited

Notes: Not to be compiled separately

#define GAN_TEST_OP3 A,
B,
C,
typeA,
typeB,
typeC   ) 
 

Value:

(assert(sizeof(*(A))==sizeof(typeA)&&sizeof(*(B))==sizeof(typeB)&&\
          sizeof(*(C))==sizeof(typeC)))

#define GAN_TEST_OP4 A,
B,
C,
D,
typeA,
typeB,
typeC,
typeD   ) 
 

Value:

(assert(sizeof(*(A))==sizeof(typeA)&&sizeof(*(B))==sizeof(typeB)&&\
          sizeof(*(C))==sizeof(typeC)&&sizeof(*(D))==sizeof(typeD)))

#define GAN_TEST_OP5 A,
B,
C,
D,
E,
typeA,
typeB,
typeC,
typeD,
typeE   ) 
 

Value:

(assert(sizeof(*(A))==sizeof(typeA)&&sizeof(*(B))==sizeof(typeB)&&\
          sizeof(*(C))==sizeof(typeC)&&sizeof(*(D))==sizeof(typeD)&&\
          sizeof(*(E))==sizeof(typeE)))


Generated on Fri Mar 17 12:44:48 2006 by  doxygen 1.3.9.1