SGMatModel Class Reference

A randomly-placeable object. More...

#include <matmodel.hxx>

Inheritance diagram for SGMatModel:
SGReferenced

List of all members.

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

Detailed Description

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.


Member Function Documentation

double SGMatModel::get_coverage_m2 (  )  const

Get the average number of meters^2 occupied by each instance.

Returns:
The coverage in meters^2.

Definition at line 150 of file matmodel.cxx.

SGMatModel::HeadingType SGMatModel::get_heading_type (  )  const

Get the heading type for the object.

Returns:
The heading type.

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.

Returns:
The number of variant models.

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.

Returns:
A randomly select model from the variants.

Definition at line 138 of file matmodel.cxx.

double SGMatModel::get_randomized_range_m ( mt seed  )  const

Get a randomized visual range.

Returns:
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.

Returns:
The visual range.

Definition at line 155 of file matmodel.cxx.


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

Generated on 23 Feb 2010 for SimGear by  doxygen 1.6.1