Search Results for

    Show / Hide Table of Contents

    Class D6Joint

    Physics joint that is the most customizable type of joint. This joint type can be used to create all other built-in joint types, and to design your own custom ones, but is less intuitive to use. Allows a specification of a linear constraint (for example for a slider), twist constraint (rotating around X) and swing constraint (rotating around Y and Z). It also allows you to constrain limits to only specific axes or completely lock specific axes.

    Inheritance
    Object
    ScriptingObject
    SceneObject
    Actor
    Joint
    D6Joint
    Inherited Members
    Actor::_box
    Joint::_breakForce
    Joint::_breakTorque
    Actor::_drawCategory
    Actor::_drawNoCulling
    Joint::_enableAutoAnchor
    Joint::_enableCollision
    ScriptingObject::_gcHandle
    ScriptingObject::_id
    Actor::_isActive
    Actor::_isActiveInHierarchy
    Actor::_isEnabled
    Actor::_isHierarchyDirty
    Actor::_isPrefabRoot
    Joint::_joint
    Actor::_layer
    Actor::_localTransform
    Actor::_name
    SceneObject::_parent
    Actor::_physicsScene
    SceneObject::_prefabID
    SceneObject::_prefabObjectID
    Actor::_scene
    Actor::_sphere
    Actor::_staticFlags
    Joint::_targetAnchor
    Joint::_targetAnchorRotation
    Actor::_transform
    ScriptingObject::_type
    Actor::AddMovement(const Vector3& translation)
    Actor::AddMovement(const Vector3& translation, const Quaternion& rotation)
    Actor::AddScript()
    Actor::AddStaticFlags(StaticFlags flags)
    Actor::AddTag(const Tag& tag)
    Actor::AddTagRecursive(const Tag& tag)
    D6Joint
    Joint::BeginPlay(SceneBeginData* data)
    Actor::BreakPrefabLink()
    ScriptingObject::CanCast(const ScriptingTypeHandle& from, const ScriptingTypeHandle& to)
    ScriptingObject::CanCast(const MClass* from, const MClass* to)
    ScriptingObject::Cast(ScriptingObject* obj)
    ScriptingObject::ChangeID(const Guid& newId)
    Actor::ChangeScriptOrder(Script* script, int32 newIndex)
    Actor::Children
    Actor::Clone()
    Joint::Create()
    Joint::CreateJoint(const struct PhysicsJointDesc& desc)
    ScriptingObject::CreateManaged()
    ScriptingObject::CreateManagedInternal()
    ScriptingObject::Deleted
    Object::DeleteObject(float timeToLive = 0.0f, bool useGameTime=false)
    Object::DeleteObjectNow()
    Actor::DEPRECATED("Use HasTag instead") const String& GetTag()
    Actor::DEPRECATED("Use AddTag instead") void SetTag(const StringView& value)
    ISerializable::DeserializeIfExists(DeserializeStream& stream, const char* memberName, ISerializeModifier* modifier)
    D6Joint
    Actor::DestroyChildren(float timeLeft = 0.0f)
    ScriptingObject::DestroyManaged()
    Actor::Draw(RenderContext& renderContext)
    Actor::Draw(RenderContextBatch& renderContextBatch)
    Joint::DrawPhysicsDebug(RenderView& view)
    Joint::EndPlay()
    Actor::FindActor(const StringView& name)
    Actor::FindActor(const MClass* type, bool activeOnly=false)
    Actor::FindActor(const MClass* type, const StringView& name)
    Actor::FindActor(const MClass* type, const Tag& tag, bool activeOnly=false)
    Actor::FindActor()
    Actor::FindActor(const Tag& tag)
    Actor::FindScript(const MClass* type)
    Actor::FindScript()
    Object::Flags
    Actor::FromBytes(const Span<byte>& data, Array<Actor* >& output, ISerializeModifier* modifier)
    Actor::FromBytes(const Span<byte>& data)
    Actor::FromBytes(const Span<byte>& data, const Dictionary<Guid, Guid, HeapAllocation>& idsMapping)
    ScriptingObject::FromInterface(void* interfaceObj, const ScriptingTypeHandle& interfaceType)
    ScriptingObject::FromInterface(T* interfaceObj)
    Actor::FromJson(const StringAnsiView& json)
    Actor::GetBox()
    Actor::GetBoxWithChildren()
    Joint::GetBreakForce()
    Joint::GetBreakTorque()
    Actor::GetChild(int32 index)
    Actor::GetChild(const StringView& name)
    Actor::GetChild(const MClass* type)
    Actor::GetChild()
    Actor::GetChildren(const MClass* type)
    Actor::GetChildren()
    Actor::GetChildrenCount()
    ScriptingObject::GetClass()
    Joint::GetCurrentForce(Vector3& linear, Vector3& angular)
    Actor::GetDirection()
    Actor::GetEditorBox()
    Actor::GetEditorBoxChildren()
    Joint::GetEnableAutoAnchor()
    Joint::GetEnableCollision()
    ScriptingObject::GetID()
    Actor::GetIsActive()
    Actor::GetLayer()
    Actor::GetLayerMask()
    Actor::GetLayerName()
    Actor::GetLocalOrientation()
    Actor::GetLocalPosition()
    Actor::GetLocalScale()
    Actor::GetLocalToWorldMatrix(Matrix& localToWorld)
    Actor::GetLocalToWorldMatrix(Double4x4& localToWorld)
    Actor::GetLocalTransform()
    ScriptingObject::GetManagedInstance()
    Actor::GetName()
    SceneObject::GetNamePath(Char separatorChar='/')
    Actor::GetOrAddChild()
    ScriptingObject::GetOrCreateManagedInstance()
    Actor::GetOrderInParent()
    Actor::GetOrientation()
    SceneObject::GetParent()
    Actor::GetPerInstanceRandom()
    Joint::GetPhysicsImpl()
    Actor::GetPhysicsScene()
    Actor::GetPosition()
    SceneObject::GetPrefabID()
    SceneObject::GetPrefabObjectID()
    Actor::GetPrefabRoot()
    Actor::GetRotation()
    Actor::GetScale()
    Actor::GetScene()
    Actor::GetSceneObjectId()
    Actor::GetSceneRendering()
    Actor::GetScript(int32 index)
    Actor::GetScript(const MClass* type)
    Actor::GetScript()
    Actor::GetScriptByID(const Guid& id)
    Actor::GetScripts(const MClass* type)
    Actor::GetScripts()
    Actor::GetScriptsCount()
    Actor::GetSphere()
    Actor::GetStaticFlags()
    Joint::GetTargetAnchor()
    Joint::GetTargetAnchorRotation()
    Joint::GetTargetOrientation()
    Joint::GetTargetPosition()
    Actor::GetTransform()
    ScriptingObject::GetType()
    ScriptingObject::GetTypeHandle()
    Actor::GetWorldToLocalMatrix(Matrix& worldToLocal)
    Actor::GetWorldToLocalMatrix(Double4x4& worldToLocal)
    Actor::HasActorInChildren(Actor* a)
    Actor::HasActorInHierarchy(Actor* a)
    Actor::HasContentLoaded()
    ScriptingObject::HasManagedInstance()
    SceneObject::HasParent()
    SceneObject::HasPrefabLink()
    Actor::HasScene()
    Actor::HasStaticFlag(StaticFlags flag)
    Actor::HasTag()
    Actor::HasTag(const Tag& tag)
    Actor::HasTag(const StringView& tag)
    Actor::HideFlags
    Actor::Initialize()
    Actor::InitializeHierarchy()
    Actor::Intersects(const Ray& ray, Real& distance, Vector3& normal)
    Actor::IntersectsItself(const Ray& ray, Real& distance, Vector3& normal)
    ScriptingObject::Is(const ScriptingTypeHandle& type)
    ScriptingObject::Is(const MClass* type)
    ScriptingObject::Is()
    Actor::IsActiveInHierarchy()
    SceneObject::IsDuringPlay()
    Actor::IsPrefabRoot()
    ScriptingObject::IsRegistered()
    Actor::IsStatic()
    Actor::IsTransformStatic()
    Joint::JointBreak
    Actor::LinkPrefab(const Guid& prefabId, const Guid& prefabObjectId)
    Actor::LookAt(const Vector3& worldPos)
    Actor::LookAt(const Vector3& worldPos, const Vector3& worldUp)
    Actor::LookingAt(const Vector3& worldPos)
    Actor::LookingAt(const Vector3& worldPos, const Vector3& worldUp)
    ScriptingObject::NewObject(const ScriptingTypeHandle& typeHandle)
    ScriptingObject::NewObject()
    Actor::OnActiveChanged()
    Joint::OnActiveInTreeChanged()
    Actor::OnBeginPlay()
    Actor::OnDebugDraw()
    Actor::OnDeleteObject()
    Joint::OnDisable()
    Joint::OnEnable()
    Actor::OnEndPlay()
    Joint::OnJointBreak()
    Actor::OnLayerChanged()
    ScriptingObject::OnManagedInstanceDeleted()
    Actor::OnOrderInParentChanged()
    Joint::OnParentChanged()
    Actor::OnPhysicsSceneChanged(PhysicsScene* previous)
    ScriptingObject::OnScriptingDispose()
    Actor::OnStaticFlagsChanged()
    Joint::OnTransformChanged()
    ScriptingObject::RegisterObject()
    Actor::RemoveStaticFlags(StaticFlags flags)
    Actor::RemoveTag(const Tag& tag)
    Actor::ResetLocalTransform()
    SceneObject::SceneObject(const SpawnParams& params)
    ScriptingObject::ScriptingObject(const SpawnParams& params)
    Actor::Scripts
    D6Joint
    D6Joint
    Joint::SetBreakForce(float value)
    Joint::SetBreakTorque(float value)
    Actor::SetDirection(const Float3& value)
    Joint::SetEnableAutoAnchor(bool value)
    Joint::SetEnableCollision(bool value)
    Actor::SetIsActive(bool value)
    Joint::SetJointLocation(const Vector3& location)
    Joint::SetJointOrientation(const Quaternion& orientation)
    Actor::SetLayer(int32 layerIndex)
    Actor::SetLayerName(const StringView& value)
    Actor::SetLayerNameRecursive(const StringView& value)
    Actor::SetLayerRecursive(int32 layerIndex)
    Actor::SetLocalOrientation(const Quaternion& value)
    Actor::SetLocalPosition(const Vector3& value)
    Actor::SetLocalScale(const Float3& value)
    Actor::SetLocalTransform(const Transform& value)
    ScriptingObject::SetManagedInstance(MObject* instance)
    Actor::SetName(String&& value)
    Actor::SetName(const StringView& value)
    Actor::SetOrderInParent(int32 index)
    Actor::SetOrientation(const Quaternion& value)
    Actor::SetParent(Actor* value, bool worldPositionsStays, bool canBreakPrefabLink)
    Actor::SetParent(Actor* value, bool canBreakPrefabLink=true)
    SceneObject::SetParent(Actor* value)
    Actor::SetPhysicsScene(PhysicsScene* scene)
    Actor::SetPosition(const Vector3& value)
    Actor::SetRotation(const Matrix& value)
    Actor::SetScale(const Float3& value)
    Actor::SetStaticFlag(StaticFlags flag, bool value)
    Actor::SetStaticFlags(StaticFlags value)
    Joint::SetTargetAnchor(const Vector3& value)
    Joint::SetTargetAnchorRotation(const Quaternion& value)
    Actor::SetTransform(const Transform& value)
    D6Joint
    Actor::Tags
    Joint::Target
    Actor::ToBytes(const Array<Actor* >& actors, MemoryWriteStream& output)
    Actor::ToBytes(const Array<Actor* >& actors)
    ScriptingObject::ToInterface(ScriptingObject* obj, const ScriptingTypeHandle& interfaceType)
    ScriptingObject::ToInterface(ScriptingObject* obj)
    Actor::ToJson()
    ScriptingObject::ToManaged(const ScriptingObject* obj)
    ScriptingObject::ToNative(MObject* obj)
    Actor::ToString()
    Actor::TreeExecute(Function<bool(Actor* , Params ...)>& action, Params ... args)
    Actor::TreeExecuteChildren(Function<bool(Actor* , Params ...)>& action, Params ... args)
    Actor::TryGetSerializedObjectsIds(const Span<byte>& data)
    ScriptingObject::UnregisterObject()
    Actor::UnregisterObjectHierarchy()
    ISerializable::~ISerializable()
    Object::~Object()
    SceneObject::~SceneObject()
    ScriptingObject::~ScriptingObject()
    Assembly: FlaxEngine.dll
    File: Engine/Physics/Joints/D6Joint.h
    Syntax
    public class D6Joint : public Joint

    Methods

    CreateJoint(const PhysicsJointDesc& desc)

    Declaration
    protected void* CreateJoint(const PhysicsJointDesc& desc) override
    Parameters
    PhysicsJointDesc desc

    Returns
    void

    Deserialize(DeserializeStream& stream, ISerializeModifier* modifier)

    Deserializes object from the input stream.

    Declaration
    public virtual void Deserialize(DeserializeStream& stream, ISerializeModifier* modifier) override
    Parameters
    DeserializeStream stream

    The input stream.

    ISerializeModifier modifier

    The deserialization modifier object. Always valid.

    Overrides
    Actor::Deserialize(DeserializeStream& stream, ISerializeModifier* modifier)

    GetCurrentSwingY()

    Gets the current swing angle of the joint from the Y axis.

    Declaration
    public float GetCurrentSwingY() const
    Returns
    float

    GetCurrentSwingZ()

    Gets the current swing angle of the joint from the Z axis.

    Declaration
    public float GetCurrentSwingZ() const
    Returns
    float

    GetCurrentTwist()

    Gets the twist angle of the joint (in the range (-2Pi, 2Pi]).

    Declaration
    public float GetCurrentTwist() const
    Returns
    float

    GetDrive(const D6JointDriveType index)

    Gets the drive parameters for the specified drive type.

    Declaration
    public D6JointDrive GetDrive(const D6JointDriveType index) const
    Parameters
    D6JointDriveType index

    The type of drive being specified.

    Returns
    D6JointDrive

    The value.

    GetDriveAngularVelocity()

    Gets the drive's target angular velocity.

    Declaration
    public Vector3 GetDriveAngularVelocity() const
    Returns
    Vector3

    GetDriveLinearVelocity()

    Gets the drive's target linear velocity.

    Declaration
    public Vector3 GetDriveLinearVelocity() const
    Returns
    Vector3

    GetDrivePosition()

    Gets the drive's target position relative to the joint's first body.

    Declaration
    public Vector3 GetDrivePosition() const
    Returns
    Vector3

    GetDriveRotation()

    Gets the drive's target rotation relative to the joint's first body.

    Declaration
    public Quaternion GetDriveRotation() const
    Returns
    Quaternion

    GetLimitLinear()

    Determines the linear limit used for constraining translation degrees of freedom.

    Declaration
    public LimitLinear GetLimitLinear() const
    Returns
    LimitLinear

    GetLimitSwing()

    Determines the cone limit used for constraining the swing (rotation around Y and Z) degree of freedom.

    Declaration
    public LimitConeRange GetLimitSwing() const
    Returns
    LimitConeRange

    GetLimitTwist()

    Determines the angular limit used for constraining the twist (rotation around X) degree of freedom.

    Declaration
    public LimitAngularRange GetLimitTwist() const
    Returns
    LimitAngularRange

    GetMotion(const D6JointAxis axis)

    Gets the motion type around the specified axis.

    Each axis may independently specify that the degree of freedom is locked (blocking relative movement along or around this axis), limited by the corresponding limit, or free.

    Declaration
    public D6JointMotion GetMotion(const D6JointAxis axis) const
    Parameters
    D6JointAxis axis

    The axis the degree of freedom around which the motion type is specified.

    Returns
    D6JointMotion

    The value.

    OnDebugDrawSelected()

    Draws debug shapes for the selected actor and all child scripts.

    Declaration
    public virtual void OnDebugDrawSelected() override
    Overrides
    Actor::OnDebugDrawSelected()

    Serialize(SerializeStream& stream, const void* otherObj)

    Serializes object to the output stream compared to the values of the other object instance (eg. default class object). If other object is null then serialize all properties.

    Declaration
    public virtual void Serialize(SerializeStream& stream, const void* otherObj) override
    Parameters
    SerializeStream stream

    The output stream.

    void otherObj

    The instance of the object to compare with and serialize only the modified properties. If null, then serialize all properties.

    Overrides
    Actor::Serialize(SerializeStream& stream, const void* otherObj)

    SetDrive(const D6JointDriveType index, const D6JointDrive& value)

    Sets the drive parameters for the specified drive type.

    Declaration
    public void SetDrive(const D6JointDriveType index, const D6JointDrive& value)
    Parameters
    D6JointDriveType index

    The type of drive being specified.

    D6JointDrive value

    The value.

    SetDriveAngularVelocity(const Vector3& value)

    Sets the drive's target angular velocity.

    Declaration
    public void SetDriveAngularVelocity(const Vector3& value)
    Parameters
    Vector3 value

    SetDriveLinearVelocity(const Vector3& value)

    Sets the drive's target linear velocity.

    Declaration
    public void SetDriveLinearVelocity(const Vector3& value)
    Parameters
    Vector3 value

    SetDrivePosition(const Vector3& value)

    Sets the drive's target position relative to the joint's first body.

    Declaration
    public void SetDrivePosition(const Vector3& value)
    Parameters
    Vector3 value

    SetDriveRotation(const Quaternion& value)

    Sets the drive's target rotation relative to the joint's first body.

    Declaration
    public void SetDriveRotation(const Quaternion& value)
    Parameters
    Quaternion value

    SetLimitLinear(const LimitLinear& value)

    Determines the linear limit used for constraining translation degrees of freedom.

    Declaration
    public void SetLimitLinear(const LimitLinear& value)
    Parameters
    LimitLinear value

    SetLimitSwing(const LimitConeRange& value)

    Determines the cone limit used for constraining the swing (rotation around Y and Z) degree of freedom.

    Declaration
    public void SetLimitSwing(const LimitConeRange& value)
    Parameters
    LimitConeRange value

    SetLimitTwist(const LimitAngularRange& value)

    Determines the angular limit used for constraining the twist (rotation around X) degree of freedom.

    Declaration
    public void SetLimitTwist(const LimitAngularRange& value)
    Parameters
    LimitAngularRange value

    SetMotion(const D6JointAxis axis, const D6JointMotion value)

    Sets the motion type around the specified axis.

    Each axis may independently specify that the degree of freedom is locked (blocking relative movement along or around this axis), limited by the corresponding limit, or free.

    Declaration
    public void SetMotion(const D6JointAxis axis, const D6JointMotion value)
    Parameters
    D6JointAxis axis

    The axis the degree of freedom around which the motion type is specified.

    D6JointMotion value

    The value.

    See Also

    Joint
    • Improve this Doc
    • View Source
    In This Article
    Back to top Copyright © 2012-2024 Wojciech Figat