An implementation of the IModelPostProcessor interface that puts pre-computed coefficients for simple wind animation into the Texture vertex data.
sealed class
|
PlantProcessor
|
extends
|
ModelPostProcessor
|
Returns the configuration value that describes this object.
public
override
method
|
ToConfig
()
|
||
type
|
ConfigValue
|
||
returns
|
|
The configuration value. | |
implements
|
ModelPostProcessor.ToConfig
|
Remarks:
All configurable objects need to implement this interface. For simple types, it is preferable to delegate to ToValue.
The returned value may be of type Invalid, which means that this object in its current state cannot be described with the configuration API.
Before returning the resulting configuration value, Cache must be called on it, passing this IConfigurable object as parameter.
Creates a new instance of PlantProcessor.
public
constructor
|
PlantProcessor
(float64 occlusion = 0.1,
float64 wind = 2.5,
float64 pivot = 0.5,
float64 random = 0.25,
float64 y = 1)
|
||
params
|
occlusion
|
Minimum ambient-occlusion term to put into the alpha channel. | |
wind
|
The relative distance from the pivot to a vertex if raised by this power and then put into the red channel. | ||
pivot
|
Chooses
the
plant
pivot
point
for
a
vertex:
0 :
the
model
origin
1 :
projection
of
vertex
onto
the
XZ-plane.
The pivot coefficient is put into the blue channel. |
||
random
|
Controls randomness of wind, depending on angle between vertex normal and direction from vertex to pivot point. The randomness coefficient is put into the green channel. | ||
y
|
Relative height where wind has maximum influence. |
Performs post-processing on the vertices of the given model geometry.
public
override
method
|
PostProcess
(VertexArrays vertices)
|
||
type
|
bool
|
||
params
|
vertices
|
[not-null]
|
The vertices to post-process. |
returns
|
true
if
some
vertices
have
been
post-processed,
false
if
no
post-processing
has
been
performed.
|
||
implements
|
ModelPostProcessor.PostProcess
|