OpenLexocad  28.0
PropertyMesh.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <Geom/IndexedMesh.h>
4 #include <Core/Property.h>
5 
6 
7 
8 namespace Core
9 {
10 class LX_CORE_EXPORT PropertyMesh : public Core::Property
11 {
13 
14 public:
15  void setValue(const Geom::IndexedMesh& mesh);
16  bool setValueFromVariant(const Core::Variant& value);
18 
19  const Geom::IndexedMesh& getValue() const;
20 
21 
23 
24  virtual void save(Base::AbstractWriter& writer, Base::PersistenceVersion& save_version);
26  virtual bool isEqual(const Property*) const;
27  virtual Core::Property* copy(void) const override;
28  virtual void paste(const Core::Property& from) override;
29 
30 protected:
32 };
33 
34 
35 
37 
38 
39 } // namespace Core
Property.h
Core::PropertyMesh::paste
virtual void paste(const Core::Property &from) override
Paste the value from the property (mainly for Undo/Redo and transactions)
Core::PropertyMesh::copyValue
void copyValue(Core::Property *p)
Core::PropertyMesh::setValue
void setValue(const Geom::IndexedMesh &mesh)
Core::PropertyMesh
Definition: PropertyMesh.h:11
Core::PropertyMesh::_value
Geom::IndexedMesh _value
Definition: PropertyMesh.h:31
Core::PropertyMesh::setValueFromVariant
bool setValueFromVariant(const Core::Variant &value)
Base::PersistenceVersion
Definition: Persistence.h:13
Core::PropertyMesh::getValue
const Geom::IndexedMesh & getValue() const
Core
Definition: Base.h:5
Core::Variant
Definition: Variant.h:78
Base::AbstractWriter
Definition: Writer.h:13
Core::PropertyMesh::restore
virtual void restore(Base::AbstractXMLReader &reader, Base::PersistenceVersion &version)
This method is used to restore properties from an XML document.
Base::AbstractXMLReader
Definition: AbstractXMLReader.h:7
IndexedMesh.h
Core::PropertyMesh::save
virtual void save(Base::AbstractWriter &writer, Base::PersistenceVersion &save_version)
This method is used to save properties or very small amounts of data to an XML document.
Core::version
LX_CORE_EXPORT Version & version
Core::PropertyMesh::getVariant
Core::Variant getVariant(void) const
Core::PropertyMesh::copy
virtual Core::Property * copy(void) const override
Returns a new copy of the property (mainly for Undo/Redo and transactions). The copy has no container...
Core::Property
Definition: Property.h:72
TYPESYSTEM_HEADER
#define TYPESYSTEM_HEADER()
define for subclassing Base::BaseClass
Definition: Base.h:12
Core::DECLARE_PROPERTY_FACTORY
DECLARE_PROPERTY_FACTORY(PropertyAxis1_Factory, Core::PropertyAxis1)
Core::PropertyMesh::isEqual
virtual bool isEqual(const Property *) const
compare properties
Geom::IndexedMesh
Definition: IndexedMesh.h:15