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

Círculo en dos dimensiones. More...

#include <Circle2d.h>

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

Public Member Functions

 Circle2d (const Pos2d &centro, const GEOM_FT &rad)
 Build the circle from its center and its radius.
 
 Circle2d (const GEOM_FT &rad2, const Pos2d &centro)
 Build the circle from its center and its squared radius.
 
 Circle2d (const Pos2d &p1, const Pos2d &p2, const Pos2d &p3)
 Build the circle from three points. More...
 
virtual Surface2d * getCopy (void) const
 
Pos2d Centro (void) const
 
virtual Pos2d getCenterOfMass (void) const
 Return the position of the center of mass.
 
Pos2d Point (const double &ang) const
 Return the point of the circle that corresponds to the parameter angle. More...
 
GEOM_FT getSquaredRadius (void) const
 
GEOM_FT getRadius (void) const
 Return the radius of the circle.
 
GEOM_FT getDiameter (void) const
 
virtual double getAngle (const Pos2d &p) const
 Return the angle between the line that passes through the center and the p point and the x axis. More...
 
virtual GEOM_FT getLength (void) const
 Return the length of the círcle.
 
GEOM_FT getPerimeter (void) const
 Return the perimeter of the object.
 
virtual double getIncludedAngle (void) const
 Return the angle included by the circle (2*pi).
 
virtual GEOM_FT getArea (void) const
 Return the area of the circle.
 
virtual GEOM_FT getVolume (void) const
 Return the volume of the object.
 
virtual GEOM_FT Ix (void) const
 Return el moment of inertia del círculo with respect to axis parallel to x que pasa por su centro. More...
 
virtual GEOM_FT Iy (void) const
 Moment of inertia with respect to an axis parallel to the Y axis that passes through the center of mass. More...
 
virtual GEOM_FT Pxy (void) const
 Product of inertia with respect to the center of mass.
 
virtual GEOM_FT Iz (void) const
 
virtual GEOM_FT GetMax (unsigned short int i) const
 Return the maximum value of the i coordinate of the points of the circle.
 
virtual GEOM_FT GetMin (unsigned short int i) const
 Return el valor mínimo of the i coordinate of the points of the circle.
 
virtual bool In (const Pos2d &p, const double &tol=0.0) const
 Return true if the point is on the circle.
 
Pos2dArray getPointsOnPerimeter (const size_t &n, const double &theta_inic=0.0) const
 Return n points equally spaced over the cicumference.
 
Polygon2d getInscribedPolygon (const size_t &n, const double &theta_inic=0.0) const
 Return the n-gon inscribed int the circle.
 
void Transform (const Trf2d &trf2d)
 Aplica al objeto la transformación que se pasa como parámetro. More...
 
Circle2d offset (const GEOM_FT &) const
 Return a circle parallel to this one at the distance being passed as parameter. More...
 
void Print (std::ostream &os) const
 
void Plot (Plotter &) const
 
- Public Member Functions inherited from Surface2d
virtual unsigned short int Dimension (void) const
 Return the dimension of the object 0, 1, 2 or 3.
 
GEOM_FT getPerimeter (void) const
 Return the object perimeter.
 
virtual GEOM_FT IArea (void) const
 
- Public Member Functions inherited from GeomObj2d
GEOM_FT GetXMax (void) const
 
GEOM_FT GetYMax (void) const
 
GEOM_FT GetXMin (void) const
 
GEOM_FT GetYMin (void) const
 
Pos2d getPMax (void) const
 
Pos2d getPMin (void) const
 
virtual Pos2d Projection (const Pos2d &) const
 Return the orthogonal projection onto the line. More...
 
virtual Vector2d Projection (const Vector2d &) const
 Return the projection onto the line. More...
 
BND2d Bnd (void) const
 Return the bounding rectangle.
 
virtual bool Out (const Pos2d &p, const double &tol=0.0) const
 Return true if the point lies outside the object.
 
virtual GEOM_FT getCenterOfMassFactor (void) const
 Return the factor used for the computation of the center of mass (1.0 by default). More...
 
GEOM_FT Wx (void) const
 Return the section modulus.
 
GEOM_FT Wy (void) const
 Return the section modulus.
 
double Theta_p (void) const
 Return the angle of one of the principal axis of inertia.
 
Dir2d IAxisDir_a (void) const
 Return the dirección de un principal axis of inertia (we don't know if it's the major or the minor yet). More...
 
Dir2d IAxisDir_b (void) const
 Return the direction of the other principal axis of inertia (we don't know if it's the major or the minor yet). More...
 
Line2d IAxis_a (void) const
 Return un principal axis of inertia (no sabemos si el mayor o el menor.
 
Line2d IAxis_b (void) const
 Return un principal axis of inertia (no sabemos si el mayor o el menor.
 
Ref2d2d PrincipalAxesOfInertia (void) const
 Return los principal axis of inertia.
 
GEOM_FT I1 (void) const
 Return the moment of inertia principal mayor.
 
GEOM_FT I2 (void) const
 Return the moment of inertia principal menor.
 
PrincipalAxes2D Inertia (void)
 
GEOM_FT I (const unsigned short int &i, const unsigned short int &j) const
 Return the componente i,j of the inertia tensor computed with respect to the center of mass. More...
 
GEOM_FT I (const Pos2d &O, const Vector2d &e) const
 Return the moment of inertia with respect to the axis that passes through O with the direction of e. More...
 
GEOM_FT I (const Line2d &r) const
 Return the moment of inertia with respect to the line argument.
 
GEOM_FT I (const unsigned short int i, const unsigned short int j, const Pos2d &o) const
 Return the component i,j of the inertia tensor computed with respect to the point "o". More...
 
GEOM_FT IO (const Pos2d &o) const
 Return the polar moment of inertia with respect to the point o.
 
FT_matrix I (void) const
 Return the inertia tensor with respect to the center of mass of the object.
 
FT_matrix I (const Pos2d &o) const
 Return the inertia tensor with respect to the point o.
 
virtual void Move (const Vector2d &)
 Desplaza el objeto.
 
- Public Member Functions inherited from GeomObj
 GeomObj (void)
 Constructor.
 
virtual bool hasCenterOfMass (void) const
 Return true if the object has a center of mass.
 
GEOM_FT getCenterOfMassArea (void) const
 Return the dimension used to compute the center of mass, as follows: More...
 
- 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.
 
CommandEntity * Owner (void)
 Return a pointer to the object owner.
 
const CommandEntity * Owner (void) const
 Return un puntero al objeto propietario de ESTE.
 
const StandardOutputWrapper & getStandardOutputWrapper (void) const
 Return the regular output stream wrapper.
 
StandardOutputWrapper & getStandardOutputWrapper (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.
 
EntityWithOwner & operator= (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.
 
EntityWithOwner * Owner (void)
 
const EntityWithOwner * Owner (void) const
 

Protected Member Functions

void arc_points (const double &theta_inic, const double &delta_theta, Pos2dArray &ptos) const
 Return n points equally espaces over the circle perimenter.
 
- 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.
 

Friends

int operator== (const Circle2d &a, const Circle2d &b)
 

Additional Inherited Members

- Public Types inherited from GeomObj2d
typedef PolyPos< Pos2d > list_Pos2d
 
- Public Types inherited from GeomObj
typedef PolyPos< Pos3d > list_Pos3d
 
typedef PolyPos< Pos2d > list_Pos2d
 
- 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.
 
- Static Protected Member Functions inherited from CommandEntity
static CommandEntity * entcmd_cast (boost::any &data)
 
- Static Protected Attributes inherited from EntityWithOwner
static int verbosity = 1
 Object that owns THIS ONE. More...
 

Detailed Description

Círculo en dos dimensiones.

Constructor & Destructor Documentation

◆ Circle2d()

Circle2d::Circle2d ( const Pos2d &  p1,
const Pos2d &  p2,
const Pos2d &  p3 
)

Build the circle from three points.

Basado en Mathematical elements for computer graphics (Rogers and Adams) page 233.

Member Function Documentation

◆ getAngle()

double Circle2d::getAngle ( const Pos2d &  p) const
virtual

Return the angle between the line that passes through the center and the p point and the x axis.

Reimplemented in CircularSector2d.

◆ Ix()

GEOM_FT Circle2d::Ix ( void  ) const
virtual

Return el moment of inertia del círculo with respect to axis parallel to x que pasa por su centro.

Implements GeomObj2d.

Reimplemented in AnnulusSector2d, and CircularSector2d.

◆ Iy()

virtual GEOM_FT Circle2d::Iy ( void  ) const
inlinevirtual

Moment of inertia with respect to an axis parallel to the Y axis that passes through the center of mass.

Implements GeomObj2d.

Reimplemented in AnnulusSector2d, and CircularSector2d.

◆ offset()

Circle2d Circle2d::offset ( const GEOM_FT &  d) const

Return a circle parallel to this one at the distance being passed as parameter.

The new circle will be exterior if the distance is positive.

◆ Point()

Pos2d Circle2d::Point ( const double &  ang) const

Return the point of the circle that corresponds to the parameter angle.

◆ Transform()

void Circle2d::Transform ( const Trf2d &  trf2d)
virtual

Aplica al objeto la transformación que se pasa como parámetro.

Implements GeomObj2d.


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