NTrace
GPU ray tracing framework
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
FW::Vec4f Class Reference

#include <Math.hpp>

Inherits FW::VectorBase< F32, 4, Vec4f >, and float4.

Public Member Functions

FW_CUDA_FUNC Vec4f (void)
 
FW_CUDA_FUNC Vec4f (F32 a)
 
FW_CUDA_FUNC Vec4f (F32 xx, F32 yy, F32 zz, F32 ww)
 
FW_CUDA_FUNC Vec4f (const Vec2f &xy, F32 zz, F32 ww)
 
FW_CUDA_FUNC Vec4f (const Vec3f &xyz, F32 ww)
 
FW_CUDA_FUNC Vec4f (const Vec2f &xy, const Vec2f &zw)
 
FW_CUDA_FUNC Vec4f (const Vec4i &v)
 
FW_CUDA_FUNC const F32getPtr (void) const
 
FW_CUDA_FUNC F32getPtr (void)
 
FW_CUDA_FUNC operator Vec4i (void) const
 
FW_CUDA_FUNC Vec2f getXY (void) const
 
FW_CUDA_FUNC Vec3f getXYZ (void) const
 
FW_CUDA_FUNC Vec3f getXYW (void) const
 
U32 toABGR (void) const
 
template<class V >
FW_CUDA_FUNC Vec4f (const VectorBase< F32, 4, V > &v)
 
template<class V >
FW_CUDA_FUNC Vec4foperator= (const VectorBase< F32, 4, V > &v)
 
- Public Member Functions inherited from FW::VectorBase< F32, 4, Vec4f >
FW_CUDA_FUNC VectorBase (void)
 
FW_CUDA_FUNC const F32getPtr (void) const
 
FW_CUDA_FUNC F32getPtr (void)
 
FW_CUDA_FUNC const F32get (int idx) const
 
FW_CUDA_FUNC F32get (int idx)
 
FW_CUDA_FUNC F32 set (int idx, const F32 &a)
 
FW_CUDA_FUNC void set (const F32 &a)
 
FW_CUDA_FUNC void set (const F32 *ptr)
 
FW_CUDA_FUNC void set (const VectorBase< F32, L, V > &v)
 
FW_CUDA_FUNC void setZero (void)
 
void print (void) const
 
void sprint (char *vec, size_t s) const
 
FW_CUDA_FUNC bool isZero (void) const
 
FW_CUDA_FUNC F32 lenSqr (void) const
 
FW_CUDA_FUNC F32 length (void) const
 
FW_CUDA_FUNC Vec4f normalized (F32len=(F32) 1) const
 
FW_CUDA_FUNC void normalize (F32len=(F32) 1)
 
FW_CUDA_FUNC F32 min (void) const
 
FW_CUDA_FUNC Vec4f min (const VectorBase< F32, L, V > &v) const
 
FW_CUDA_FUNC F32 max (void) const
 
FW_CUDA_FUNC Vec4f max (const VectorBase< F32, L, V > &v) const
 
FW_CUDA_FUNC F32 sum (void) const
 
FW_CUDA_FUNC Vec4f abs (void) const
 
FW_CUDA_FUNC Vector< F32, L+1 > toHomogeneous (void) const
 
FW_CUDA_FUNC Vector< F32, L-1 > toCartesian (void) const
 
FW_CUDA_FUNC const F32operator[] (int idx) const
 
FW_CUDA_FUNC F32operator[] (int idx)
 
FW_CUDA_FUNC Vec4foperator= (const F32 &a)
 
FW_CUDA_FUNC Vec4foperator= (const VectorBase< F32, L, V > &v)
 
FW_CUDA_FUNC Vec4foperator+= (const F32 &a)
 
FW_CUDA_FUNC Vec4foperator+= (const VectorBase< F32, L, V > &v)
 
FW_CUDA_FUNC Vec4foperator-= (const F32 &a)
 
FW_CUDA_FUNC Vec4foperator-= (const VectorBase< F32, L, V > &v)
 
FW_CUDA_FUNC Vec4foperator*= (const F32 &a)
 
FW_CUDA_FUNC Vec4foperator*= (const VectorBase< F32, L, V > &v)
 
FW_CUDA_FUNC Vec4foperator/= (const F32 &a)
 
FW_CUDA_FUNC Vec4foperator/= (const VectorBase< F32, L, V > &v)
 
FW_CUDA_FUNC Vec4foperator%= (const F32 &a)
 
FW_CUDA_FUNC Vec4foperator%= (const VectorBase< F32, L, V > &v)
 
FW_CUDA_FUNC Vec4foperator&= (const F32 &a)
 
FW_CUDA_FUNC Vec4foperator&= (const VectorBase< F32, L, V > &v)
 
FW_CUDA_FUNC Vec4foperator|= (const F32 &a)
 
FW_CUDA_FUNC Vec4foperator|= (const VectorBase< F32, L, V > &v)
 
FW_CUDA_FUNC Vec4foperator^= (const F32 &a)
 
FW_CUDA_FUNC Vec4foperator^= (const VectorBase< F32, L, V > &v)
 
FW_CUDA_FUNC Vec4foperator<<= (const F32 &a)
 
FW_CUDA_FUNC Vec4foperator<<= (const VectorBase< F32, L, V > &v)
 
FW_CUDA_FUNC Vec4foperator>>= (const F32 &a)
 
FW_CUDA_FUNC Vec4foperator>>= (const VectorBase< F32, L, V > &v)
 
FW_CUDA_FUNC Vec4f operator+ (void) const
 
FW_CUDA_FUNC Vec4f operator+ (const F32 &a) const
 
FW_CUDA_FUNC Vec4f operator+ (const VectorBase< F32, L, V > &v) const
 
FW_CUDA_FUNC Vec4f operator- (void) const
 
FW_CUDA_FUNC Vec4f operator- (const F32 &a) const
 
FW_CUDA_FUNC Vec4f operator- (const VectorBase< F32, L, V > &v) const
 
FW_CUDA_FUNC Vec4f operator~ (void) const
 
FW_CUDA_FUNC Vec4f operator* (const F32 &a) const
 
FW_CUDA_FUNC Vec4f operator* (const VectorBase< F32, L, V > &v) const
 
FW_CUDA_FUNC Vec4f operator/ (const F32 &a) const
 
FW_CUDA_FUNC Vec4f operator/ (const VectorBase< F32, L, V > &v) const
 
FW_CUDA_FUNC Vec4f operator% (const F32 &a) const
 
FW_CUDA_FUNC Vec4f operator% (const VectorBase< F32, L, V > &v) const
 
FW_CUDA_FUNC Vec4f operator& (const F32 &a) const
 
FW_CUDA_FUNC Vec4f operator& (const VectorBase< F32, L, V > &v) const
 
FW_CUDA_FUNC Vec4f operator| (const F32 &a) const
 
FW_CUDA_FUNC Vec4f operator| (const VectorBase< F32, L, V > &v) const
 
FW_CUDA_FUNC Vec4f operator^ (const F32 &a) const
 
FW_CUDA_FUNC Vec4f operator^ (const VectorBase< F32, L, V > &v) const
 
FW_CUDA_FUNC Vec4f operator<< (const F32 &a) const
 
FW_CUDA_FUNC Vec4f operator<< (const VectorBase< F32, L, V > &v) const
 
FW_CUDA_FUNC Vec4f operator>> (const F32 &a) const
 
FW_CUDA_FUNC Vec4f operator>> (const VectorBase< F32, L, V > &v) const
 
FW_CUDA_FUNC F32 dot (const VectorBase< F32, L, V > &v) const
 
FW_CUDA_FUNC Vec4f clamp (const VectorBase< F32, L, V > &lo, const VectorBase< F32, L, W > &hi) const
 
FW_CUDA_FUNC bool operator== (const VectorBase< F32, L, V > &v) const
 
FW_CUDA_FUNC bool operator!= (const VectorBase< F32, L, V > &v) const
 

Static Public Member Functions

static FW_CUDA_FUNC Vec4f fromPtr (const F32 *ptr)
 
static Vec4f fromABGR (U32 abgr)
 

Detailed Description

Definition at line 348 of file Math.hpp.

Constructor & Destructor Documentation

FW_CUDA_FUNC FW::Vec4f::Vec4f ( void  )
inline

Definition at line 351 of file Math.hpp.

FW_CUDA_FUNC FW::Vec4f::Vec4f ( F32  a)
inline

Definition at line 352 of file Math.hpp.

FW_CUDA_FUNC FW::Vec4f::Vec4f ( F32  xx,
F32  yy,
F32  zz,
F32  ww 
)
inline

Definition at line 353 of file Math.hpp.

FW_CUDA_FUNC FW::Vec4f::Vec4f ( const Vec2f xy,
F32  zz,
F32  ww 
)
inline

Definition at line 354 of file Math.hpp.

FW_CUDA_FUNC FW::Vec4f::Vec4f ( const Vec3f xyz,
F32  ww 
)
inline

Definition at line 355 of file Math.hpp.

FW_CUDA_FUNC FW::Vec4f::Vec4f ( const Vec2f xy,
const Vec2f zw 
)
inline

Definition at line 356 of file Math.hpp.

FW_CUDA_FUNC FW::Vec4f::Vec4f ( const Vec4i v)
inline

Definition at line 357 of file Math.hpp.

template<class V >
FW_CUDA_FUNC FW::Vec4f::Vec4f ( const VectorBase< F32, 4, V > &  v)
inline

Definition at line 373 of file Math.hpp.

Member Function Documentation

Vec4f Vec4f::fromABGR ( U32  abgr)
static

Definition at line 34 of file Math.cpp.

static FW_CUDA_FUNC Vec4f FW::Vec4f::fromPtr ( const F32 ptr)
inlinestatic

Definition at line 361 of file Math.hpp.

FW_CUDA_FUNC const F32* FW::Vec4f::getPtr ( void  ) const
inline

Definition at line 359 of file Math.hpp.

FW_CUDA_FUNC F32* FW::Vec4f::getPtr ( void  )
inline

Definition at line 360 of file Math.hpp.

FW_CUDA_FUNC Vec2f FW::Vec4f::getXY ( void  ) const
inline

Definition at line 364 of file Math.hpp.

FW_CUDA_FUNC Vec3f FW::Vec4f::getXYW ( void  ) const
inline

Definition at line 366 of file Math.hpp.

FW_CUDA_FUNC Vec3f FW::Vec4f::getXYZ ( void  ) const
inline

Definition at line 365 of file Math.hpp.

FW_CUDA_FUNC FW::Vec4f::operator Vec4i ( void  ) const
inline

Definition at line 363 of file Math.hpp.

template<class V >
FW_CUDA_FUNC Vec4f& FW::Vec4f::operator= ( const VectorBase< F32, 4, V > &  v)
inline

Definition at line 374 of file Math.hpp.

U32 Vec4f::toABGR ( void  ) const

Definition at line 45 of file Math.cpp.


The documentation for this class was generated from the following files: