casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions | Protected Member Functions | Protected Attributes
RSVector Class Reference

Subclass of RSLine that takes a length and angle instead of a second point. More...

#include <RegionShapes.h>

List of all members.

Public Member Functions

 RSVector (double x, double y, double length, double angle, MDirection::Types worldSystem, int arrowLength, bool arrow=true, ArrowType arrowType=FilledDoubleV)
 World Constructor.
 RSVector (double x, double y, double length, double angle, int arrowLength, bool arrow=true, ArrowType arrowType=FilledDoubleV)
 Pixel Constructor.
 RSVector (const RecordInterface &properties)
 Record Constructor.
 ~RSVector ()
 Destructor.
bool arrow () const
 Returns whether the vector has an arrow at the end or not.
String type () const
 Overrides RSLine::type.
void getVectorCoordinates (double &x, double &y, double &angle, double &length, int &arrowLength, String toSystem="") const
 Gets vector-specific coordinates, to avoid dependence on coordParameterValues() when the shape type is known.
vector< double > coordParameterValues () const
 Overrides RSLine::coordParameterValues.
vector< double > coordParameterValues (String toSystem) const
 Implements RegionShape::coordParameterValues.
vector< StringcoordParameterNames () const
 Overrides RSLine::coordParameterNames.
vector< CoordinateParameterType > coordParameterTypes () const
 Overrides RSLine::coordParameterPositions.
void setCoordParameters (const vector< double > &vals)
 Overrides RSLine::setCoordParameters.
void setCoordParameters (const vector< double > &vals, String valSystem)
 Overrides RSLine::setCoordParameters.
vector< StringoptionNames () const
 Overrides RSLine::optionNames.
vector< OptionType > optionTypes () const
 Overrides RSLine::optionTypes.
vector< vector< String > > optionChoices () const
 Overrides RSLine::optionChoices.
vector< RSOption > optionValues () const
 Overrides RSLine::optionValues.
void setOptionValues (const vector< RSOption > &options)
 Overrides RSLine::setOptions.

Protected Member Functions

void getShapeSpecificProperties (Record &properties) const
 Overrides RSLine::getShapeSpecificProperties.

Protected Attributes

double m_length
double m_angle

Detailed Description

Subclass of RSLine that takes a length and angle instead of a second point.

Definition at line 601 of file RegionShapes.h.


Constructor & Destructor Documentation

RSVector::RSVector ( double  x,
double  y,
double  length,
double  angle,
MDirection::Types  worldSystem,
int  arrowLength,
bool  arrow = true,
ArrowType  arrowType = FilledDoubleV 
)

World Constructor.

x, y, length, and angle must all be 1) using the same world system as defined by worldSystem, and 2) in unit RegionShape::UNIT. Angle is counterclockwise, and the base is the east vector. arrowLength is in screen pixels. arrow defines whether the second point has an arrow.

RSVector::RSVector ( double  x,
double  y,
double  length,
double  angle,
int  arrowLength,
bool  arrow = true,
ArrowType  arrowType = FilledDoubleV 
)

Pixel Constructor.

Angle is counterclockwise. arrowLength is in screen pixels. arrow defines whether the second point has an arrow.

RSVector::RSVector ( const RecordInterface &  properties)

Record Constructor.

Destructor.


Member Function Documentation

bool RSVector::arrow ( ) const [inline]

Returns whether the vector has an arrow at the end or not.

Definition at line 624 of file RegionShapes.h.

References casa::p2Arrow().

Overrides RSLine::coordParameterNames.

vector<CoordinateParameterType> RSVector::coordParameterTypes ( ) const

Overrides RSLine::coordParameterPositions.

vector<double> RSVector::coordParameterValues ( ) const

Overrides RSLine::coordParameterValues.

vector<double> RSVector::coordParameterValues ( String  toSystem) const

Implements RegionShape::coordParameterValues.

void RSVector::getShapeSpecificProperties ( Record &  properties) const [inline, protected]

Overrides RSLine::getShapeSpecificProperties.

Definition at line 675 of file RegionShapes.h.

void RSVector::getVectorCoordinates ( double &  x,
double &  y,
double &  angle,
double &  length,
int &  arrowLength,
String  toSystem = "" 
) const

Gets vector-specific coordinates, to avoid dependence on coordParameterValues() when the shape type is known.

If toSystem is empty, no conversion is done; otherwise see the constraints listed in RegionShape::coordParameterValues(String).

vector<vector<String> > RSVector::optionChoices ( ) const

Overrides RSLine::optionChoices.

vector<String> RSVector::optionNames ( ) const

Overrides RSLine::optionNames.

vector<OptionType> RSVector::optionTypes ( ) const

Overrides RSLine::optionTypes.

vector<RSOption> RSVector::optionValues ( ) const

Overrides RSLine::optionValues.

void RSVector::setCoordParameters ( const vector< double > &  vals)

Overrides RSLine::setCoordParameters.

void RSVector::setCoordParameters ( const vector< double > &  vals,
String  valSystem 
)

Overrides RSLine::setCoordParameters.

void RSVector::setOptionValues ( const vector< RSOption > &  options)

Overrides RSLine::setOptions.

String RSVector::type ( ) const [inline]

Overrides RSLine::type.

Definition at line 627 of file RegionShapes.h.


Member Data Documentation

double RSVector::m_angle [protected]

Definition at line 672 of file RegionShapes.h.

double RSVector::m_length [protected]

Definition at line 671 of file RegionShapes.h.


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