Aerodynamic Objects Core 2.0.0
Loading...
Searching...
No Matches
AerodynamicObjects.FlowSensor Class Reference

Used to measure relative flow velocity using the velocity of the object and any interactable flow primitives in the scene. More...

Inheritance diagram for AerodynamicObjects.FlowSensor:
AerodynamicObjects.FlowAffected AerodynamicObjects.AeroObject

Public Member Functions

override void FixedUpdate ()
 
override void Awake ()
 
void GetObjectVelocity ()
 Determine the velocity and angular velocity of the object. More...
 
- Public Member Functions inherited from AerodynamicObjects.FlowAffected
void GetInteractionID ()
 Obtains a unique interaction ID for the object. More...
 
void IgnoreInteraction (FlowPrimitive primitive)
 Tells the flow interaction manager that this object and the provided flow primitive should not interact. More...
 
void IgnoreInteraction (FluidVolume fluidVolume)
 Tells the flow interaction manager that this object and the provided fluid volume should not interact. More...
 
virtual void OnDestroy ()
 
virtual void Awake ()
 
virtual void FixedUpdate ()
 
void SubscribeToFluidVolume (FluidVolume fluidVolume)
 Add this fluid volume to the object's list of fluid volumes. More...
 
void UnsubscribeFromFluidVolume (FluidVolume fluidVolume)
 Remove this fluid volume from the object's list of fluid volumes. More...
 
void UpdateFluidVolumes ()
 Looks at the fluid volumes which are currently affecting this object and removes any that have become null or are now ignored. More...
 
void RemoveNullVolumes ()
 Removes any fluid volumes which have become null from the list of interacting fluid volumes for this object. More...
 
Vector3 GetFluidVelocity (Vector3 position)
 Gets the fluid velocity at the provided position and checks whether to include the global fluid velocity or not. More...
 
Vector3 GetFluidVelocityNoInteractionCheck (Vector3 position)
 Gets the fluid velocity at the provided position and checks whether to include the global fluid velocity or not. More...
 
Vector3 GetFluidVelocityWithGlobal (Vector3 position)
 Gets the fluid velocity at the provided position under the assumption that the object IS affected by the global fluid. More...
 
Vector3 GetFluidVelocityWithGlobalNoInteractionCheck (Vector3 position)
 
Vector3 GetFluidVelocityWithoutGlobal (Vector3 position)
 

Public Attributes

Rigidbody rb
 
VelocitySource velocitySource = VelocitySource.Rigidbody
 Which component should this object use to determine its velocity. More...
 
Vector3 velocity = Vector3.zero
 Velocity of the object in the global (earth) frame of reference. More...
 
Vector3 localVelocity = Vector3.zero
 Velocity of the object in the object's local frame of reference. More...
 
Vector3 relativeVelocity = Vector3.zero
 Velocity of the object relative to the fluid. More...
 
Vector3 localRelativeVelocity = Vector3.zero
 Velocity of the object relative to the fluid. More...
 
Vector3 angularVelocity = Vector3.zero
 Angular velocity of the object in the global (earth) frame of reference. More...
 
Vector3 localAngularVelocity = Vector3.zero
 Angular velocity of the object in the object's local frame of reference. More...
 
- Public Attributes inherited from AerodynamicObjects.FlowAffected
bool affectedByGlobalFluid = true
 Will the global fluid velocity affect this object? More...
 
int interactionID = 0
 The unique ID number for this object, used for identifying pairs of ignored interactions by the FlowInteractionManager. More...
 
List< FluidVolumelocalFluidVolumes = new List<FluidVolume>()
 The local fluid volumes that are currently affecting this object. More...
 
Fluid fluid = new Fluid()
 The state and properties of the fluid around the object. More...
 

Detailed Description

Used to measure relative flow velocity using the velocity of the object and any interactable flow primitives in the scene.

Member Function Documentation

◆ Awake()

override void AerodynamicObjects.FlowSensor.Awake ( )
virtual

Reimplemented from AerodynamicObjects.FlowAffected.

◆ FixedUpdate()

override void AerodynamicObjects.FlowSensor.FixedUpdate ( )
virtual

Reimplemented from AerodynamicObjects.FlowAffected.

◆ GetObjectVelocity()

void AerodynamicObjects.FlowSensor.GetObjectVelocity ( )

Determine the velocity and angular velocity of the object.

Can use either the assigned rigidbody or the transform of the object.

Member Data Documentation

◆ angularVelocity

Vector3 AerodynamicObjects.FlowSensor.angularVelocity = Vector3.zero

Angular velocity of the object in the global (earth) frame of reference.

(m/s)

◆ localAngularVelocity

Vector3 AerodynamicObjects.FlowSensor.localAngularVelocity = Vector3.zero

Angular velocity of the object in the object's local frame of reference.

(m/s)

◆ localRelativeVelocity

Vector3 AerodynamicObjects.FlowSensor.localRelativeVelocity = Vector3.zero

Velocity of the object relative to the fluid.

Measured in the object's local frame of reference. (m/s)

◆ localVelocity

Vector3 AerodynamicObjects.FlowSensor.localVelocity = Vector3.zero

Velocity of the object in the object's local frame of reference.

(m/s)

◆ rb

Rigidbody AerodynamicObjects.FlowSensor.rb

◆ relativeVelocity

Vector3 AerodynamicObjects.FlowSensor.relativeVelocity = Vector3.zero

Velocity of the object relative to the fluid.

Measured in the global (earth) frame of reference. (m/s)

◆ velocity

Vector3 AerodynamicObjects.FlowSensor.velocity = Vector3.zero

Velocity of the object in the global (earth) frame of reference.

(m/s)

◆ velocitySource

VelocitySource AerodynamicObjects.FlowSensor.velocitySource = VelocitySource.Rigidbody

Which component should this object use to determine its velocity.

If transform is selected, the object will use changes in its transform to determine velocity and angular velocity. For rigidbody, the object will use the selected rigidbody to obtain its velocity.


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