Class SplineModel
Renders model over the spline segments.
Inherited Members
Assembly: FlaxEngine.dll
File: Engine/Level/Actors/SplineModel.h
Syntax
public class SplineModel : public ModelInstanceActor
Constructors
~SplineModel()
Declaration
public ~SplineModel()
Fields
DrawModes
The draw passes to use for rendering this object.
Declaration
public DrawPass DrawModes = DrawPass::Default
Field Value
DrawPass
|
Model
The model asset to draw.
Declaration
public AssetReference<Model> Model
Field Value
AssetReference<Model>
|
Methods
Deserialize(DeserializeStream& stream, ISerializeModifier* modifier)
Deserializes object from the input stream.
Declaration
public virtual void Deserialize(DeserializeStream& stream, ISerializeModifier* modifier) override
Parameters
DeserializeStream
stream
The input stream. |
ISerializeModifier
modifier
The deserialization modifier object. Always valid. |
Overrides
Draw(RenderContext& renderContext)
Draws this actor. Called by Scene Rendering service. This call is more optimized than generic Draw (eg. geometry is rendered during all pass types but other actors are drawn only during GBufferFill pass).
Declaration
public virtual void Draw(RenderContext& renderContext) override
Parameters
RenderContext
renderContext
The rendering context. |
Overrides
GetBoundsScale()
Gets the model bounds scale. It is useful when using Position Offset to animate the vertices of the object outside of its bounds.
Declaration
public float GetBoundsScale() const
Returns
float
|
GetForcedLOD()
Gets the model forced Level Of Detail index. Allows to bind the given model LOD to show. Value -1 disables this feature.
Declaration
public int32 GetForcedLOD() const
Returns
int32
|
GetLODBias()
Gets the model Level Of Detail bias value. Allows to increase or decrease rendered model quality.
Declaration
public int32 GetLODBias() const
Returns
int32
|
GetMaterial(int32 entryIndex)
Gets the material used to draw the meshes which are assigned to that slot (set in Entries or model's default).
Declaration
public virtual MaterialBase* GetMaterial(int32 entryIndex) override
Parameters
int32
entryIndex
The material slot entry index. |
Returns
MaterialBase
|
Overrides
GetMaterialSlots()
Gets the material slots array set on the asset (eg. model or skinned model asset).
Declaration
public virtual Span<MaterialSlot> GetMaterialSlots() const override
Returns
Span<MaterialSlot>
|
Overrides
GetPreTransform()
Gets the transformation applied to the model geometry before placing it over the spline. Can be used to change the way model goes over the spline.
Declaration
public Transform GetPreTransform() const
Returns
Transform
|
GetQuality()
Gets the spline model quality scale. Higher values improve the spline representation (better tessellation) but reduce performance.
Declaration
public float GetQuality() const
Returns
float
|
HasContentLoaded()
Returns true if actor has loaded content.
Declaration
public virtual bool HasContentLoaded() const override
Returns
bool
|
Overrides
IntersectsItself(const Ray& ray, Real& distance, Vector3& normal)
Determines if there is an intersection between the current object and a ray.
Declaration
public virtual bool IntersectsItself(const Ray& ray, Real& distance, Vector3& normal) override
Parameters
Ray
ray
The ray to test. |
Real
distance
When the method completes, contains the distance of the intersection (if any valid). |
Vector3
normal
When the method completes, contains the intersection surface normal vector (if any valid). |
Returns
bool
True whether the two objects intersected, otherwise false. |
Overrides
OnActiveInTreeChanged()
Called when actor active in tree state gets changed.
Declaration
protected virtual void OnActiveInTreeChanged() override
Overrides
OnParentChanged()
Called when actor parent gets changed.
Declaration
public virtual void OnParentChanged() override
Overrides
Serialize(SerializeStream& stream, const void* otherObj)
Serializes object to the output stream compared to the values of the other object instance (eg. default class object). If other object is null then serialize all properties.
Declaration
public virtual void Serialize(SerializeStream& stream, const void* otherObj) override
Parameters
SerializeStream
stream
The output stream. |
void
otherObj
The instance of the object to compare with and serialize only the modified properties. If null, then serialize all properties. |
Overrides
SetBoundsScale(float value)
Sets the model bounds scale. It is useful when using Position Offset to animate the vertices of the object outside of its bounds.
Declaration
public void SetBoundsScale(float value)
Parameters
float
value
|
SetForcedLOD(int32 value)
Sets the model forced Level Of Detail index. Allows to bind the given model LOD to show. Value -1 disables this feature.
Declaration
public void SetForcedLOD(int32 value)
Parameters
int32
value
|
SetLODBias(int32 value)
Sets the model Level Of Detail bias value. Allows to increase or decrease rendered model quality.
Declaration
public void SetLODBias(int32 value)
Parameters
int32
value
|
SetPreTransform(const Transform& value)
Sets the transformation applied to the model geometry before placing it over the spline. Can be used to change the way model goes over the spline.
Declaration
public void SetPreTransform(const Transform& value)
Parameters
Transform
value
|
SetQuality(float value)
Sets the spline model quality scale. Higher values improve the spline representation (better tessellation) but reduce performance.
Declaration
public void SetQuality(float value)
Parameters
float
value
|
UpdateBounds()
Updates the model bounds (eg. when mesh has applied significant deformation).
Declaration
public virtual void UpdateBounds() override