HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GU_Interpolate Class Reference

Interpolate between multiple pieces of geometry. More...

#include <GU_Interpolate.h>

Public Types

using DetailList = UT_Array< GU_ConstDetailHandle >
 

Static Public Member Functions

static GU_ConstDetailHandle fastLerp (const GU_ConstDetailHandle &g0, const GU_ConstDetailHandle &g1, fpreal t)
 
static GU_ConstDetailHandle lerp (const GU_ConstDetailHandle &g0, const GU_ConstDetailHandle &g1, fpreal t)
 
static GU_ConstDetailHandle interpolate (const DetailList &geo, const fpreal *weights)
 
static GU_ConstDetailHandle fastInterpolate (const DetailList &geo, const fpreal *weights)
 
static bool matchTopology (const GU_ConstDetailHandle &g0, const GU_ConstDetailHandle &g1)
 
static bool matchTopology (const GU_Detail &g0, const GU_Detail &g1)
 

Detailed Description

Interpolate between multiple pieces of geometry.

Definition at line 20 of file GU_Interpolate.h.

Member Typedef Documentation

Member Function Documentation

static GU_ConstDetailHandle GU_Interpolate::fastInterpolate ( const DetailList geo,
const fpreal weights 
)
static

Perform a weighted sum of the geometry. sum(weights) should be 1.

This method assumes topology on all the geometry matches. Attributes don't have to match, but the primitive types and topology do.

static GU_ConstDetailHandle GU_Interpolate::fastLerp ( const GU_ConstDetailHandle g0,
const GU_ConstDetailHandle g1,
fpreal  t 
)
static

Linear interpolate between two pieces of geometry. t should be between 0 and 1.

This method assumes the topology matches. Attributes don't have to match, but the primitive types and topology do.

static GU_ConstDetailHandle GU_Interpolate::interpolate ( const DetailList geo,
const fpreal weights 
)
static

Perform a weighted sum of the geometry. sum(weights) should be 1.

This method verifies the topology of the geometry matches before performing interpolation. All geometry which matches topology with the input with the largest weight will be considered. Any geometry which doesn't match will have its weight distributed amongst the other geometry.

static GU_ConstDetailHandle GU_Interpolate::lerp ( const GU_ConstDetailHandle g0,
const GU_ConstDetailHandle g1,
fpreal  t 
)
static

Linear interpolate between two pieces of geometry. t should be between 0 and 1.

This method verifies the topology of the two details matches before performing interpolation. If the topology doesn't match, the method returns the geometry with the largest contribution.

static bool GU_Interpolate::matchTopology ( const GU_ConstDetailHandle g0,
const GU_ConstDetailHandle g1 
)
static

Check to see whether geometry matches topology and can be interpolated. This doesn't verify that the attributes for geometries match, only the topology.

static bool GU_Interpolate::matchTopology ( const GU_Detail g0,
const GU_Detail g1 
)
static

Check to see whether geometry matches topology and can be interpolated. This doesn't verify that the attributes for geometries match, only the topology.


The documentation for this class was generated from the following file: