IMP logo
Public Member Functions | Static Public Member Functions
IMP::em::Voxel Class Reference

Detailed Description

A a decorator for a particle that stores data on a density voxel , such as: position (x,y,z) attributes and density attributes

+ Inheritance diagram for IMP::em::Voxel:

List of all members.

Public Member Functions

 Voxel (Model *m, ParticleIndex id)
 Voxel (::IMP::Particle *p)
Float get_density () const
void set_density (Float t)
void show (std::ostream &out=std::cout) const
- Public Member Functions inherited from IMP::Decorator
std::size_t __hash__ () const
ParticleIndex get_particle_index () const
Particleget_particle () const
Modelget_model () const
 Returns the Model containing the particle.
 Decorator (Particle *p)
 Decorator ()

Static Public Member Functions

static Voxel decorate_particle (::IMP::Particle *p)
static const FloatKey get_density_key ()
static const FloatKeys get_keys ()
static bool particle_is_instance (Particle *p)
 Return true if the particle can be cast to the decorator.
static Voxel setup_particle (Particle *p, const algebra::Vector3D &position, Float radius, Float density)
static Decorator setup_particle (Particle *p, extra_arguments)

Additional Inherited Members

- Protected Member Functions inherited from IMP::Decorator
 Decorator (Model *m, ParticleIndex pi)
 Decorator (Particle *p)
int compare (base::Object *o) const

Member Function Documentation

static bool IMP::em::Voxel::particle_is_instance ( Particle p)
static

Return true if the particle can be cast to the decorator.

That is, if particle_is_instance() returns true, then it is legal to construct an instance of the decorator with that particle. If not, setup_particle() must be called first.

// it is false
std::cout << IMP::core::XYZ::particle_is_instance(p) << std::endl;
// As a result this is an error
// now set it up
// now it is true
std::cout << IMP::core::XYZ::particle_is_instance(p) << std::endl;
// and now this code is OK

Reimplemented from IMP::Decorator.

static Voxel IMP::em::Voxel::setup_particle ( Particle p,
const algebra::Vector3D position,
Float  radius,
Float  density 
)
static

Create a decorator with the passed coordinates.


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

Generated on Tue May 22 2012 23:33:34 for IMP by doxygen 1.8.1