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

#include <Math.hpp>

Inherits FW::VectorBase< S32, 2, Vec2i >, and int2.

Public Member Functions

FW_CUDA_FUNC Vec2i (void)
 
FW_CUDA_FUNC Vec2i (S32 a)
 
FW_CUDA_FUNC Vec2i (S32 xx, S32 yy)
 
FW_CUDA_FUNC const S32getPtr (void) const
 
FW_CUDA_FUNC S32getPtr (void)
 
FW_CUDA_FUNC Vec2i perpendicular (void) const
 
template<class V >
FW_CUDA_FUNC Vec2i (const VectorBase< S32, 2, V > &v)
 
template<class V >
FW_CUDA_FUNC Vec2ioperator= (const VectorBase< S32, 2, V > &v)
 
- Public Member Functions inherited from FW::VectorBase< S32, 2, Vec2i >
FW_CUDA_FUNC VectorBase (void)
 
FW_CUDA_FUNC const S32getPtr (void) const
 
FW_CUDA_FUNC S32getPtr (void)
 
FW_CUDA_FUNC const S32get (int idx) const
 
FW_CUDA_FUNC S32get (int idx)
 
FW_CUDA_FUNC S32 set (int idx, const S32 &a)
 
FW_CUDA_FUNC void set (const S32 &a)
 
FW_CUDA_FUNC void set (const S32 *ptr)
 
FW_CUDA_FUNC void set (const VectorBase< S32, 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 S32 lenSqr (void) const
 
FW_CUDA_FUNC S32 length (void) const
 
FW_CUDA_FUNC Vec2i normalized (S32len=(S32) 1) const
 
FW_CUDA_FUNC void normalize (S32len=(S32) 1)
 
FW_CUDA_FUNC S32 min (void) const
 
FW_CUDA_FUNC Vec2i min (const VectorBase< S32, L, V > &v) const
 
FW_CUDA_FUNC S32 max (void) const
 
FW_CUDA_FUNC Vec2i max (const VectorBase< S32, L, V > &v) const
 
FW_CUDA_FUNC S32 sum (void) const
 
FW_CUDA_FUNC Vec2i abs (void) const
 
FW_CUDA_FUNC Vector< S32, L+1 > toHomogeneous (void) const
 
FW_CUDA_FUNC Vector< S32, L-1 > toCartesian (void) const
 
FW_CUDA_FUNC const S32operator[] (int idx) const
 
FW_CUDA_FUNC S32operator[] (int idx)
 
FW_CUDA_FUNC Vec2ioperator= (const S32 &a)
 
FW_CUDA_FUNC Vec2ioperator= (const VectorBase< S32, L, V > &v)
 
FW_CUDA_FUNC Vec2ioperator+= (const S32 &a)
 
FW_CUDA_FUNC Vec2ioperator+= (const VectorBase< S32, L, V > &v)
 
FW_CUDA_FUNC Vec2ioperator-= (const S32 &a)
 
FW_CUDA_FUNC Vec2ioperator-= (const VectorBase< S32, L, V > &v)
 
FW_CUDA_FUNC Vec2ioperator*= (const S32 &a)
 
FW_CUDA_FUNC Vec2ioperator*= (const VectorBase< S32, L, V > &v)
 
FW_CUDA_FUNC Vec2ioperator/= (const S32 &a)
 
FW_CUDA_FUNC Vec2ioperator/= (const VectorBase< S32, L, V > &v)
 
FW_CUDA_FUNC Vec2ioperator%= (const S32 &a)
 
FW_CUDA_FUNC Vec2ioperator%= (const VectorBase< S32, L, V > &v)
 
FW_CUDA_FUNC Vec2ioperator&= (const S32 &a)
 
FW_CUDA_FUNC Vec2ioperator&= (const VectorBase< S32, L, V > &v)
 
FW_CUDA_FUNC Vec2ioperator|= (const S32 &a)
 
FW_CUDA_FUNC Vec2ioperator|= (const VectorBase< S32, L, V > &v)
 
FW_CUDA_FUNC Vec2ioperator^= (const S32 &a)
 
FW_CUDA_FUNC Vec2ioperator^= (const VectorBase< S32, L, V > &v)
 
FW_CUDA_FUNC Vec2ioperator<<= (const S32 &a)
 
FW_CUDA_FUNC Vec2ioperator<<= (const VectorBase< S32, L, V > &v)
 
FW_CUDA_FUNC Vec2ioperator>>= (const S32 &a)
 
FW_CUDA_FUNC Vec2ioperator>>= (const VectorBase< S32, L, V > &v)
 
FW_CUDA_FUNC Vec2i operator+ (void) const
 
FW_CUDA_FUNC Vec2i operator+ (const S32 &a) const
 
FW_CUDA_FUNC Vec2i operator+ (const VectorBase< S32, L, V > &v) const
 
FW_CUDA_FUNC Vec2i operator- (void) const
 
FW_CUDA_FUNC Vec2i operator- (const S32 &a) const
 
FW_CUDA_FUNC Vec2i operator- (const VectorBase< S32, L, V > &v) const
 
FW_CUDA_FUNC Vec2i operator~ (void) const
 
FW_CUDA_FUNC Vec2i operator* (const S32 &a) const
 
FW_CUDA_FUNC Vec2i operator* (const VectorBase< S32, L, V > &v) const
 
FW_CUDA_FUNC Vec2i operator/ (const S32 &a) const
 
FW_CUDA_FUNC Vec2i operator/ (const VectorBase< S32, L, V > &v) const
 
FW_CUDA_FUNC Vec2i operator% (const S32 &a) const
 
FW_CUDA_FUNC Vec2i operator% (const VectorBase< S32, L, V > &v) const
 
FW_CUDA_FUNC Vec2i operator& (const S32 &a) const
 
FW_CUDA_FUNC Vec2i operator& (const VectorBase< S32, L, V > &v) const
 
FW_CUDA_FUNC Vec2i operator| (const S32 &a) const
 
FW_CUDA_FUNC Vec2i operator| (const VectorBase< S32, L, V > &v) const
 
FW_CUDA_FUNC Vec2i operator^ (const S32 &a) const
 
FW_CUDA_FUNC Vec2i operator^ (const VectorBase< S32, L, V > &v) const
 
FW_CUDA_FUNC Vec2i operator<< (const S32 &a) const
 
FW_CUDA_FUNC Vec2i operator<< (const VectorBase< S32, L, V > &v) const
 
FW_CUDA_FUNC Vec2i operator>> (const S32 &a) const
 
FW_CUDA_FUNC Vec2i operator>> (const VectorBase< S32, L, V > &v) const
 
FW_CUDA_FUNC S32 dot (const VectorBase< S32, L, V > &v) const
 
FW_CUDA_FUNC Vec2i clamp (const VectorBase< S32, L, V > &lo, const VectorBase< S32, L, W > &hi) const
 
FW_CUDA_FUNC bool operator== (const VectorBase< S32, L, V > &v) const
 
FW_CUDA_FUNC bool operator!= (const VectorBase< S32, L, V > &v) const
 

Static Public Member Functions

static FW_CUDA_FUNC Vec2i fromPtr (const S32 *ptr)
 

Detailed Description

Definition at line 238 of file Math.hpp.

Constructor & Destructor Documentation

FW_CUDA_FUNC FW::Vec2i::Vec2i ( void  )
inline

Definition at line 241 of file Math.hpp.

FW_CUDA_FUNC FW::Vec2i::Vec2i ( S32  a)
inline

Definition at line 242 of file Math.hpp.

FW_CUDA_FUNC FW::Vec2i::Vec2i ( S32  xx,
S32  yy 
)
inline

Definition at line 243 of file Math.hpp.

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

Definition at line 251 of file Math.hpp.

Member Function Documentation

static FW_CUDA_FUNC Vec2i FW::Vec2i::fromPtr ( const S32 ptr)
inlinestatic

Definition at line 247 of file Math.hpp.

FW_CUDA_FUNC const S32* FW::Vec2i::getPtr ( void  ) const
inline

Definition at line 245 of file Math.hpp.

FW_CUDA_FUNC S32* FW::Vec2i::getPtr ( void  )
inline

Definition at line 246 of file Math.hpp.

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

Definition at line 252 of file Math.hpp.

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

Definition at line 249 of file Math.hpp.


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