TORCS
1.3.9
The Open Racing Car Simulator
Shape.h
Go to the documentation of this file.
1
/*
2
SOLID - Software Library for Interference Detection
3
Copyright (C) 1997-1998 Gino van den Bergen
4
5
This library is free software; you can redistribute it and/or
6
modify it under the terms of the GNU Library General Public
7
License as published by the Free Software Foundation; either
8
version 2 of the License, or (at your option) any later version.
9
10
This library is distributed in the hope that it will be useful,
11
but WITHOUT ANY WARRANTY; without even the implied warranty of
12
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13
Library General Public License for more details.
14
15
You should have received a copy of the GNU Library General Public
16
License along with this library; if not, write to the Free
17
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18
19
Please send remarks, questions and bug reports to gino@win.tue.nl,
20
or write to:
21
Gino van den Bergen
22
Department of Mathematics and Computing Science
23
Eindhoven University of Technology
24
P.O. Box 513, 5600 MB Eindhoven, The Netherlands
25
*/
26
27
#ifndef _SHAPE_H_
28
#define _SHAPE_H_
29
30
#ifdef _MSC_VER
31
#pragma warning(disable:4786) // identifier was truncated to '255'
32
#endif // _MSC_VER
33
34
#include "
BBox.h
"
35
36
class
Transform
;
37
class
Point
;
38
39
enum
ShapeType
{
40
COMPLEX
,
41
CONVEX
42
};
43
44
class
Shape
{
45
public
:
46
virtual
~Shape
() {}
47
virtual
BBox
bbox
(
const
Transform
& t)
const
= 0;
48
virtual
ShapeType
getType
()
const
= 0;
49
};
50
51
typedef
const
Shape
*
ShapePtr
;
52
53
typedef
bool (*
Intersect
)(
const
Shape
&,
const
Shape
&,
54
const
Transform
&,
const
Transform
&,
55
Vector
&);
56
57
typedef
bool (*
Common_point
)(
const
Shape
&,
const
Shape
&,
58
const
Transform
&,
const
Transform
&,
59
Vector
&,
Point
&,
Point
&);
60
61
#endif
Shape::bbox
virtual BBox bbox(const Transform &t) const =0
COMPLEX
Definition:
Shape.h:40
Shape::~Shape
virtual ~Shape()
Definition:
Shape.h:46
ShapeType
ShapeType
Definition:
Shape.h:39
Common_point
bool(* Common_point)(const Shape &, const Shape &, const Transform &, const Transform &, Vector &, Point &, Point &)
Definition:
Shape.h:57
Shape::getType
virtual ShapeType getType() const =0
Transform
Definition:
Transform.h:41
ShapePtr
const Shape * ShapePtr
Definition:
Shape.h:51
Shape
Definition:
Shape.h:44
BBox
Definition:
BBox.h:36
CONVEX
Definition:
Shape.h:41
Intersect
bool(* Intersect)(const Shape &, const Shape &, const Transform &, const Transform &, Vector &)
Definition:
Shape.h:53
BBox.h
Vector
Definition:
Vector.h:32
Point
Definition:
Point.h:34
src
modules
simu
simuv2
SOLID-2.0
src
Shape.h
Generated by
1.8.14