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

Base class for any object which will be affected by the flow. More...

Inheritance diagram for AerodynamicObjects.FlowAffected:
AerodynamicObjects.FlowFieldArrows AerodynamicObjects.FlowParticles AerodynamicObjects.FlowSensor AerodynamicObjects.MoveWithFlow AerodynamicObjects.SensorRake AerodynamicObjects.Demos.SurfaceParticles AerodynamicObjects.FlowFieldParticles AerodynamicObjects.FlowPointParticles AerodynamicObjects.ParticleGrid AerodynamicObjects.SurfaceTrails AerodynamicObjects.AeroObject

Public Member Functions

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

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

Base class for any object which will be affected by the flow.

This class obtains the local flow velocity and will ignore specific flow primitives and fluid volumes. The class maintains a list of the current local fluid volumes which are affecting the object using the subscription methods which are called when an object of this type enters a fluid volume.

Member Function Documentation

◆ Awake()

virtual void AerodynamicObjects.FlowAffected.Awake ( )
virtual

◆ FixedUpdate()

virtual void AerodynamicObjects.FlowAffected.FixedUpdate ( )
virtual

◆ GetFluidVelocity()

Vector3 AerodynamicObjects.FlowAffected.GetFluidVelocity ( Vector3  position)

Gets the fluid velocity at the provided position and checks whether to include the global fluid velocity or not.

If this function is called in a loop it may be more efficient to perform the check on affectedByGlobalFluid and then call GetFluidVelocityWithGlobal or GetFluidVelocityWithoutGlobal.

Parameters
positionThe position to use when calculating fluid velocity.

◆ GetFluidVelocityNoInteractionCheck()

Vector3 AerodynamicObjects.FlowAffected.GetFluidVelocityNoInteractionCheck ( Vector3  position)

Gets the fluid velocity at the provided position and checks whether to include the global fluid velocity or not.

If this function is called in a loop it may be more efficient to perform the check on affectedByGlobalFluid and then call GetFluidVelocityWithGlobal or GetFluidVelocityWithoutGlobal. Does not perform any interaction checks for the ID of this object.

Parameters
positionThe position to use when calculating fluid velocity.

◆ GetFluidVelocityWithGlobal()

Vector3 AerodynamicObjects.FlowAffected.GetFluidVelocityWithGlobal ( Vector3  position)

Gets the fluid velocity at the provided position under the assumption that the object IS affected by the global fluid.

This is potentially useful

Parameters
position
Returns

◆ GetFluidVelocityWithGlobalNoInteractionCheck()

Vector3 AerodynamicObjects.FlowAffected.GetFluidVelocityWithGlobalNoInteractionCheck ( Vector3  position)

◆ GetFluidVelocityWithoutGlobal()

Vector3 AerodynamicObjects.FlowAffected.GetFluidVelocityWithoutGlobal ( Vector3  position)

◆ GetInteractionID()

void AerodynamicObjects.FlowAffected.GetInteractionID ( )

Obtains a unique interaction ID for the object.

Should be called when the object is created.

◆ IgnoreInteraction() [1/2]

void AerodynamicObjects.FlowAffected.IgnoreInteraction ( FlowPrimitive  primitive)

Tells the flow interaction manager that this object and the provided flow primitive should not interact.

Parameters
primitiveThe flow primitive to ignore

◆ IgnoreInteraction() [2/2]

void AerodynamicObjects.FlowAffected.IgnoreInteraction ( FluidVolume  fluidVolume)

Tells the flow interaction manager that this object and the provided fluid volume should not interact.

Parameters
fluidVolumeThe fluid volume to ignore

◆ OnDestroy()

virtual void AerodynamicObjects.FlowAffected.OnDestroy ( )
virtual

◆ RemoveNullVolumes()

void AerodynamicObjects.FlowAffected.RemoveNullVolumes ( )

Removes any fluid volumes which have become null from the list of interacting fluid volumes for this object.

◆ SubscribeToFluidVolume()

void AerodynamicObjects.FlowAffected.SubscribeToFluidVolume ( FluidVolume  fluidVolume)

Add this fluid volume to the object's list of fluid volumes.

The object will then be affected by this fluid volume.

◆ UnsubscribeFromFluidVolume()

void AerodynamicObjects.FlowAffected.UnsubscribeFromFluidVolume ( FluidVolume  fluidVolume)

Remove this fluid volume from the object's list of fluid volumes.

The object will no longer be affected by this fluid volume.

◆ UpdateFluidVolumes()

void AerodynamicObjects.FlowAffected.UpdateFluidVolumes ( )

Looks at the fluid volumes which are currently affecting this object and removes any that have become null or are now ignored.

Member Data Documentation

◆ affectedByGlobalFluid

bool AerodynamicObjects.FlowAffected.affectedByGlobalFluid = true

Will the global fluid velocity affect this object?

◆ fluid

Fluid AerodynamicObjects.FlowAffected.fluid = new Fluid()

The state and properties of the fluid around the object.

◆ interactionID

int AerodynamicObjects.FlowAffected.interactionID = 0

The unique ID number for this object, used for identifying pairs of ignored interactions by the FlowInteractionManager.

◆ localFluidVolumes

List<FluidVolume> AerodynamicObjects.FlowAffected.localFluidVolumes = new List<FluidVolume>()

The local fluid volumes that are currently affecting this object.


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