bazar  1.3.1
Public Member Functions | Public Attributes | List of all members
Vec3 Struct Reference

#include <matvec.h>

Public Member Functions

 Vec3 ()
 Vec3 (const double p[3])
 Vec3 (double x, double y, double z)
double & operator[] (int i)
const double & operator[] (int i) const
const Vec3operator= (const Vec3 &a)
void mul (double scalar)
double norm () const
void normalize ()
void setMul (const Mat3x4 &mat, const Vec3 &v)
void setSub (const Vec3 &a, const Vec3 &b)
void setAdd (const Vec3 &a, const Vec3 &b)
void sub (const Vec3 &a)
void add (const Vec3 &a)
void setCross (const Vec3 &a, const Vec3 &b)
void set (double x, double y, double z)
void set (double *a)
double dot (const Vec3 &a)

Public Attributes

double v [3]

Detailed Description

Examples:
multigl.cpp.

Definition at line 11 of file matvec.h.

Constructor & Destructor Documentation

Vec3::Vec3 ( )
inline

Definition at line 14 of file matvec.h.

Vec3::Vec3 ( const double  p[3])
inline

Definition at line 15 of file matvec.h.

References v.

Vec3::Vec3 ( double  x,
double  y,
double  z 
)
inline

Definition at line 16 of file matvec.h.

References v.

Member Function Documentation

void Vec3::add ( const Vec3 a)
inline

Definition at line 43 of file matvec.h.

References v.

double Vec3::dot ( const Vec3 a)
inline

Definition at line 54 of file matvec.h.

References v.

void Vec3::mul ( double  scalar)
inline

Definition at line 25 of file matvec.h.

References v.

Referenced by normalize().

double Vec3::norm ( ) const
inline

Definition at line 31 of file matvec.h.

References v.

Referenced by normalize().

void Vec3::normalize ( )
inline

Definition at line 32 of file matvec.h.

References mul(), and norm().

Referenced by PerspectiveCamera::setByTarget().

const Vec3& Vec3::operator= ( const Vec3 a)
inline

Definition at line 21 of file matvec.h.

References v.

double& Vec3::operator[] ( int  i)
inline

Definition at line 18 of file matvec.h.

References v.

const double& Vec3::operator[] ( int  i) const
inline

Definition at line 19 of file matvec.h.

References v.

void Vec3::set ( double  x,
double  y,
double  z 
)
inline

Definition at line 51 of file matvec.h.

References v.

void Vec3::set ( double *  a)
inline

Definition at line 52 of file matvec.h.

References v.

void Vec3::setAdd ( const Vec3 a,
const Vec3 b 
)
inline

Definition at line 39 of file matvec.h.

References v.

void Vec3::setCross ( const Vec3 a,
const Vec3 b 
)
inline

Definition at line 45 of file matvec.h.

References v.

Referenced by PerspectiveCamera::setByTarget().

void Vec3::setMul ( const Mat3x4 mat,
const Vec3 v 
)
void Vec3::setSub ( const Vec3 a,
const Vec3 b 
)
inline

Definition at line 36 of file matvec.h.

References v.

Referenced by PerspectiveCamera::setByTarget().

void Vec3::sub ( const Vec3 a)
inline

Definition at line 42 of file matvec.h.

References v.

Member Data Documentation

double Vec3::v[3]

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