home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Graphics 16,000
/
graphics-16000.iso
/
msdos
/
utils
/
graphtal.lzh
/
Graphtal.Amiga
/
Plane.h
< prev
next >
Wrap
C/C++ Source or Header
|
1992-11-19
|
1KB
|
47 lines
/*
* Plane.h - class definition for geometric object plane.
*
* Copyright (C) 1992, Christoph Streit (streit@iam.unibe.ch)
* University of Berne, Switzerland
* Copyright (C) 1989, 1991, Craig E. Kolb
* All rights reserved.
*
* This software may be freely copied, modified, and redistributed
* provided that this copyright notice is preserved on all copies.
*
* You may not distribute this software, in whole or in part, as part of
* any commercial product without the express consent of the authors.
*
* There is no warranty or other guarantee of fitness of this software
* for any purpose. It is provided solely "as is".
*
*/
#ifndef Plane_H
# define Plane_H
#include "GeoObject.h"
//___________________________________________________________ Plane
class Plane : public GeoObject
{
public:
static GeoObject* create(const Vector&, const Vector&);
int intersect(const Ray&, real, real&);
Vector normal(const Vector&) const;
PolygonList* tesselate(const BoundingBox&);
private:
Plane(const Vector&, const Vector&);
int intersectPlaneWithSegment(const Vector&, const Vector&, Vector&);
private:
Vector n; // plane normal
Vector pos; // point on the plane
real D; // plane constant
};
#endif // Plane_H