SMTK
@SMTK_VERSION@
Simulation Modeling Tool Kit
|
Represent a discrete geometric shape as a modeling entity. More...
#include <DiscreteGeometry.h>
Classes | |
class | ShapeOptions |
A base class for subclasses of DiscreteGeometry to use when passing options to updateChildren() and setShapeData(). More... | |
Public Member Functions | |
smtkTypeMacro (smtk::markup::DiscreteGeometry) | |
smtkSuperclassMacro (smtk::markup::SpatialData) | |
template<typename... Args> | |
DiscreteGeometry (Args &&... args) | |
virtual void | assignedIds (std::vector< AssignedIds * > &assignments) const |
Return all of the IdSpace allotments this instance has. More... | |
virtual vtkSmartPointer< vtkDataObject > | shape () const |
Return the VTK data defining the shape of this component. | |
Public Member Functions inherited from smtk::markup::SpatialData | |
smtkTypeMacro (smtk::markup::SpatialData) | |
smtkSuperclassMacro (smtk::markup::Component) | |
template<typename... Args> | |
SpatialData (Args &&... args) | |
void | initialize (const nlohmann::json &data, smtk::resource::json::Helper &helper) override |
Provide an initializer for resources to call after construction. | |
Public Member Functions inherited from smtk::markup::Component | |
smtkTypeMacro (smtk::markup::Component) | |
smtkSuperclassMacro (smtk::graph::Component) | |
template<typename... Args> | |
Component (Args &&... args) | |
Component::Index | index () const |
The index is a compile-time intrinsic of the derived resource; as such, it cannot be set. | |
std::string | name () const override |
Return the component's name. | |
bool | setName (const std::string &name) |
Set the component's name. | |
ArcEndpointInterface< arcs::GroupsToMembers, ConstArc, IncomingArc > | groups () const |
Return the container of groups this component belongs to. | |
ArcEndpointInterface< arcs::GroupsToMembers, NonConstArc, IncomingArc > | groups () |
ArcEndpointInterface< arcs::LabelsToSubjects, ConstArc, IncomingArc > | labels () const |
Return the container of labels that reference this component. | |
ArcEndpointInterface< arcs::LabelsToSubjects, NonConstArc, IncomingArc > | labels () |
ArcEndpointInterface< arcs::URLsToImportedData, ConstArc, IncomingArc > | importedFrom () const |
Return the container of URLs from which this component was imported (if any). | |
ArcEndpointInterface< arcs::URLsToImportedData, NonConstArc, IncomingArc > | importedFrom () |
Public Member Functions inherited from smtk::graph::Component | |
smtkTypeMacro (smtk::graph::Component) | |
smtkSuperclassMacro (smtk::resource::Component) | |
const smtk::resource::ResourcePtr | resource () const override |
Access the containing resource. | |
smtk::resource::Resource * | parentResource () const override |
Return a raw (not shared) pointer to the resource that owns this component. More... | |
const smtk::common::UUID & | id () const override |
Access the component's id. | |
bool | setId (const smtk::common::UUID &uid) override |
Set the component's id. | |
template<typename ArcType > | |
ArcEndpointInterface< ArcType, ConstArc, OutgoingArc > | outgoing () const |
Return an endpoint-interface object for arcs of ArcType outgoing from this node. More... | |
template<typename ArcType > | |
ArcEndpointInterface< ArcType, NonConstArc, OutgoingArc > | outgoing () |
template<typename ArcType > | |
ArcEndpointInterface< ArcType, ConstArc, IncomingArc > | incoming () const |
Return an endpoint-interface object for arcs of ArcType incoming to this node. More... | |
template<typename ArcType > | |
ArcEndpointInterface< ArcType, NonConstArc, IncomingArc > | incoming () |
bool | disconnect (bool onlyExplicit=false) |
Remove all (editable) arcs from this node. More... | |
Public Member Functions inherited from smtk::resource::Component | |
smtkTypeMacro (smtk::resource::Component) | |
smtkSuperclassMacro (smtk::resource::PersistentObject) | |
smtkSharedFromThisMacro (smtk::resource::PersistentObject) | |
template<typename ResourceType > | |
ResourceType * | parentResourceAs () const |
This variant of parentResource casts the result to the given ResourceType. | |
Links & | links () override |
Return the links that connect this component to external resources/components. | |
const Links & | links () const override |
Properties & | properties () override |
Return properties defined on this component. | |
const Properties & | properties () const override |
Public Member Functions inherited from smtk::resource::PersistentObject | |
smtkTypeMacroBase (smtk::resource::PersistentObject) | |
template<typename T > | |
T::Ptr | as () |
Attempt to cast this object to a subclass. | |
template<typename T > | |
T::ConstPtr | as () const |
Attempt to cast this object to a subclass. | |
Protected Member Functions | |
bool | updateChildren (vtkSmartPointer< vtkDataObject > newShape, ShapeOptions &options) |
Method for subclasses to use when updating their VTK data. More... | |
Protected Member Functions inherited from smtk::graph::Component | |
Component (const std::shared_ptr< smtk::graph::ResourceBase > &) | |
Component (const std::shared_ptr< smtk::graph::ResourceBase > &, const smtk::common::UUID &) | |
virtual void | createDependentArcs () |
Additional Inherited Members | |
Public Types inherited from smtk::markup::Component | |
using | Serialize = std::true_type |
using | Index = std::size_t |
Public Types inherited from smtk::resource::Component | |
typedef std::function< void(const ComponentPtr &)> | Visitor |
typedef detail::ComponentLinks | Links |
typedef detail::ComponentProperties | Properties |
Static Public Attributes inherited from smtk::markup::Component | |
static const Component::Index | type_index |
A unique integer corresponding to the component type. | |
Protected Attributes inherited from smtk::markup::Component | |
std::string | m_name |
Protected Attributes inherited from smtk::graph::Component | |
smtk::WeakReferenceWrapper< smtk::graph::ResourceBase > | m_resource |
smtk::common::UUID | m_id |
Represent a discrete geometric shape as a modeling entity.
This class and its subclasses are implemented using VTK data.
|
inlinevirtual |
Return all of the IdSpace allotments this instance has.
Generally, this will return IDs in the "point" and "cell" domains since that is how most VTK data is modeled. However, side sets and other indirect geometries may return more.
It is up to each subclass to implement this method, which is used to look up domains (IdSpaces in particular) that this instance participates in.
Note that callers must hold a lock on the resource for the duration that they use the resulting assignments as otherwise the returned assignments could be invalidated in a separate thread.
Reimplemented in smtk::markup::UnstructuredData, and smtk::markup::ImageData.
|
protected |
Method for subclasses to use when updating their VTK data.
You must call this method before modifying any internal variable affecting the return value of DiscreteGeometry::shape() since it will return with no effect if newShape matches the existing shape.
This is only intended to be called from within an operation whose result is accepted here since this method will remove no-longer-referenced Field nodes and add new ones. It will also update the assigned point and cell IDs for data inheriting vtkDataSet. If changes were made, this method returns true (and adds this object to options.trackedChanges's "modified" item).
Note that this method does not modify referential geometry linked to this (primary) geometry. You are responsible for doing this since the nature of your operation determines whether reference geometry should be removed or rewritten to use the newly-assigned IDs (which this method does not update for you).
Remove fields no longer referenced.