63 int tag()
const override {
return tag_of<
decltype(*this)>; }
73 void update(
SPCtx* ctx,
unsigned int flags)
override;
81 return cast<Persp3D>(SP_ACTIVE_DOCUMENT->getObjectByRepr(
repr));
constexpr int tag_of
Convenience function to retrieve the tag (class id) of a given type.
3x3 matrix representing an affine transformation.
Two-dimensional point that doubles as a vector.
Interface for XML node observers.
Interface for refcounted XML nodes.
std::vector< SPBox3D * > boxes
~Persp3DNodeObserver() override=default
void notifyAttributeChanged(Inkscape::XML::Node &, GQuark, Inkscape::Util::ptr_shared, Inkscape::Util::ptr_shared) final
Attribute change callback.
void build(SPDocument *doc, Inkscape::XML::Node *repr) override
Virtual build: set persp3d attributes from its associated XML node.
std::list< SPBox3D * > list_of_boxes() const
static void toggle_VPs(std::list< Persp3D * >, Proj::Axis axis)
double get_infinite_angle(Proj::Axis axis) const
void toggle_VP(Proj::Axis axis, bool set_undo=true)
bool perspectives_coincide(Persp3D const *rhs) const
Persp3DNodeObserver & nodeObserver()
void add_box(SPBox3D *box)
unsigned int num_boxes() const
static Persp3D * document_first_persp(SPDocument *document)
void update_box_displays()
Geom::Point get_infinite_dir(Proj::Axis axis) const
static Persp3D * create_xml_element(SPDocument *document)
void set_VP_state(Proj::Axis axis, Proj::VPState state)
void rotate_VP(Proj::Axis axis, double angle, bool alt_pressed)
void update(SPCtx *ctx, unsigned int flags) override
bool has_box(SPBox3D *box) const
Geom::Point get_PL_dir_from_pt(Geom::Point const &pt, Proj::Axis axis) const
void apply_affine_transformation(Geom::Affine const &xform)
std::unique_ptr< Persp3DImpl > perspective_impl
static void print_debugging_info_all(SPDocument *doc)
void print_debugging_info() const
friend Persp3DNodeObserver
bool has_all_boxes_in_selection(Inkscape::ObjectSet *set) const
Proj::Pt2 get_VP(Proj::Axis axis) const
void release() override
Virtual release of Persp3D members before destruction.
Geom::Point get_finite_dir(Geom::Point const &pt, Proj::Axis axis) const
static bool VP_is_finite(Persp3DImpl *persp_impl, Proj::Axis axis)
Inkscape::XML::Node * write(Inkscape::XML::Document *doc, Inkscape::XML::Node *repr, unsigned int flags) override
Virtual write: write object attributes to repr.
static void print_all_selected()
static Persp3D * get_from_repr(Inkscape::XML::Node *repr)
void absorb(Persp3D *persp2)
void remove_box(SPBox3D *box)
Typed SVG document implementation.
SPObject is an abstract base class of all of the document nodes at the SVG document level.
Inkscape::XML::Node * repr
Helper class to stream background task notifications as a series of messages.
Interface for XML node observers.
static cairo_user_data_key_t key
Interface for XML documents.