Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members  

WPCG::WP_Vertex Class Reference

#include <WP_Vertex.h>

List of all members.

Public Methods

 WP_Vertex ()
 WP_Vertex (const WP_Point3D &p, const WP_Vector3D &n)
 ~WP_Vertex ()
WP_Vertex & operator= (const WP_Vertex &v)
void lerp3D (const WP_Vertex *v, float t)

Public Attributes

WP_Point3D point
WP_Vector3D normal
scalar texCoords [2]


Detailed Description

this class represents a 3D vertex
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_Vertex::WP_Vertex   [inline]
 

WPCG::WP_Vertex::WP_Vertex const WP_Point3D   p,
const WP_Vector3D   n
[inline]
 

Parameters:
p  a WP_Point3D object which holds the vertex its coordinates
n  a WP_Vector3D object representing the normal of this vertex. This is used for shading operations like for example gouraud shading

WPCG::WP_Vertex::~WP_Vertex   [inline]
 


Member Function Documentation

void WPCG::WP_Vertex::lerp3D const WP_Vertex *    v,
float    t
[inline]
 

this function linearly interpolates between two vertices and the resulting vertex is assigned to this vertex

Parameters:
v  a pointer to a WP_Vertex object representing the second vertex used for interpolating between
t  the amount of interpolation between the two vertices. 0.0 will result in this vertex. 1.0 will result in vertex v. 0.5 in between the two vertices etc.

WP_Vertex& WPCG::WP_Vertex::operator= const WP_Vertex &    v [inline]
 

assignment operator

Parameters:
v  the WP_Vertex object which is copied to this object
Returns:
a reference to this object containing the copied vertex values


Member Data Documentation

WP_Vector3D WPCG::WP_Vertex::normal
 

a WP_Vector3D object representing the normal of this vector

WP_Point3D WPCG::WP_Vertex::point
 

a WP_point3D object holding the vertex its coordinates

scalar WPCG::WP_Vertex::texCoords[2]
 

an array of two scalars holding the texture coordinates for this vector. This is used for texture mapping. texCoords[0] = s and texCoords[1] = t


The documentation for this class was generated from the following file:
Generated on Tue Jan 28 20:26:44 2003 by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002