|
Arma Reforger Script API
|
Generic preview entity used to represent another entity is simplified form. More...
Public Member Functions | |
| void | SetPreviewTransform (vector worldTransform[4], EEditorTransformVertical verticalMode, float heightTerrain=0, bool isUnderwater=false, TraceParam trace=null) |
| Set transformation of the preview. | |
| array< SCR_BasePreviewEntity > | GetPreviewChildren () |
| Get all direct preview entity children. | |
| IEntity | GetSourceEntity () |
| Get entity from which the preview was copied from. | |
| void | GetPreviewBounds (out vector outBoundMin, out vector outBoundMax) |
| Get local bounding box of the preview entity (including all children) | |
| bool | HasMultipleEditableEntities () |
| void | SCR_BasePreviewEntity (IEntitySource src, IEntity parent) |
| void | ~SCR_BasePreviewEntity () |
| override void | _WB_GetBoundBox (inout vector min, inout vector max, IEntitySource src) |
| override int | _WB_GetAfterWorldUpdateSpecs (IEntitySource src) |
| override void | _WB_AfterWorldUpdate (float timeSlice) |
Static Public Member Functions | |
| static SCR_BasePreviewEntity | SpawnPreview (notnull array< ref SCR_BasePreviewEntry > entries, ResourceName previewPrefab, BaseWorld world=null, EntitySpawnParams spawnParams=null, ResourceName material=ResourceName.Empty, EPreviewEntityFlag flags=0) |
| Spawn preview entity from entries. | |
Protected Member Functions | |
| void | SetChildTransform (EEditorTransformVertical verticalMode, float heightTerrain, bool isUnderwater=false, TraceParam trace=null) |
| void | SetPreviewObject (VObject mesh, ResourceName material) |
| void | EOnPreviewInit (SCR_BasePreviewEntry entry, SCR_BasePreviewEntity root) |
| Init event called when the preview is created. | |
| void | EOnRootPreviewInit (array< ref SCR_BasePreviewEntry > entries) |
| Init event called on preview root entity. | |
Protected Attributes | |
| EPreviewEntityFlag | m_Flags |
| IEntity | m_Entity |
| IEntitySource | m_EntitySource |
| float | m_fHeightTerrain = -1 |
| bool | m_bIsOnOrigTransform = true |
| vector | m_vLocalTransform [4] |
| vector | m_vTerrainTransform [4] |
| ref array< SCR_BasePreviewEntity > | m_aChildren |
| vector | m_vBounds [2] |
| bool | m_bHasMultipleEditableEntities |
Generic preview entity used to represent another entity is simplified form.
Uses array of SCR_BasePreviewEntry for configuration. Such array can be generated from prefab or existing entities, see inherited classes for details.
| void SCR_BasePreviewEntity.SCR_BasePreviewEntity | ( | IEntitySource | src, |
| IEntity | parent ) |
| void SCR_BasePreviewEntity.~SCR_BasePreviewEntity | ( | ) |
| override void SCR_BasePreviewEntity._WB_AfterWorldUpdate | ( | float | timeSlice | ) |
| override int SCR_BasePreviewEntity._WB_GetAfterWorldUpdateSpecs | ( | IEntitySource | src | ) |
| override void SCR_BasePreviewEntity._WB_GetBoundBox | ( | inout vector | min, |
| inout vector | max, | ||
| IEntitySource | src ) |
|
protected |
Init event called when the preview is created.
To be overridden by child classes
Implemented in SCR_EditablePreviewEntity, and SCR_RefPreviewEntity.
|
protected |
Init event called on preview root entity.
To be overridden by child classes
Implemented in SCR_EditablePreviewEntity.
| void SCR_BasePreviewEntity.GetPreviewBounds | ( | out vector | outBoundMin, |
| out vector | outBoundMax ) |
Get local bounding box of the preview entity (including all children)
| [out] | outBoundMin | Lower corner |
| [out] | outBoundMax | Upper corner |
| array< SCR_BasePreviewEntity > SCR_BasePreviewEntity.GetPreviewChildren | ( | ) |
Get all direct preview entity children.
| IEntity SCR_BasePreviewEntity.GetSourceEntity | ( | ) |
Get entity from which the preview was copied from.
| bool SCR_BasePreviewEntity.HasMultipleEditableEntities | ( | ) |
|
protected |
|
protected |
| void SCR_BasePreviewEntity.SetPreviewTransform | ( | vector | worldTransform[4], |
| EEditorTransformVertical | verticalMode, | ||
| float | heightTerrain = 0, | ||
| bool | isUnderwater = false, | ||
| TraceParam | trace = null ) |
Set transformation of the preview.
Entities will be oriented to terrain when when they have the functionality enabled.
| worldTransform | Transformation matrix in world space |
| verticalMode | Type of vertical editing |
| heightTerrain | Height above terrain |
| isUnderwater | True when the preview entity is under ocean surface |
|
static |
Spawn preview entity from entries.
To get entries, see specialized inherited classes.
| entries | List of entity entries |
| previewPrefab | Prefab of preview entity. Can also be a class name, e.g., "SCR_RefPreviewEntity" |
| world | World in which the preview will be spawned |
| spawnParams | Spawn params of the preview |
| material | Material of the preview. When empty, meshes won't be created at all. |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |