Jafar
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Types | Public Member Functions | Public Attributes | Friends
jafar::model3d::Point3D Class Reference

We use Homogeneous coordinates (X,Y,Z,W), and be default W=1. More...


Detailed Description

We use Homogeneous coordinates (X,Y,Z,W), and be default W=1.

Definition at line 16 of file point3D.hpp.

#include <point3D.hpp>

Inheritance diagram for jafar::model3d::Point3D:
Inheritance graph
[legend]

List of all members.

Public Types

enum  STATE { BAD_POINT = 0, GOOD_POINT = 1 }
enum  COORD_INDEX { X = 0, Y = 1, Z = 2, W = 3 }
 can be used to safely access coordinates

Public Member Functions

 Point3D (const Point3D &)
 Copy constructor.
 Point3D (double x, double y, double z, double w=1)
 constructor with given coordinates
Point3Doperator= (const Point3D &)
 implement = operator
bool isGoodPoint ()
 Decides wether the point is good or bad depending on its state.
double x () const
double y () const
double z () const
double w () const
double & operator() (int index)
 return the coordinate value
double & operator[] (int index)
 return the coordinate value
void setCoord (double x, double y, double z, double w=1)
 setter
jblas::vec4getCoord ()
 Return a vector containing the coordinates.
virtual void clear ()
 set the point at the origin (0,0,0,1)

Public Attributes

jblas::vec4 coord
 this vector contains the coordinates of the point (X,Y,Z,W)
Point3D::STATE state
 can tel if this point is a "good" one or a "bad" one for example a bad point can be a result of an Outer measure

Friends

std::ostream & operator<< (std::ostream &os, const Point3D &pt)
 implement operator <<
std::istream & operator>> (std::istream &is, Point3D &pt)
 implement operator >>

Member Function Documentation

double& jafar::model3d::Point3D::operator() ( int  index) [inline]

return the coordinate value

Note:
There is no test of the given parameter.
Parameters:
index: 0 for X, 1 for Y, 2 for Z, 3 for W

Definition at line 47 of file point3D.hpp.

References coord.

double& jafar::model3d::Point3D::operator[] ( int  index) [inline]

return the coordinate value

Note:
There is no test on the given parameter.
Parameters:
index: 0 for X, 1 for Y, 2 for Z, 3 for W

Definition at line 53 of file point3D.hpp.

References coord.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on Wed Oct 15 2014 00:37:42 for Jafar by doxygen 1.7.6.1
LAAS-CNRS