Class TCastleDistanceJoint

Unit

Declaration

type TCastleDistanceJoint = class(TCastleAbstractTwoBodiesJoint)

Description

Distance joint tries to maintain a certain distance between two rigid bodies, with certain flexibility (like a spring). Anchor and ConnectedAnchor actually determine the points between which the distance is observed.

Source: transform/castletransform_joints.inc (line 321).

Hierarchy

Show Additional Members:

Overview

Fields

Protected FParentRigidBody: TCastleRigidBody;
Protected FBreakThresholdForce: Single;
Protected FBreakThresholdTorque: Single;
Protected FBreakable: Boolean;

Methods

Protected function GetInternalText: String; virtual;
Protected procedure SetInternalText(const Value: String); virtual;
Protected procedure TranslateProperties(const TranslatePropertyEvent: TTranslatePropertyEvent); virtual;
Public procedure CustomSerialization(const SerializationProcess: TSerializationProcess); virtual;
Public procedure SetTransient;
Public procedure AddNonVisualComponent(const NonVisualComponent: TComponent);
Public procedure InsertNonVisualComponent(const Index: Integer; const NonVisualComponent: TComponent);
Public procedure RemoveNonVisualComponent(const NonVisualComponent: TComponent);
Public function NonVisualComponentsIndexOf(const NonVisualComponent: TComponent): Integer;
Public function NonVisualComponentsCount: Integer;
Public function NonVisualComponentsEnumerate: TNonVisualComponentsEnumerator;
Public function ValueIsStreamed: Boolean; virtual;
Public procedure DesignerInfo(const SList: TStrings); virtual;
Public procedure DesignerWarnings(const SList: TStrings); virtual;
Protected procedure Update(const SecondsPassed: Single; var RemoveMe: TRemoveType); virtual;
Protected procedure BeforeRender( const CameraView: TViewVectors; const ParentParentWorldTransformation: TTransformation); virtual;
Protected procedure ParentChanged; virtual; deprecated 'Use ParentAfterAttach / ParentBeforeDetach or WorldAfterAttach / WorldBeforeDetach';
Protected procedure ParentBeforeDetach; virtual;
Protected function CanAttachToParent(const NewParent: TCastleTransform; out ReasonWhyCannot: String): Boolean; virtual;
Public procedure BeforeDestruction; override;
Public function World: TCastleAbstractRootTransform;
Protected procedure RecreateKraftJoint;
Protected procedure OnParentTransformAddBehavior(const Component: TComponent); virtual;
Protected procedure OnBeforeParentTransfromRemoveBehavior(const Component: TComponent); virtual;
Protected procedure OnParentRigidBodyInitialized(const Component: TComponent); virtual;
Protected procedure OnBeforeParentRigidBodyDeinitialized(const Component: TComponent); virtual;
Protected procedure SetParentRigidBodyEvents;
Protected procedure RemoveParentRigidBodyEvents;
Protected procedure UpdateBreakThresholdForceInKraft;
Protected procedure UpdateBreakThresholdTorqueInKraft;
Protected procedure UpdateBreakableInKraft;
Protected procedure SetBreakThresholdForce(const AValue: Single);
Protected procedure SetBreakThresholdTorque(const AValue: Single);
Protected procedure SetBreakable(const AValue: Boolean);
Public procedure WorldAfterAttach; override;
Protected procedure InitializeKraftJoint; override;
Protected procedure SetConnected(const AConnected: TCastleTransform); virtual;
Protected procedure SetConnectedCollide(const AValue: Boolean); virtual;
Protected function AllNeededKraftObjectsInitialized: Boolean; override;
Protected procedure OnConnectedFree(const Sender: TFreeNotificationObserver); virtual;
Protected procedure OnConnectedAddBehavior(const Component: TComponent); virtual;
Protected procedure OnConnectedTransfromRemoveBehavior(const Component: TComponent); virtual;
Protected procedure OnConnectedRigidBodyInitialized(const Component: TComponent); virtual;
Protected procedure OnBeforeConnectedRigidBodyDeinitialized(const Component: TComponent); virtual;
Protected procedure SetConnectedEvents;
Protected procedure RemoveConnectedEvents;
Protected procedure SetConnectedRigidBodyEvents;
Protected procedure RemoveConnectedRigidBodyEvents;
Public procedure ParentAfterAttach; override;
Protected function GetKraftJoint: TKraftConstraintJoint; override;
Protected procedure CreateKraftJoint; override;
Protected procedure DeinitializeKraftJoint; override;
Protected procedure SetName(const Value: TComponentName); override;
Public constructor Create(AOwner: TComponent); override;
Public destructor Destroy; override;
Public procedure WorldBeforeDetach; override;
Public procedure InternalCreateGizmos; override;
Public procedure InternalDestroyGizmos; override;
Public function PropertySections(const PropertyName: String): TPropertySections; override;

Properties

Public property NonVisualComponents [const Index: Integer]: TComponent read GetNonVisualComponents;
Public property IsLoading: Boolean read FIsLoading;
Public property Parent: TCastleTransform read FParent;
Public property ListenWorldChange: Boolean read FListenWorldChange write SetListenWorldChange;
Published property Breakable: Boolean read FBreakable write SetBreakable default false;
Published property BreakThresholdForce: Single read FBreakThresholdForce write SetBreakThresholdForce default 0.0;
Published property BreakThresholdTorque: Single read FBreakThresholdTorque write SetBreakThresholdTorque default 0.0;
Published property Connected: TCastleTransform read FConnected write SetConnected;
Published property ConnectedCollide: Boolean read FConnectedCollide write SetConnectedCollide default false;
Public property Anchor: TVector3 read FAnchor write SetAnchor;
Public property ConnectedAnchor: TVector3 read FConnectedAnchor write SetConnectedAnchor;
Published property FrequencyHz: Single read FFrequencyHz write SetFrequencyHz default 0.0;
Published property DampingRatio: Single read FDampingRatio write SetDampingRatio default 0.0;
Published property AnchorPersistent: TCastleVector3Persistent read FAnchorPersistent ;
Published property ConnectedAnchorPersistent: TCastleVector3Persistent read FConnectedAnchorPersistent ;

Description

Fields

Protected FParentRigidBody: TCastleRigidBody;

This item is declared in ancestor TCastleAbstractJoint.

When joint is added to world we need to find parent rigid body and set callbacks for its initialize/deinitialize events. If this pointer is not nil that means that we've done that.

Source: transform/castletransform_joints.inc (line 34).

Protected FBreakThresholdForce: Single;

This item is declared in ancestor TCastleAbstractJoint.

This item has no description.

Source: transform/castletransform_joints.inc (line 35).

Protected FBreakThresholdTorque: Single;

This item is declared in ancestor TCastleAbstractJoint.

This item has no description.

Source: transform/castletransform_joints.inc (line 36).

Protected FBreakable: Boolean;

This item is declared in ancestor TCastleAbstractJoint.

This item has no description.

Source: transform/castletransform_joints.inc (line 37).

Methods

Protected function GetInternalText: String; virtual;

This item is declared in ancestor TCastleComponent.

This item has no description.

Source: base/castleclassutils.pas (line 575).

Protected procedure SetInternalText(const Value: String); virtual;

This item is declared in ancestor TCastleComponent.

This item has no description.

Source: base/castleclassutils.pas (line 576).

Protected procedure TranslateProperties(const TranslatePropertyEvent: TTranslatePropertyEvent); virtual;

This item is declared in ancestor TCastleComponent.

Enumerate all properties that are possible to translate in this component. E.g. in TCastleLabel it will return TCastleLabel.Caption, in TCastleEdit it will return TCastleEdit.Text and TCastleEdit.Placeholder.

Returns only non-empty properties, thus assuming that if current (by convention, English) text is empty, then there is no point in translating it. Moreover descendants may define boolean properties to exclude particular text from translating, e.g. TCastleLabel.CaptionTranslate, TCastleEdit.TextTranslate, TCastleEdit.PlaceholderTranslate.

It is not recursive (it doesn't enumerate children properties). Use global TranslateProperties procedure to call this on a hierarchy of TComponent.

You usually don't want to call this method (it is called by other engine routines). But you may find it useful to override this, if you define new component.

Source: base/castleclassutils.pas (line 598).

Public procedure CustomSerialization(const SerializationProcess: TSerializationProcess); virtual;

This item is declared in ancestor TCastleComponent.

Override this method to call various methods of SerializationProcess, which in turn allows to serialize/deserialize things that are not published. This allows to serialize/deserialize with more freedom, e.g. to serialize/deserialize some private field.

Source: base/castleclassutils.pas (line 610).

Public procedure SetTransient;

This item is declared in ancestor TCastleComponent.

Ignore this component when serializing parent's TCastleUserInterface.Controls list or TCastleTransform.List, and do not show this component in CGE editor. This simply sets csTransient flag in ComponentStyle.

This is useful for children that are automatically managed by the parent, and should not be modified by user code. For example, TCastleCheckbox is internally composed from TCastleImageControl and TCastleLabel children, but we don't want to serialize or even show these children to user.

Note that if you want to prevent this component from serializing as part of TCastleUserInterface.Controls list or TCastleTransform.List, but you still want it to be visible in CGE editor, then make it a "subcomponent" instead, by SetSubComponent(true).

Note that both csSubComponent and csTransient only disable the component serialization as part of parent's lists enumerated by CustomSerialization (see internal TCastleUserInterface.SerializeChildrenEnumerate , TCastleTransform.SerializeChildrenEnumerate, TCastleTransform.SerializeBehaviorsEnumerate).

If you will make the component published in its own property (which is normal for "subcomponents") then it will be serialized anyway, just as part of it's own property (like TCastleScrollView.ScrollArea). So to really avoid serializing a children component make it csSubComponent and/or csTransient, and do not publish it.

Source: base/castleclassutils.pas (line 663).

Public procedure AddNonVisualComponent(const NonVisualComponent: TComponent);

This item is declared in ancestor TCastleComponent.

Add non-visual component to this component. This is used to organize non-visual components in a tree hierarchy, in CGE designs and editor.

See also
NonVisualComponentsCount
Count of components added by AddNonVisualComponent.
NonVisualComponents
Components added by AddNonVisualComponent.
NonVisualComponentsEnumerate
You can enumerate current non-visual components using loop like for C in MyComponent.NonVisualComponentsEnumerate do ....

Source: base/castleclassutils.pas (line 672).

Public procedure InsertNonVisualComponent(const Index: Integer; const NonVisualComponent: TComponent);

This item is declared in ancestor TCastleComponent.

Insert non-visual component to this component. This is used to organize non-visual components in a tree hierarchy, in CGE designs and editor.

See also
NonVisualComponentsCount
Count of components added by AddNonVisualComponent.
NonVisualComponents
Components added by AddNonVisualComponent.
NonVisualComponentsEnumerate
You can enumerate current non-visual components using loop like for C in MyComponent.NonVisualComponentsEnumerate do ....

Source: base/castleclassutils.pas (line 681).

Public procedure RemoveNonVisualComponent(const NonVisualComponent: TComponent);

This item is declared in ancestor TCastleComponent.

Removes the component previously added by AddNonVisualComponent.

Source: base/castleclassutils.pas (line 684).

Public function NonVisualComponentsIndexOf(const NonVisualComponent: TComponent): Integer;

This item is declared in ancestor TCastleComponent.

Index of the previously added non-visual component. Returns -1 if the component was not found.

Source: base/castleclassutils.pas (line 688).

Public function NonVisualComponentsCount: Integer;

This item is declared in ancestor TCastleComponent.

Count of components added by AddNonVisualComponent.

See also
AddNonVisualComponent
Add non-visual component to this component.
NonVisualComponents
Components added by AddNonVisualComponent.
NonVisualComponentsEnumerate
You can enumerate current non-visual components using loop like for C in MyComponent.NonVisualComponentsEnumerate do ....

Source: base/castleclassutils.pas (line 695).

Public function NonVisualComponentsEnumerate: TNonVisualComponentsEnumerator;

This item is declared in ancestor TCastleComponent.

You can enumerate current non-visual components using loop like for C in MyComponent.NonVisualComponentsEnumerate do .... Do not call this method in other contexts, it is only useful for "for..in" construction.

See also
AddNonVisualComponent
Add non-visual component to this component.

Source: base/castleclassutils.pas (line 705).

Public function ValueIsStreamed: Boolean; virtual;

This item is declared in ancestor TCastleComponent.

Whether the current value of this object should be written to the stream. This should be True if anything inside this object should be serialized (which means it has non-default value or "stored" specifier indicates that it should be serialized).

This is used by CastleComponentSerialize, which is used in Castle Game Engine for all serialization.

In simple cases, this just says whether the current value of this object equals to some default value.

The default implementation of this class returns True (so always write).

Descendants that override this to sometimes return False (so no need to write) must be very careful: any addition of a new field requires extending this method, otherwise new field may not be saved sometimes (when all other fields are default). Descentants of such classes must also be aware of it. This check must include everything that is inside this object in JSON, including subcomponents and children objects (as done e.g. by TSerializationProcess.ReadWriteList). In practice, overriding this method is only reasonable for simple classes that will not change much in the future, like TCastleVector3Persistent.

The name of this method is consistent with TPropertyEditor.ValueIsStreamed in LCL.

Source: base/castleclassutils.pas (line 739).

Public procedure DesignerInfo(const SList: TStrings); virtual;

This item is declared in ancestor TCastleComponent.

Override to add information that should be visible at design-time. Call SList.Add for each new line of information.

Source: base/castleclassutils.pas (line 743).

Public procedure DesignerWarnings(const SList: TStrings); virtual;

This item is declared in ancestor TCastleComponent.

Override to add warnings that should be visible at design-time. Call SList.Add for each new warning.

Source: base/castleclassutils.pas (line 747).

Protected procedure Update(const SecondsPassed: Single; var RemoveMe: TRemoveType); virtual;

This item is declared in ancestor TCastleBehavior.

Continuously occuring event, for various tasks.

Parameters
RemoveMe
Set this to rtRemove or rtRemoveAndFree to remove this component from Parent after this call finished. rtRemoveAndFree additionally will free this item. Initially it's rtNone when this method is called.

Source: transform/castletransform_behavior.inc (line 52).

Protected procedure BeforeRender( const CameraView: TViewVectors; const ParentParentWorldTransformation: TTransformation); virtual;

This item is declared in ancestor TCastleBehavior.

Event called right before rendering the parent TCastleTransform. Override this if you have to adjust the parent transformation strictly before the rendering.

Compared to adjusting the parent transformation in e.g. Update, adjusting the parent transformation here has advantages:

  1. There's no 1-frame delay between moving the thing that causes the change (like camera) and updating the thing that reacts to it (like a transformation with a billboard).

  2. We adjust transformation before rendering each occurrence of TCastleTransform in the viewport tree. This matters if given TCastleTransform may occur multiple times in the viewport tree, directly or through TCastleTransformReference.

  3. We adjust transformation before each render, so things are OK if given TCastleTransform is present in multiple viewports (see https://castle-engine.io/multiple_viewports_to_display_one_world).

For example, adjusting the TCastleTransform done by the TCastleBillboard is done using this method. The transformation in this case is determined by the camera and parent's parent transformation. The transformation has to be applied without any delay (even a 1-frame delay would be visible, as artifacts caused by billboard not perfectly aligned with the camera would be visible – blending sort along camera direction in sort3D is not perfect if billboard doesn't exactly match camera direction). And the transformation with billboard may be present in multiple viewports and/or multiple times in the same viewport tree.

Parameters
CameraView
Current camera vectors, in world coordinates, used to render the scene now.
ParentParentWorldTransformation

World transformation of the parent of the parent of this behavior. The name is kind of convoluted, but consistent: When the parent of this behavior has exactly one parent TCastleTransform (not zero, not more) then ParentParentWorldTransformation.Transform is equivalent to Parent.Parent.WorldTransform.

Source: transform/castletransform_behavior.inc (line 103).

Protected procedure ParentChanged; virtual; deprecated 'Use ParentAfterAttach / ParentBeforeDetach or WorldAfterAttach / WorldBeforeDetach';

This item is declared in ancestor TCastleBehavior.

Warning: this symbol is deprecated: Use ParentAfterAttach / ParentBeforeDetach or WorldAfterAttach / WorldBeforeDetach

Called after Parent changed, at the end of TCastleTransform.AddBehavior, TCastleTransform.RemoveBehavior.

Source: transform/castletransform_behavior.inc (line 109).

Protected procedure ParentBeforeDetach; virtual;

This item is declared in ancestor TCastleBehavior.

Called before Parent changed, e.g. at the beginning of TCastleTransform.RemoveBehavior.

This is also called at the destruction of behavior (more precisely from BeforeDestruction now). Even in this case, we guarantee that Parent is still valid during this call, and not in half-destroyed state. Before the actual destructor of TCastleBehavior we do BeforeParentDetach and BeforeWorldDetach and set Parent to Nil.

Source: transform/castletransform_behavior.inc (line 122).

Protected function CanAttachToParent(const NewParent: TCastleTransform; out ReasonWhyCannot: String): Boolean; virtual;

This item is declared in ancestor TCastleBehavior.

Check can this behavior be added to NewParent. When this returns False, it has to set also ReasonWhyCannot. When overriding this, you can use e.g. this code to make sure we are the only behavior of given class:

function TCastleBillboard.CanAttachToParent(const NewParent: TCastleTransform;
  out ReasonWhyCannot: String): Boolean;
begin
  Result := inherited;
  if not Result then Exit;

  if NewParent.FindBehavior(TCastleBillboard) <> nil then
  begin
    ReasonWhyCannot := 'Only one TCastleBillboard behavior can be added to a given TCastleTransform';
    Result := false;
  end;
end;

Source: transform/castletransform_behavior.inc (line 158).

Public procedure BeforeDestruction; override;

This item is declared in ancestor TCastleBehavior.

This item has no description.

Source: transform/castletransform_behavior.inc (line 161).

Public function World: TCastleAbstractRootTransform;

This item is declared in ancestor TCastleBehavior.

Reference to the root transformation (typically matching the TCastleViewport.Items value) corresponding to the parent of this behavior.

May be Nil if the behavior is not yet added to the parent TCastleTransform, or when the TCastleTransform is not yet part of the TCastleAbstractRootTransform (which means that TCastleTransform is not added to the viewport yet). You can use ListenWorldChange and override WorldBeforeDetach, WorldAfterAttach to be notified when this changes.

Source: transform/castletransform_behavior.inc (line 184).

Protected procedure RecreateKraftJoint;

This item is declared in ancestor TCastleAbstractJoint.

This item has no description.

Source: transform/castletransform_joints.inc (line 45).

Protected procedure OnParentTransformAddBehavior(const Component: TComponent); virtual;

This item is declared in ancestor TCastleAbstractJoint.

Event callback when TCastleRigidBody is added to the parent transform.

Source: transform/castletransform_joints.inc (line 53).

Protected procedure OnBeforeParentTransfromRemoveBehavior(const Component: TComponent); virtual;

This item is declared in ancestor TCastleAbstractJoint.

Event callback when TCastleRigidBody is removed from the parent transform.

Source: transform/castletransform_joints.inc (line 56).

Protected procedure OnParentRigidBodyInitialized(const Component: TComponent); virtual;

This item is declared in ancestor TCastleAbstractJoint.

Event callback when TCastleRigidBody behavior is initialized.

Source: transform/castletransform_joints.inc (line 59).

Protected procedure OnBeforeParentRigidBodyDeinitialized(const Component: TComponent); virtual;

This item is declared in ancestor TCastleAbstractJoint.

Event callback when TCastleRigidBody behavior is deinitialized.

Source: transform/castletransform_joints.inc (line 62).

Protected procedure SetParentRigidBodyEvents;

This item is declared in ancestor TCastleAbstractJoint.

Sets TCastleRigidBody behavior initialize/deinitialize callbacks.

Source: transform/castletransform_joints.inc (line 65).

Protected procedure RemoveParentRigidBodyEvents;

This item is declared in ancestor TCastleAbstractJoint.

Removes TCastleRigidBody behavior initialize/deinitialize callbacks.

Source: transform/castletransform_joints.inc (line 68).

Protected procedure UpdateBreakThresholdForceInKraft;

This item is declared in ancestor TCastleAbstractJoint.

This item has no description.

Source: transform/castletransform_joints.inc (line 70).

Protected procedure UpdateBreakThresholdTorqueInKraft;

This item is declared in ancestor TCastleAbstractJoint.

This item has no description.

Source: transform/castletransform_joints.inc (line 71).

Protected procedure UpdateBreakableInKraft;

This item is declared in ancestor TCastleAbstractJoint.

This item has no description.

Source: transform/castletransform_joints.inc (line 72).

Protected procedure SetBreakThresholdForce(const AValue: Single);

This item is declared in ancestor TCastleAbstractJoint.

This item has no description.

Source: transform/castletransform_joints.inc (line 74).

Protected procedure SetBreakThresholdTorque(const AValue: Single);

This item is declared in ancestor TCastleAbstractJoint.

This item has no description.

Source: transform/castletransform_joints.inc (line 75).

Protected procedure SetBreakable(const AValue: Boolean);

This item is declared in ancestor TCastleAbstractJoint.

This item has no description.

Source: transform/castletransform_joints.inc (line 76).

Public procedure WorldAfterAttach; override;

This item is declared in ancestor TCastleAbstractJoint.

This item has no description. Showing description inherited from TCastleBehavior.WorldAfterAttach.

Called after Parent became part of World. Called only if ListenWorldChange is True.

Source: transform/castletransform_joints.inc (line 79).

Protected procedure InitializeKraftJoint; override;

This item is declared in ancestor TCastleAbstractTwoBodiesJoint.

This item has no description.

Source: transform/castletransform_joints.inc (line 126).

Protected procedure SetConnected(const AConnected: TCastleTransform); virtual;

This item is declared in ancestor TCastleAbstractTwoBodiesJoint.

This item has no description.

Source: transform/castletransform_joints.inc (line 127).

Protected procedure SetConnectedCollide(const AValue: Boolean); virtual;

This item is declared in ancestor TCastleAbstractTwoBodiesJoint.

This item has no description.

Source: transform/castletransform_joints.inc (line 128).

Protected function AllNeededKraftObjectsInitialized: Boolean; override;

This item is declared in ancestor TCastleAbstractTwoBodiesJoint.

This item has no description. Showing description inherited from TCastleAbstractJoint.AllNeededKraftObjectsInitialized.

Can we create joint object.

Source: transform/castletransform_joints.inc (line 130).

Protected procedure OnConnectedFree(const Sender: TFreeNotificationObserver); virtual;

This item is declared in ancestor TCastleAbstractTwoBodiesJoint.

This item has no description.

Source: transform/castletransform_joints.inc (line 132).

Protected procedure OnConnectedAddBehavior(const Component: TComponent); virtual;

This item is declared in ancestor TCastleAbstractTwoBodiesJoint.

Event callback when TCastleRigidBody is added to the connected transform.

Source: transform/castletransform_joints.inc (line 135).

Protected procedure OnConnectedTransfromRemoveBehavior(const Component: TComponent); virtual;

This item is declared in ancestor TCastleAbstractTwoBodiesJoint.

Event callback when TCastleRigidBody is removed from the connected transform.

Source: transform/castletransform_joints.inc (line 138).

Protected procedure OnConnectedRigidBodyInitialized(const Component: TComponent); virtual;

This item is declared in ancestor TCastleAbstractTwoBodiesJoint.

Event callback when connected transform TCastleRigidBody behavior is initialized.

Source: transform/castletransform_joints.inc (line 141).

Protected procedure OnBeforeConnectedRigidBodyDeinitialized(const Component: TComponent); virtual;

This item is declared in ancestor TCastleAbstractTwoBodiesJoint.

Event callback when connected transform TCastleRigidBody behavior is deinitialized.

Source: transform/castletransform_joints.inc (line 144).

Protected procedure SetConnectedEvents;

This item is declared in ancestor TCastleAbstractTwoBodiesJoint.

Sets connected transform add/remove behavior callbacks and free notification observer.

Source: transform/castletransform_joints.inc (line 148).

Protected procedure RemoveConnectedEvents;

This item is declared in ancestor TCastleAbstractTwoBodiesJoint.

Removes connected transform add/remmove behavior callbacks and free notification observer.

Source: transform/castletransform_joints.inc (line 152).

Protected procedure SetConnectedRigidBodyEvents;

This item is declared in ancestor TCastleAbstractTwoBodiesJoint.

Sets connected TCastleRigidBody behavior initialize/deinitialize callbacks.

Source: transform/castletransform_joints.inc (line 155).

Protected procedure RemoveConnectedRigidBodyEvents;

This item is declared in ancestor TCastleAbstractTwoBodiesJoint.

Removes connected TCastleRigidBody behavior initialize/deinitialize callbacks.

Source: transform/castletransform_joints.inc (line 159).

Public procedure ParentAfterAttach; override;

This item is declared in ancestor TCastleAbstractTwoBodiesJoint.

We need to check if the connected castle transform is not the parent node and we need to change the connected node to nil then.

Source: transform/castletransform_joints.inc (line 165).

Protected function GetKraftJoint: TKraftConstraintJoint; override;

This item has no description. Showing description inherited from TCastleAbstractJoint.GetKraftJoint.

Get physics engine (Kraft) joint instance.

Source: transform/castletransform_joints.inc (line 339).

Protected procedure CreateKraftJoint; override;

This item has no description. Showing description inherited from TCastleAbstractJoint.CreateKraftJoint.

Create physics engine (Kraft) joint and set its specialized properties.

Source: transform/castletransform_joints.inc (line 340).

Protected procedure DeinitializeKraftJoint; override;

This item has no description.

Source: transform/castletransform_joints.inc (line 341).

Protected procedure SetName(const Value: TComponentName); override;

This item has no description.

Source: transform/castletransform_joints.inc (line 342).

Public constructor Create(AOwner: TComponent); override;

This item has no description.

Source: transform/castletransform_joints.inc (line 344).

Public destructor Destroy; override;

This item has no description.

Source: transform/castletransform_joints.inc (line 345).

Public procedure WorldBeforeDetach; override;

This item has no description. Showing description inherited from TCastleBehavior.WorldBeforeDetach.

Called before Parent stops being part of World. Called only if ListenWorldChange is True.

This is also called at the destruction of behavior (more precisely from BeforeDestruction now). Even in this case, we guarantee that Parent is still valid during this call, and not in half-destroyed state. Before the actual destructor of TCastleBehavior we do BeforeParentDetach and BeforeWorldDetach and set Parent to Nil.

Source: transform/castletransform_joints.inc (line 347).

Public procedure InternalCreateGizmos; override;

This item has no description. Showing description inherited from TCastleAbstractJoint.InternalCreateGizmos.

Create design-time transformations that are displayed in the hierarchy to visualize physics joints 3D points. If you want to visualize the behavior using a visible TCastleTransform, then create and add to Parent a descendant of TCastleJointTool, and set InternalCastleDesignInvalidate to True.

Source: transform/castletransform_joints.inc (line 348).

Public procedure InternalDestroyGizmos; override;

This item has no description. Showing description inherited from TCastleAbstractJoint.InternalDestroyGizmos.

Destroy design-time stuff. You can destroy any component, just be sure to set InternalCastleDesignInvalidate to True.

Source: transform/castletransform_joints.inc (line 349).

Public function PropertySections(const PropertyName: String): TPropertySections; override;

This item has no description. Showing description inherited from TCastleComponent.PropertySections.

Section where to show property in the editor.

Source: transform/castletransform_joints.inc (line 350).

Properties

Public property NonVisualComponents [const Index: Integer]: TComponent read GetNonVisualComponents;

This item is declared in ancestor TCastleComponent.

Components added by AddNonVisualComponent.

Source: base/castleclassutils.pas (line 698).

Public property IsLoading: Boolean read FIsLoading;

This item is declared in ancestor TCastleComponent.

Is the component during deserialization now.

Note: We can't use csLoading in ComponentState because in Delphi it is not possible to control it from CastleComponentSerialize.

Source: base/castleclassutils.pas (line 711).

Public property Parent: TCastleTransform read FParent;

This item is declared in ancestor TCastleBehavior.

Parent TCastleTransform of this behavior. Change it by doing TCastleTransform.AddBehavior, TCastleTransform.RemoveBehavior.

Nil if this behavior is not yet added to a parent.

Source: transform/castletransform_behavior.inc (line 191).

Public property ListenWorldChange: Boolean read FListenWorldChange write SetListenWorldChange;

This item is declared in ancestor TCastleBehavior.

Set this to True to receive WorldBeforeDetach, WorldAfterAttach calls.

Source: transform/castletransform_behavior.inc (line 194).

Published property Breakable: Boolean read FBreakable write SetBreakable default false;

This item is declared in ancestor TCastleAbstractJoint.

Makes the joint breakable when force is greater than BreakThresholdForce or torque is greater than BreakThresholdTorque.

Source: transform/castletransform_joints.inc (line 97).

Published property BreakThresholdForce: Single read FBreakThresholdForce write SetBreakThresholdForce default 0.0;

This item is declared in ancestor TCastleAbstractJoint.

Force threshold to break joint.

Source: transform/castletransform_joints.inc (line 100).

Published property BreakThresholdTorque: Single read FBreakThresholdTorque write SetBreakThresholdTorque default 0.0;

This item is declared in ancestor TCastleAbstractJoint.

Torque threshold to break joint.

Source: transform/castletransform_joints.inc (line 103).

Published property Connected: TCastleTransform read FConnected write SetConnected;

This item is declared in ancestor TCastleAbstractTwoBodiesJoint.

Second transform of the physics joint. Note that it can't be the Parent of this joint.

Source: transform/castletransform_joints.inc (line 169).

Published property ConnectedCollide: Boolean read FConnectedCollide write SetConnectedCollide default false;

This item is declared in ancestor TCastleAbstractTwoBodiesJoint.

Should connected transforms (Connected and Parent) collide.

Source: transform/castletransform_joints.inc (line 173).

Public property Anchor: TVector3 read FAnchor write SetAnchor;

First point from which the distance is measured.

Source: transform/castletransform_joints.inc (line 353).

Public property ConnectedAnchor: TVector3 read FConnectedAnchor write SetConnectedAnchor;

Second point from which the distance is measured.

Source: transform/castletransform_joints.inc (line 356).

Published property FrequencyHz: Single read FFrequencyHz write SetFrequencyHz default 0.0;

Frequency controls how fast the oscillations occur. The smaller the value, the longer the oscillation movement. This may not seem intuitive, but a higher value causes the oscillation in specified time to be faster and therefore the movement is shorter.

So if you want longer movement make this value smaller.

See live example: https://gamedev.stackexchange.com/questions/98772/b2distancejoint-with-frequency-equal-to-0-vs-b2weldjoint

Source: transform/castletransform_joints.inc (line 367).

Published property DampingRatio: Single read FDampingRatio write SetDampingRatio default 0.0;

How fast the oscillations are damped, large values can cause the body to not do even one oscillation.

Source: transform/castletransform_joints.inc (line 371).

Published property AnchorPersistent: TCastleVector3Persistent read FAnchorPersistent ;

Anchor that can be visually edited in Castle Game Engine Editor, Lazarus and Delphi. Normal user code does not need to deal with this, instead read or write Anchor directly.

See also
Anchor
First point from which the distance is measured.

Source: transform/auto_generated_persistent_vectors/tcastledistancejoint_persistent_vectors.inc (line 37).

Published property ConnectedAnchorPersistent: TCastleVector3Persistent read FConnectedAnchorPersistent ;

ConnectedAnchor that can be visually edited in Castle Game Engine Editor, Lazarus and Delphi. Normal user code does not need to deal with this, instead read or write ConnectedAnchor directly.

See also
ConnectedAnchor
Second point from which the distance is measured.

Source: transform/auto_generated_persistent_vectors/tcastledistancejoint_persistent_vectors.inc (line 105).


Generated by PasDoc 0.17.0.snapshot.