libjbt

jbt_warp Class Reference

Abstract base class for warp hierarchy. More...

Inherits jbt_ngnode.

Inherited by jbt_bend, jbt_extrude, jbt_taper and jbt_twist.

List of all members.

Public Members

Protected Members


Detailed Description

Abstract base class for warp hierarchy.

Author(s):
Mark Tigges

This class implements the foundataion for implementing non-affine transformations into the BlobTree. All sub-classes must implemented these pure virtual functions: precompute, warp and unwarp.

This class provides a sampled normal based on the gradient returned by the base class. You may elect in a sub-class to implement a proper normal if possible.


Member Function Documentation

void jbt_warp::setSmooth( jFlt, jFlt )

Sets the smoothness of the application of the warp. The two parameters correspond to the parameters that are passed to the smoothstep function in jgl. The default values are 0 and 1. This causes a nice smooth cubic which varies from 0..1. Calling this function and setting these does not guarantee any difference. It is up to the base class to use the values. If it does not make sense to use them then nothing will happen. Pass 0 and 0 to ensure no smoothing happens.

virtual void jbt_warp::precompute( const jVec3& ) = 0 [pure virtual]

Precompute warp-specific parameters.

Reimplemented in jbt_twist, jbt_taper, jbt_extrude and jbt_bend.

virtual jVec3 jbt_warp::unwarp( const jVec3& ) const = 0 [pure virtual]

Moves a point from warped space to normal space.

Reimplemented in jbt_twist, jbt_taper, jbt_extrude and jbt_bend.

virtual jVec3 jbt_warp::warp( const jVec3& ) const = 0 [pure virtual]

Moves a point from normal space to warped space.

Reimplemented in jbt_twist, jbt_taper, jbt_extrude and jbt_bend.

jbt_warp::jbt_warp( jbt_blobtree* = 0 ) [protected]

Pass the child to have affected by the warp.

void jbt_warp::beginQuery( const jVec3& ) [protected]

Reimplemented from jbt_ngnode.

void jbt_warp::normal( jNorm3& ) [protected]

Reimplemented from jbt_ngnode.

void jbt_warp::computeBound() [protected]

Reimplemented from jbt_ngnode.

jFlt jbt_warp::smooth( jFlt k ) const [protected]

Smooth the 0..1 parameter according to the parameters passed to setSmooth.

void jbt_warp::seedPoints( jVec3list& ) const [protected]

This default bracketing for warped BlobTrees is not efficient. If your warp subclass is easy to provide brackets for you are well advised to do so. This bracketing simply defers to jbt_blobtree::bracket() which is a brute force method.

Reimplemented from jbt_ngnode.


Member Data Documentation

jFlt jbt_warp::a [protected]

Smooth parameters. Call smoothstep with these parameters to ease the amount of warp.

Reimplemented in jbt_bend.

jFlt jbt_warp::b [protected]

Smooth parameters. Call smoothstep with these parameters to ease the amount of warp.

Reimplemented in jbt_bend.


The documentation for this class was generated from the following file:
JSP / libjbt v0.1 mtigges@cpsc.ucalgary.ca