40   explicit FXVec4f(FXfloat d):x(d),y(d),z(d),w(d){}
    49   FXVec4f(
const FXfloat v[]):x(v[0]),y(v[1]),z(v[2]),w(v[3]){}
    52   FXVec4f(FXfloat xx,FXfloat yy,FXfloat zz,FXfloat ww):x(xx),y(yy),z(zz),w(ww){}
    58   const FXfloat& 
operator[](FXint i)
 const {
return (&x)[i];}
    67   FXVec4f& 
set(FXfloat d){x=d;y=d;z=d;w=d;
return *
this;}
    70   FXVec4f& 
set(FXfloat xx,FXfloat yy,FXfloat zz,FXfloat ww){x=xx;y=yy;z=zz;w=ww;
return *
this;}
    76   FXVec4f& 
set(
const FXfloat v[]){x=v[0];y=v[1];z=v[2];w=v[3];
return *
this;}
    80   FXVec4f& operator/=(FXfloat n){ 
return set(x/n,y/n,z/n,w/n); }
    84   FXVec4f& operator-=(
const FXVec4f& v){ 
return set(x-v.x,y-v.y,z-v.z,w-v.w); }
    85   FXVec4f& operator%=(
const FXVec4f& v){ 
return set(x*v.x,y*v.y,z*v.z,w*v.w); }
    86   FXVec4f& operator/=(
const FXVec4f& v){ 
return set(x/v.x,y/v.y,z/v.z,w/v.w); }
    89   operator FXfloat*(){
return &x;}
    90   operator const FXfloat*() 
const {
return &x;}
    91   operator FXVec3f&(){
return *
reinterpret_cast<FXVec3f*
>(
this);}
    92   operator const FXVec3f&() 
const {
return *
reinterpret_cast<const FXVec3f*
>(
this);}
    95   FXbool 
operator!()
 const { 
return x==0.0f && y==0.0f && z==0.0f && w==0.0f; }
   102   FXfloat 
length2()
 const { 
return w*w+z*z+y*y+x*x; }
   103   FXfloat length()
 const { 
return Math::sqrt(length2()); }
   106   FXfloat distance(
const FXVec3f& p) 
const;
   109   FXbool crosses(
const FXVec3f& a,
const FXVec3f& b) 
const;
   117 static inline FXfloat operator*(
const FXVec4f& a,
const FXVec4f& b){ 
return a.x*b.x+a.y*b.y+a.z*b.z+a.w*b.w; }
   120 static inline FXVec4f operator*(
const FXVec4f& a,FXfloat n){
return FXVec4f(a.x*n,a.y*n,a.z*n,a.w*n);}
   121 static inline FXVec4f operator*(FXfloat n,
const FXVec4f& a){
return FXVec4f(n*a.x,n*a.y,n*a.z,n*a.w);}
   122 static inline FXVec4f operator/(
const FXVec4f& a,FXfloat n){
return FXVec4f(a.x/n,a.y/n,a.z/n,a.w/n);}
   123 static inline FXVec4f operator/(FXfloat n,
const FXVec4f& a){
return FXVec4f(n/a.x,n/a.y,n/a.z,n/a.w);}
   126 static inline FXVec4f operator+(
const FXVec4f& a,
const FXVec4f& b){ 
return FXVec4f(a.x+b.x,a.y+b.y,a.z+b.z,a.w+b.w); }
   127 static inline FXVec4f operator-(
const FXVec4f& a,
const FXVec4f& b){ 
return FXVec4f(a.x-b.x,a.y-b.y,a.z-b.z,a.w-b.w); }
   130 static inline FXVec4f operator%(
const FXVec4f& a,
const FXVec4f& b){ 
return FXVec4f(a.x*b.x,a.y*b.y,a.z*b.z,a.w*b.w); }
   131 static inline FXVec4f operator/(
const FXVec4f& a,
const FXVec4f& b){ 
return FXVec4f(a.x/b.x,a.y/b.y,a.z/b.z,a.w/b.w); }
   134 static inline FXbool operator==(
const FXVec4f& a,FXfloat n){
return a.x==n && a.y==n && a.z==n && a.w==n;}
   135 static inline FXbool operator!=(
const FXVec4f& a,FXfloat n){
return a.x!=n || a.y!=n || a.z!=n || a.w!=n;}
   136 static inline FXbool operator==(FXfloat n,
const FXVec4f& a){
return n==a.x && n==a.y && n==a.z && n==a.w;}
   137 static inline FXbool operator!=(FXfloat n,
const FXVec4f& a){
return n!=a.x || n!=a.y || n!=a.z || n!=a.w;}
   140 static inline FXbool operator==(
const FXVec4f& a,
const FXVec4f& b){ 
return a.x==b.x && a.y==b.y && a.z==b.z && a.w==b.w; }
   141 static inline FXbool operator!=(
const FXVec4f& a,
const FXVec4f& b){ 
return a.x!=b.x || a.y!=b.y || a.z!=b.z || a.w!=b.w; }
   144 static inline FXbool operator<(
const FXVec4f& a,FXfloat n){
return a.x<n && a.y<n && a.z<n && a.w<n;}
   145 static inline FXbool operator<=(
const FXVec4f& a,FXfloat n){
return a.x<=n && a.y<=n && a.z<=n && a.w<=n;}
   146 static inline FXbool operator>(
const FXVec4f& a,FXfloat n){
return a.x>n && a.y>n && a.z>n && a.w>n;}
   147 static inline FXbool operator>=(
const FXVec4f& a,FXfloat n){
return a.x>=n && a.y>=n && a.z>=n && a.w>=n;}
   150 static inline FXbool operator<(FXfloat n,
const FXVec4f& a){
return n<a.x && n<a.y && n<a.z && n<a.w;}
   151 static inline FXbool operator<=(FXfloat n,
const FXVec4f& a){
return n<=a.x && n<=a.y && n<=a.z && n<=a.w;}
   152 static inline FXbool operator>(FXfloat n,
const FXVec4f& a){
return n>a.x && n>a.y && n>a.z && n>a.w;}
   153 static inline FXbool operator>=(FXfloat n,
const FXVec4f& a){
return n>=a.x && n>=a.y && n>=a.z && n>=a.w;}
   156 static inline FXbool operator<(
const FXVec4f& a,
const FXVec4f& b){ 
return a.x<b.x && a.y<b.y && a.z<b.z && a.w<b.w; }
   157 static inline FXbool operator<=(
const FXVec4f& a,
const FXVec4f& b){ 
return a.x<=b.x && a.y<=b.y && a.z<=b.z && a.w<=b.w; }
   158 static inline FXbool operator>(
const FXVec4f& a,
const FXVec4f& b){ 
return a.x>b.x && a.y>b.y && a.z>b.z && a.w>b.w; }
   159 static inline FXbool operator>=(
const FXVec4f& a,
const FXVec4f& b){ 
return a.x>=b.x && a.y>=b.y && a.z>=b.z && a.w>=b.w; }
   162 static inline FXVec4f lo(
const FXVec4f& a,
const FXVec4f& b){
return FXVec4f(Math::fmin(a.x,b.x),Math::fmin(a.y,b.y),Math::fmin(a.z,b.z),Math::fmin(a.w,b.w));}
   163 static inline FXVec4f lo(
const FXVec4f& a,FXfloat n){
return FXVec4f(Math::fmin(a.x,n),Math::fmin(a.y,n),Math::fmin(a.z,n),Math::fmin(a.w,n));}
   164 static inline FXVec4f lo(FXfloat n,
const FXVec4f& b){
return FXVec4f(Math::fmin(n,b.x),Math::fmin(n,b.y),Math::fmin(n,b.z),Math::fmin(n,b.w));}
   167 static inline FXVec4f hi(
const FXVec4f& a,
const FXVec4f& b){
return FXVec4f(Math::fmax(a.x,b.x),Math::fmax(a.y,b.y),Math::fmax(a.z,b.z),Math::fmax(a.w,b.w));}
   168 static inline FXVec4f hi(
const FXVec4f& a,FXfloat n){
return FXVec4f(Math::fmax(a.x,n),Math::fmax(a.y,n),Math::fmax(a.z,n),Math::fmax(a.w,n));}
   169 static inline FXVec4f hi(FXfloat n,
const FXVec4f& b){
return FXVec4f(Math::fmax(n,b.x),Math::fmax(n,b.y),Math::fmax(n,b.z),Math::fmax(n,b.w));}
   172 static inline FXVec4f clamp(FXfloat lower,
const FXVec4f& x,FXfloat upper){
return hi(lo(x,upper),lower);}
   175 static inline FXVec4f clamp(
const FXVec4f& x,FXfloat limit){
return hi(lo(x,limit),-limit);}
   178 static inline FXVec4f clamp(
const FXVec4f& lower,
const FXVec4f& x,
const FXVec4f& upper){
return hi(lo(x,upper),lower);}
   181 static inline FXVec4f clamp(
const FXVec4f& x,
const FXVec4f& limit){
return hi(lo(x,limit),-limit);}
   184 static inline FXVec4f abs(
const FXVec4f& a){
return FXVec4f(Math::fabs(a.x),Math::fabs(a.y),Math::fabs(a.z),Math::fabs(a.w));}
   187 static inline FXfloat max(
const FXVec4f& a){ 
return Math::fmax(Math::fmax(a.x,a.y),Math::fmax(a.z,a.w)); }
   190 static inline FXfloat min(
const FXVec4f& a){ 
return Math::fmin(Math::fmin(a.x,a.y),Math::fmin(a.z,a.w)); }
   193 static inline FXVec4f lerp(
const FXVec4f& u,
const FXVec4f& v,FXfloat f){
return (v-u)*f+u;}
   196 extern FXAPI FXVec4f plane(
const FXVec4f& vec);
   199 extern FXAPI FXVec4f plane(
const FXVec3f& vec,FXfloat dist);
   202 extern FXAPI FXVec4f plane(
const FXVec3f& vec,
const FXVec3f& p);
   205 extern FXAPI FXVec4f plane(
const FXVec3f& a,
const FXVec3f& b,
const FXVec3f& c);
   208 extern FXAPI FXColor colorFromVec4f(
const FXVec4f& vec);
   211 extern FXAPI FXVec4f colorToVec4f(FXColor clr);
   214 extern FXAPI FXVec4f normalize(
const FXVec4f& v);
   217 extern FXAPI FXStream& operator<<(FXStream& store,
const FXVec4f& v);
   220 extern FXAPI FXStream& operator>>(FXStream& store,FXVec4f& v);
 FXVec4f(const FXVec3f &v, FXfloat s=0.0f)
Construct with 3-vector. 
Definition: FXVec4f.h:43
 
FXVec4f()
Default constructor; value is not initialized. 
Definition: FXVec4f.h:37
 
const FXfloat & operator[](FXint i) const
Return a const reference to the ith element. 
Definition: FXVec4f.h:58
 
FXVec4f & operator*=(FXfloat n)
Assigning operators. 
Definition: FXVec4f.h:79
 
FXfloat length2() const
Length and square of length. 
Definition: FXVec4f.h:102
 
FXbool operator!() const
Test if zero. 
Definition: FXVec4f.h:95
 
~FXVec4f()
Destructor. 
Definition: FXVec4f.h:112
 
Definition: FX4Splitter.h:28
 
FXVec4f operator+() const
Unary. 
Definition: FXVec4f.h:98
 
FXVec4f & operator=(const FXVec4f &v)
Assignment. 
Definition: FXVec4f.h:61
 
FXVec4f(FXfloat d)
Initialize all components the same. 
Definition: FXVec4f.h:40
 
FXVec4f(const FXfloat v[])
Construct from array of floats. 
Definition: FXVec4f.h:49
 
Single-precision 3-element vector. 
Definition: FXVec3f.h:28
 
FXVec4f(const FXVec4f &v)
Initialize from another vector. 
Definition: FXVec4f.h:46
 
FXVec4f & operator+=(const FXVec4f &v)
Element-wise assigning operators. 
Definition: FXVec4f.h:83
 
FXVec4f & operator=(const FXfloat v[])
Assignment from array of floats. 
Definition: FXVec4f.h:64
 
FXVec4f(FXfloat xx, FXfloat yy, FXfloat zz, FXfloat ww)
Construct from components. 
Definition: FXVec4f.h:52
 
FXfloat & operator[](FXint i)
Return a non-const reference to the ith element. 
Definition: FXVec4f.h:55
 
Single-precision 4-element vector. 
Definition: FXVec4f.h:28