SuperTuxKart
Loading...
Searching...
No Matches
arena_node_3d.hpp
1//
2// SuperTuxKart - a fun racing game with go-kart
3// Copyright (C) 2016 SuperTuxKart-Team
4//
5// This program is free software; you can redistribute it and/or
6// modify it under the terms of the GNU General Public License
7// as published by the Free Software Foundation; either version 3
8// of the License, or (at your option) any later version.
9//
10// This program 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
13// GNU General Public License for more details.
14//
15// You should have received a copy of the GNU General Public License
16// along with this program; if not, write to the Free Software
17// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18
19#ifndef HEADER_ARENA_NODE_3D_HPP
20#define HEADER_ARENA_NODE_3D_HPP
21
22#include "tracks/arena_node.hpp"
23#include "tracks/bounding_box_3d.hpp"
24
28class ArenaNode3D : public ArenaNode,
29 public BoundingBox3D
30{
31public:
32 ArenaNode3D(const Vec3 &p0, const Vec3 &p1, const Vec3 &p2, const Vec3 &p3,
33 const Vec3 &normal, unsigned int node_index)
34 : ArenaNode(p0, p1, p2, p3, normal, node_index),
35 BoundingBox3D(p0, p1, p2, p3, normal) {}
36 // ------------------------------------------------------------------------
37 virtual bool pointInside(const Vec3& p,
38 bool ignore_vertical = false) const OVERRIDE
39 {
40 return BoundingBox3D::pointInside(p);
41 }
42 // ------------------------------------------------------------------------
43 virtual bool is3DQuad() const OVERRIDE { return true; }
44
45};
46
47#endif
Definition: arena_node_3d.hpp:30
virtual bool pointInside(const Vec3 &p, bool ignore_vertical=false) const OVERRIDE
Returns true if a point is inside this quad.
Definition: arena_node_3d.hpp:37
virtual bool is3DQuad() const OVERRIDE
Returns true if this quad is 3D, which additional 3D testing is used in pointInside.
Definition: arena_node_3d.hpp:43
Definition: arena_node.hpp:32
Definition: bounding_box_3d.hpp:28
A wrapper around bullets btVector3 to include conventient conversion functions (e....
Definition: vec3.hpp:35