OpenWalnut  1.5.0dev
Public Member Functions | Private Attributes | List of all members
WDataCreatorSphere Class Reference

Creates a sphere inside a given grid. More...

#include <WDataCreatorSphere.h>

+ Inheritance diagram for WDataCreatorSphere:
+ Collaboration diagram for WDataCreatorSphere:

Public Member Functions

 WDataCreatorSphere ()
 Default constructor. More...
 
virtual ~WDataCreatorSphere ()
 Destructor. More...
 
virtual WValueSetBase::SPtr operator() (WProgress::SPtr progress, WGridRegular3D::ConstSPtr grid, unsigned char order=0, unsigned char dimension=1, dataType type=W_DT_FLOAT)
 Create the dataset. More...
 
- Public Member Functions inherited from WObjectNDIP< WDataSetSingleCreatorInterface >
virtual ~WObjectNDIP ()
 Destructor. More...
 
virtual std::string getName () const
 The name of the object. More...
 
virtual std::string getDescription () const
 The description of this object. More...
 
virtual const char ** getIcon () const
 The icon of this object. More...
 
virtual WProperties::SPtr getProperties ()
 Return the property group of this object. More...
 
- Public Member Functions inherited from WDataSetSingleCreatorInterface
virtual ~WDataSetSingleCreatorInterface ()
 Destructor. More...
 

Private Attributes

WPropPosition m_center
 Relative center coordinates. More...
 
WPropDouble m_radius
 The radius of the sphere in relative coordinates. More...
 
WPropDouble m_lowerClamp
 Clamp to 0 for all values below this one. More...
 
WPropDouble m_upperClamp
 Clamp to 0 for all values above. More...
 
WPropDouble m_lowerClampValue
 To which value should be clamped? More...
 
WPropDouble m_upperClampValue
 To which value should be clamped? More...
 

Additional Inherited Members

- Public Types inherited from WObjectNDIP< WDataSetSingleCreatorInterface >
typedef std::shared_ptr< WObjectNDIPSPtr
 Shared ptr to an instance. More...
 
typedef std::shared_ptr< const WObjectNDIPConstSPtr
 Shared ptr to a const instance. More...
 
- Protected Member Functions inherited from WObjectNDIP< WDataSetSingleCreatorInterface >
 WObjectNDIP (std::string name, std::string description, const char **icon=NULL)
 Construct a NDIP'ed object. More...
 
- Protected Attributes inherited from WObjectNDIP< WDataSetSingleCreatorInterface >
WProperties::SPtr m_properties
 the properties of the object. More...
 

Detailed Description

Creates a sphere inside a given grid.

Only works on scalar fields.

Definition at line 35 of file WDataCreatorSphere.h.

Constructor & Destructor Documentation

◆ WDataCreatorSphere()

WDataCreatorSphere::WDataCreatorSphere ( )

◆ ~WDataCreatorSphere()

WDataCreatorSphere::~WDataCreatorSphere ( )
virtual

Destructor.

Definition at line 56 of file WDataCreatorSphere.cpp.

Member Function Documentation

◆ operator()()

WValueSetBase::SPtr WDataCreatorSphere::operator() ( WProgress::SPtr  progress,
WGridRegular3D::ConstSPtr  grid,
unsigned char  order = 0,
unsigned char  dimension = 1,
dataType  type = W_DT_FLOAT 
)
virtual

Create the dataset.

This needs to be implemented by all the creators you write. This method is designed to be applicable to all kinds of WDataSetSingle that use WValueSetBase. Your implementation does not need to support all types. If you do not support any order/dimension combination, throw an exception (like by using WAssert).

Parameters
orderthe tensor order of the values stored in this WValueSet
dimensionthe tensor dimension of the values stored in this WValueSet
progressthe progress instance you should increment each time you fill the value for one voxel.
gridthe grid on which the value set has to be build
typethe value type in the value set
Returns
the value set for the given grid

Implements WDataSetSingleCreatorInterface.

Definition at line 60 of file WDataCreatorSphere.cpp.

References m_center, m_lowerClamp, m_lowerClampValue, m_radius, m_upperClamp, and m_upperClampValue.

Member Data Documentation

◆ m_center

WPropPosition WDataCreatorSphere::m_center
private

Relative center coordinates.

Definition at line 70 of file WDataCreatorSphere.h.

Referenced by operator()(), and WDataCreatorSphere().

◆ m_lowerClamp

WPropDouble WDataCreatorSphere::m_lowerClamp
private

Clamp to 0 for all values below this one.

Definition at line 80 of file WDataCreatorSphere.h.

Referenced by operator()(), and WDataCreatorSphere().

◆ m_lowerClampValue

WPropDouble WDataCreatorSphere::m_lowerClampValue
private

To which value should be clamped?

Definition at line 90 of file WDataCreatorSphere.h.

Referenced by operator()(), and WDataCreatorSphere().

◆ m_radius

WPropDouble WDataCreatorSphere::m_radius
private

The radius of the sphere in relative coordinates.

Definition at line 75 of file WDataCreatorSphere.h.

Referenced by operator()(), and WDataCreatorSphere().

◆ m_upperClamp

WPropDouble WDataCreatorSphere::m_upperClamp
private

Clamp to 0 for all values above.

Definition at line 85 of file WDataCreatorSphere.h.

Referenced by operator()(), and WDataCreatorSphere().

◆ m_upperClampValue

WPropDouble WDataCreatorSphere::m_upperClampValue
private

To which value should be clamped?

Definition at line 95 of file WDataCreatorSphere.h.

Referenced by operator()(), and WDataCreatorSphere().


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