---
name: "clip3d"
section: "3alleg"
platform: "linux"
package: "liballegro-doc"
version: "2:4.2.2-2.2"
release: "Debian 6.0 (Squeeze)"
platforms: ["linux"]
url: "https://new.carta.tech/clip3d"
---

# clip3d(3alleg)

Clips the polygon given in vtx using fixed point math. Allegro game programming library.

## NAME

clip3d - Clips the polygon given in vtx using fixed point math. Allegro game programming library.

## SYNOPSIS

**#include \<allegro.h\>**

**int clip3d(int type, fixed min\_z, fixed max\_z, int vc,** **const V3D \*vtx\[\], V3D \*vout\[\], V3D \*vtmp\[\], int out\[\]);**

## DESCRIPTION

Fixed point version of clip3d\_f(). This function should be used with  caution, due to the limited precision of fixed point arithmetic and high  chance of rounding errors: the floating point code is better for most  situations.

## RETURN VALUE

Returns the number of vertices after clipping is done.

## SEE ALSO

[**polygon3d**(3alleg)](/polygon3d/3alleg.md), [**clip3d\_f**(3alleg)](/clip3d_f/3alleg.md)
