Search Results for

    Show / Hide Table of Contents

    Class Cloth

    Physical simulation actor for cloth objects made of vertices that are simulated as cloth particles with physical properties, forces, and constraints to affect cloth behavior.

    Inheritance
    System.Object
    Object
    SceneObject
    Actor
    Cloth
    Implements
    ISerializable
    Inherited Members
    Actor.SetLayerRecursive(Int32)
    Actor.SetLayerNameRecursive(String)
    Actor.HasTag()
    Actor.HasTag(Tag)
    Actor.HasTag(String)
    Actor.AddTag(Tag)
    Actor.AddTagRecursive(Tag)
    Actor.RemoveTag(Tag)
    Actor.SetParent(Actor, Boolean, Boolean)
    Actor.GetChild(Int32)
    Actor.GetChild(String)
    Actor.GetChild(Type)
    Actor.GetChildren(Type)
    Actor.DestroyChildren(Single)
    Actor.GetScript(Int32)
    Actor.GetScript(Type)
    Actor.GetScripts(Type)
    Actor.AddMovement(Vector3)
    Actor.AddMovement(Vector3, Quaternion)
    Actor.GetWorldToLocalMatrix(Matrix)
    Actor.GetLocalToWorldMatrix(Matrix)
    Actor.OnDebugDraw()
    Actor.OnDebugDrawSelected()
    Actor.GetPrefabRoot()
    Actor.FindActor(String)
    Actor.FindActor(Type, Boolean)
    Actor.FindActor(Type, String)
    Actor.FindActor(Type, Tag, Boolean)
    Actor.FindScript(Type)
    Actor.HasActorInHierarchy(Actor)
    Actor.HasActorInChildren(Actor)
    Actor.IntersectsItself(Ray, Single, Vector3)
    Actor.Intersects(Ray, Single, Vector3)
    Actor.LookAt(Vector3)
    Actor.LookAt(Vector3, Vector3)
    Actor.LookingAt(Vector3)
    Actor.LookingAt(Vector3, Vector3)
    Actor.ToBytes(Actor[])
    Actor.FromBytes(Byte[])
    Actor.FromBytes(Byte[], Dictionary<Guid, Guid>)
    Actor.TryGetSerializedObjectsIds(Byte[])
    Actor.ToJson()
    Actor.FromJson(String)
    Actor.Clone()
    Actor.OnEnable()
    Actor.OnDisable()
    Actor.OnParentChanged()
    Actor.OnTransformChanged()
    Actor.OnActiveChanged()
    Actor.OnActiveInTreeChanged()
    Actor.OnOrderInParentChanged()
    Actor.OnStaticFlagsChanged()
    Actor.OnLayerChanged()
    Actor.OnBeginPlay()
    Actor.OnEndPlay()
    Actor.AddStaticFlags(StaticFlags)
    Actor.RemoveStaticFlags(StaticFlags)
    Actor.SetStaticFlag(StaticFlags, Boolean)
    Actor.HasStaticFlag(StaticFlags)
    Actor.ResetLocalTransform()
    Actor.AddChild(Type)
    Actor.AddChild<T>()
    Actor.GetChild<T>()
    Actor.TryGetChild<T>(T)
    Actor.GetOrAddChild<T>()
    Actor.AddScript(Type)
    Actor.AddScript<T>()
    Actor.GetScript<T>()
    Actor.TryGetScript<T>(T)
    Actor.FindScript<T>()
    Actor.FindActor<T>(Boolean)
    Actor.FindActor<T>(String)
    Actor.FindActor<T>(Tag, Boolean)
    Actor.GetChildren<T>()
    Actor.GetScripts<T>()
    Actor.RotateAround(Vector3, Vector3, Single, Boolean)
    Actor.ToString()
    Actor.Children
    Actor.Tags
    Actor.Layer
    Actor.Name
    Actor.IsActive
    Actor.StaticFlags
    Actor.PerInstanceRandom
    Actor.LocalPosition
    Actor.LocalOrientation
    Actor.LocalScale
    Actor.Sphere
    Actor.Box
    Actor.BoxWithChildren
    Actor.EditorBox
    Actor.EditorBoxChildren
    Actor.HasContentLoaded
    Actor.IsPrefabRoot
    Actor.IsStatic
    Actor.IsTransformStatic
    Actor.WorldToLocalMatrix
    Actor.LocalToWorldMatrix
    SceneObject.SetParent(Actor, Boolean)
    SceneObject.LinkPrefab(Guid, Guid)
    SceneObject.BreakPrefabLink()
    SceneObject.GetNamePath(Char)
    SceneObject.IsDuringPlay
    SceneObject.HasParent
    SceneObject.HasPrefabLink
    SceneObject.PrefabID
    SceneObject.PrefabObjectID
    Object.__unmanagedPtr
    Object.__internalId
    Object.Finalize()
    Object.As<T>()
    Object.NewValue(Type)
    Object.New(String)
    Object.Find<T>(Guid, Boolean)
    Object.Find(Guid, Type, Boolean)
    Object.TryFind<T>(Guid)
    Object.TryFind(Guid, Type)
    Object.Destroy(Object, Single)
    Object.DestroyNow(Object)
    Object.Destroy<T>(T, Single)
    Object.Equals(Object)
    Object.GetUnmanagedPtr(Object)
    Object.GetUnmanagedInterface(Object, Type)
    Object.FromUnmanagedPtr(IntPtr)
    Object.MapObjectID(Guid)
    Object.RemapObjectID(Guid)
    Object.GetHashCode()
    Object.ID
    Object.TypeName
    Namespace: FlaxEngine
    Assembly: FlaxEngine.CSharp.dll
    Syntax
    [ActorContextMenu("New/Physics/Cloth")]
    [ActorToolbox("Physics")]
    [Unmanaged]
    public class Cloth : Actor, ISerializable

    Constructors

    Cloth()

    Initializes a new instance of the Cloth.

    Declaration
    public Cloth()

    Properties

    Collision

    Gets or sets the cloth response to collisions settings.

    Declaration
    [EditorOrder(20)]
    [EditorDisplay("Cloth", null)]
    [Unmanaged]
    public Cloth.CollisionSettings Collision { get; set; }
    Property Value
    Cloth.CollisionSettings

    Fabric

    Gets or sets the cloth's fabric settings (material's stiffness and compression response).

    Declaration
    [EditorOrder(40)]
    [EditorDisplay("Cloth", null)]
    [Unmanaged]
    public Cloth.FabricSettings Fabric { get; set; }
    Property Value
    Cloth.FabricSettings

    Force

    Gets or sets the cloth response to forces settings.

    Declaration
    [EditorOrder(10)]
    [EditorDisplay("Cloth", null)]
    [Unmanaged]
    public Cloth.ForceSettings Force { get; set; }
    Property Value
    Cloth.ForceSettings

    Mesh

    Gets or sets the mesh to use for the cloth simulation (single mesh from specific LOD). Always from the parent static or animated model actor.

    Declaration
    [EditorOrder(0)]
    [EditorDisplay("Cloth", null)]
    [Unmanaged]
    public ModelInstanceActor.MeshReference Mesh { get; set; }
    Property Value
    ModelInstanceActor.MeshReference

    Simulation

    Gets or sets the cloth simulation settings.

    Declaration
    [EditorOrder(30)]
    [EditorDisplay("Cloth", null)]
    [Unmanaged]
    public Cloth.SimulationSettings Simulation { get; set; }
    Property Value
    Cloth.SimulationSettings

    Methods

    ClearInteria()

    Sets the inertia derived from transform change to zero (once). It will reset any cloth object movement effects as it was teleported.

    Declaration
    [Unmanaged]
    public void ClearInteria()

    GetPaint()

    Gets the cloth particles paint data with per-particle max distance (normalized 0-1, 0 makes particle immovable). Returned value is empty if cloth was not initialized or doesn't use paint feature.

    Declaration
    [Unmanaged]
    public float[] GetPaint()
    Returns
    System.Single[]

    GetParticles()

    Gets the cloth particles data with per-particle XYZ position (in local cloth-space).

    Declaration
    [Unmanaged]
    public Float3[] GetParticles()
    Returns
    Float3[]

    Rebuild()

    Recreates the cloth by removing current instance data and creating a new physical cloth object.

    Declaration
    [Unmanaged]
    public void Rebuild()

    SetPaint(Single[])

    Sets the cloth particles paint data with per-particle max distance (normalized 0-1, 0 makes particle immovable). The size of the input data had to match the cloth size. Set to empty to remove paint.

    Declaration
    [Unmanaged]
    public void SetPaint(float[] value)
    Parameters
    System.Single[] value

    SetParticles(Float3[])

    Sets the cloth particles data with per-particle XYZ position (in local cloth-space). The size of the input data had to match the cloth size.

    Declaration
    [Unmanaged]
    public void SetParticles(Float3[] value)
    Parameters
    Float3[] value

    Extension Methods

    Extensions.ReflectiveCompare<T>(T, T)
    Extensions.DeepClone<T>(T)
    Extensions.RawClone<T>(T)
    In This Article
    Back to top Copyright © 2012-2024 Wojciech Figat