mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-05-21 10:55:33 +03:00
0024342: Create non-constant methods ChangeCoord with index parameter in classes gp_XY and gp_XYZ
The methods were created.
This commit is contained in:
parent
971c281b11
commit
db71702d4b
@ -70,6 +70,11 @@ is
|
||||
raises OutOfRange
|
||||
is static;
|
||||
|
||||
ChangeCoord (me: in out; theIndex : Integer) returns Real
|
||||
---C++: inline
|
||||
---C++: return &
|
||||
raises OutOfRange;
|
||||
|
||||
Coord (me; X, Y : out Real) is static;
|
||||
---C++: inline
|
||||
---Purpose: For this number pair, returns its coordinates X and Y.
|
||||
|
@ -47,6 +47,12 @@ inline Standard_Real gp_XY::Coord (const Standard_Integer i) const
|
||||
return (&x)[i-1];
|
||||
}
|
||||
|
||||
inline Standard_Real& gp_XY::ChangeCoord (const Standard_Integer theIndex)
|
||||
{
|
||||
Standard_OutOfRange_Raise_if(theIndex < 1 || theIndex > 2,NULL);
|
||||
return (&x)[theIndex - 1];
|
||||
}
|
||||
|
||||
inline void gp_XY::Coord (Standard_Real& X,
|
||||
Standard_Real& Y) const
|
||||
{ X = x; Y = y; }
|
||||
|
@ -78,6 +78,12 @@ is
|
||||
raises OutOfRange
|
||||
is static;
|
||||
|
||||
ChangeCoord (me: in out; theIndex : Integer) returns Real
|
||||
---C++: inline
|
||||
---C++: return &
|
||||
raises OutOfRange;
|
||||
|
||||
|
||||
Coord (me; X, Y, Z : out Real) is static;
|
||||
---C++: inline
|
||||
--Purpose: For this XYZ object, returns:
|
||||
|
@ -50,6 +50,12 @@ inline Standard_Real gp_XYZ::Coord (const Standard_Integer i) const {
|
||||
return (&x)[i-1];
|
||||
}
|
||||
|
||||
inline Standard_Real& gp_XYZ::ChangeCoord(const Standard_Integer theIndex)
|
||||
{
|
||||
Standard_OutOfRange_Raise_if(theIndex < 1 || theIndex > 3,NULL);
|
||||
return (&x)[theIndex - 1];
|
||||
}
|
||||
|
||||
inline void gp_XYZ::Coord (Standard_Real& X,
|
||||
Standard_Real& Y,
|
||||
Standard_Real& Z) const
|
||||
|
Loading…
x
Reference in New Issue
Block a user