Main Page   Modules   Alphabetical List   Data Structures   Data Fields  

RtBary
[Math Tools]


Typedefs

typedef RwReal  RtBaryV4d [4]
typedef RtBaryV4d  RtBaryTransform [4]

Functions

RwBool  RtBaryGetTransform (RtBaryTransform m, RwReal *const area, const RwV3d *const v0, const RwV3d *const v1, const RwV3d *const v2)
void  RtBaryNormalize (RtBaryTransform bary)
void  RtBaryWeightsFromV3d (RtBaryV4d out, RtBaryTransform mat, const RwV3d *const in)
void  RtBaryWeightsFromEdge (RtBaryV4d out, RtBaryTransform mat, const RwV3d *const in)
void  RtBaryV3dFromWeights (RwV3d *const out, const RtBaryV4d weights, const RwV3d *const v0, const RwV3d *const v1, const RwV3d *const v2)

Detailed Description

Barycentric Toolkit for RenderWare.

RtBary Toolkit Overview

Requirements

Overview

This toolkit provides functionality for mapping points between the barycentric space defined by a triangle and Cartesian space. Given a triangle with vertices (v0, v1, v2), the barycentric weights (w0, w1, w2) correspond with the Cartesian point w0*v0 + w1*v1 + w2*v2 where (w0+w1+w2) == 1

Typedef Documentation

typedef RtBaryV4d RtBaryTransform[4]
 

RtBaryTransform typedef for the 4x4 homogeneous transform matrix mapping a point from Cartesian space to the barycentric space defined by a triangle.

typedef RwReal RtBaryV4d[4]
 

RtBaryV4d typedef for the 4 element homogeneous row of a transform matrix mapping a point from Cartesian space to the barycentric space defined by a triangle.


Function Documentation

RwBool RtBaryGetTransform RtBaryTransform    xform,
RwReal *const    area,
const RwV3d *const    v0,
const RwV3d *const    v1,
const RwV3d *const    v2
 

RtBaryGetTransform finds the 4x4 transform matrix mapping a point from homogeneous Cartesian space to the barycentric space defined by a triangle. The final column of the matrix holds the equation of the plane supporting the triangle.

Parameters:
xform  receives the 4x4 transform matrix
area  receives the area of the triangle
v0  first vertex of triangle
v1  second vertex of triangle
v2  third vertex of triangle
Returns:
Flags success
See also:
RtBaryWeightsFromV3d , RtBaryV3dFromWeights
void RtBaryNormalize RtBaryTransform    bary
 

RtBaryNormalize

TODO!!!

void RtBaryV3dFromWeights RwV3d *const    out,
const RtBaryV4d    weights,
const RwV3d *const    v0,
const RwV3d *const    v1,
const RwV3d *const    v2
 

RtBaryV3dFromWeights finds the point corresponding to the specified barycentric weights for a specified triangle.

Note that this function is used for debug purposes only and, for efficiency, is available as a macro for final release versions of an application.

Parameters:
out  receives the point
weights  barycentric weights
v0  first vertex of triangle
v1  second vertex of triangle
v2  third vertex of triangle
See also:
RtBaryGetTransform , RtBaryWeightsFromV3d
void RtBaryWeightsFromEdge RtBaryV4d    out,
RtBaryTransform    mat,
const RwV3d *const    in
 

RtBaryWeightsFromEdge

TODO!!!

void RtBaryWeightsFromV3d RtBaryV4d    out,
RtBaryTransform    mat,
const RwV3d *const    in
 

RtBaryWeightsFromV3d finds the barycentric weights corresponding to a specifed point in a triangle with a given 4x4 barycentric transform matrix. The first three returned weights w0, w1, w2 apply to the triangle vertices v0, v1, v2 specified to RtBaryGetTransform. The final weight holds the height of the point above the plane supporting the triangle.

See also:
RtBaryWeightsFromV3d , RtBaryV3dFromWeights

Criterion Software © 1993-2003 Criterion Software Limited. All rights reserved. Built Tue Apr 22 12:46:53 2003. Send Feedback
Converted from CHM to HTML with chm2web Pro 2.85 (unicode)