Class ModelPreview
Model asset preview editor viewport.
Inheritance
Implements
Namespace: FlaxEditor.Viewport.Previews
Assembly: FlaxEngine.CSharp.dll
Syntax
public class ModelPreview : AssetPreview, IComparable, IDrawable, IEditorPrimitivesOwner
Constructors
ModelPreview(Boolean)
Initializes a new instance of the ModelPreview class.
Declaration
public ModelPreview(bool useWidgets)
Parameters
System.Boolean
useWidgets
if set to |
Properties
Model
Gets or sets the model asset to preview.
Declaration
public Model Model { get; set; }
Property Value
Model
|
PreviewActor
Gets the model actor used to preview selected asset.
Declaration
public StaticModel PreviewActor { get; }
Property Value
StaticModel
|
ScaleToFit
Gets or sets a value indicating whether scale the model to the normalized bounds.
Declaration
public bool ScaleToFit { get; set; }
Property Value
System.Boolean
|
ShowBitangents
Gets or sets a value indicating whether show model geometry bitangent vectors (aka binormals) debug view.
Declaration
public bool ShowBitangents { get; set; }
Property Value
System.Boolean
|
ShowBounds
Gets or sets a value indicating whether show model bounding box debug view.
Declaration
public bool ShowBounds { get; set; }
Property Value
System.Boolean
|
ShowCurrentLOD
Gets or sets a value that shows LOD statistics
Declaration
public bool ShowCurrentLOD { get; set; }
Property Value
System.Boolean
|
ShowFloor
Gets or sets a value indicating whether show floor model.
Declaration
public bool ShowFloor { get; set; }
Property Value
System.Boolean
|
ShowNormals
Gets or sets a value indicating whether show model geometry normal vectors debug view.
Declaration
public bool ShowNormals { get; set; }
Property Value
System.Boolean
|
ShowTangents
Gets or sets a value indicating whether show model geometry tangent vectors debug view.
Declaration
public bool ShowTangents { get; set; }
Property Value
System.Boolean
|
Methods
Draw()
OnDebugDraw(GPUContext, ref RenderContext)
Called when drawing debug shapes with DebugDraw for this viewport.
Declaration
protected override void OnDebugDraw(GPUContext context, ref RenderContext renderContext)
Parameters
GPUContext
context
The GPU context. |
RenderContext
renderContext
The render context. |
Overrides
OnDestroy()
OnKeyDown(KeyboardKeys)
When key goes down
Declaration
public override bool OnKeyDown(KeyboardKeys key)
Parameters
KeyboardKeys
key
Key value |
Returns
System.Boolean
True if event has been handled, otherwise false |
Overrides
ResetCamera()
Resets the camera to focus on a object.
Declaration
public void ResetCamera()