FSpeedTreeWind

SpeedTreeWind.h

Windows
MacOS
Linux

References

Module

Engine

Header

/Engine/Source/Runtime/Engine/Public/SpeedTreeWind.h

Include

#include "SpeedTreeWind.h"

Syntax

class FSpeedTreeWind

Remarks

SpeedTreeWind.h

*** INTERACTIVE DATA VISUALIZATION (IDV) PROPRIETARY INFORMATION ***

This software is supplied under the terms of a license agreement or nondisclosure agreement with Interactive Data Visualization and may not be copied or disclosed except in accordance with the terms of that agreement. Copyright (c) 2003-2012 IDV, Inc. All Rights Reserved.

IDV, Inc. Web: http://www.idvinc.com

Variables

Name Description

Protected variable

bool[NUM_WIND_OPTIONS]

 

m_abOptions

Protected variable

float[3]

 

m_afBranchWindAnchor

Protected variable

float[3]

 

m_afDirection

Protected variable

float[3]

 

m_afDirectionAtStart

Protected variable

float[3]

 

m_afDirectionMidTarget

Protected variable

float[3]

 

m_afDirectionTarget

Protected variable

float[NUM_OSC_COMPONENTS]

 

m_afOscillationTimes

Protected variable

float[2]

 

m_afRollingOffset

Protected variable

float[NUM_SHADER_VALUES *2]

 

m_afShaderTable

Includes Previous frame's values after current.

Protected variable

bool

 

m_bGustingEnabled

Protected variable

bool

 

m_bNeedsReload

Protected variable

float

 

m_fCombinedStrength

Protected variable

double

 

m_fDirectionChangeEndTime

Protected variable

double

 

m_fDirectionChangeStartTime

Protected variable

double

 

m_fElapsedTime

Protected variable

float

 

m_fGust

Protected variable

double

 

m_fGustAtStart

Protected variable

double

 

m_fGustFallStart

Protected variable

double

 

m_fGustFallTarget

Protected variable

double

 

m_fGustRiseTarget

Protected variable

double

 

m_fGustStart

Protected variable

double

 

m_fGustTarget

Protected variable

double

 

m_fLastTime

Protected variable

float

 

m_fMaxBranchLevel1Length

Protected variable

float

 

m_fStrength

Protected variable

float

 

m_fStrengthAtStart

Protected variable

double

 

m_fStrengthChangeEndTime

Protected variable

double

 

m_fStrengthChangeStartTime

Protected variable

float

 

m_fStrengthTarget

Protected variable

SParams

 

m_sParams

Constructors

Name Description

Public function

FSpeedTreeWind()

Default constructor for FSpeedTreeWind.

Functions

Name Description

Public function

ENGINE_API void

 

Advance

(
    bool bEnabled,
    double fTime
)

Animation

Protected function

void

 

ComputeWindAnchor

(
    float* pPos
)

Computes the wind anchor position based on current wind conditions.

Public function

ENGINE_API void

 

EnableGusting

(
    bool bEnabled
)

Public function Const

ENGINE_API const float *

 

GetBranchAnchor()

Public function Const

ENGINE_API float

 

GetMaxBranchLength()

Public function Const

ENGINE_API const FSpeedTreeWind::SParams &

 

GetParams()

Public function Const

ENGINE_API const float *

 

GetShaderTable()

Protected function

void

 

Gust

(
    double fTime
)

Advances the gust parameter and randomly gusts if it can (e.g., the gust is not dying off or rising) based on the gust frequency.

Protected function

float

 

Interpolate

(
    float fA,
    float fB,
    float fAmt
)

Public function Const

ENGINE_API bool

 

IsOptionEnabled

(
    EOptions eOption
)

Protected function

float

 

LinearSigmoid

(
    float fInput,
    float fLinearness
)

Converts an input value (fInput) in the range [0.0, 1.0] to an s-curve. The parameter fLinearness flattens out the s-curve where 0.0 = s-curve and 1.0 = linear.

Public function

ENGINE_API bool

 

NeedsReload()

Protected function

void

 

Normalize

(
    float* pVector
)

Normalizes the the incoming vector (pVector).

Protected function Const

float

 

RandomFloat

(
    float fMin,
    float fMax
)

Public function

ENGINE_API void

 

Scale

(
    float fScalar
)

Public function

ENGINE_API void

 

SetDirection

(
    const FVector& vDir
)

Public function

ENGINE_API void

 

SetGustFrequency

(
    float fGustFreq
)

Public function

ENGINE_API void

 

SetGustMax

(
    float InGustMax
)

Public function

ENGINE_API void

 

SetGustMin

(
    float InGustMin
)

Instantly set gust min/max. Trees will pop if visible. Don't call during gameplay while trees are visible.

Public function

ENGINE_API void

 

SetInitDirection

(
    const FVector& vDir
)

Public function

ENGINE_API void

 

SetNeedsReload

(
    bool bReload
)

Public function

ENGINE_API void

 

SetOption

(
    EOptions eOption,
    bool bState
)

Shader options

Public function

ENGINE_API void

 

SetParams

(
    const FSpeedTreeWind::SParams& sParams
)

Settings

Public function

ENGINE_API void

 

SetStrength

(
    float fStrength
)

Sets the desired strength (fStrength). The FSpeedTreeWind::Advance( ) function will make the actual strength get there smoothly based on the strength response time.

Public function

ENGINE_API void

 

SetTreeValues

(
    const FVector& vBranchAnchor,
    float fMaxBranchLength
)

Tree-specific values

Classes

Enums

Name

Description

Public enum

Constants

Public enum

EOptions

Shader state that are set at compile time

Public enum

EOscillationComponents

Wind simulation components that oscillate

Public enum

EShaderValues

Values to be uploaded as shader constants

Select Skin
Light
Dark

Welcome to the new Unreal Engine 4 Documentation site!

We're working on lots of new features including a feedback system so you can tell us how we are doing. It's not quite ready for use in the wild yet, so head over to the Documentation Feedback forum to tell us about this page or call out any issues you are encountering in the meantime.

We'll be sure to let you know when the new system is up and running.

Post Feedback