Class Joint3D<T, K>
This class represent a 3D physics joint and connects two entities together. All Joints restrict some degrees of freedom, seeking a specific configuration.
Inheritance
Inherited Members
Namespace: Evergine.Framework.Physics3D
Assembly: Evergine.Framework.dll
Syntax
public abstract class Joint3D<T, K> : Component, IDependencyObject, IDisposable where T : IJoint3D where K : JointDef3D<T>, new()
Type Parameters
Name | Description |
---|---|
T | The associated joint interface. |
K | The associated joint definition. |
Constructors
Joint3D()
Initializes a new instance of the Joint3D<T, K> class.
Declaration
public Joint3D()
Fields
breakpoint
Joint Breakpoint.
Declaration
protected float breakpoint
Field Value
Type | Description |
---|---|
float |
connectedBody
The connected rigid body.
Declaration
protected RigidBody3D connectedBody
Field Value
Type | Description |
---|---|
RigidBody3D |
isActive
If the joint is active.
Declaration
protected bool isActive
Field Value
Type | Description |
---|---|
bool |
joint
The physic joint.
Declaration
protected T joint
Field Value
Type | Description |
---|---|
T |
rigidBody
The associated body.
Declaration
[BindComponent(true, true, BindComponentSource.Owner, null, true)]
protected RigidBody3D rigidBody
Field Value
Type | Description |
---|---|
RigidBody3D |
transform3D
The transform 3D.
Declaration
[BindComponent(true, true, BindComponentSource.Owner, null, true)]
protected Transform3D transform3D
Field Value
Type | Description |
---|---|
Transform3D |
Properties
AppliedImpulse
Gets the applied impulse.
Declaration
public float AppliedImpulse { get; }
Property Value
Type | Description |
---|---|
float |
BreakPoint
Gets or sets joint Breakpoint Property. MaxValue by default.
Declaration
[RenderProperty(Tooltip = "Joint Breakpoint Property. MaxValue by default")]
public float BreakPoint { get; set; }
Property Value
Type | Description |
---|---|
float |
CollideConnected
Gets or sets a value indicating whether the attached bodies should collide themselves.
Declaration
[RenderProperty(Tooltip = "Indicating whether the attached bodies should collide themselves.")]
public bool CollideConnected { get; set; }
Property Value
Type | Description |
---|---|
bool |
ConnectedEntityPath
Gets or sets the connected entity path.
Declaration
public virtual string ConnectedEntityPath { get; set; }
Property Value
Type | Description |
---|---|
string |
DebugDrawSize
Gets or sets the connected entity path.
Declaration
[RenderPropertyAsFInput(MinLimit = 0, MaxLimit = 3.4028235E+38)]
public float DebugDrawSize { get; set; }
Property Value
Type | Description |
---|---|
float |
JointFeedback
Gets the Joint feedback.
Declaration
public IJointFeedback3D JointFeedback { get; }
Property Value
Type | Description |
---|---|
IJointFeedback3D |
NeedsFeedback
Gets or sets a value indicating whether the application needs to obtain feedback.
Declaration
public bool NeedsFeedback { get; set; }
Property Value
Type | Description |
---|---|
bool |
OverrideNumSolverIterations
Gets or sets the number of solver iterations.
Declaration
public int OverrideNumSolverIterations { get; set; }
Property Value
Type | Description |
---|---|
int |
Methods
BodyAChanged()
Body A is changed.
Declaration
protected virtual void BodyAChanged()
BodyBChanged()
Body B is changed.
Declaration
protected virtual void BodyBChanged()
CreateConnectedEntity()
Refresh the connected entity.
Declaration
protected void CreateConnectedEntity()
CreateJoint(K)
Creates the joint.
Declaration
protected virtual T CreateJoint(K jointDef)
Parameters
Type | Name | Description |
---|---|---|
K | jointDef | The joint def. |
Returns
Type | Description |
---|---|
T | The physic joint. |
Dispose()
Dispose this collider 3D.
Declaration
public virtual void Dispose()
FillJointDef(K)
Fill the joint definition.
Declaration
protected virtual bool FillJointDef(K jointDef)
Parameters
Type | Name | Description |
---|---|---|
K | jointDef | The joint definition. |
Returns
Type | Description |
---|---|
bool | True if all is OK. |
GetFrameX(ref Vector3, ref Vector3, out Matrix4x4)
Gets the frame.
Declaration
protected void GetFrameX(ref Vector3 a, ref Vector3 offset, out Matrix4x4 result)
Parameters
Type | Name | Description |
---|---|---|
Vector3 | a | The axis. |
Vector3 | offset | The offset. |
Matrix4x4 | result | The frame matrix. |
GetFrameZ(ref Vector3, ref Vector3, out Matrix4x4)
Gets the frame.
Declaration
protected void GetFrameZ(ref Vector3 a, ref Vector3 offset, out Matrix4x4 result)
Parameters
Type | Name | Description |
---|---|---|
Vector3 | a | The axis. |
Vector3 | offset | The offset. |
Matrix4x4 | result | The frame matrix. |
InitJoint()
Initialize joint.
Declaration
protected virtual void InitJoint()
OnActivated()
Invoked when the object is activated once is attached.
Declaration
protected override void OnActivated()
Overrides
OnDeactivated()
Invoked when the object is deactivated.
Declaration
protected override void OnDeactivated()
Overrides
OnDetach()
Invoked when the object is detached.
Declaration
protected override void OnDetach()
Overrides
RefreshJoint()
Refresh the joint.
Declaration
protected void RefreshJoint()
RefreshJointValue<V>(ref V, V)
Update a joint value.
Declaration
protected void RefreshJointValue<V>(ref V variable, V newValue)
Parameters
Type | Name | Description |
---|---|---|
V | variable | The variable to change. |
V | newValue | The new value. |
Type Parameters
Name | Description |
---|---|
V | The variable type. |
RemoveConnectedEntity()
Remove the connected entity.
Declaration
protected void RemoveConnectedEntity()
Start()
Invoked to start the object.
Declaration
protected override void Start()
Overrides
Events
OnBroke
Physic 3D Joint Broke Event
Declaration
public event Joint3D<T, K>.OnBrokeEventHandler OnBroke
Event Type
Type | Description |
---|---|
Joint3D<T, K>.OnBrokeEventHandler |