mirror of
https://github.com/Relintai/pandemonium_engine_minimal.git
synced 2025-02-02 05:17:02 +01:00
37 lines
752 B
C++
37 lines
752 B
C++
#ifndef LINE_SHAPE_2D_H
|
|
#define LINE_SHAPE_2D_H
|
|
|
|
/* line_shape_2d.h */
|
|
|
|
|
|
#include "scene/resources/shapes_2d/shape_2d.h"
|
|
|
|
class LineShape2D : public Shape2D {
|
|
GDCLASS(LineShape2D, Shape2D);
|
|
|
|
Vector2 normal;
|
|
real_t d;
|
|
|
|
void _update_shape();
|
|
|
|
protected:
|
|
static void _bind_methods();
|
|
|
|
public:
|
|
virtual bool _edit_is_selected_on_click(const Point2 &p_point, double p_tolerance) const;
|
|
|
|
void set_normal(const Vector2 &p_normal);
|
|
void set_d(real_t p_d);
|
|
|
|
Vector2 get_normal() const;
|
|
real_t get_d() const;
|
|
|
|
virtual void draw(const RID &p_to_rid, const Color &p_color);
|
|
virtual Rect2 get_rect() const;
|
|
virtual real_t get_enclosing_radius() const;
|
|
|
|
LineShape2D();
|
|
};
|
|
|
|
#endif // LINE_SHAPE_2D_H
|