28 #include "../pos_vec/Pos3d.h" 41 explicit Ray3d(
const CGRay_3 &);
44 virtual GeomObj *getCopy(
void)
const 45 {
return new Ray3d(*
this); }
48 const CGRay_3 &ToCGAL(
void)
const 50 void TwoPoints(
const Pos3d &p1,
const Pos3d &p2);
51 virtual GEOM_FT
GetMax(
unsigned short int)
const 53 virtual GEOM_FT
GetMin(
unsigned short int)
const 55 virtual Line3d getSupportLine(
void)
const 56 {
return Line3d(cgsr.supporting_line()); }
57 Pos3d getFromPoint(
void)
const 58 {
return Pos3d(cgsr.source()); }
59 inline GEOM_FT getSlope(
void)
const 60 {
return getSupportLine().
getSlope(); }
63 const Pos3d Point(
const int &i= 0)
const 64 {
return Pos3d(cgsr.point(i)); }
68 inline bool isDegenerated(
void)
const 69 {
return cgsr.is_degenerate(); }
70 virtual bool In(
const Pos3d &p,
const double &tol= 0.0) const
72 {
return cgsr.has_on(p.ToCGAL()); }
91 inline virtual Pos3d getCenterOfMass(
void)
const 92 {
return Pos3d(NAN,NAN,NAN); }
93 Dir3d GetDir(
void)
const;
98 inline double getAngle(
const Vector3d &v)
const 99 {
return angle(VDir(),v); }
101 inline virtual GEOM_FT Ix(
void)
const 104 inline virtual GEOM_FT Iy(
void)
const 107 inline virtual GEOM_FT Iz(
void)
const 110 boost::python::dict
getPyDict(
void)
const;
111 void setPyDict(
const boost::python::dict &);
113 inline void Print(std::ostream &os)
const 118 {
return r.getAngle(v); }
119 inline GEOM_FT angle(
const Ray3d &sr,
const Line3d &r)
120 {
return r.getAngle(sr.VDir()); }
121 inline GEOM_FT angle(
const Line3d &r,
const Ray3d &sr)
122 {
return r.getAngle(sr.VDir()); }
125 {
return r.
dist2(p); }
127 {
return r.
dist2(p); }
129 {
return r.
dist(p); }
131 {
return r.
dist(p); }
133 inline bool parallel(
const Ray3d &r1,
const Line3d &r2)
135 inline bool parallel(
const Line3d &r1,
const Ray3d &r2)
136 {
return parallel(r2,r1); }
137 inline bool parallel(
const Ray3d &r1,
const Ray3d &r2)
148 inline bool colineales(
const Ray3d &sr,
const Line3d &r)
149 {
return colineales(sr.getSupportLine(),r); }
150 inline bool colineales(
const Line3d &r,
const Ray3d &sr)
151 {
return colineales(sr,r); }
152 inline bool colineales(
const Ray3d &sr1,
const Ray3d &sr2)
153 {
return colineales(sr1,sr2.getSupportLine()); }
boost::python::dict getPyDict(void) const
Return a Python dictionary with the object members values.
Definition: Ray3d.cc:203
void swap(void)
@ brief Swaps the ray orientation.
Definition: Ray3d.cc:80
bool downwards(void) const
Return true if the ray goes down.
Definition: Ray3d.cc:97
bool upwards(void) const
Return true if the ray goes up.
Definition: Ray3d.cc:93
Base class for position lists.
Definition: PolyPos.h:35
virtual Vector3d getKVector(void) const
Returns a vector in the direction of the local Z axis.
Definition: Ray3d.cc:112
Pos3d Projection(const Pos3d &) const
Return the orthogonal projection onto the line.
Definition: Ray3d.cc:187
virtual bool operator==(const Ray3d &) const
Comparison operator.
Definition: Ray3d.cc:65
Pos3d PtoParametricas(const GEOM_FT &lambda) const
Return a point of the line at a distance lambda from its origin.
Definition: Ray3d.h:66
GEOM_FT getSlope(void) const
Return the angle or the line with respect to XY plane.
Definition: Line3d.cc:281
Ray in a three-dimensional space.
Definition: Ray3d.h:36
Base class for the objects involving a single dimension in a three-dimensional space.
Definition: Linear3d.h:33
virtual GEOM_FT GetMin(unsigned short int) const
Return the minimum value of the i-th coordinate.
Definition: Ray3d.h:53
Vector3d getNormalized(void) const
Return the normalized vector.
Definition: Vector3d.cc:118
virtual GEOM_FT GetMax(unsigned short int) const
Return the maximum value of the i-th coordinate.
Definition: Ray3d.h:51
GEOM_FT dist(const Pos3d &p) const
Return the distance from the point to the ray.
Definition: Ray3d.cc:128
Dirección en el espacio de tres dimensiones.
Definition: Dir3d.h:35
virtual bool In(const Pos3d &p, const double &tol=0.0) const
Return true if point lies inside the object.
Definition: Ray3d.h:70
bool isParallel(const Ray3d &r) const
Return true if parallel.
Definition: Ray3d.cc:132
virtual GEOM_FT getLength(void) const
Return the object length.
Definition: Ray3d.h:89
Posición en tres dimensiones.
Definition: Pos3d.h:44
GeomObj3d::list_Pos3d getIntersection(unsigned short int, const double &) const
Return the intersection of the ray with the plane defined by the equation coord_i= d...
Definition: Ray3d.cc:156
Line in a three-dimensional space.
Definition: Line3d.h:62
virtual GEOM_FT dist2(const Pos3d &p) const
Returns the squared distand from the point.
Definition: Ray3d.cc:116
Ray3d(void)
Default constructor.
Definition: Ray3d.cc:30
void setPyDict(const boost::python::dict &)
Set the values of the object members from a Python dictionary.
Definition: Ray3d.cc:212
virtual Vector3d getIVector(void) const
Returns a vector in the direction of the local X axis.
Definition: Ray3d.cc:102
Clase base para las entidades geométricas.
Definition: GeomObj.h:40
virtual Vector3d getJVector(void) const
Returns a vector in the direction of the local Y axis.
Definition: Ray3d.cc:107
void Put(const Pos3d &p1, const Pos3d &p2)
Set the points that define the line.
Definition: Ray3d.h:76
Vector en tres dimensiones.
Definition: Vector3d.h:39