// -------------------------------------------------------------------------------------------------------------------- // // Copyright (c) VRMADA, All rights reserved. // // -------------------------------------------------------------------------------------------------------------------- using System.Collections.Generic; using UnityEngine; namespace UltimateXR.Examples.FullScene.Lab { public partial class Laser { #region Private Types & Data /// /// Stores all information for a burn result of pointing the enabled laser to an object. /// private class LaserBurn { #region Public Types & Data /// /// Gets the transform component of the GameObject that is used to represent the burn. /// public Transform Transform => GameObject.transform; /// /// Gets the last normal of the laser impact that caused the laser burn. /// public Vector3 LastWorldNormal => Transform.TransformVector(LastNormal); /// /// Gets the last world-space position in the burn path. /// public Vector3 LastWorldPathPosition => Transform.TransformPoint(PathPositions[PathPositions.Count - 1]); /// /// Gets the dynamically created object to represent the burn. /// public GameObject GameObject { get; set; } /// /// Gets the dynamically created object that represents the incandescent part in the burn. /// public GameObject GameObjectIncandescent { get; set; } /// /// Gets the collider that was hit. /// public Collider Collider { get; set; } /// /// Gets the burn path line renderer. /// public LineRenderer LineRenderer { get; set; } /// /// Gets the incandescent path line renderer. /// public LineRenderer IncandescentLineRenderer { get; set; } /// /// Gets the positions in the burn path. /// public List PathPositions { get; set; } /// /// Gets the creation times of each path position so that we can fade them out based on age. /// public List PathCreationTimes { get; set; } /// /// Last hit normal in local coordinates of the burn object. /// public Vector3 LastNormal { get; set; } #endregion } #endregion } }