Abstract class representing one aggregate particle. More...
#include <aggregate.hpp>
Public Member Functions | |
Aggregate () | |
Default constructor. More... | |
Aggregate (const Vector3 &pos) | |
Constructor from position. More... | |
Aggregate (const Quaternion &ori) | |
Constructor from orientation. More... | |
Aggregate (const Vector3 &pos, const Quaternion &ori) | |
Constructor from position and orientation. More... | |
bool | operator== (const Aggregate &other) const |
Equality operator. More... | |
bool | operator!= (const Aggregate &other) const |
Inequality operator. More... | |
virtual bool | containsPoint (const Vector3 &p) const =0 |
Ckecks, whether given point is contained by receiver. More... | |
virtual bool | containsSphere (const Sphere &s) const =0 |
Ckecks, whether given sphere is contained by receiver. More... | |
virtual double | computeDistanceFrom (const Aggregate &aggreg) const =0 |
Computes distance of receiver from given Aggregate. More... | |
virtual double | computeMaxCoord (int axis) const =0 |
Computes maximum coordinate along given axis. More... | |
virtual double | computeMinCoord (int axis) const =0 |
Computes minimum coordinate along given axis. More... | |
bool | isInsideCube (double s) const |
Determines if receiver is entirely inside cube. The cube is in positive octant and has one corner in origin. More... | |
virtual double | computeVolume () const =0 |
Computes volume of receiver. | |
virtual void | fromSize (double s)=0 |
Adjust receiver dimensions accodring to given size. More... | |
virtual double | getSize () const =0 |
Returns size of receiver (what sieve opening it would normally pass) | |
virtual double | getMaxSize () const =0 |
Returns maximum size of receiver. | |
int | getNumber () |
Getter for number. | |
void | setNumber (int n) |
Setter for number. More... | |
const Vector3 & | getPos () const |
Getter for position (by reference) | |
Vector3 | getPos () |
Getter for position (by value) | |
void | setPos (const Vector3 &p) |
Setter for position. More... | |
void | setPos (double x, double y, double z) |
Setter for position (from individual components) More... | |
const Quaternion & | getOri () const |
Getter for orientation (by reference) | |
Quaternion | getOri () |
Getter for orientation (by value) | |
void | setOri (const Quaternion &q) |
Setter for orientation. More... | |
virtual const string & | getClassName ()=0 |
Returns string representation of class name. | |
Static Public Member Functions | |
static Aggregate * | Load (istream &is) |
Create and return a new aggregate from given istream. More... | |
Protected Attributes | |
int | number |
Number. | |
Vector3 | pos |
Position. | |
Quaternion | ori |
Orientation. | |
Friends | |
ostream & | operator<< (ostream &os, const Aggregate &o) |
Aggregate to ostream shift operator. | |
double | get_x (const Aggregate &a) |
Auxiliary function to get x coordinate from Aggregate reference (used by Octree) | |
double | get_y (const Aggregate &a) |
Auxiliary function to get y coordinate from Aggregate reference (used by Octree) | |
double | get_z (const Aggregate &a) |
Auxiliary function to get z coordinate from Aggregate reference (used by Octree) | |
double | get_size (const Aggregate &a) |
Auxiliary function to get (max) size from Aggregate reference (used by Octree) | |
double | get_x (const Aggregate *a) |
Auxiliary function to get x coordinate from Aggregate pointer (used by Octree) | |
double | get_y (const Aggregate *a) |
Auxiliary function to get y coordinate from Aggregate pointer (used by Octree) | |
double | get_z (const Aggregate *a) |
Auxiliary function to get z coordinate from Aggregate pointer (used by Octree) | |
double | get_size (const Aggregate *a) |
Auxiliary function to get (max) size from Aggregate pointer (used by Octree) | |
Abstract class representing one aggregate particle.
Containing information about its shape, position and orientation
|
inline |
Default constructor.
Sets number to -1, pos to (0,0,0) and ori to ((1,0,0),0)
|
inline |
Constructor from position.
Number is set to -1 and ori to ((1,0,0),0)
pos | position |
|
inline |
Constructor from orientation.
Number is set to -1 and pos to (0,0,0)
ori | orientation |
|
inline |
Constructor from position and orientation.
Number is set to -1
pos | position |
ori | orientation |
|
pure virtual |
Computes distance of receiver from given Aggregate.
Positive when the aggregates are separate, negative whan they overlap
aggreg | Aggregate object to compute distance from |
Implemented in aggregpacking::Ellipsoid, and aggregpacking::Sphere.
|
pure virtual |
Computes maximum coordinate along given axis.
axis | 0=x, 1=y, 2=z |
Implemented in aggregpacking::Ellipsoid, and aggregpacking::Sphere.
|
pure virtual |
Computes minimum coordinate along given axis.
axis | 0=x, 1=y, 2=z |
Implemented in aggregpacking::Ellipsoid, and aggregpacking::Sphere.
|
pure virtual |
Ckecks, whether given point is contained by receiver.
p | point coordinates |
Implemented in aggregpacking::Ellipsoid, and aggregpacking::Sphere.
|
pure virtual |
Ckecks, whether given sphere is contained by receiver.
s | given sphere object |
Implemented in aggregpacking::Ellipsoid, and aggregpacking::Sphere.
|
pure virtual |
Adjust receiver dimensions accodring to given size.
s | given size |
Implemented in aggregpacking::Ellipsoid, and aggregpacking::Sphere.
bool aggregpacking::Aggregate::isInsideCube | ( | double | s | ) | const |
Determines if receiver is entirely inside cube. The cube is in positive octant and has one corner in origin.
s | cube size |
|
static |
Create and return a new aggregate from given istream.
is | input stream |
|
inline |
Inequality operator.
Intended for Python
other | instance to compare with |
|
inline |
Equality operator.
Intended for Python
other | instance to compare with |
|
inline |
Setter for number.
n | new number |
|
inline |
Setter for orientation.
q | new orientation |
|
inline |
Setter for position.
p | new position |
|
inline |
Setter for position (from individual components)
x | x coordinate |
y | y coordinate |
z | z coordinate |