VTK
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
vtkPerlinNoise Class Reference

an implicit function that implements Perlin noise More...

#include <vtkPerlinNoise.h>

Inheritance diagram for vtkPerlinNoise:
[legend]
Collaboration diagram for vtkPerlinNoise:
[legend]

Public Types

typedef vtkImplicitFunction Superclass
 
- Public Types inherited from vtkImplicitFunction
typedef vtkObject Superclass
 
- Public Types inherited from vtkObject
typedef vtkObjectBase Superclass
 

Public Member Functions

virtual int IsA (const char *type)
 
vtkPerlinNoiseNewInstance () const
 
void PrintSelf (ostream &os, vtkIndent indent)
 
void EvaluateGradient (double x[3], double n[3])
 
double EvaluateFunction (double x[3])
 
double EvaluateFunction (double x, double y, double z)
 
virtual void SetFrequency (double, double, double)
 
virtual void SetFrequency (double[3])
 
virtual doubleGetFrequency ()
 
virtual void GetFrequency (double data[3])
 
virtual void SetPhase (double, double, double)
 
virtual void SetPhase (double[3])
 
virtual doubleGetPhase ()
 
virtual void GetPhase (double data[3])
 
virtual void SetAmplitude (double)
 
virtual double GetAmplitude ()
 
- Public Member Functions inherited from vtkImplicitFunction
vtkImplicitFunctionNewInstance () const
 
unsigned long GetMTime ()
 
double FunctionValue (const double x[3])
 
double FunctionValue (double x, double y, double z)
 
void FunctionGradient (const double x[3], double g[3])
 
doubleFunctionGradient (const double x[3])
 
doubleFunctionGradient (double x, double y, double z)
 
virtual void SetTransform (vtkAbstractTransform *)
 
virtual void SetTransform (const double elements[16])
 
virtual vtkAbstractTransformGetTransform ()
 
double EvaluateFunction (double x, double y, double z)
 
- Public Member Functions inherited from vtkObject
vtkObjectNewInstance () const
 
virtual void DebugOn ()
 
virtual void DebugOff ()
 
bool GetDebug ()
 
void SetDebug (bool debugFlag)
 
virtual void Modified ()
 
unsigned long AddObserver (unsigned long event, vtkCommand *, float priority=0.0f)
 
unsigned long AddObserver (const char *event, vtkCommand *, float priority=0.0f)
 
vtkCommandGetCommand (unsigned long tag)
 
void RemoveObserver (vtkCommand *)
 
void RemoveObservers (unsigned long event, vtkCommand *)
 
void RemoveObservers (const char *event, vtkCommand *)
 
int HasObserver (unsigned long event, vtkCommand *)
 
int HasObserver (const char *event, vtkCommand *)
 
void RemoveObserver (unsigned long tag)
 
void RemoveObservers (unsigned long event)
 
void RemoveObservers (const char *event)
 
void RemoveAllObservers ()
 
int HasObserver (unsigned long event)
 
int HasObserver (const char *event)
 
template<class U , class T >
unsigned long AddObserver (unsigned long event, U observer, void(T::*callback)(), float priority=0.0f)
 
template<class U , class T >
unsigned long AddObserver (unsigned long event, U observer, void(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f)
 
template<class U , class T >
unsigned long AddObserver (unsigned long event, U observer, bool(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f)
 
int InvokeEvent (unsigned long event, void *callData)
 
int InvokeEvent (const char *event, void *callData)
 
int InvokeEvent (unsigned long event)
 
int InvokeEvent (const char *event)
 
- Public Member Functions inherited from vtkObjectBase
const char * GetClassName () const
 
virtual void Delete ()
 
virtual void FastDelete ()
 
void Print (ostream &os)
 
virtual void Register (vtkObjectBase *o)
 
virtual void UnRegister (vtkObjectBase *o)
 
void SetReferenceCount (int)
 
void PrintRevisions (ostream &)
 
virtual void PrintHeader (ostream &os, vtkIndent indent)
 
virtual void PrintTrailer (ostream &os, vtkIndent indent)
 
int GetReferenceCount ()
 

Static Public Member Functions

static int IsTypeOf (const char *type)
 
static vtkPerlinNoiseSafeDownCast (vtkObjectBase *o)
 
static vtkPerlinNoiseNew ()
 
- Static Public Member Functions inherited from vtkImplicitFunction
static int IsTypeOf (const char *type)
 
static vtkImplicitFunctionSafeDownCast (vtkObjectBase *o)
 
- Static Public Member Functions inherited from vtkObject
static int IsTypeOf (const char *type)
 
static vtkObjectSafeDownCast (vtkObjectBase *o)
 
static vtkObjectNew ()
 
static void BreakOnError ()
 
static void SetGlobalWarningDisplay (int val)
 
static void GlobalWarningDisplayOn ()
 
static void GlobalWarningDisplayOff ()
 
static int GetGlobalWarningDisplay ()
 
- Static Public Member Functions inherited from vtkObjectBase
static int IsTypeOf (const char *name)
 
static vtkObjectBaseNew ()
 

Protected Member Functions

virtual vtkObjectBaseNewInstanceInternal () const
 
 vtkPerlinNoise ()
 
 ~vtkPerlinNoise ()
 
- Protected Member Functions inherited from vtkImplicitFunction
 vtkImplicitFunction ()
 
 ~vtkImplicitFunction ()
 
- Protected Member Functions inherited from vtkObject
 vtkObject ()
 
virtual ~vtkObject ()
 
virtual void RegisterInternal (vtkObjectBase *, int check)
 
virtual void UnRegisterInternal (vtkObjectBase *, int check)
 
void InternalGrabFocus (vtkCommand *mouseEvents, vtkCommand *keypressEvents=NULL)
 
void InternalReleaseFocus ()
 
- Protected Member Functions inherited from vtkObjectBase
 vtkObjectBase ()
 
virtual ~vtkObjectBase ()
 
virtual void CollectRevisions (ostream &)
 
virtual void ReportReferences (vtkGarbageCollector *)
 
 vtkObjectBase (const vtkObjectBase &)
 
void operator= (const vtkObjectBase &)
 

Protected Attributes

double Frequency [3]
 
double Phase [3]
 
double Amplitude
 
- Protected Attributes inherited from vtkImplicitFunction
vtkAbstractTransformTransform
 
double ReturnValue [3]
 
- Protected Attributes inherited from vtkObject
bool Debug
 
vtkTimeStamp MTime
 
vtkSubjectHelper * SubjectHelper
 
- Protected Attributes inherited from vtkObjectBase
vtkAtomicInt32 ReferenceCount
 
vtkWeakPointerBase ** WeakPointers
 

Detailed Description

an implicit function that implements Perlin noise

vtkPerlinNoise computes a Perlin noise field as an implicit function. vtkPerlinNoise is a concrete implementation of vtkImplicitFunction. Perlin noise, originally described by Ken Perlin, is a non-periodic and continuous noise function useful for modeling real-world objects.

The amplitude and frequency of the noise pattern are adjustable. This implementation of Perlin noise is derived closely from Greg Ward's version in Graphics Gems II.

See also
vtkImplicitFunction
Examples:
vtkPerlinNoise (Examples)
Tests:
vtkPerlinNoise (Tests)

Definition at line 43 of file vtkPerlinNoise.h.

Member Typedef Documentation

Definition at line 46 of file vtkPerlinNoise.h.

Constructor & Destructor Documentation

vtkPerlinNoise::vtkPerlinNoise ( )
protected
vtkPerlinNoise::~vtkPerlinNoise ( )
inlineprotected

Definition at line 91 of file vtkPerlinNoise.h.

Member Function Documentation

static int vtkPerlinNoise::IsTypeOf ( const char *  type)
static
virtual int vtkPerlinNoise::IsA ( const char *  name)
virtual

Return 1 if this class is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeMacro found in vtkSetGet.h.

Reimplemented from vtkImplicitFunction.

static vtkPerlinNoise* vtkPerlinNoise::SafeDownCast ( vtkObjectBase o)
static
virtual vtkObjectBase* vtkPerlinNoise::NewInstanceInternal ( ) const
protectedvirtual

Reimplemented from vtkImplicitFunction.

vtkPerlinNoise* vtkPerlinNoise::NewInstance ( ) const
void vtkPerlinNoise::PrintSelf ( ostream &  os,
vtkIndent  indent 
)
virtual

Methods invoked by print to print information about the object including superclasses. Typically not called by the user (use Print() instead) but used in the hierarchical print process to combine the output of several classes.

Reimplemented from vtkImplicitFunction.

static vtkPerlinNoise* vtkPerlinNoise::New ( )
static

Instantiate the class.

double vtkPerlinNoise::EvaluateFunction ( double  x[3])
virtual

Evaluate PerlinNoise function.

Implements vtkImplicitFunction.

double vtkPerlinNoise::EvaluateFunction ( double  x,
double  y,
double  z 
)
inline

Evaluate PerlinNoise function.

Definition at line 55 of file vtkPerlinNoise.h.

void vtkPerlinNoise::EvaluateGradient ( double  x[3],
double  n[3] 
)
virtual

Evaluate PerlinNoise gradient. Currently, the method returns a 0 gradient.

Implements vtkImplicitFunction.

virtual void vtkPerlinNoise::SetFrequency ( double  ,
double  ,
double   
)
virtual

Set/get the frequency, or physical scale, of the noise function (higher is finer scale). The frequency can be adjusted per axis, or the same for all axes.

virtual void vtkPerlinNoise::SetFrequency ( double  [3])
virtual

Set/get the frequency, or physical scale, of the noise function (higher is finer scale). The frequency can be adjusted per axis, or the same for all axes.

virtual double* vtkPerlinNoise::GetFrequency ( )
virtual

Set/get the frequency, or physical scale, of the noise function (higher is finer scale). The frequency can be adjusted per axis, or the same for all axes.

virtual void vtkPerlinNoise::GetFrequency ( double  data[3])
virtual

Set/get the frequency, or physical scale, of the noise function (higher is finer scale). The frequency can be adjusted per axis, or the same for all axes.

virtual void vtkPerlinNoise::SetPhase ( double  ,
double  ,
double   
)
virtual

Set/get the phase of the noise function. This parameter can be used to shift the noise function within space (perhaps to avoid a beat with a noise pattern at another scale). Phase tends to repeat about every unit, so a phase of 0.5 is a half-cycle shift.

virtual void vtkPerlinNoise::SetPhase ( double  [3])
virtual

Set/get the phase of the noise function. This parameter can be used to shift the noise function within space (perhaps to avoid a beat with a noise pattern at another scale). Phase tends to repeat about every unit, so a phase of 0.5 is a half-cycle shift.

virtual double* vtkPerlinNoise::GetPhase ( )
virtual

Set/get the phase of the noise function. This parameter can be used to shift the noise function within space (perhaps to avoid a beat with a noise pattern at another scale). Phase tends to repeat about every unit, so a phase of 0.5 is a half-cycle shift.

virtual void vtkPerlinNoise::GetPhase ( double  data[3])
virtual

Set/get the phase of the noise function. This parameter can be used to shift the noise function within space (perhaps to avoid a beat with a noise pattern at another scale). Phase tends to repeat about every unit, so a phase of 0.5 is a half-cycle shift.

virtual void vtkPerlinNoise::SetAmplitude ( double  )
virtual

Set/get the amplitude of the noise function. Amplitude can be negative. The noise function varies randomly between -|Amplitude| and |Amplitude|. Therefore the range of values is 2*|Amplitude| large. The initial amplitude is 1.

virtual double vtkPerlinNoise::GetAmplitude ( )
virtual

Set/get the amplitude of the noise function. Amplitude can be negative. The noise function varies randomly between -|Amplitude| and |Amplitude|. Therefore the range of values is 2*|Amplitude| large. The initial amplitude is 1.

Member Data Documentation

double vtkPerlinNoise::Frequency[3]
protected

Definition at line 93 of file vtkPerlinNoise.h.

double vtkPerlinNoise::Phase[3]
protected

Definition at line 94 of file vtkPerlinNoise.h.

double vtkPerlinNoise::Amplitude
protected

Definition at line 95 of file vtkPerlinNoise.h.


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