00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
#ifndef OPENCAL_PLANE_H
00012
#define OPENCAL_PLANE_H
00013
00014
00015
#include <OpenCAL/global.h>
00016
#include <OpenCAL/RigidObject.h>
00017
#include <OpenCAL/TriangleMesh.h>
00018
00019
#include <OpenCAL/Vector3.h>
00020
using OpenCAL::Utils::Vector3;
00021
00022
00023
namespace OpenCAL
00024 {
00025
00026
00030 class OPENCAL_API Plane:
public RigidObject
00031 {
00032
protected:
00033
00034
TriangleMesh m_surface;
00035 Vector3 m_normal;
00036
00037
public:
00038
00039 Plane(
System *parent);
00040 Plane(
System *parent,
const Vector3 &position,
const Vector3 &normal);
00042
virtual ~Plane();
00043
00044
00045
const TriangleMesh &getSurface()
const {
return m_surface; }
00046
TriangleMesh *getSurfaceP() {
return &m_surface; }
00047
const Vector3 &getNormal()
const {
return m_normal; }
00048 Vector3 *getNormalP() {
return &m_normal; }
00049
00050
00051
00052
00053
virtual void render();
00054
float distance(
const Vector3 &point)
const;
00055
00056
00057
00058
00059
00060 };
00061 }
00062
00063
#endif // OPENCAL_PLANE_H