Itasca C++ Interface
Loading...
Searching...
No Matches
Public Member Functions | Static Public Attributes | List of all members
itascaxd::IGeometry Class Referenceabstract

Interface for the global list of all geomtric data sets IGeomSet. More...

#include <igeometry.h>

Public Member Functions

virtual itasca::IContainergetIContainer ()=0
 Returns an IContainer interface for the list of all IGeomSet objects.
 
virtual const itasca::IContainergetIContainer () const =0
 Returns an IContainer interface for the list of all IGeomSet objects.
 
virtual uint32 getIGeomPointType () const =0
 Returns the type identifier for IGeomPoint objects.
 
virtual uint32 getIGeomEdgeType () const =0
 Returns the type identifier for IGeomEdge objects.
 
virtual uint32 getIGeomPolyType () const =0
 Returns the type identifier for IGeomPoly objects.
 
virtual uint32 getIGeomSetType () const =0
 Returns the type identifier for IGeomSet objects.
 
virtual IGeomSetgetFirstGeomSet ()=0
 Returns a pointer to the first IGeomSet in the list, or 0 if none are present. See the IGeomSet::getNext() function.
 
virtual const IGeomSetgetFirstGeomSet () const =0
 Returns a pointer to the first IGeomSet in the list, or 0 if none are present. See the IGeomSet::getNext() function.
 
virtual const IGeomSetgetCurrent () const =0
 Returns a pointer to the current IGeomSet.
 
virtual IGeomSetlookupWithID (uint64 id)=0
 Returns a pointer to the IGeomSet with matching id, or 0 if it doesn't exist. Guaranteed to take less than linear time.
 
virtual const IGeomSetlookupWithID (uint64 id) const =0
 Returns a pointer to the IGeomSet with matching id, or 0 if it doesn't exist. Guaranteed to take less than linear time.
 
virtual IGeomSetlookupWithName (const IString &name)=0
 Returns a pointer to the IGeomSet with matching name, or 0 if it doesn't exist. Guaranteed to take less than linear time.
 
virtual const IGeomSetlookupWithName (const IString &name) const =0
 Returns a pointer to the IGeomSet with matching name, or 0 if it doesn't exist. Guaranteed to take less than linear time.
 
virtual StringList findAllGeomSets (bool allowDuringRestore) const =0
 Returns all geometry sets.
 
virtual StringList orderedGeomSets (bool allowDuringRestore) const =0
 Returns all geometry sets in order.
 
virtual IGeomSetcreate (const string &name)=0
 
virtual IGeomSetremoveSet (IGeomSet *set)=0
 Removes set from the list, and destroys it. Returns a pointer to the next item in the list after set, or 0 if unsuccessful.
 
virtual string importFromFile (IGeomSet *set, const string &filename, const string &formatKeyword=string(), const itasca::IGroupID &id=itasca::IGroupID(), bool merge=true)=0
 
virtual string exportToFile (const IGeomSet *set, const string &filename, const IRange *filter, const string &formatKeyword=string(), bool binary=false, bool nodes=false, bool edges=false, const string &comment=string(), uint32 *numberOfNodesExported=0, uint32 *numberOfPolysExported=0) const =0
 
virtual StringList getFileFormatMasks () const =0
 Returns the list of file masks that will be autodetected as a supported geometry import format.
 
virtual StringList getImportExportPluginNames () const =0
 get names list of all registered import-export plugins
 
virtual itasca::IGeomImportExportmatchImportExport (const string &name) const =0
 
virtual itasca::IGeomImportExportfindImportExportByFileExt (const string &filename) const =0
 
virtual void registerImportExport (itasca::IGeomImportExport *obj, uint32 version)=0
 Register import-export object.
 
virtual uint64 assignGroupsByProjection (itasca::IContainer *con, const DVect &proj, const std::vector< const IGeomSet * > &sets, const string &slot, const IRange *filter)=0
 
virtual itasca::IContainer::signal_typegetAnyAddedSignal2 () const =0
 Returns a signal that gets called every time anything is added.
 
virtual itasca::IContainer::signal_typegetAnyRemovedSignal2 () const =0
 Returns a signal that gets called every time anything is removed.
 
virtual uint32 getCurrentChangedCode () const =0
 Returns a notification code (see INoticeManager) indicating a current geometry set changed.
 
virtual IGeometrynewLocalInstance () const =0
 Creates new empty local instance of Geometry object, it is not the global engine singleton,.
 
virtual void destroy ()=0
 Destroys-delete local instance of geometry object.
 

Static Public Attributes

static const TType type_ = 0x4c815be1
 The type identification number for this class, for use in convert_cast() and convert_getcast().
 

Detailed Description

Interface for the global list of all geomtric data sets IGeomSet.

Member Function Documentation

◆ assignGroupsByProjection()

virtual uint64 itascaxd::IGeometry::assignGroupsByProjection ( itasca::IContainer * con,
const DVect & proj,
const std::vector< const IGeomSet * > & sets,
const string & slot,
const IRange * filter )
pure virtual

Assigns group names to the object in IContainer based on counting the intersections of surfaces with a ray projected from t->getLocation(). Surfaces are automatically assigned surface ID numbers by assigning all surface within a set connected by common edges the same surface ID numbers. (in 2D all edges connected by common points). con is the container of objects that will have group names assigned. proj is the direction of the projection vector to use sets is the list of geometric sets to check against. In 3D only polygons are used, in 2D only edge are used. slot is the slot to assign a group name to filter is used to filter object in the container, only object in the container as assigned group names. Returns the number of objects in the container that have had a group name assigned.

◆ create()

virtual IGeomSet * itascaxd::IGeometry::create ( const string & name)
pure virtual

Creates a new IGeomSet with name name, and returns a pointer to it. An id may optionally be specified, otherwise one is assigned. If an Id number is given and a IGeomSet already exists with that ID, and exception occurs.

◆ exportToFile()

virtual string itascaxd::IGeometry::exportToFile ( const IGeomSet * set,
const string & filename,
const IRange * filter,
const string & formatKeyword = string(),
bool binary = false,
bool nodes = false,
bool edges = false,
const string & comment = string(),
uint32 * numberOfNodesExported = 0,
uint32 * numberOfPolysExported = 0 ) const
pure virtual

Attemps to export geometry elements from set to a file filename, using the format specified. binary indicates that a binary format should be used, if both text and binary are optional. nodes indicates that all IGeomPoints that fall into the filter should be exported. edges indicates that all IGeomEdges that fall into the filter should be exported. comment indicates a comment string that can be embedded in the file, if applicable. Note that Points and Edges that are connect to exported Polygons are automatically exported.

◆ findImportExportByFileExt()

virtual itasca::IGeomImportExport * itascaxd::IGeometry::findImportExportByFileExt ( const string & filename) const
pure virtual

Finds match for import-export in the internal pluginlist (by supported file-format extensions) and returns finde import-export object, which will be owned by the caller. Destroy using ->destroy(). Retunrs 0 if no match.

◆ importFromFile()

virtual string itascaxd::IGeometry::importFromFile ( IGeomSet * set,
const string & filename,
const string & formatKeyword = string(),
const itasca::IGroupID & id = itasca::IGroupID(),
bool merge = true )
pure virtual

Attempts to import geometric elements into set from file filename, using the format specified. If a group string is given, every geometric element is assigned that group name in slot slot, overriding possible group assignments in the file itself. If an error occurs, the error message is returned as a string. If the return string is null, no error occurred.

◆ matchImportExport()

virtual itasca::IGeomImportExport * itascaxd::IGeometry::matchImportExport ( const string & name) const
pure virtual

finds match for import-export in the internal pluginlist (by registered name) and returns matched import-export object, which will be owned by the caller. Destroy using ->destroy(). Retunrs 0 if no match.


The documentation for this class was generated from the following file: