Next: astGetStcCoord - Return information about an AstroCoords element stored in an Stc
Up: AST Function Descriptions
Previous: astGetRegionMesh - Return a mesh of points covering the surface or volume of a Region
astGetRegionPoints
-
Returns the positions that define the given Region
- Description:
- This function
returns the axis values at the points that define the supplied
Region. The particular meaning of these points will depend on the
type of class supplied, as listed below under "Applicability:".
- Synopsis:
- void astGetRegionPoints( AstRegion
this, int maxpoint, int maxcoord,
int
npoint, double
points )
- Parameters:
-
this
-
Pointer to the Region.
-
maxpoint
-
If zero, the number of points needed to define the Region is
returned in
"
npoint",
but no axis values are returned and all other parameters are ignored.
If not zero, the supplied value should be the length of the
second dimension of the "points"
array. An error is reported if the number of points needed to define
the Region exceeds this number.
-
maxcoord
-
The length of the
first dimension of the "points" array.
An error is reported if the number of axes in the supplied Region
exceeds this number.
-
npoint
-
A pointer to an integer in which to return the
number of points defining the Region.
-
points
-
The address of the first element in a 2-dimensional array of
shape "[maxcoord][maxpoint]", in which to return
the coordinate values at the positions that define the Region.
These are stored such that the value of coordinate number
"coord" for point number "point" is found in element
"points[coord][point]".
- Class Applicability:
-
Region
-
All Regions have this attribute.
-
Box
-
The first returned position is the Box centre, and the second is
a Box corner.
-
Circle
-
The first returned position is the Circle centre, and the second is
a point on the circumference.
-
CmpRegion
-
Returns a value of zero for
"
npoint"
and leaves the supplied array contents unchanged. To find the
points defining a CmpRegion, use this method on the component
Regions, which can be accessed by invoking
astDecompose
on the CmpRegion.
-
Ellipse
-
The first returned position is the Ellipse centre. The second is
the end of one of the axes of the ellipse. The third is some
other point on the circumference of the ellipse, distinct from
the second point.
-
Interval
-
The first point corresponds to the lower bounds position, and
the second point corresponds to the upper bounds position. These
are reversed to indicate an extcluded interval rather than an
included interval. See the Interval constructor for more
information.
-
NullRegion
-
Returns a value of zero for
"
npoint"
and leaves the supplied array contents unchanged.
-
PointList
-
The positions returned are those that were supplied when the
PointList was constructed.
-
Polygon
-
The positions returned are the vertex positions that were supplied
when the Polygon was constructed.
-
Prism
-
Returns a value of zero for
"
npoint"
and leaves the supplied array contents unchanged. To find the
points defining a Prism, use this method on the component
Regions, which can be accessed by invoking
astDecompose
on the CmpRegion.
- Notes:
- If the coordinate system represented by the Region has been
changed since it was first created, the returned axis values refer
to the new (changed) coordinate system, rather than the original
coordinate system. Note however that if the transformation from
original to new coordinate system is non-linear, the shape within
the new coordinate system may be distorted, and so may not match
that implied by the name of the Region subclass (Circle, Box, etc).
Next: astGetStcCoord - Return information about an AstroCoords element stored in an Stc
Up: AST Function Descriptions
Previous: astGetRegionMesh - Return a mesh of points covering the surface or volume of a Region
AST A Library for Handling World Coordinate Systems in Astronomy
Starlink User Note 211
R.F. Warren-Smith & D.S. Berry
24th May 2011
E-mail:ussc@star.rl.ac.uk
Copyright (C) 2009 Science \& Technology Facilities Council