#include <visualvector.h>
Inheritance diagram for GVectors::VisualVector:

Public Member Functions | |
| VisualVector () | |
| Constructor. | |
| VisualVector (double x, double y, double z) | |
| Constructor. | |
| VisualVector (const std::string &t, double x, double y, double z) | |
| Constructor. | |
| VisualVector (const GVector &v) | |
| Constructor. | |
| VisualVector (const std::string &t, const GVector &v) | |
| Constructor. | |
| VisualVector (double x, double y, double z, const Coordinates &origin) | |
| Constructor. | |
| VisualVector (const std::string &t, double x, double y, double z, const Coordinates &origin) | |
| Constructor. | |
| VisualVector (const GVector &v, const Coordinates &origin) | |
| Constructor. | |
| VisualVector (const std::string &t, const GVector &v, const Coordinates &origin) | |
| Constructor. | |
| virtual | ~VisualVector () |
| Destructor. | |
| VisualVector (const VisualVector &vv) | |
| Copy constructor. | |
| void | set_scale (double s) |
| Set the scale. | |
| void | set_origin (const Coordinates &c) |
| Set the origin (tail) of the vector. | |
| void | set_arrow_length (double len) |
| Set the length of the arrow. | |
| void | set_arrow_angle (double ang, Angle_Type at=ANG_RAD) |
| Set the angle of the arrow. | |
| void | set_rotation (const Rotation &rot) |
| Set the rotation of the vector. | |
| void | set_tag (const std::string &t) |
| Set the tag of the VisualVector. | |
| void | set_color (const Color &c) |
| Set the color of the segment used to draw the vector. | |
| double | get_scale () const |
| Get the scale used to draw the vector. | |
| Coordinates | get_origin () const |
| Get the start point of the segment used to draw the vector. | |
| Coordinates | get_end () const |
| Get the end point of the segment used to draw the vector. | |
| double | get_arrow_length () const |
| Get length of the arrow. | |
| double | get_arrow_angle (Angle_Type at=ANG_RAD) const |
| Get the angle of the arrow. | |
| Rotation | get_rotation () const |
| Get the rotation used to draw the vector. | |
| std::string | get_tag () const |
| Get the tag of the VisualVector. | |
| Color | get_color () const |
| Get the color of the segment used to draw the vector. | |
| void | draw (Drawer &d) |
| Draw the VisualVector. | |
| const VisualVector & | operator= (const VisualVector &v) |
| Assignment operator for VisualVectors. | |
| const VisualVector & | operator= (const GVector &gv) |
| Assignment operator for GVectors. | |
Protected Member Functions | |
| void | transform_vector_2d () |
| Transform the vector to a 2D plane. | |
Private Member Functions | |
| void | init_matrices () |
| Initialize the matrices. | |
Private Attributes | |
| Rotation | rotation |
| Rotation of the VisualVector. | |
| Segment | segment |
| The segment used to draw the vector. | |
| double | scale |
| The scale. | |
| double | arrow_length |
| The length of the arrow. | |
| double | arrow_angle |
| The angle of the arrow Segments. | |
| std::string | tag |
| A std::string holding the optional tag of the vector. | |
| Matrix4x4 | m_rot_x |
| Rotation matrix in x direction. | |
| Matrix4x4 | m_rot_y |
| Rotation matrix in y direction. | |
| Matrix4x4 | m_rot_z |
| Rotation matrix in z direction. | |
| Matrix4x4 | m_rot_ix |
| Inverse rotation matrix in x direction. | |
| Matrix4x4 | m_rot_iy |
| Inverse rotation matrix in y direction. | |
| Matrix4x4 | m_rot_iz |
| Inverse rotation matrix in z direction. | |
| Matrix4x4 | m_scale |
| The scale matrix. | |
| Matrix4x4 | m_otrans |
| The object translation matrix. | |
| Matrix4x4 | m_iotrans |
| The inverse object translation matrix. | |
All lengths used in this class are to be interpreted by the Drawer class. It is made no assumption about the unit of the lengths.
| VisualVector::VisualVector | ( | ) |
Constructor. Initializes the VisualVector as zero vector.
| VisualVector::VisualVector | ( | double | x, | |
| double | y, | |||
| double | z | |||
| ) |
Constructor.
| x | The value of the x component. | |
| y | The value of the y component. | |
| z | The value of the z component. |
| VisualVector::VisualVector | ( | const std::string & | t, | |
| double | x, | |||
| double | y, | |||
| double | z | |||
| ) |
Constructor.
| t | String holding the tag of the VisualVector. | |
| x | The value of the x component. | |
| y | The value of the y component. | |
| z | The value of the z component. |
| VisualVector::VisualVector | ( | const GVector & | v | ) |
| VisualVector::VisualVector | ( | const std::string & | t, | |
| const GVector & | v | |||
| ) |
Constructor.
| t | String holding the tag of the VisualVector. | |
| v | A const reference to a GVector used to initialize the components. |
| VisualVector::VisualVector | ( | double | x, | |
| double | y, | |||
| double | z, | |||
| const Coordinates & | origin | |||
| ) |
Constructor.
| x | The value of the x component. | |
| y | The value of the y component. | |
| z | The value of the z component. | |
| origin | The origin in the 2D plane. |
| VisualVector::VisualVector | ( | const std::string & | t, | |
| double | x, | |||
| double | y, | |||
| double | z, | |||
| const Coordinates & | origin | |||
| ) |
Constructor.
| t | String holding the tag of the VisualVector. | |
| x | The value of the x component. | |
| y | The value of the y component. | |
| z | The value of the z component. | |
| origin | The origin in the 2D plane. |
| VisualVector::VisualVector | ( | const GVector & | v, | |
| const Coordinates & | origin | |||
| ) |
Constructor.
| v | A const reference to a GVector used to initialize the components. | |
| origin | The origin in the 2D plane. |
| VisualVector::VisualVector | ( | const std::string & | t, | |
| const GVector & | v, | |||
| const Coordinates & | origin | |||
| ) |
Constructor.
| t | String holding the tag of the VisualVector. | |
| v | A const reference to a GVector used to initialize the components. | |
| origin | The origin in the 2D plane. |
| VisualVector::~VisualVector | ( | ) | [virtual] |
Destructor. Does nothing. Just for completeness.
| VisualVector::VisualVector | ( | const VisualVector & | vv | ) |
| void VisualVector::init_matrices | ( | ) | [private] |
Initializes all matrices.
| void VisualVector::transform_vector_2d | ( | ) | [protected] |
Projects the VisualVector to two dimensions and fills start and end point of the segment used to draw the vector later on.
| void VisualVector::set_scale | ( | double | s | ) |
Sets the scale of the VisualVector used when projecting on a 2D plane.
| s | The scale to set. |
| void VisualVector::set_origin | ( | const Coordinates & | c | ) |
Sets the origin of the VisualVector used when projecting on a 2D plane.
| c | A const reference to the Coordinates specifying the origin. |
| void GVectors::VisualVector::set_arrow_length | ( | double | len | ) | [inline] |
Set the length of the arrow.
| len | The length of the arrow. |
| void VisualVector::set_arrow_angle | ( | double | ang, | |
| Angle_Type | at = ANG_RAD | |||
| ) |
Sets the angle of the arrow.
| ang | The angle. | |
| at | The units of the angle used. |
| void VisualVector::set_rotation | ( | const Rotation & | rot | ) |
| void GVectors::VisualVector::set_tag | ( | const std::string & | t | ) | [inline] |
Sets the tag of the VisualVector. The use of the tag is left to the user of the VisualVector class.
| t | A const reference to a std::string holding the tag. |
| void GVectors::VisualVector::set_color | ( | const Color & | c | ) | [inline] |
Sets the color of the segment used to draw the flag. This is passed to the segment representing the vector.
| c | A const reference to a Color object. |
| double GVectors::VisualVector::get_scale | ( | ) | const [inline] |
Gets the scale used to draw the vector.
| Coordinates GVectors::VisualVector::get_origin | ( | ) | const [inline] |
Gets the start point of the segment used to draw the vector.
| Coordinates GVectors::VisualVector::get_end | ( | ) | const [inline] |
Gets the end point of the segment used to draw the vector.
| double GVectors::VisualVector::get_arrow_length | ( | ) | const [inline] |
Gets the length of the arrow.
| double VisualVector::get_arrow_angle | ( | Angle_Type | at = ANG_RAD |
) | const |
Gets the angle used to draw the arrow.
| at | The units of measurement used for getting the angle. |
| Rotation GVectors::VisualVector::get_rotation | ( | ) | const [inline] |
| std::string GVectors::VisualVector::get_tag | ( | ) | const [inline] |
| Color GVectors::VisualVector::get_color | ( | ) | const [inline] |
Gets the color of the segment used to draw the vector.
| void VisualVector::draw | ( | Drawer & | d | ) |
Draws the VisualVector using the Drawer specified.
| d | A reference to the Drawer object used to draw the vector. |
| const VisualVector & VisualVector::operator= | ( | const VisualVector & | v | ) |
Assignment operator for assigning another VisualVector to this.
| v | A const reference to a VisualVector object. |
| const VisualVector & VisualVector::operator= | ( | const GVector & | gv | ) |
Assignment operator for assigning a GVector to this.
| gv | A const reference to a GVector object. |
Reimplemented from GVectors::GVector.
Rotation GVectors::VisualVector::rotation [private] |
The rotation of the VisualVector.
Segment GVectors::VisualVector::segment [private] |
The segment used to draw the vector.
double GVectors::VisualVector::scale [private] |
The scale value is filled into the m_scale matrix.
double GVectors::VisualVector::arrow_length [private] |
The length of the Segment used to draw the head arrow.
double GVectors::VisualVector::arrow_angle [private] |
The angle of the arrow Segments in relation to the Segment used to draw the vector itself.
std::string GVectors::VisualVector::tag [private] |
A std::string holding the optional tag of the vector. The use of the tag is left to the user of the class. The VisualVector class makes no explicit use of the tag.
Matrix4x4 GVectors::VisualVector::m_rot_x [private] |
Rotation matrix in x direction.
Matrix4x4 GVectors::VisualVector::m_rot_y [private] |
Rotation matrix in y direction.
Matrix4x4 GVectors::VisualVector::m_rot_z [private] |
Rotation matrix in z direction.
Matrix4x4 GVectors::VisualVector::m_rot_ix [private] |
Inverse rotation matrix in x direction.
Matrix4x4 GVectors::VisualVector::m_rot_iy [private] |
Inverse rotation matrix in y direction.
Matrix4x4 GVectors::VisualVector::m_rot_iz [private] |
Inverse rotation matrix in z direction.
Matrix4x4 GVectors::VisualVector::m_scale [private] |
The scale matrix. Depends on the scale value.
Matrix4x4 GVectors::VisualVector::m_otrans [private] |
The object translation matrix.
Matrix4x4 GVectors::VisualVector::m_iotrans [private] |
The inverse object translation matrix.
1.4.7