Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.
/* macros */
#define gaiaGetPoint(xy,v,x,y) \
{*x = xy[(v) * 2]; \
*y = xy[(v) * 2 + 1];}
#define gaiaSetPoint(xy,v,x,y) \
{xy[(v) * 2] = x; \
xy[(v) * 2 + 1] = y;}
typedef struct gaiaPointStruct
{
/* an OpenGis POINT */
double X; /* X,Y coordinates */
double Y;
double Z; /* Z coordinate */
double M; /* M measure */
int DimensionModel; /* (x,y), (x,y,z), (x,y,m) or (x,y,z,m) */
struct gaiaPointStruct *Next; /* for double-linked list */
struct gaiaPointStruct *Prev; /* for double-linked list */
} gaiaPoint;[i] [b]//What is this piece[/b][/i]
typedef gaiaPoint *gaiaPointPtr;[i] [b]//What is this piece[/b][/i]
public class gaiaPointStruct
{
/* an OpenGis POINT */
public double X; /* X,Y coordinates */
public double Y;
public double Z; /* Z coordinate */
public double M; /* M measure */
public int DimensionModel; /* (x,y), (x,y,z), (x,y,m) or (x,y,z,m) */
public gaiaPointStruct Next; /* for double-linked list */
public gaiaPointStruct Prev; /* for double-linked list */
} gaiaPoint;
typedef gaiaPoint *gaiaPointPtr;
using System;
using MyApplication1;
namespace MyApplication1
{
public class gaiaPoint
{
/* an OpenGis POINT */
public double X; /* X,Y coordinates */
public double Y;
public double Z; /* Z coordinate */
public double M; /* M measure */
public int DimensionModel; /* (x,y), (x,y,z), (x,y,m) or (x,y,z,m) */
public gaiaPoint Next; /* for double-linked list */
public gaiaPoint Prev; /* for double-linked list */
public static void gaiaSetPoint(double [] xy, int v, double x, double y) {
xy[(v) * 2] = x;
xy[(v) * 2 + 1] = y;
}
public static double gaiaGetPointX(double [] xy, int v){
return (xy[(v) * 2]);
}
public static double gaiaGetPointY(double [] xy, int v){
return (xy[(v) * 2 + 1]);
}
}
}
class MyProgram
{
static void Main(string[] args)
{
gaiaPoint gaiaPointPtr;
}
}
public static void gaiaGetPoint(ref double [] xy, int v, double x, double y)
{
xy[(v) * 2] = x;
xy[(v) * 2 + 1] = y;
}
public static void gaiaSetPoint(double [] xy, int v, ref double x, ref double y)
{
x = (xy[(v) * 2]);
y = (xy[(v) * 2 + 1]);
}
If you are experiencing a similar issue, please ask a related question
Title | # Comments | Views | Activity |
---|---|---|---|
What's the most efficient way to load up a couple of large table in C#? | 5 | 45 | |
Error on link | 14 | 46 | |
how to convert MM/dd/YYYY hh:mm:ss AM to YYYY-MM-dd datetime format by linq? | 4 | 48 | |
Problem!!! | 8 | 33 |
Join the community of 500,000 technology professionals and ask your questions.