Use backtick code blocks for syntax highlighting
This commit is contained in:
parent
8ed9dea394
commit
f658bfbb40
203 changed files with 26546 additions and 25801 deletions
56
65-02.md
56
65-02.md
|
|
@ -30,38 +30,40 @@ polygons, and planes are shown in Listing 65.1.
|
|||
|
||||
**LISTING 65.1 L65\_1.h**
|
||||
|
||||
typedef struct {
|
||||
double v[3];
|
||||
} point_t;
|
||||
```c
|
||||
typedef struct {
|
||||
double v[3];
|
||||
} point_t;
|
||||
|
||||
typedef struct {
|
||||
double x, y;
|
||||
} point2D_t;
|
||||
typedef struct {
|
||||
double x, y;
|
||||
} point2D_t;
|
||||
|
||||
typedef struct {
|
||||
int color;
|
||||
int numverts;
|
||||
point_t verts[MAX_POLY_VERTS];
|
||||
} polygon_t;
|
||||
typedef struct {
|
||||
int color;
|
||||
int numverts;
|
||||
point_t verts[MAX_POLY_VERTS];
|
||||
} polygon_t;
|
||||
|
||||
typedef struct {
|
||||
int color;
|
||||
int numverts;
|
||||
point2D_t verts[MAX_POLY_VERTS];
|
||||
} polygon2D_t;
|
||||
typedef struct {
|
||||
int color;
|
||||
int numverts;
|
||||
point2D_t verts[MAX_POLY_VERTS];
|
||||
} polygon2D_t;
|
||||
|
||||
typedef struct convexobject_s {
|
||||
struct convexobject_s *pnext;
|
||||
point_t center;
|
||||
double vdist;
|
||||
int numpolys;
|
||||
polygon_t *ppoly;
|
||||
} convexobject_t;
|
||||
typedef struct convexobject_s {
|
||||
struct convexobject_s *pnext;
|
||||
point_t center;
|
||||
double vdist;
|
||||
int numpolys;
|
||||
polygon_t *ppoly;
|
||||
} convexobject_t;
|
||||
|
||||
typedef struct {
|
||||
double distance;
|
||||
point_t normal;
|
||||
} plane_t;
|
||||
typedef struct {
|
||||
double distance;
|
||||
point_t normal;
|
||||
} plane_t;
|
||||
```
|
||||
|
||||
Given a line segment, and a plane to which to clip the segment, the
|
||||
first question is whether the segment is entirely on the inside or the
|
||||
|
|
|
|||
Loading…
Reference in a new issue