Public Member Functions |
| Spore (float centroid_x, float centroid_y, float centroid_z, float length, float width, float base_theta, float base_psi, float theta, float psi, float opacity, size_t level, const class Spore_density *density) throw (jwscxx::base::Arg_error) |
| Constructs a parent-less Spore positioned w.r.t. a centroid.
|
| Spore (Structure *parent, float length, float width, float base_theta, float base_psi, float theta, float psi, float opacity, const class Spore_density *density) throw (jwscxx::base::Arg_error, Apical_error) |
| Constructs a Spore and attaches it to a parent.
|
| Spore (Structure *parent, float centroid_x, float centroid_y, float centroid_z, float length, float width, float base_theta, float base_psi, float opacity, const class Spore_density *density) throw (jwscxx::base::Arg_error, Apical_error) |
| Constructs a Spore and attaches it to a parent.
|
| Spore (const Spore &s) |
| Constructs a Spore by copying another.
|
| Spore (const class Apical_hypha &h, float width, const Spore_density *density) throw (jwscxx::base::Arg_error) |
| Constructs a Spore by copying another.
|
Spore * | clone () const |
| Clones this Spore.
|
Spore & | operator= (const Spore &s) |
| Copies a Spore into this Spore.
|
class Spore_density * | get_density () const |
| Returns the density parameters used by this Structure.
|
Spore * | split_into_apical (const Spore *rvals_1, const Spore *rvals_2) throw (jwscxx::base::Arg_error) |
| Stochastically splits this Spore into this and another Spore.
|
Spore * | merge_with_apical (const Spore *rvals) throw (jwscxx::base::Arg_error) |
| Stochastically merges this Spore with its Spore::apical.
|
class Apical_hypha * | split_into_apical (const Apical_hypha *rvals_1, const Apical_hypha *rvals_2) throw (jwscxx::base::Arg_error) |
| Splits a Spore into 2 Apical_hypha.
|
void | replace (class Apical_hypha *hypha) throw (jwscxx::base::Arg_error) |
| Replaces this Spore with an Apical_hypha.
|
bool | draw_in_matrix_f (jwsc::Matrix_f *M, float x, float y, float z, float x_scale, float y_scale, float z_scale, bool fill=true) const |
| Draws this Spore in a matrix.
|
bool | draw_in_matblock_f (jwsc::Matblock_f *M_blk, float x, float y, float z, float x_scale, float y_scale, float z_scale, bool fill=true) const |
| Draws this Spore in a matrix block.
|
float | get_intersection (jwsc::Vector_f **isect_out, uint32_t n, const jwsc::Vector_f *p1_in, const jwsc::Vector_f *p2_in) throw (jwscxx::base::Arg_error) |
| Draws this Spore in an OpenGL environment.
|
const char * | get_type_str () const |
| Returns the type of this Structure in the form of a string.
|
Static Public Member Functions |
static const char * | type_str () |
| Returns the type of this Structure in the form of a string.
|
Protected Member Functions |
void | draw_in_zeroed_matrix_f (jwsc::Matrix_f *M, float x, float y, float z, float x_scale, float y_scale, float z_scale, bool fill=true) const |
| Draws this Spore in a zeroed matrix.
|
void | update_log_prob () |
| Updates Structure::log_prob.
|
Protected Attributes |
class Spore_density * | density |
| Parameters for density functions over a Spore.
|
An Alterneria spore modeled as a symmetric ellipsoid.
The ellipsoid is symmetric with respect to two of its minor axis.
Definition at line 79 of file spore.h.
bool Spore::draw_in_matrix_f |
( |
jwsc::Matrix_f * |
M, |
|
|
float |
x, |
|
|
float |
y, |
|
|
float |
z, |
|
|
float |
x_scale, |
|
|
float |
y_scale, |
|
|
float |
z_scale, |
|
|
bool |
fill = true |
|
) |
| const |
Draws this Spore in a matrix.
The drawing plane (M) has normal vector <x,y,z> = <0,0,1> in 3-space, i.e., it is parallel to the xy-plane. The parameter z specifies the distance of the drawing plane from the origin (0,0,1).
The parameters x and y specify the location of M->elts[0][0] in the spore coordinate system. Increasing indices of m correspond to increasing values of x and y scaled by x_scale and y_scale, respectively.
Formally, the center of the (i,j)th element of M in spore coordinates will be
x_0 = x + x_scale*(i + 0.5);
y_0 = y + y_scale*(j + 0.5);
z_0 = z + z_scale*0.5;
The position of (x_0,y_0,z_0) in m is given by
i = floor((x_0 - x) / x_scale + 0.5);
j = floor((y_0 - y) / y_scale + 0.5);
- Parameters:
-
M | Matrix to draw spore in. |
x | Position of the first m column index in the spore coordinate system. |
y | Position of the first m row index in the spore coordinate system. |
z | Position of m in the spore coordinate system. |
x_scale | Number of spore coordinate system units per column in m. |
y_scale | Number of spore coordinate system units per row in m. |
z_scale | Number of spore coordinate system units per matrix. |
fill | Set to true if the spore is to be filled; false otherwise. |
- Returns:
- True if any of the structures intersect with something other than one of its children.
Definition at line 660 of file spore.cpp.
bool Spore::draw_in_matblock_f |
( |
jwsc::Matblock_f * |
M_blk, |
|
|
float |
x, |
|
|
float |
y, |
|
|
float |
z, |
|
|
float |
x_scale, |
|
|
float |
y_scale, |
|
|
float |
z_scale, |
|
|
bool |
fill = true |
|
) |
| const [virtual] |
Draws this Spore in a matrix block.
The drawing planes (M_blk) have normal vectors <x,y,z> = <0,0,1> in 3-space, i.e., parallel to the xy-plane. The parameter z specifies the distance of the drawing plane from the origin (0,0,1).
The parameters x, y, and z specify the location of mb->elts[0][0][0] in the spore coordinate system. Increasing indices of mb correspond to increasing values of x, y, and z scaled by x_scale, y_scale and z_scale, respectively.
Formally, the center of the (i,j,k)th element of M_blk in spore coordinates will be
x_0 = x + x_scale*(i + 0.5);
y_0 = y + y_scale*(j + 0.5);
z_0 = z + z_scale*(k + 0.5);
The position of (x_0,y_0,z_0) in M_blk is given by
i = floor((x_0 - x) / x_scale + 0.5);
j = floor((y_0 - y) / y_scale + 0.5);
k = floor((z_0 - z) / z_scale + 0.5);
- Parameters:
-
M_blk | Matrix block to draw spore in. |
x | Position of the first mb column index in the spore coordinate system. |
y | Position of the first mb row index in the spore coordinate system. |
z | Position of the first mb matrix in the spore coordinate system. |
x_scale | Number of spore coordinate system units per column in mb. |
y_scale | Number of spore coordinate system units per row in mb. |
z_scale | Number of spore coordinate system units per matrix in mb. |
fill | Set to true if the spore is to be filled; false otherwise. |
- Returns:
- True if any of the structures intersect with something other than one of its children.
Implements Structure.
Definition at line 806 of file spore.cpp.
void Spore::draw_in_zeroed_matrix_f |
( |
jwsc::Matrix_f * |
M, |
|
|
float |
x, |
|
|
float |
y, |
|
|
float |
z, |
|
|
float |
x_scale, |
|
|
float |
y_scale, |
|
|
float |
z_scale, |
|
|
bool |
fill = true |
|
) |
| const [protected] |
Draws this Spore in a zeroed matrix.
The drawing plane (M) has normal vector <x,y,z> = <0,0,1> in 3-space, i.e., it is parallel to the xy-plane. The parameter z specifies the distance of the drawing plane from the origin (0,0,1).
The parameters x and y specify the location of M->elts[0][0] in the spore coordinate system. Increasing indices of m correspond to increasing values of x and y scaled by x_scale and y_scale, respectively.
Formally, the center of the (i,j)th element of m in spore coordinates will be
x_0 = x + x_scale*(i + 0.5);
y_0 = y + y_scale*(j + 0.5);
z_0 = z + z_scale*0.5;
The position of (x_0,y_0,z_0) in m is given by
i = floor((x_0 - x) / x_scale + 0.5);
j = floor((y_0 - y) / y_scale + 0.5);
- Parameters:
-
M | Matrix to draw spore in. |
x | Position of the first m column index in the spore coordinate system. |
y | Position of the first m row index in the spore coordinate system. |
z | Position of m in the spore coordinate system. |
x_scale | Number of spore coordinate system units per column in m. |
y_scale | Number of spore coordinate system units per row in m. |
z_scale | Number of spore coordinate system units per matrix. |
fill | Set to true if the spore is to be filled; false otherwise. |
- Warning:
- In order to do proper filling of the spore, the matrix M must be empty (zero) prior to calling this function.
Definition at line 889 of file spore.cpp.