xc
Public Member Functions | Friends | List of all members
Vector2d Class Reference

Vector en dos dimensiones. More...

#include <Vector2d.h>

Inheritance diagram for Vector2d:
Inheritance graph
[legend]
Collaboration diagram for Vector2d:
Collaboration graph
[legend]

Public Member Functions

 Vector2d (const CGVector_2 &v)
 
 Vector2d (const CGDirection_2 &dir)
 
 Vector2d (const GEOM_FT &x, const GEOM_FT &y)
 Constructor.
 
 Vector2d (const boost::python::list &)
 Constructor.
 
 Vector2d (const FT_matrix &m)
 Constructor.
 
 Vector2d (const Pos2d &p1, const Pos2d &p2)
 Constructor.
 
virtual bool operator== (const Vector2d &) const
 Comparison operator.
 
bool operator!= (const Vector2d &) const
 
const CGVector_2 & ToCGAL (void) const
 
int dimension (void) const
 
void Neg (void)
 
Vector2d operator- (void) const
 
bool Nulo (void) const
 
void SetX (const GEOM_FT &vx)
 
void SetY (const GEOM_FT &vy)
 
void Set (unsigned short int i, const GEOM_FT &v)
 
GEOM_FT at (const size_t &i) const
 
GEOM_FT operator() (const size_t &i) const
 
GEOM_FT operator[] (const size_t &j) const
 
GEOM_FT x () const
 
GEOM_FT y () const
 
FT_matrix getMatrix (void) const
 Return the point coordinates in a matrix.
 
boost::python::list getPyList (void) const
 Return the point coordinates in a Python list.
 
Vector2doperator+= (const Vector2d &)
 
Vector2doperator-= (const Vector2d &)
 
Vector2d operator+ (const Vector2d &) const
 Return la suma de los vectores.
 
Vector2d operator- (const Vector2d &) const
 Return la resta de los vectores.
 
Vector2d operator* (const GEOM_FT &) const
 Return el producto del vector por el escalar.
 
Vector2d operator/ (const GEOM_FT &) const
 Return el producto del vector por el inverso del escalar.
 
virtual GEOM_FT GetModulus2 (void) const
 
virtual GEOM_FT GetModulus (void) const
 Return el módulo del vector.
 
bool EsUnitario (const double &tol=mchne_eps_dbl) const
 
Vector2d getNormalized (void) const
 Return el versor (vector de módulo unidad) correspondiente a éste vector.
 
void Normalize (void)
 Normalize vector.
 
Vector2d Normal (void) const
 Return el vector normal a éste.
 
Dir2d getDirection (void) const
 
GEOM_FT getSignedAngle (const Vector2d &v) const
 Return the angle with the vector argument.
 
GEOM_FT getAngle (const Vector2d &v) const
 Return the angle with the argument vector.
 
GEOM_FT XAxisAngle (void) const
 
GEOM_FT YAxisAngle (void) const
 
virtual GEOM_FT GetDot (const Vector2d &v) const
 
virtual GEOM_FT GetDot (const FT_matrix &m) const
 Producto escalar.
 
Vector2d Rotated (const double &ang_rad) const
 Return the vector that results from rotating this one by the given angle. More...
 
Vector2d Perpendicular (const Orientacion &o) const
 
Vector2d Perpendicular (const Vector2d &v) const
 Return the vector obtained from projecting v onto the perpendicular direction to this vector. More...
 
boost::python::dict getPyDict (void) const
 Return a Python dictionary with the object members values.
 
void setPyDict (const boost::python::dict &)
 Set the values of the object members from a Python dictionary.
 
void Print (std::ostream &stream) const
 
void Plot (Plotter &psos) const
 
- Public Member Functions inherited from ProtoGeom
 ProtoGeom (void)
 False when solution is not possible: intersection of parallel planes. More...
 
void setExists (bool e)
 
bool exists (void) const
 
boost::python::dict getPyDict (void) const
 Return a Python dictionary with the object members values.
 
void setPyDict (const boost::python::dict &)
 Set the values of the object members from a Python dictionary.
 
- Public Member Functions inherited from CommandEntity
 CommandEntity (CommandEntity *owr=nullptr)
 Default constructor.
 
CommandEntityOwner (void)
 Return a pointer to the object owner.
 
const CommandEntityOwner (void) const
 Return un puntero al objeto propietario de ESTE.
 
const StandardOutputWrappergetStandardOutputWrapper (void) const
 Return the regular output stream wrapper.
 
StandardOutputWrappergetStandardOutputWrapper (void)
 Return the regular output stream wrapper.
 
const std::string & getLogFileName (void) const
 Returns log file name.
 
void setLogFileName (const std::string &)
 Sets log file name.
 
const std::string & getErrFileName (void) const
 Returns err file name.
 
void setErrFileName (const std::string &)
 Sets error file name.
 
const std::string & getOutputFileName (void) const
 Returns regular output file name.
 
void setOutputFileName (const std::string &)
 Sets regular output file name.
 
boost::python::object evalPy (boost::python::object dict, const std::string &)
 Return the Python object that results from evaluating the argument.
 
boost::python::object execPy (boost::python::object dict, const std::string &)
 Return the Python objects that results from executing the code in the string argument.
 
boost::python::object execFilePy (boost::python::object dict, const std::string &)
 Return the Python object that results from executing the code in the file.
 
- Public Member Functions inherited from EntityWithProperties
 EntityWithProperties (EntityWithProperties *owr=nullptr)
 Default constructor.
 
void clearPyProps (void)
 Clear python properties map.
 
bool hasPyProp (const std::string &)
 Returns true if property exists.
 
boost::python::object getPyProp (const std::string &str)
 Return the Python object with the name being passed as parameter.
 
void setPyProp (std::string str, boost::python::object val)
 Sets/appends a value tho the Python object's dictionary.
 
void copyPropsFrom (const EntityWithProperties &)
 Copy the properties from the argument.
 
boost::python::list getPropNames (void) const
 Return the names of the object properties weightings.
 
const PythonDict & getPropertiesDict (void) const
 Return a std::map container with the properties of the object.
 
boost::python::dict getPyDict (void) const
 Return a Python dictionary containing the object members values.
 
void setPyDict (const boost::python::dict &)
 Set the values of the object members from a Python dictionary.
 
- Public Member Functions inherited from EntityWithOwner
 EntityWithOwner (EntityWithOwner *owr=nullptr)
 Default constructor.
 
 EntityWithOwner (const EntityWithOwner &)
 Copy constructor.
 
EntityWithOwneroperator= (const EntityWithOwner &)
 Assignment operator.
 
virtual bool operator== (const EntityWithOwner &) const
 Comparison operator.
 
virtual ~EntityWithOwner (void)
 Virtual destructor.
 
virtual std::string getClassName (void) const
 Returns demangled class name.
 
void set_owner (EntityWithOwner *owr)
 Assigns the owner of the object.
 
EntityWithOwnerOwner (void)
 
const EntityWithOwnerOwner (void) const
 

Friends

GEOM_FT dot (const Vector2d &v1, const Vector2d &v2)
 
GEOM_FT dot (const Vector2d &v1, const FT_matrix &m)
 Return the product of the vector times the matrix.
 
GEOM_FT dot (const FT_matrix &m, const Vector2d &v1)
 Return the product of the matrix times the vector.
 
FT_matrix operator* (const FT_matrix &m, const Vector2d &v)
 Product of the vector times the matrix.
 
std::ostream & operator<< (std::ostream &stream, const Vector2d &n)
 

Additional Inherited Members

- Public Types inherited from EntityWithProperties
typedef std::map< std::string, boost::python::object > PythonDict
 
- Static Public Member Functions inherited from CommandEntity
static void resetStandardOutput (void)
 Reset the standard output streams to its defaults buffers.
 
- Static Public Member Functions inherited from EntityWithOwner
static int getVerbosityLevel (void)
 Get the value of the verbosity level.
 
static void setVerbosityLevel (const int &)
 Set the value of the verbosity level.
 
- Protected Member Functions inherited from CommandEntity
template<class T >
void string_to (T &, const std::string &) const
 
- Protected Member Functions inherited from EntityWithProperties
bool isEqual (const EntityWithProperties &) const
 Return true if both objects are equal.
 
- Protected Member Functions inherited from EntityWithOwner
virtual bool isEqual (const EntityWithOwner &) const
 Return true if both objects are equal.
 
- Static Protected Member Functions inherited from CommandEntity
static CommandEntityentcmd_cast (boost::any &data)
 
- Static Protected Attributes inherited from EntityWithOwner
static int verbosity = 1
 Object that owns THIS ONE. More...
 

Detailed Description

Vector en dos dimensiones.

Member Function Documentation

◆ Perpendicular()

Vector2d Vector2d::Perpendicular ( const Vector2d v) const

Return the vector obtained from projecting v onto the perpendicular direction to this vector.

Used to orthogonalize a base.

◆ Rotated()

Vector2d Vector2d::Rotated ( const double &  ang_rad) const

Return the vector that results from rotating this one by the given angle.


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