Main Page Namespace List Class Hierarchy Compound List File List Namespace Members Compound Members
WPCG::WP_Point3D Class Reference
#include <WP_Point3D.h>
List of all members.
Detailed Description
this class represents a 3D point
-
Author:
-
Copyright (C) 2001 W.P. van Paassen peter@paassen.tmfweb.nl
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; see the file COPYING. If not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
Constructor & Destructor Documentation
WPCG::WP_Point3D::WP_Point3D |
( |
|
) |
[inline] |
|
|
-
Parameters:
-
x |
the x coordinate of this point |
y |
the y coordinate of this point |
z |
the z coordinate of this point |
|
WPCG::WP_Point3D::~WP_Point3D |
( |
|
) |
[inline] |
|
WPCG::WP_Point3D::WP_Point3D |
( |
const WP_Point3D & |
p |
) |
[inline] |
|
Member Function Documentation
void WPCG::WP_Point3D::draw |
( |
|
) |
const [inline] |
|
|
this function draws the 3D point to the screen using OpenGL |
WP_Point3D& WPCG::WP_Point3D::operator *= |
( |
const WP_Matrix3D & |
m |
) |
[inline] |
|
|
this operator multiplies the current point by a matrix -
Parameters:
-
m |
a WP_Matrix3D object representing the matrix by which this point is multiplied |
-
Returns:
-
a reference to this object containing the new point values after multiplication by the matrix
|
WP_Point3D WPCG::WP_Point3D::operator+ |
( |
const WP_Vector3D & |
v |
) |
const [inline] |
|
|
this operator adds a vector to this point resulting in a new point -
Parameters:
-
v |
a WP_Vector3D object representing the vector which is added to this point |
-
Returns:
-
a WP_Point3D object representing the new point
|
WP_Vector3D WPCG::WP_Point3D::operator+ |
( |
const WP_Point3D & |
p |
) |
const [inline] |
|
|
this operator adds a point to this point resulting in a vector -
Parameters:
-
p |
a WP_Point3D object representing the point which is added to this point |
-
Returns:
-
a WP_Vector3D object representing the vector
|
WP_Point3D& WPCG::WP_Point3D::operator+= |
( |
const WP_Vector3D & |
v |
) |
[inline] |
|
|
this operator adds a vector to this point resulting in a new point -
Parameters:
-
v |
a WP_Vector3D object representing the vector which is added to this point |
-
Returns:
-
a reference to this object containing the new point values after the addition of the vector
|
WP_Point3D WPCG::WP_Point3D::operator- |
( |
const WP_Vector3D & |
v |
) |
const [inline] |
|
|
this operator subtracts a vector from this point resulting in a new point -
Parameters:
-
v |
a WP_Vector3D object representing the vector which is subtracted from this point |
-
Returns:
-
a WP_Point3D object representing the new point
|
WP_Vector3D WPCG::WP_Point3D::operator- |
( |
const WP_Point3D & |
p |
) |
const [inline] |
|
|
this operator substracts a point from this point resulting in a vector -
Parameters:
-
p |
a WP_Point3D object representing the point which is subtracted from this point |
-
Returns:
-
a WP_Vector3D object representing the vector
|
WP_Point3D& WPCG::WP_Point3D::operator-= |
( |
const WP_Vector3D & |
v |
) |
[inline] |
|
|
this operator subtracts a vector from this point resulting in a new point -
Parameters:
-
v |
a WP_Vector3D object representing the vector which is subtracted from this point |
-
Returns:
-
a reference to this object containing the new point values after the subtraction of the vector
|
WP_Point3D& WPCG::WP_Point3D::operator= |
( |
const WP_Point3D & |
p |
) |
[inline] |
|
|
assignment operator -
Parameters:
-
p |
the WP_Point3D object which is copied to this object |
-
Returns:
-
a reference to this object containing the copied point values
|
void WPCG::WP_Point3D::set |
( |
const WP_Vector3D & |
v |
) |
[inline] |
|
|
this function converts a vector to a point by setting the x, y, and z values of the vector in the point -
Parameters:
-
v |
the vector which values are taken and set in this point |
|
WP_Vector3D WPCG::WP_Point3D::toVector |
( |
|
) |
const [inline] |
|
|
this function creates a vector from this point's x, y and z values -
Returns:
-
a WP_Vector3D object representing the created vector
|
Member Data Documentation
scalar WPCG::WP_Point3D::data[4]
|
|
|
an array of scalars representing the homogenous point, so data[0] = x, data[1] = y, data[2] = z and data[3] = 1.0f |
The documentation for this class was generated from the following file:
Generated on Tue Jan 28 20:26:42 2003 by
1.2.14 written by Dimitri van Heesch,
© 1997-2002