Highroad Engine v1.3
Classes | Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | List of all members
MoreMountains.Tools.MMConeOfVision2D Class Reference
Inheritance diagram for MoreMountains.Tools.MMConeOfVision2D:

Classes

struct  MeshEdgePosition
 
struct  RaycastData
 

Public Member Functions

virtual void SetDirectionAndAngles (Vector3 direction, Vector3 eulerAngles)
 

Public Attributes

LayerMask ObstacleMask
 
float VisionRadius = 5f
 
float VisionAngle = 20f
 
Vector3 Direction
 
Vector3 EulerAngles
 
bool ShouldScanForTargets = true
 
LayerMask TargetMask
 
float ScanFrequencyInSeconds = 1f
 
List< Transform > VisibleTargets = new List<Transform>()
 
bool ShouldDrawMesh = true
 
float MeshDensity = 0.2f
 
int EdgePrecision = 3
 
float EdgeThreshold = 0.5f
 
MeshFilter VisionMeshFilter
 

Protected Member Functions

virtual void Awake ()
 
virtual void LateUpdate ()
 
virtual void ScanForTargets ()
 
virtual void DrawMesh ()
 

Protected Attributes

Mesh _visionMesh
 
Collider2D[] _targetsWithinDistance
 
Transform _target
 
Vector3 _directionToTarget
 
float _distanceToTarget
 
float _lastScanTimestamp
 
RaycastHit2D _scanForTargetsHit2D
 
List< Vector3 > _viewPoints = new List<Vector3>()
 
RaycastData _oldViewCast = new RaycastData()
 
RaycastData _viewCast = new RaycastData()
 
Vector3[] _vertices
 
int[] _triangles
 
Vector3 _minPoint
 
Vector3 _maxPoint
 
Vector3 _direction
 
RaycastData _returnRaycastData
 
RaycastHit2D _raycastAtAngleHit2D
 
int _numberOfVerticesLastTime = 0
 

Member Function Documentation

◆ Awake()

virtual void MoreMountains.Tools.MMConeOfVision2D.Awake ( )
protectedvirtual

◆ DrawMesh()

virtual void MoreMountains.Tools.MMConeOfVision2D.DrawMesh ( )
protectedvirtual

◆ LateUpdate()

virtual void MoreMountains.Tools.MMConeOfVision2D.LateUpdate ( )
protectedvirtual

◆ ScanForTargets()

virtual void MoreMountains.Tools.MMConeOfVision2D.ScanForTargets ( )
protectedvirtual

◆ SetDirectionAndAngles()

virtual void MoreMountains.Tools.MMConeOfVision2D.SetDirectionAndAngles ( Vector3  direction,
Vector3  eulerAngles 
)
virtual

Member Data Documentation

◆ _direction

Vector3 MoreMountains.Tools.MMConeOfVision2D._direction
protected

◆ _directionToTarget

Vector3 MoreMountains.Tools.MMConeOfVision2D._directionToTarget
protected

◆ _distanceToTarget

float MoreMountains.Tools.MMConeOfVision2D._distanceToTarget
protected

◆ _lastScanTimestamp

float MoreMountains.Tools.MMConeOfVision2D._lastScanTimestamp
protected

◆ _maxPoint

Vector3 MoreMountains.Tools.MMConeOfVision2D._maxPoint
protected

◆ _minPoint

Vector3 MoreMountains.Tools.MMConeOfVision2D._minPoint
protected

◆ _numberOfVerticesLastTime

int MoreMountains.Tools.MMConeOfVision2D._numberOfVerticesLastTime = 0
protected

◆ _oldViewCast

RaycastData MoreMountains.Tools.MMConeOfVision2D._oldViewCast = new RaycastData()
protected

◆ _raycastAtAngleHit2D

RaycastHit2D MoreMountains.Tools.MMConeOfVision2D._raycastAtAngleHit2D
protected

◆ _returnRaycastData

RaycastData MoreMountains.Tools.MMConeOfVision2D._returnRaycastData
protected

◆ _scanForTargetsHit2D

RaycastHit2D MoreMountains.Tools.MMConeOfVision2D._scanForTargetsHit2D
protected

◆ _target

Transform MoreMountains.Tools.MMConeOfVision2D._target
protected

◆ _targetsWithinDistance

Collider2D [] MoreMountains.Tools.MMConeOfVision2D._targetsWithinDistance
protected

◆ _triangles

int [] MoreMountains.Tools.MMConeOfVision2D._triangles
protected

◆ _vertices

Vector3 [] MoreMountains.Tools.MMConeOfVision2D._vertices
protected

◆ _viewCast

RaycastData MoreMountains.Tools.MMConeOfVision2D._viewCast = new RaycastData()
protected

◆ _viewPoints

List<Vector3> MoreMountains.Tools.MMConeOfVision2D._viewPoints = new List<Vector3>()
protected

◆ _visionMesh

Mesh MoreMountains.Tools.MMConeOfVision2D._visionMesh
protected

◆ Direction

Vector3 MoreMountains.Tools.MMConeOfVision2D.Direction

◆ EdgePrecision

int MoreMountains.Tools.MMConeOfVision2D.EdgePrecision = 3

◆ EdgeThreshold

float MoreMountains.Tools.MMConeOfVision2D.EdgeThreshold = 0.5f

◆ EulerAngles

Vector3 MoreMountains.Tools.MMConeOfVision2D.EulerAngles

◆ MeshDensity

float MoreMountains.Tools.MMConeOfVision2D.MeshDensity = 0.2f

◆ ObstacleMask

LayerMask MoreMountains.Tools.MMConeOfVision2D.ObstacleMask

◆ ScanFrequencyInSeconds

float MoreMountains.Tools.MMConeOfVision2D.ScanFrequencyInSeconds = 1f

◆ ShouldDrawMesh

bool MoreMountains.Tools.MMConeOfVision2D.ShouldDrawMesh = true

◆ ShouldScanForTargets

bool MoreMountains.Tools.MMConeOfVision2D.ShouldScanForTargets = true

◆ TargetMask

LayerMask MoreMountains.Tools.MMConeOfVision2D.TargetMask

◆ VisibleTargets

List<Transform> MoreMountains.Tools.MMConeOfVision2D.VisibleTargets = new List<Transform>()

◆ VisionAngle

float MoreMountains.Tools.MMConeOfVision2D.VisionAngle = 20f

◆ VisionMeshFilter

MeshFilter MoreMountains.Tools.MMConeOfVision2D.VisionMeshFilter

◆ VisionRadius

float MoreMountains.Tools.MMConeOfVision2D.VisionRadius = 5f

The documentation for this class was generated from the following file: