[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Chapter summary: Metric entities, co-ordinate systems and transformations.
This non-core Level 2 library vcsl
is intended to provide an environment
for representing co-ordinate systems, transformations, dimensions, and metric
units.
This includes classes for
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
vcsl_dimension
- Abstract dimension
vcsl_length
vcsl_angle
vcsl_unit
- Abstract unit associated to a dimension
vcsl_length_unit
vcsl_meter
- This is the standard length unit
vcsl_angle_unit
vcsl_radian
- This is the standard angular unit
vcsl_degree
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
vcsl_coordinate_system
vcsl_cartesian_2d
vcsl_cartesian_3d
vcsl_cylindrical
vcsl_polar
vcsl_spherical
vcsl_geographic
vcsl_geocentric
- Intended to represent a location relative to the earth
vcsl_geodetic
- Intended to represent a location relative to the earth
vcsl_lambertian
- Lambert Conformal Conic Projection
vcsl_utm
- Universal Transverse Mercator projection
vcsl_spatial_transformation
vcsl_cylindrical_to_cartesian_3d
vcsl_perspective
vcsl_rotation
- Rotation about an axis through the origin
vcsl_displacement
- Rotation about a general axis
vcsl_scale
vcsl_translation
vcsl_composition
- Composition of transformations
vcsl_graph
- Represent multiple co-ordinate systems and transformation between them.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
The following example shows how to use and build a set of co-ordinate systems.
#include <vcsl/vcsl_cartesian_3d.h> #include <vcsl/vcsl_rotation.h> #include <vcsl/vcsl_graph.h> ... //: Convenient indices for vectors representing points, etc. enum AXES { X, Y, Z, T }; //: Graph of defined CS (Co-ordinate system) // All CS must be added to this graph as they are created. vcsl_graph_sptr graphCS = new vcsl_graph; //: World Coordinate System // Equivalent to the Top view, by definition. // // A CS for which no parent is defined is absolute. Logically, // there must be one absolute CS which all other directly or // indirectly relate to. vcsl_spatial_sptr WCS = new vcsl_cartesian_3d; // Add WCS to the global map of coordinate systems. WCS->set_graph(graphCS); // New CS can be defined relative to any point (translation) or // axis (rotation) in the parent CS. But it is so common to do // so relative to the X, Y, or Z axes, that it is convenient to // define the corresponding vectors: //: x-axis vector vnl_vector_fixed <double, 3> xA; xA[X]=1; xA[Y] = 0; xA[Z] = 0; //: y-axis vector vnl_vector_fixed <double, 3> yA; yA[X]=0; yA[Y] = 1; yA[Z] = 0; //: z-axis vector vnl_vector_fixed <double, 3> zA; zA[X]=0; zA[Y] = 0; zA[Z] = 1; //: 90 degree rotation about WCS y-axis // Transforms from WCS to right CS vcsl_rotation rightXF; rightXF.set_static(vnl_math::pi_over_2, yA); //: WCS rotated 90 degrees about the y-axis to produce right hand view/CS vcsl_spatial_sptr right = new vcsl_cartesian_3d; right->set_graph(graphCS); right->set_unique(WCS, &rightXF); //: Corner of a box with opposite corner at origin of WCS. vnl_vector_fixed <double, 3> corner; corner[X] = 1; corner[Y] = 2; corner[Z] = 3; // By inspection, corner should be (-3,2,1) in 'right' CS vnl_vector<double> cornerXF = WCS->from_local_to_cs(corner, right, 0); vcl_cout << cornerXF.x() << ", " << cornerXF.y() << ", " << cornerXF.z() << '\n'; |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
vcsl_spherical_to_cartesian_3d
vcsl_polar_to_cartesian_2d
vcsl_geocentric_to_cartesian_3d
vcsl_geodetic_to_cartesian_3d
vcsl_lambertian_to_cartesian_3d
vcsl_utm_to_cartesian_3d
vcsl_spatial_transformation
, add
//: May `this' have a matrix representation ? virtual bool is_linear(void) const=0; //: Homogeneous matrix of `this' at time `time' // REQUIRE: is_valid() // REQUIRE: is_linear() virtual vnl_matrix<double> matrix_value(const double time, bool type) const; |
[ << ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
This document was generated by Rumpelstiltskin on November, 22 2009 using texi2html 1.78.