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

Fluid volumes are used to contain and manage flow primitives so that they only affect objects within the defined volume. More...

Inheritance diagram for AerodynamicObjects.FluidVolume:

Public Types

enum  Shape
 Defines the shape of the volume. More...
 

Public Member Functions

void GetInteractionID ()
 Obtains a unique interaction ID for the object. More...
 
void OnEnable ()
 
void RemovePrimitive (FlowPrimitive flowPrimitive)
 
void AddPrimitive (FlowPrimitive flowPrimitive)
 
virtual void Reset ()
 
void SetColliderRuntime ()
 
void SetColliderEditor ()
 
virtual bool IsPositionInsideZone (Vector3 position)
 
Vector3 VelocityFunction (Vector3 position)
 Calculate the velocity of all flow primitives contained in this fluid volume - no checks for if they interact. More...
 
bool IsInteractionIgnored (int flowAffectedID)
 
void IgnoreInteraction (int flowAffectedID)
 
Vector3 VelocityFunction (Vector3 position, int flowAffectedID)
 Calculate the velocity of all flow primitives contained in this fluid volume including checks for if each flow primitive should interact with the provided ID. More...
 
Vector3 VelocityFunction (Vector3 position, int flowAffectedID, List< FlowPrimitive > interactingFlowPrimitives)
 
List< VelocityEventHandlerGetInteractingVelocityFunctions (int flowAffectedID)
 
List< FlowPrimitiveGetInteractingPrimitives (int flowAffectedID)
 Iterates over the list of flow primitives and adds each primitive which will interact with the provided ID. More...
 
List< FlowPrimitiveGetInteractingPrimitives (int flowAffectedID, List< FlowPrimitive > interactingPrimitives)
 Iterates over the list of flow primitives and adds each primitive which will interact with the provided ID. More...
 
virtual void UpdateFluidProperties (AeroObject aeroObject)
 Override this function to change the way fluid properties are calculated. More...
 
virtual void OnTriggerEnter (Collider other)
 
virtual void OnTriggerExit (Collider other)
 
virtual void OnValidate ()
 

Public Attributes

Vector3 boxSize = new Vector3(1, 1, 1)
 
float sphereRadius = 0.5f
 
float capsuleRadius = 0.5f
 
float capsuleHeight = 1f
 
Shape shape = Shape.Box
 
FluidProperties fluidProperties
 
FlowPrimitive[] flowPrimitives = new FlowPrimitive[0]
 
int interactionID = 0
 The unique ID number for this fluid volume, used for identifying pairs of ignored interactions by the FlowInteractionManager. More...
 

Detailed Description

Fluid volumes are used to contain and manage flow primitives so that they only affect objects within the defined volume.

Member Enumeration Documentation

◆ Shape

Defines the shape of the volume.

Member Function Documentation

◆ AddPrimitive()

void AerodynamicObjects.FluidVolume.AddPrimitive ( FlowPrimitive  flowPrimitive)

◆ GetInteractingPrimitives() [1/2]

List< FlowPrimitive > AerodynamicObjects.FluidVolume.GetInteractingPrimitives ( int  flowAffectedID)

Iterates over the list of flow primitives and adds each primitive which will interact with the provided ID.

This function is useful when you need to cache multiple interaction checks before getting velocities. For example, when a particle system is getting the velocities for each particle, the interaction check is done at the Flow Particles level with a single ID for the whole collection of particles.

Parameters
flowAffectedIDID of the flow affected object to check the primitives agains
Returns
List of flow primitives from the fluid volume which interact with the ID.

◆ GetInteractingPrimitives() [2/2]

List< FlowPrimitive > AerodynamicObjects.FluidVolume.GetInteractingPrimitives ( int  flowAffectedID,
List< FlowPrimitive interactingPrimitives 
)

Iterates over the list of flow primitives and adds each primitive which will interact with the provided ID.

This function is useful when you need to cache multiple interaction checks before getting velocities. For example, when a particle system is getting the velocities for each particle, the interaction check is done at the Flow Particles level with a single ID for the whole collection of particles.

Parameters
flowAffectedIDID of the flow affected object to check the primitives agains
Returns
List of flow primitives from the fluid volume which interact with the ID.

◆ GetInteractingVelocityFunctions()

List< VelocityEventHandler > AerodynamicObjects.FluidVolume.GetInteractingVelocityFunctions ( int  flowAffectedID)

◆ GetInteractionID()

void AerodynamicObjects.FluidVolume.GetInteractionID ( )

Obtains a unique interaction ID for the object.

Should be called when the object is created.

◆ IgnoreInteraction()

void AerodynamicObjects.FluidVolume.IgnoreInteraction ( int  flowAffectedID)

◆ IsInteractionIgnored()

bool AerodynamicObjects.FluidVolume.IsInteractionIgnored ( int  flowAffectedID)

◆ IsPositionInsideZone()

virtual bool AerodynamicObjects.FluidVolume.IsPositionInsideZone ( Vector3  position)
virtual

◆ OnEnable()

void AerodynamicObjects.FluidVolume.OnEnable ( )

◆ OnTriggerEnter()

virtual void AerodynamicObjects.FluidVolume.OnTriggerEnter ( Collider  other)
virtual

◆ OnTriggerExit()

virtual void AerodynamicObjects.FluidVolume.OnTriggerExit ( Collider  other)
virtual

◆ OnValidate()

virtual void AerodynamicObjects.FluidVolume.OnValidate ( )
virtual

◆ RemovePrimitive()

void AerodynamicObjects.FluidVolume.RemovePrimitive ( FlowPrimitive  flowPrimitive)

◆ Reset()

virtual void AerodynamicObjects.FluidVolume.Reset ( )
virtual

◆ SetColliderEditor()

void AerodynamicObjects.FluidVolume.SetColliderEditor ( )

◆ SetColliderRuntime()

void AerodynamicObjects.FluidVolume.SetColliderRuntime ( )

◆ UpdateFluidProperties()

virtual void AerodynamicObjects.FluidVolume.UpdateFluidProperties ( AeroObject  aeroObject)
virtual

Override this function to change the way fluid properties are calculated.

E.g. to add a pressure gradient.

Parameters
aeroObjectThe aerodynamic object for which the fluid properties are relevant.

◆ VelocityFunction() [1/3]

Vector3 AerodynamicObjects.FluidVolume.VelocityFunction ( Vector3  position)

Calculate the velocity of all flow primitives contained in this fluid volume - no checks for if they interact.

Parameters
positionPosition of the object in the global (earth) frame of reference.
Returns
The velocity of the fluid at the given position in the global (earth) frame.

◆ VelocityFunction() [2/3]

Vector3 AerodynamicObjects.FluidVolume.VelocityFunction ( Vector3  position,
int  flowAffectedID 
)

Calculate the velocity of all flow primitives contained in this fluid volume including checks for if each flow primitive should interact with the provided ID.

Parameters
positionPosition of the object in the global (earth) frame of reference.
flowAffectedIDThe interaction ID of the object which is being affected by this fluid volume.
Returns
The velocity of the fluid at the given position in the global (earth) frame.

◆ VelocityFunction() [3/3]

Vector3 AerodynamicObjects.FluidVolume.VelocityFunction ( Vector3  position,
int  flowAffectedID,
List< FlowPrimitive interactingFlowPrimitives 
)

Member Data Documentation

◆ boxSize

Vector3 AerodynamicObjects.FluidVolume.boxSize = new Vector3(1, 1, 1)

◆ capsuleHeight

float AerodynamicObjects.FluidVolume.capsuleHeight = 1f

◆ capsuleRadius

float AerodynamicObjects.FluidVolume.capsuleRadius = 0.5f

◆ flowPrimitives

FlowPrimitive [] AerodynamicObjects.FluidVolume.flowPrimitives = new FlowPrimitive[0]

◆ fluidProperties

FluidProperties AerodynamicObjects.FluidVolume.fluidProperties

◆ interactionID

int AerodynamicObjects.FluidVolume.interactionID = 0

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

◆ shape

Shape AerodynamicObjects.FluidVolume.shape = Shape.Box

◆ sphereRadius

float AerodynamicObjects.FluidVolume.sphereRadius = 0.5f

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