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< String > coordParameterNames () 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< String > optionNames () 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 633 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.

RSVector::~RSVector (  ) 

Destructor.


Member Function Documentation

bool RSVector::arrow (  )  const [inline]

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

Definition at line 656 of file RegionShapes.h.

References casa::p2Arrow().

vector<String> RSVector::coordParameterNames (  )  const
vector<CoordinateParameterType> RSVector::coordParameterTypes (  )  const

Overrides RSLine::coordParameterPositions.

vector<double> RSVector::coordParameterValues ( String  toSystem  )  const
vector<double> RSVector::coordParameterValues (  )  const
void RSVector::getShapeSpecificProperties ( Record &  properties  )  const [inline, protected]

Overrides RSLine::getShapeSpecificProperties.

Definition at line 711 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
vector<String> RSVector::optionNames (  )  const

Overrides RSLine::optionNames.

vector<OptionType> RSVector::optionTypes (  )  const

Overrides RSLine::optionTypes.

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

Overrides RSLine::setOptions.

String RSVector::type (  )  const [inline]

Overrides RSLine::type.

Definition at line 661 of file RegionShapes.h.


Member Data Documentation

double RSVector::m_angle [protected]

Definition at line 708 of file RegionShapes.h.

double RSVector::m_length [protected]

Definition at line 707 of file RegionShapes.h.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 31 Aug 2016 for casa by  doxygen 1.6.1