Class SynthesizedPlane
Creates data for an MRPlane When added to a synthesized object, adds a trackable MRPlane to the database. When added to a simulated object, its plane will be provided to the database by the simulated plane provider.
Inherited Members
Namespace: Unity.MARS.Data.Synthetic
Syntax
public class SynthesizedPlane : SynthesizedTrackable<MRPlane>, ISimulatable, ISynthesizedData, IProvidesTraits<bool>, IProvidesTraits, IUsesMARSTrackableData<MRPlane>, IUsesCameraOffset, IFunctionalitySubscriber<IProvidesCameraOffset>
Properties
TraitName
Declaration
public override string TraitName { get; }
Property Value
Type | Description |
---|---|
String |
Overrides
Methods
Awake()
Called by Unity when the object is first activated
Declaration
protected override void Awake()
Overrides
GetData()
Get the MRPlane data for this synthesized plane
Declaration
public override MRPlane GetData()
Returns
Type | Description |
---|---|
MRPlane | The MRPlane data |
Overrides
GetProvidedTraits()
Get the TraitDefinitions provided by this SynthesizedPlane
Declaration
public override TraitDefinition[] GetProvidedTraits()
Returns
Type | Description |
---|---|
TraitDefinition[] | The provided traits |
Overrides
Initialize()
Called by MARS when the SynthesizedObject is initialized
Declaration
public override void Initialize()
Overrides
OnEnable()
Called by Unity when the object is enabled
Declaration
protected override void OnEnable()
Overrides
RefreshFromMRPlane()
Refresh the data for this SynthesizedPlane using the associated MRPlane
Declaration
public void RefreshFromMRPlane()
SetMRPlaneData(List<Vector3>, Vector3, Vector2)
Set the data for the MRPlane backing this SynthesizedPlane
Declaration
public void SetMRPlaneData(List<Vector3> vertices, Vector3 center, Vector2 extents)
Parameters
Type | Name | Description |
---|---|---|
List<Vector3> | vertices | The vertices for the boundary polygon |
Vector3 | center | The position of the center of the plane |
Vector2 | extents | The extents of the boundary polygon |
Terminate()
Called when this plane is removed from the MARS database
Declaration
public override void Terminate()
Overrides
ValidateUsingMeshCache()
Ensure that this object has the correct references to its Mesh and MeshFilter
Declaration
public void ValidateUsingMeshCache()