home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Photo CD Demo 1
/
Demo.bin
/
graphtal
/
plane.h
< prev
next >
Wrap
C/C++ Source or Header
|
1992-10-22
|
1KB
|
45 lines
/*
* Plane.h - class definition for geometric object plane.
*
* Copyright (C) 1992, Christoph Streit (streit@iam.unibe.ch)
* 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