Reads halfspaces from the database into a region by running the specified SQL query.

Namespace: Spherical.IO
Assembly: SphericalLib (in SphericalLib.dll) Version: 1.0.5951.32246 (1.0.0.0)

Syntax

C#
public static Region ReadRegion(
	SqlConnection conn,
	SqlTransaction tran,
	string query
)
Visual C++
public:
static Region^ ReadRegion(
	SqlConnection^ conn, 
	SqlTransaction^ tran, 
	String^ query
)
F#
static member ReadRegion : 
        conn:SqlConnection * 
        tran:SqlTransaction * 
        query:string -> Region 

Parameters

conn
Type: System.Data.SqlClient..::..SqlConnection
The SQL connection to read the region from.
tran
Type: System.Data.SqlClient..::..SqlTransaction
The SQL transaction.
query
Type: System..::..String
The SQL select convexid, x, y, z, c statement for the region.

Return Value

The region is not simplified.

Remarks

The types of the columns are Int32 for the ID and double for the rest.

Examples

To select region #1 from the halfspace table:
CopyC#
Region r = SqlIO.ReadRegion(cn,tn,"SELECT ConvexID,X,Y,Z,C FROM RegionHalfspace WHERE RegionID=1");

See Also