Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ PEXXCToNPCTransform(3) — Open3D 4.96

Media Vault

Software Library

Restoration Projects

Artifacts Sought

PEXXCToNPCTransform(3)  —  Subroutines

Name

PEXXCToNPCTransform

Synopsis

int PEXXCToNPCTransform(PEXNPCSubVolume ∗npc_sub_volume, PEXDeviceCoord ∗viewport, unsigned int window_height, PEXMatrix transform_return)

Arguments

npc_sub_volume
A pointer to an NPC subvolume, typically that of a renderer resource

viewportAn array of two device coordinate points defining a viewport, typically that of a renderer resource.  The first point in the array is the lower-left corner of the viewport; the second point is the upper-right. 

window_height
The height of the drawable

transform_return
The returned transformation

Returns

Zero if successful; otherwise, one of the following:

PEXBadViewport - (xmin >= xmax, or ymin >= ymax, or zmin > zmax)
PEXBadSubVolume - (xmin >= xmax, or ymin >= ymax, or zmin > zmax)

Description

This function computes a transformation matrix to map a drawable point (XC) to NPC coordinates, using the specified NPC subvolume, DC viewport, and drawable height.  The returned transformation matrix first transforms the x and y coordinates of points to device coordinates (DC), leaving the z coordinate unmodified.  It then applies the viewport-to-subvolume transformation to all coordinates of the resulting points, producing 3D NPC points. 

When specifying NPC and DC, the X, Y and Z limits must be as follows:

xmin < xmax ,  ymin < ymax ,  zmin <= zmax

Errors

None

See Also

PEXXCToNPCTransform2D

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026