A randomly-placeable object. More...
#include <matmodel.hxx>
Public Types | |
enum | HeadingType |
The heading type for a randomly-placed object. | |
Public Member Functions | |
int | get_model_count (SGPropertyNode *prop_root) |
Get the number of variant models available for the object. | |
osg::Node * | get_random_model (SGPropertyNode *prop_root) |
Get a randomly-selected variant model for the object. | |
double | get_coverage_m2 () const |
Get the average number of meters^2 occupied by each instance. | |
double | get_range_m () const |
Get the visual range of the object in meters. | |
double | get_randomized_range_m (mt *seed) const |
Get a randomized visual range. | |
HeadingType | get_heading_type () const |
Get the heading type for the object. | |
Friends | |
class | SGMatModelGroup |
A randomly-placeable object.
SGMaterial uses this class to keep track of the model(s) and parameters for a single instance of a randomly-placeable object. The object can have more than one variant model (i.e. slightly different shapes of trees), but they are considered equivalent and interchangeable.
Definition at line 59 of file matmodel.hxx.
double SGMatModel::get_coverage_m2 | ( | ) | const |
Get the average number of meters^2 occupied by each instance.
Definition at line 150 of file matmodel.cxx.
SGMatModel::HeadingType SGMatModel::get_heading_type | ( | ) | const |
Get the heading type for the object.
Definition at line 174 of file matmodel.cxx.
int SGMatModel::get_model_count | ( | SGPropertyNode * | prop_root | ) |
Get the number of variant models available for the object.
Definition at line 95 of file matmodel.cxx.
osg::Node * SGMatModel::get_random_model | ( | SGPropertyNode * | prop_root | ) |
Get a randomly-selected variant model for the object.
Definition at line 138 of file matmodel.cxx.
double SGMatModel::get_randomized_range_m | ( | mt * | seed | ) | const |
Get a randomized visual range.
Definition at line 160 of file matmodel.cxx.
double SGMatModel::get_range_m | ( | ) | const |
Get the visual range of the object in meters.
Definition at line 155 of file matmodel.cxx.