iMSTK
Interactive Medical Simulation Toolkit
Public Member Functions | Protected Member Functions | List of all members
imstk::ImplicitGeometry Class Referenceabstract

Class that can represent the geometry of multiple implicit geometries as boolean functions One may supply it with multiple implicit geometries and the operation they would like. More...

#include <imstkCompositeImplicitGeometry.h>

Inheritance diagram for imstk::ImplicitGeometry:
Inheritance graph
[legend]
Collaboration diagram for imstk::ImplicitGeometry:
Collaboration graph
[legend]

Public Member Functions

virtual double getFunctionValue (const Vec3d &pos) const =0
 Returns function value given position.
 
- Public Member Functions inherited from imstk::Geometry
virtual ~Geometry () override=default
 Destructor.
 
virtual const std::string getTypeName () const =0
 Returns the string representing the type name of the geometry.
 
 SIGNAL (Geometry, modified)
 
virtual void print () const
 Print.
 
virtual double getVolume ()
 Returns the volume of the geometry (if valid)
 
virtual void computeBoundingBox (Vec3d &lowerCorner, Vec3d &upperCorner, const double paddingPercent=0.0)
 Compute the bounding box for the geometry. More...
 
virtual Vec3d getCenter ()
 Returns the bounding box center.
 
void translate (const Vec3d &t, TransformType type=TransformType::ConcatenateToTransform)
 Translate the geometry in Cartesian space.
 
void translate (double x, double y, double z, TransformType type=TransformType::ConcatenateToTransform)
 
void rotate (const Quatd &q, TransformType type=TransformType::ConcatenateToTransform)
 Rotate the geometry in Cartesian space.
 
void rotate (const Mat3d &m, TransformType type=TransformType::ConcatenateToTransform)
 
void rotate (const Vec3d &axis, double radians, TransformType type=TransformType::ConcatenateToTransform)
 
void scale (const Vec3d &scaling, TransformType type=TransformType::ConcatenateToTransform)
 Scale in Cartesian directions.
 
void scale (const double scaling, TransformType type=TransformType::ConcatenateToTransform)
 
void transform (const Mat4d &T, TransformType type=TransformType::ConcatenateToTransform)
 Applies a rigid transform to the geometry.
 
Vec3d getTranslation () const
 Get/Set translation.
 
void setTranslation (const Vec3d &t)
 
void setTranslation (const double x, const double y, const double z)
 
Mat3d getRotation () const
 Get/Set rotation.
 
void setRotation (const Mat3d &m)
 
void setRotation (const Quatd &q)
 
void setRotation (const Vec3d &axis, const double angle)
 
Vec3d getScaling () const
 Get/Set scaling.
 
void setScaling (const Vec3d &s)
 
void setScaling (const double s)
 
const Mat4d & getTransform ()
 Get/Set the transform.
 
void setTransform (const Mat4d &m)
 
const std::string & getName () const
 Get name of the geometry.
 
uint32_t getGlobalIndex () const
 Get the global (unique) index of the geometry.
 
virtual bool isMesh () const
 Returns true if the geometry is a mesh, else returns false.
 
void postModified ()
 Post modified event.
 
virtual void updatePostTransformData () const
 
- Public Member Functions inherited from imstk::EventObject
template<typename T >
void postEvent (const T &e)
 Emits the event Direct observers will be immediately called, in sync Queued observers will receive the Command in their queue for later execution, reciever must implement doEvent.
 
template<typename T >
void queueEvent (const T &e)
 Queues event directly to this.
 
void doEvent ()
 Do an event, if none exists return.
 
void doAllEvents ()
 Do all the events in the event queue.
 
void foreachEvent (std::function< void(Command cmd)> func)
 Thread safe loop over all event commands, one can implement a custom handler.
 
void rforeachEvent (std::function< void(Command cmd)> func)
 thread safe reverse loop over all event commands, one can implement a custom handler
 
void clearEvents ()
 Removes all events from queue cleans up copies of the event.
 

Protected Member Functions

 ImplicitGeometry (std::string name="")
 
- Protected Member Functions inherited from imstk::Geometry
 Geometry (const std::string &name=std::string(""))
 Constructor.
 
virtual void applyTransform (const Mat4d &imstkNotUsed(m))
 Directly apply transform to data.
 

Additional Inherited Members

- Public Types inherited from imstk::Geometry
enum class  TransformType { ApplyToData , ConcatenateToTransform }
 Enumeration for the transformation to apply \params ApplyToTransform to apply the transformation to the data \params ApplyToTransform to apply the transformation to the transform matrix.
 
enum class  DataType { PreTransform , PostTransform }
 Enumeration for the data to retrieve \params PreTransform for data where transform matrix is not applied \params PostTransform for data where transform matrix is applied.
 
- Public Types inherited from imstk::EventObject
using Observer = std::pair< EventObject *, std::function< void(Event *)> >
 
- Static Public Member Functions inherited from imstk::Geometry
static uint32_t getTotalNumberGeometries ()
 Get a pointer to geometry that has been registered globally.
 
- Static Protected Member Functions inherited from imstk::Geometry
static uint32_t getUniqueID ()
 Get a unique ID for the new generated geometry object.
 
- Protected Attributes inherited from imstk::Geometry
std::string m_name
 
uint32_t m_geometryIndex
 

Unique name for each geometry


 
bool m_transformApplied = true
 

Unique ID assigned to each geometry upon construction


 
Mat4d m_transform
 
- Protected Attributes inherited from imstk::EventObject
ParallelUtils::SpinLock eventQueueLock
 
std::deque< CommandeventQueue
 
std::vector< std::pair< std::string, std::vector< Observer > > > queuedObservers
 
std::vector< std::pair< std::string, std::vector< Observer > > > directObservers
 
- Static Protected Attributes inherited from imstk::Geometry
static ParallelUtils::SpinLock s_GeomGlobalLock
 Mutex lock for thread-safe counter update and name set update.
 
static uint32_t s_NumGeneratedGegometries = 0
 Total number of geometries that have been created in this program.
 

Detailed Description

Class that can represent the geometry of multiple implicit geometries as boolean functions One may supply it with multiple implicit geometries and the operation they would like.

Defines implicit geometry with an implicit function Implicit functions must be decoupled from geometry.

Definition at line 34 of file imstkImplicitGeometry.h.


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