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

#include <Math.hpp>

Inherits FW::VectorBase< F32, 3, Vec3f >, and float3.

Public Member Functions

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

Detailed Description

Definition at line 324 of file Math.hpp.

Constructor & Destructor Documentation

FW_CUDA_FUNC FW::Vec3f::Vec3f ( void  )
inline

Definition at line 327 of file Math.hpp.

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

Definition at line 328 of file Math.hpp.

FW_CUDA_FUNC FW::Vec3f::Vec3f ( F32  xx,
F32  yy,
F32  zz 
)
inline

Definition at line 329 of file Math.hpp.

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

Definition at line 330 of file Math.hpp.

FW_CUDA_FUNC FW::Vec3f::Vec3f ( const Vec3i v)
inline

Definition at line 331 of file Math.hpp.

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

Definition at line 342 of file Math.hpp.

Member Function Documentation

FW_CUDA_FUNC Vec3f FW::Vec3f::cross ( const Vec3f v) const
inline

Definition at line 340 of file Math.hpp.

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

Definition at line 335 of file Math.hpp.

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

Definition at line 333 of file Math.hpp.

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

Definition at line 334 of file Math.hpp.

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

Definition at line 338 of file Math.hpp.

FW_CUDA_FUNC FW::Vec3f::operator Vec3i ( void  ) const
inline

Definition at line 337 of file Math.hpp.

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

Definition at line 343 of file Math.hpp.


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