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

#include <Math.hpp>

Inherits FW::VectorBase< F32, 2, Vec2f >, and float2.

Public Member Functions

FW_CUDA_FUNC Vec2f (void)
 
FW_CUDA_FUNC Vec2f (F32 a)
 
FW_CUDA_FUNC Vec2f (F32 xx, F32 yy)
 
FW_CUDA_FUNC Vec2f (const Vec2i &v)
 
FW_CUDA_FUNC const F32getPtr (void) const
 
FW_CUDA_FUNC F32getPtr (void)
 
FW_CUDA_FUNC operator Vec2i (void) const
 
FW_CUDA_FUNC Vec2f perpendicular (void) const
 
FW_CUDA_FUNC F32 cross (const Vec2f &v) const
 
template<class V >
FW_CUDA_FUNC Vec2f (const VectorBase< F32, 2, V > &v)
 
template<class V >
FW_CUDA_FUNC Vec2foperator= (const VectorBase< F32, 2, V > &v)
 
- Public Member Functions inherited from FW::VectorBase< F32, 2, Vec2f >
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 Vec2f normalized (F32len=(F32) 1) const
 
FW_CUDA_FUNC void normalize (F32len=(F32) 1)
 
FW_CUDA_FUNC F32 min (void) const
 
FW_CUDA_FUNC Vec2f min (const VectorBase< F32, L, V > &v) const
 
FW_CUDA_FUNC F32 max (void) const
 
FW_CUDA_FUNC Vec2f max (const VectorBase< F32, L, V > &v) const
 
FW_CUDA_FUNC F32 sum (void) const
 
FW_CUDA_FUNC Vec2f 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 Vec2foperator= (const F32 &a)
 
FW_CUDA_FUNC Vec2foperator= (const VectorBase< F32, L, V > &v)
 
FW_CUDA_FUNC Vec2foperator+= (const F32 &a)
 
FW_CUDA_FUNC Vec2foperator+= (const VectorBase< F32, L, V > &v)
 
FW_CUDA_FUNC Vec2foperator-= (const F32 &a)
 
FW_CUDA_FUNC Vec2foperator-= (const VectorBase< F32, L, V > &v)
 
FW_CUDA_FUNC Vec2foperator*= (const F32 &a)
 
FW_CUDA_FUNC Vec2foperator*= (const VectorBase< F32, L, V > &v)
 
FW_CUDA_FUNC Vec2foperator/= (const F32 &a)
 
FW_CUDA_FUNC Vec2foperator/= (const VectorBase< F32, L, V > &v)
 
FW_CUDA_FUNC Vec2foperator%= (const F32 &a)
 
FW_CUDA_FUNC Vec2foperator%= (const VectorBase< F32, L, V > &v)
 
FW_CUDA_FUNC Vec2foperator&= (const F32 &a)
 
FW_CUDA_FUNC Vec2foperator&= (const VectorBase< F32, L, V > &v)
 
FW_CUDA_FUNC Vec2foperator|= (const F32 &a)
 
FW_CUDA_FUNC Vec2foperator|= (const VectorBase< F32, L, V > &v)
 
FW_CUDA_FUNC Vec2foperator^= (const F32 &a)
 
FW_CUDA_FUNC Vec2foperator^= (const VectorBase< F32, L, V > &v)
 
FW_CUDA_FUNC Vec2foperator<<= (const F32 &a)
 
FW_CUDA_FUNC Vec2foperator<<= (const VectorBase< F32, L, V > &v)
 
FW_CUDA_FUNC Vec2foperator>>= (const F32 &a)
 
FW_CUDA_FUNC Vec2foperator>>= (const VectorBase< F32, L, V > &v)
 
FW_CUDA_FUNC Vec2f operator+ (void) const
 
FW_CUDA_FUNC Vec2f operator+ (const F32 &a) const
 
FW_CUDA_FUNC Vec2f operator+ (const VectorBase< F32, L, V > &v) const
 
FW_CUDA_FUNC Vec2f operator- (void) const
 
FW_CUDA_FUNC Vec2f operator- (const F32 &a) const
 
FW_CUDA_FUNC Vec2f operator- (const VectorBase< F32, L, V > &v) const
 
FW_CUDA_FUNC Vec2f operator~ (void) const
 
FW_CUDA_FUNC Vec2f operator* (const F32 &a) const
 
FW_CUDA_FUNC Vec2f operator* (const VectorBase< F32, L, V > &v) const
 
FW_CUDA_FUNC Vec2f operator/ (const F32 &a) const
 
FW_CUDA_FUNC Vec2f operator/ (const VectorBase< F32, L, V > &v) const
 
FW_CUDA_FUNC Vec2f operator% (const F32 &a) const
 
FW_CUDA_FUNC Vec2f operator% (const VectorBase< F32, L, V > &v) const
 
FW_CUDA_FUNC Vec2f operator& (const F32 &a) const
 
FW_CUDA_FUNC Vec2f operator& (const VectorBase< F32, L, V > &v) const
 
FW_CUDA_FUNC Vec2f operator| (const F32 &a) const
 
FW_CUDA_FUNC Vec2f operator| (const VectorBase< F32, L, V > &v) const
 
FW_CUDA_FUNC Vec2f operator^ (const F32 &a) const
 
FW_CUDA_FUNC Vec2f operator^ (const VectorBase< F32, L, V > &v) const
 
FW_CUDA_FUNC Vec2f operator<< (const F32 &a) const
 
FW_CUDA_FUNC Vec2f operator<< (const VectorBase< F32, L, V > &v) const
 
FW_CUDA_FUNC Vec2f operator>> (const F32 &a) const
 
FW_CUDA_FUNC Vec2f operator>> (const VectorBase< F32, L, V > &v) const
 
FW_CUDA_FUNC F32 dot (const VectorBase< F32, L, V > &v) const
 
FW_CUDA_FUNC Vec2f 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 Vec2f fromPtr (const F32 *ptr)
 

Detailed Description

Definition at line 301 of file Math.hpp.

Constructor & Destructor Documentation

FW_CUDA_FUNC FW::Vec2f::Vec2f ( void  )
inline

Definition at line 304 of file Math.hpp.

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

Definition at line 305 of file Math.hpp.

FW_CUDA_FUNC FW::Vec2f::Vec2f ( F32  xx,
F32  yy 
)
inline

Definition at line 306 of file Math.hpp.

FW_CUDA_FUNC FW::Vec2f::Vec2f ( const Vec2i v)
inline

Definition at line 307 of file Math.hpp.

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

Definition at line 318 of file Math.hpp.

Member Function Documentation

FW_CUDA_FUNC F32 FW::Vec2f::cross ( const Vec2f v) const
inline

Definition at line 316 of file Math.hpp.

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

Definition at line 311 of file Math.hpp.

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

Definition at line 309 of file Math.hpp.

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

Definition at line 310 of file Math.hpp.

FW_CUDA_FUNC FW::Vec2f::operator Vec2i ( void  ) const
inline

Definition at line 313 of file Math.hpp.

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

Definition at line 319 of file Math.hpp.

FW_CUDA_FUNC Vec2f FW::Vec2f::perpendicular ( void  ) const
inline

Definition at line 315 of file Math.hpp.


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