Shape3D::get_debug_mesh_lines const methods
This commit is contained in:
parent
ec9302cecc
commit
8e1c9ff1c1
19 changed files with 19 additions and 19 deletions
|
@ -31,7 +31,7 @@
|
|||
#include "box_shape_3d.h"
|
||||
#include "servers/physics_server_3d.h"
|
||||
|
||||
Vector<Vector3> BoxShape3D::get_debug_mesh_lines() {
|
||||
Vector<Vector3> BoxShape3D::get_debug_mesh_lines() const {
|
||||
Vector<Vector3> lines;
|
||||
AABB aabb;
|
||||
aabb.position = -get_extents();
|
||||
|
|
|
@ -46,7 +46,7 @@ public:
|
|||
void set_extents(const Vector3 &p_extents);
|
||||
Vector3 get_extents() const;
|
||||
|
||||
virtual Vector<Vector3> get_debug_mesh_lines() override;
|
||||
virtual Vector<Vector3> get_debug_mesh_lines() const override;
|
||||
virtual real_t get_enclosing_radius() const override;
|
||||
|
||||
BoxShape3D();
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
#include "capsule_shape_3d.h"
|
||||
#include "servers/physics_server_3d.h"
|
||||
|
||||
Vector<Vector3> CapsuleShape3D::get_debug_mesh_lines() {
|
||||
Vector<Vector3> CapsuleShape3D::get_debug_mesh_lines() const {
|
||||
float radius = get_radius();
|
||||
float height = get_height();
|
||||
|
||||
|
|
|
@ -49,7 +49,7 @@ public:
|
|||
void set_height(float p_height);
|
||||
float get_height() const;
|
||||
|
||||
virtual Vector<Vector3> get_debug_mesh_lines() override;
|
||||
virtual Vector<Vector3> get_debug_mesh_lines() const override;
|
||||
virtual real_t get_enclosing_radius() const override;
|
||||
|
||||
CapsuleShape3D();
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
|
||||
#include "servers/physics_server_3d.h"
|
||||
|
||||
Vector<Vector3> ConcavePolygonShape3D::get_debug_mesh_lines() {
|
||||
Vector<Vector3> ConcavePolygonShape3D::get_debug_mesh_lines() const {
|
||||
Set<DrawEdge> edges;
|
||||
|
||||
Vector<Vector3> data = get_faces();
|
||||
|
|
|
@ -65,7 +65,7 @@ public:
|
|||
void set_faces(const Vector<Vector3> &p_faces);
|
||||
Vector<Vector3> get_faces() const;
|
||||
|
||||
virtual Vector<Vector3> get_debug_mesh_lines() override;
|
||||
virtual Vector<Vector3> get_debug_mesh_lines() const override;
|
||||
virtual real_t get_enclosing_radius() const override;
|
||||
|
||||
ConcavePolygonShape3D();
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
#include "core/math/quick_hull.h"
|
||||
#include "servers/physics_server_3d.h"
|
||||
|
||||
Vector<Vector3> ConvexPolygonShape3D::get_debug_mesh_lines() {
|
||||
Vector<Vector3> ConvexPolygonShape3D::get_debug_mesh_lines() const {
|
||||
Vector<Vector3> points = get_points();
|
||||
|
||||
if (points.size() > 3) {
|
||||
|
|
|
@ -46,7 +46,7 @@ public:
|
|||
void set_points(const Vector<Vector3> &p_points);
|
||||
Vector<Vector3> get_points() const;
|
||||
|
||||
virtual Vector<Vector3> get_debug_mesh_lines() override;
|
||||
virtual Vector<Vector3> get_debug_mesh_lines() const override;
|
||||
virtual real_t get_enclosing_radius() const override;
|
||||
|
||||
ConvexPolygonShape3D();
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
#include "cylinder_shape_3d.h"
|
||||
#include "servers/physics_server_3d.h"
|
||||
|
||||
Vector<Vector3> CylinderShape3D::get_debug_mesh_lines() {
|
||||
Vector<Vector3> CylinderShape3D::get_debug_mesh_lines() const {
|
||||
float radius = get_radius();
|
||||
float height = get_height();
|
||||
|
||||
|
|
|
@ -48,7 +48,7 @@ public:
|
|||
void set_height(float p_height);
|
||||
float get_height() const;
|
||||
|
||||
virtual Vector<Vector3> get_debug_mesh_lines() override;
|
||||
virtual Vector<Vector3> get_debug_mesh_lines() const override;
|
||||
virtual real_t get_enclosing_radius() const override;
|
||||
|
||||
CylinderShape3D();
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
#include "height_map_shape_3d.h"
|
||||
#include "servers/physics_server_3d.h"
|
||||
|
||||
Vector<Vector3> HeightMapShape3D::get_debug_mesh_lines() {
|
||||
Vector<Vector3> HeightMapShape3D::get_debug_mesh_lines() const {
|
||||
Vector<Vector3> points;
|
||||
|
||||
if ((map_width != 0) && (map_depth != 0)) {
|
||||
|
|
|
@ -54,7 +54,7 @@ public:
|
|||
void set_map_data(PackedFloat32Array p_new);
|
||||
PackedFloat32Array get_map_data() const;
|
||||
|
||||
virtual Vector<Vector3> get_debug_mesh_lines() override;
|
||||
virtual Vector<Vector3> get_debug_mesh_lines() const override;
|
||||
virtual real_t get_enclosing_radius() const override;
|
||||
|
||||
HeightMapShape3D();
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
|
||||
#include "servers/physics_server_3d.h"
|
||||
|
||||
Vector<Vector3> RayShape3D::get_debug_mesh_lines() {
|
||||
Vector<Vector3> RayShape3D::get_debug_mesh_lines() const {
|
||||
Vector<Vector3> points;
|
||||
points.push_back(Vector3());
|
||||
points.push_back(Vector3(0, 0, get_length()));
|
||||
|
|
|
@ -48,7 +48,7 @@ public:
|
|||
void set_slips_on_slope(bool p_active);
|
||||
bool get_slips_on_slope() const;
|
||||
|
||||
virtual Vector<Vector3> get_debug_mesh_lines() override;
|
||||
virtual Vector<Vector3> get_debug_mesh_lines() const override;
|
||||
virtual real_t get_enclosing_radius() const override;
|
||||
|
||||
RayShape3D();
|
||||
|
|
|
@ -56,7 +56,7 @@ public:
|
|||
virtual RID get_rid() const override { return shape; }
|
||||
|
||||
Ref<ArrayMesh> get_debug_mesh();
|
||||
virtual Vector<Vector3> get_debug_mesh_lines() = 0; // { return Vector<Vector3>(); }
|
||||
virtual Vector<Vector3> get_debug_mesh_lines() const = 0; // { return Vector<Vector3>(); }
|
||||
/// Returns the radius of a sphere that fully enclose this shape
|
||||
virtual real_t get_enclosing_radius() const = 0;
|
||||
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
#include "sphere_shape_3d.h"
|
||||
#include "servers/physics_server_3d.h"
|
||||
|
||||
Vector<Vector3> SphereShape3D::get_debug_mesh_lines() {
|
||||
Vector<Vector3> SphereShape3D::get_debug_mesh_lines() const {
|
||||
float r = get_radius();
|
||||
|
||||
Vector<Vector3> points;
|
||||
|
|
|
@ -46,7 +46,7 @@ public:
|
|||
void set_radius(float p_radius);
|
||||
float get_radius() const;
|
||||
|
||||
virtual Vector<Vector3> get_debug_mesh_lines() override;
|
||||
virtual Vector<Vector3> get_debug_mesh_lines() const override;
|
||||
virtual real_t get_enclosing_radius() const override;
|
||||
|
||||
SphereShape3D();
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
|
||||
#include "servers/physics_server_3d.h"
|
||||
|
||||
Vector<Vector3> WorldMarginShape3D::get_debug_mesh_lines() {
|
||||
Vector<Vector3> WorldMarginShape3D::get_debug_mesh_lines() const {
|
||||
Plane p = get_plane();
|
||||
Vector<Vector3> points;
|
||||
|
||||
|
|
|
@ -45,7 +45,7 @@ public:
|
|||
void set_plane(Plane p_plane);
|
||||
Plane get_plane() const;
|
||||
|
||||
virtual Vector<Vector3> get_debug_mesh_lines() override;
|
||||
virtual Vector<Vector3> get_debug_mesh_lines() const override;
|
||||
virtual real_t get_enclosing_radius() const override {
|
||||
// Should be infinite?
|
||||
return 0;
|
||||
|
|
Loading…
Reference in a new issue