Interface RigidBody
- All Superinterfaces:
X3DBoundedObject
,X3DChildNode
,X3DNode
- All Known Implementing Classes:
RigidBody
RigidBody describes a collection of shapes with a mass distribution that is affected by the physics model.
Warning: this is an abstract interface that cannot be instantiated as a concrete object. Java programmers typically only need to use concrete objects provided by the
Package hint: This interface is defined by the X3D Java Language Binding Specification for the Scene Authoring Interface (SAI).
Warning: this is an abstract interface that cannot be instantiated as a concrete object. Java programmers typically only need to use concrete objects provided by the
org.web3d.x3d.jsail
classes.
RigidBody node tooltip: (X3D version 3.2 or later) [X3DChildNode] RigidBody describes a collection of shapes with a mass distribution that is affected by the physics model.
Contains a Sphere, Box, or Cone (containerField='massDensityModel') and multiple CollidableOffset or CollidableShape nodes (containerField='geometry') for animating collidable geometry. * Package hint: This interface is defined by the X3D Java Language Binding Specification for the Scene Authoring Interface (SAI).
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addGeometry
(X3DNode[] newValue) Add array of child geometry nodes to array of existing nodes (if any).float
Provide float value from inputOutput SFFloat field named angularDampingFactor.float[]
Provide array of 3-tuple float results from inputOutput SFVec3f field named angularVelocity.boolean
Provide boolean value from inputOutput SFBool field named autoDamp.boolean
Provide boolean value from inputOutput SFBool field named autoDisable.float[]
Provide array of 3-tuple float results from initializeOnly SFVec3f field named bboxCenter.boolean
Provide boolean value from inputOutput SFBool field named bboxDisplay.float[]
Provide array of 3-tuple float results within allowed range of [0,infinity), or default value [-1 -1 -1], from initializeOnly SFVec3f field named bboxSize.float[]
Provide array of 3-tuple float results from inputOutput SFVec3f field named centerOfMass.float
Provide float value from inputOutput SFFloat field named disableAngularSpeed.float
Provide float value from inputOutput SFFloat field named disableLinearSpeed.double
Provide double value in seconds within allowed range of [0,infinity) from inputOutput SFTime field named disableTime.boolean
Provide boolean value from inputOutput SFBool field named enabled.float[]
Provide array of 3-tuple float results unit axis, angle (in radians) from inputOutput SFVec3f field named finiteRotationAxis.boolean
getFixed()
Provide boolean value from inputOutput SFBool field named fixed.float[]
Provide array of 3-tuple float results from inputOutput MFVec3f field named forces.X3DNode[]
Provide array of org.web3d.x3d.sai.Core.X3DNode results (using an array consisting of properly typed nodes or ProtoInstances) from inputOutput MFNode field geometry.float[]
Provide array of float results from inputOutput SFMatrix3f field named inertia.float
Provide float value from inputOutput SFFloat field named linearDampingFactor.float[]
Provide array of 3-tuple float results from inputOutput SFVec3f field named linearVelocity.float
getMass()
Provide float value from inputOutput SFFloat field named mass.Provide org.web3d.x3d.sai.Core.X3DNode instance (using a properly typed node) with acceptable node types limited to Sphere|Box|Cone, from inputOutput SFNode field massDensityModel.Provide org.web3d.x3d.sai.Core.X3DMetadataObject instance (using a properly typed node) from inputOutput SFNode field metadata.float[]
Provide array of 4-tuple float results unit axis, angle (in radians) from inputOutput SFRotation field named orientation.float[]
Provide array of 3-tuple float results from inputOutput SFVec3f field named position.float[]
Provide array of 3-tuple float results from inputOutput MFVec3f field named torques.boolean
Provide boolean value unit axis, angle (in radians) from inputOutput SFBool field named useFiniteRotation.boolean
Provide boolean value from inputOutput SFBool field named useGlobalGravity.boolean
Provide boolean value from inputOutput SFBool field named visible.setAngularDampingFactor
(float newValue) Accessor method to assign float value to inputOutput SFFloat field named angularDampingFactor.setAngularVelocity
(float[] newValue) Accessor method to assign 3-tuple float array to inputOutput SFVec3f field named angularVelocity.setAutoDamp
(boolean newValue) Accessor method to assign boolean value to inputOutput SFBool field named autoDamp.setAutoDisable
(boolean newValue) Accessor method to assign boolean value to inputOutput SFBool field named autoDisable.setBboxCenter
(float[] newValue) Accessor method to assign 3-tuple float array to initializeOnly SFVec3f field named bboxCenter.setBboxDisplay
(boolean newValue) Accessor method to assign boolean value to inputOutput SFBool field named bboxDisplay.setBboxSize
(float[] newValue) Accessor method to assign 3-tuple float array to initializeOnly SFVec3f field named bboxSize.setCenterOfMass
(float[] newValue) Accessor method to assign 3-tuple float array to inputOutput SFVec3f field named centerOfMass.setDisableAngularSpeed
(float newValue) Accessor method to assign float value to inputOutput SFFloat field named disableAngularSpeed.setDisableLinearSpeed
(float newValue) Accessor method to assign float value to inputOutput SFFloat field named disableLinearSpeed.setDisableTime
(double newValue) Accessor method to assign double value in seconds to inputOutput SFTime field named disableTime.setEnabled
(boolean newValue) Accessor method to assign boolean value to inputOutput SFBool field named enabled.setFiniteRotationAxis
(float[] newValue) Accessor method to assign 3-tuple float array unit axis, angle (in radians) to inputOutput SFVec3f field named finiteRotationAxis.setFixed
(boolean newValue) Accessor method to assign boolean value to inputOutput SFBool field named fixed.setForces
(float[] newValue) Accessor method to assign 3-tuple float array to inputOutput MFVec3f field named forces.void
setGeometry
(X3DNode newValue) Set single child geometry node, replacing prior array of existing nodes (if any).setGeometry
(X3DNode[] newValue) Accessor method to assign org.web3d.x3d.sai.Core.X3DNode array (using an array consisting of properly typed nodes or ProtoInstances) to inputOutput MFNode field geometry.setInertia
(float[] newValue) Accessor method to assign float array to inputOutput SFMatrix3f field named inertia.setLinearDampingFactor
(float newValue) Accessor method to assign float value to inputOutput SFFloat field named linearDampingFactor.setLinearVelocity
(float[] newValue) Accessor method to assign 3-tuple float array to inputOutput SFVec3f field named linearVelocity.setMass
(float newValue) Accessor method to assign float value to inputOutput SFFloat field named mass.setMassDensityModel
(X3DNode newValue) Accessor method to assign org.web3d.x3d.sai.Core.X3DNode instance (using a properly typed node) to inputOutput SFNode field massDensityModel.setMetadata
(X3DMetadataObject newValue) Accessor method to assign org.web3d.x3d.sai.Core.X3DMetadataObject instance (using a properly typed node) to inputOutput SFNode field metadata.setOrientation
(float[] newValue) Accessor method to assign 4-tuple float array unit axis, angle (in radians) to inputOutput SFRotation field named orientation.setPosition
(float[] newValue) Accessor method to assign 3-tuple float array to inputOutput SFVec3f field named position.setTorques
(float[] newValue) Accessor method to assign 3-tuple float array to inputOutput MFVec3f field named torques.setUseFiniteRotation
(boolean newValue) Accessor method to assign boolean value unit axis, angle (in radians) to inputOutput SFBool field named useFiniteRotation.setUseGlobalGravity
(boolean newValue) Accessor method to assign boolean value to inputOutput SFBool field named useGlobalGravity.setVisible
(boolean newValue) Accessor method to assign boolean value to inputOutput SFBool field named visible.
-
Method Details
-
getAngularDampingFactor
float getAngularDampingFactor()Provide float value from inputOutput SFFloat field named angularDampingFactor.
Tooltip: [0,1] angularDampingFactor automatically damps a portion of body motion over time. *- Returns:
- value of angularDampingFactor field
-
setAngularDampingFactor
Accessor method to assign float value to inputOutput SFFloat field named angularDampingFactor.
Tooltip: [0,1] angularDampingFactor automatically damps a portion of body motion over time. *- Parameters:
newValue
- is new value for the angularDampingFactor field.- Returns:
RigidBody
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
getAngularVelocity
float[] getAngularVelocity()Provide array of 3-tuple float results from inputOutput SFVec3f field named angularVelocity.
Tooltip: angularVelocity sets constant velocity value to object every frame, and reports updates by physics model.- Hint: initial value only applied during first frame if forces applied.
- Warning: instantaneous velocity changes may lead to numerical instability.
- Returns:
- value of angularVelocity field
-
setAngularVelocity
Accessor method to assign 3-tuple float array to inputOutput SFVec3f field named angularVelocity.
Tooltip: angularVelocity sets constant velocity value to object every frame, and reports updates by physics model.- Hint: initial value only applied during first frame if forces applied.
- Warning: instantaneous velocity changes may lead to numerical instability.
- Parameters:
newValue
- is new value for the angularVelocity field.- Returns:
RigidBody
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
getAutoDamp
boolean getAutoDamp()Provide boolean value from inputOutput SFBool field named autoDamp.
Tooltip: autoDamp enables/disables angularDampingFactor and linearDampingFactor. *- Returns:
- value of autoDamp field
-
setAutoDamp
Accessor method to assign boolean value to inputOutput SFBool field named autoDamp.
Tooltip: autoDamp enables/disables angularDampingFactor and linearDampingFactor. *- Parameters:
newValue
- is new value for the autoDamp field.- Returns:
RigidBody
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
getAutoDisable
boolean getAutoDisable()Provide boolean value from inputOutput SFBool field named autoDisable.
Tooltip: autoDisable toggles operation of disableAngularSpeed, disableLinearSpeed, disableTime. *- Returns:
- value of autoDisable field
-
setAutoDisable
Accessor method to assign boolean value to inputOutput SFBool field named autoDisable.
Tooltip: autoDisable toggles operation of disableAngularSpeed, disableLinearSpeed, disableTime. *- Parameters:
newValue
- is new value for the autoDisable field.- Returns:
RigidBody
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
getBboxCenter
float[] getBboxCenter()Provide array of 3-tuple float results from initializeOnly SFVec3f field named bboxCenter.
Tooltip: Bounding box center accompanies bboxSize and provides an optional hint for bounding box position offset from origin of local coordinate system.- Hint: precomputation and inclusion of bounding box information can speed up the initialization of large detailed models, with a corresponding cost of increased file size.
- Hint: X3D Architecture, 10.2.2 Bounding boxes https://www.web3d.org/specifications/X3Dv4/ISO-IEC19775-1v4-IS /Part01/components/grouping.html#BoundingBoxes
- Hint: X3D Architecture, 10.3.1 X3DBoundedObject https://www.web3d.org/specifications/X3Dv4/ISO-IEC19775-1v4-IS /Part01/components/grouping.html#X3DBoundedObject
- Specified by:
getBboxCenter
in interfaceX3DBoundedObject
- Returns:
- value of bboxCenter field
-
setBboxCenter
Accessor method to assign 3-tuple float array to initializeOnly SFVec3f field named bboxCenter.
Tooltip: Bounding box center accompanies bboxSize and provides an optional hint for bounding box position offset from origin of local coordinate system.- Hint: precomputation and inclusion of bounding box information can speed up the initialization of large detailed models, with a corresponding cost of increased file size.
- Hint: X3D Architecture, 10.2.2 Bounding boxes https://www.web3d.org/specifications/X3Dv4/ISO-IEC19775-1v4-IS /Part01/components/grouping.html#BoundingBoxes
- Hint: X3D Architecture, 10.3.1 X3DBoundedObject https://www.web3d.org/specifications/X3Dv4/ISO-IEC19775-1v4-IS /Part01/components/grouping.html#X3DBoundedObject
- Specified by:
setBboxCenter
in interfaceX3DBoundedObject
- Parameters:
newValue
- is new value for the bboxCenter field.- Returns:
RigidBody
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
getBboxDisplay
boolean getBboxDisplay()Provide boolean value from inputOutput SFBool field named bboxDisplay.
Tooltip: Whether to display bounding box for associated geometry, aligned with world coordinates.- Hint: the bounding box is displayed regardless of whether contained content is visible.
- Specified by:
getBboxDisplay
in interfaceX3DBoundedObject
- Returns:
- value of bboxDisplay field
-
setBboxDisplay
Accessor method to assign boolean value to inputOutput SFBool field named bboxDisplay.
Tooltip: Whether to display bounding box for associated geometry, aligned with world coordinates.- Hint: the bounding box is displayed regardless of whether contained content is visible.
- Specified by:
setBboxDisplay
in interfaceX3DBoundedObject
- Parameters:
newValue
- is new value for the bboxDisplay field.- Returns:
RigidBody
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
getBboxSize
float[] getBboxSize()Provide array of 3-tuple float results within allowed range of [0,infinity), or default value [-1 -1 -1], from initializeOnly SFVec3f field named bboxSize.
Tooltip: or [0,+infinity) Bounding box size is usually omitted, and can easily be calculated automatically by an X3D player at scene-loading time with minimal computational cost. Bounding box size can also be defined as an optional authoring hint that suggests an optimization or constraint.- Hint: can be useful for collision computations or inverse-kinematics (IK) engines.
- Hint: precomputation and inclusion of bounding box information can speed up the initialization of large detailed models, with a corresponding cost of increased file size.
- Hint: X3D Architecture, 10.2.2 Bounding boxes https://www.web3d.org/specifications/X3Dv4/ISO-IEC19775-1v4-IS /Part01/components/grouping.html#BoundingBoxes
- Hint: X3D Architecture, 10.3.1 X3DBoundedObject https://www.web3d.org/specifications/X3Dv4/ISO-IEC19775-1v4-IS /Part01/components/grouping.html#X3DBoundedObject
- Specified by:
getBboxSize
in interfaceX3DBoundedObject
- Returns:
- value of bboxSize field
-
setBboxSize
Accessor method to assign 3-tuple float array to initializeOnly SFVec3f field named bboxSize.
Tooltip: or [0,+infinity) Bounding box size is usually omitted, and can easily be calculated automatically by an X3D player at scene-loading time with minimal computational cost. Bounding box size can also be defined as an optional authoring hint that suggests an optimization or constraint.- Hint: can be useful for collision computations or inverse-kinematics (IK) engines.
- Hint: precomputation and inclusion of bounding box information can speed up the initialization of large detailed models, with a corresponding cost of increased file size.
- Hint: X3D Architecture, 10.2.2 Bounding boxes https://www.web3d.org/specifications/X3Dv4/ISO-IEC19775-1v4-IS /Part01/components/grouping.html#BoundingBoxes
- Hint: X3D Architecture, 10.3.1 X3DBoundedObject https://www.web3d.org/specifications/X3Dv4/ISO-IEC19775-1v4-IS /Part01/components/grouping.html#X3DBoundedObject
- Specified by:
setBboxSize
in interfaceX3DBoundedObject
- Parameters:
newValue
- is new value for the bboxSize field.- Returns:
RigidBody
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
getCenterOfMass
float[] getCenterOfMass()Provide array of 3-tuple float results from inputOutput SFVec3f field named centerOfMass.
Tooltip: centerOfMass defines local center of mass for physics calculations. *- Returns:
- value of centerOfMass field
-
setCenterOfMass
Accessor method to assign 3-tuple float array to inputOutput SFVec3f field named centerOfMass.
Tooltip: centerOfMass defines local center of mass for physics calculations. *- Parameters:
newValue
- is new value for the centerOfMass field.- Returns:
RigidBody
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
getDisableAngularSpeed
float getDisableAngularSpeed()Provide float value from inputOutput SFFloat field named disableAngularSpeed.
Tooltip: [0,+infinity) disableAngularSpeed defines lower-limit tolerance value when body is considered at rest and not part of rigid body calculations, reducing numeric instabilities.- Hint: only activated if autoDisable='true'.
- Returns:
- value of disableAngularSpeed field
-
setDisableAngularSpeed
Accessor method to assign float value to inputOutput SFFloat field named disableAngularSpeed.
Tooltip: [0,+infinity) disableAngularSpeed defines lower-limit tolerance value when body is considered at rest and not part of rigid body calculations, reducing numeric instabilities.- Hint: only activated if autoDisable='true'.
- Parameters:
newValue
- is new value for the disableAngularSpeed field.- Returns:
RigidBody
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
getDisableLinearSpeed
float getDisableLinearSpeed()Provide float value from inputOutput SFFloat field named disableLinearSpeed.
Tooltip: [0,+infinity) disableLinearSpeed defines lower-limit tolerance value when body is considered at rest and not part of rigid body calculation, reducing numeric instabilitiess.- Hint: only activated if autoDisable='true'.
- Returns:
- value of disableLinearSpeed field
-
setDisableLinearSpeed
Accessor method to assign float value to inputOutput SFFloat field named disableLinearSpeed.
Tooltip: [0,+infinity) disableLinearSpeed defines lower-limit tolerance value when body is considered at rest and not part of rigid body calculation, reducing numeric instabilitiess.- Hint: only activated if autoDisable='true'.
- Parameters:
newValue
- is new value for the disableLinearSpeed field.- Returns:
RigidBody
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
getDisableTime
double getDisableTime()Provide double value in seconds within allowed range of [0,infinity) from inputOutput SFTime field named disableTime.
Tooltip: [0,+infinity) disableTime defines interval when body becomes at rest and not part of rigid body calculations, reducing numeric instabilities.- Hint: only activated if autoDisable='true'
- Hint: disableTime is an SFTime duration interval, not an absolute clock time.
- Returns:
- value of disableTime field
-
setDisableTime
Accessor method to assign double value in seconds to inputOutput SFTime field named disableTime.
Tooltip: [0,+infinity) disableTime defines interval when body becomes at rest and not part of rigid body calculations, reducing numeric instabilities.- Hint: only activated if autoDisable='true'
- Hint: disableTime is an SFTime duration interval, not an absolute clock time.
- Parameters:
newValue
- is new value for the disableTime field.- Returns:
RigidBody
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
getEnabled
boolean getEnabled()Provide boolean value from inputOutput SFBool field named enabled.
Tooltip: Enables/disables node operation. *- Returns:
- value of enabled field
-
setEnabled
Accessor method to assign boolean value to inputOutput SFBool field named enabled.
Tooltip: Enables/disables node operation. *- Parameters:
newValue
- is new value for the enabled field.- Returns:
RigidBody
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
getFiniteRotationAxis
float[] getFiniteRotationAxis()Provide array of 3-tuple float results unit axis, angle (in radians) from inputOutput SFVec3f field named finiteRotationAxis.
Tooltip: finiteRotationAxis specifies vector around which the object rotates. *- Returns:
- value of finiteRotationAxis field
-
setFiniteRotationAxis
Accessor method to assign 3-tuple float array unit axis, angle (in radians) to inputOutput SFVec3f field named finiteRotationAxis.
Tooltip: finiteRotationAxis specifies vector around which the object rotates. *- Parameters:
newValue
- is new value for the finiteRotationAxis field.- Returns:
RigidBody
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
getFixed
boolean getFixed()Provide boolean value from inputOutput SFBool field named fixed.
Tooltip: fixed indicates whether body is able to move.- Hint: fixed is useful for indicating objects that do not move: walls, ground, etc.
- Returns:
- value of fixed field
-
setFixed
Accessor method to assign boolean value to inputOutput SFBool field named fixed.
Tooltip: fixed indicates whether body is able to move.- Hint: fixed is useful for indicating objects that do not move: walls, ground, etc.
- Parameters:
newValue
- is new value for the fixed field.- Returns:
RigidBody
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
getForces
float[] getForces()Provide array of 3-tuple float results from inputOutput MFVec3f field named forces.
Tooltip: forces defines linear force values applied to the object every frame. *- Returns:
- value of forces field
-
setForces
Accessor method to assign 3-tuple float array to inputOutput MFVec3f field named forces.
Tooltip: forces defines linear force values applied to the object every frame. *- Parameters:
newValue
- is new value for the forces field.- Returns:
RigidBody
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
getGeometry
X3DNode[] getGeometry()Provide array of org.web3d.x3d.sai.Core.X3DNode results (using an array consisting of properly typed nodes or ProtoInstances) from inputOutput MFNode field geometry.
Tooltip: [X3DNBodyCollidableNode] The geometry field is used to connect the body modelled by the physics engine implementation to the real geometry of the scene through the use of collidable nodes. This allows the geometry to be connected directly to the physics model as well as collision detection. Collidable nodes have their location set to the same location as the body instance in which they are located. *
Warning: according to X3D Unified Object Model (X3DUOM), acceptable node types are limited to X3DNBodyCollidableNode.- Returns:
- value of geometry field
- See Also:
-
setGeometry
Accessor method to assign org.web3d.x3d.sai.Core.X3DNode array (using an array consisting of properly typed nodes or ProtoInstances) to inputOutput MFNode field geometry.
Tooltip: [X3DNBodyCollidableNode] The geometry field is used to connect the body modelled by the physics engine implementation to the real geometry of the scene through the use of collidable nodes. This allows the geometry to be connected directly to the physics model as well as collision detection. Collidable nodes have their location set to the same location as the body instance in which they are located. *
Note: according to X3D Unified Object Model (X3DUOM), acceptable node types are limited to X3DNBodyCollidableNode.- Parameters:
newValue
- is new value for the geometry field.- Returns:
RigidBody
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
addGeometry
Add array of child geometry nodes to array of existing nodes (if any).
Note: according to X3D Unified Object Model (X3DUOM), acceptable node types are limited to X3DNBodyCollidableNode.- Parameters:
newValue
- is new value array to be appended the geometry field.
-
setGeometry
Set single child geometry node, replacing prior array of existing nodes (if any).- Parameters:
newValue
- is new node for the geometry field
-
getInertia
float[] getInertia()Provide array of float results from inputOutput SFMatrix3f field named inertia.
Tooltip: inertia matrix defines a 3x2 inertia tensor matrix.- Warning: only the first 6 values are used.
- Returns:
- value of inertia field
-
setInertia
Accessor method to assign float array to inputOutput SFMatrix3f field named inertia.
Tooltip: inertia matrix defines a 3x2 inertia tensor matrix.- Warning: only the first 6 values are used.
- Parameters:
newValue
- is new value for the inertia field.- Returns:
RigidBody
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
getLinearDampingFactor
float getLinearDampingFactor()Provide float value from inputOutput SFFloat field named linearDampingFactor.
Tooltip: [0,1] linearDampingFactor automatically damps a portion of body motion over time. *- Returns:
- value of linearDampingFactor field
-
setLinearDampingFactor
Accessor method to assign float value to inputOutput SFFloat field named linearDampingFactor.
Tooltip: [0,1] linearDampingFactor automatically damps a portion of body motion over time. *- Parameters:
newValue
- is new value for the linearDampingFactor field.- Returns:
RigidBody
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
getLinearVelocity
float[] getLinearVelocity()Provide array of 3-tuple float results from inputOutput SFVec3f field named linearVelocity.
Tooltip: linearVelocity sets constant velocity value to object every frame, and reports updates by physics model.- Hint: initial value only applied during first frame if forces applied.
- Warning: instantaneous velocity changes may lead to numerical instability.
- Returns:
- value of linearVelocity field
-
setLinearVelocity
Accessor method to assign 3-tuple float array to inputOutput SFVec3f field named linearVelocity.
Tooltip: linearVelocity sets constant velocity value to object every frame, and reports updates by physics model.- Hint: initial value only applied during first frame if forces applied.
- Warning: instantaneous velocity changes may lead to numerical instability.
- Parameters:
newValue
- is new value for the linearVelocity field.- Returns:
RigidBody
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
getMass
float getMass()Provide float value from inputOutput SFFloat field named mass.
Tooltip: (0,1] mass of the body in kilograms.- Warning: mass must be greater than 0.
- Hint: https://en.wikipedia.org/wiki/Kilogram
- Hint: X3D Architecture 4.3.6 Standard units and coordinate system https://www.web3d.org/specifications/X3Dv4/ISO-IEC19775-1v4-IS /Part01/concepts.html#Standardunitscoordinates
- Returns:
- value of mass field
-
setMass
Accessor method to assign float value to inputOutput SFFloat field named mass.
Tooltip: (0,1] mass of the body in kilograms.- Warning: mass must be greater than 0.
- Hint: https://en.wikipedia.org/wiki/Kilogram
- Hint: X3D Architecture 4.3.6 Standard units and coordinate system https://www.web3d.org/specifications/X3Dv4/ISO-IEC19775-1v4-IS /Part01/concepts.html#Standardunitscoordinates
- Parameters:
newValue
- is new value for the mass field.- Returns:
RigidBody
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
getMassDensityModel
X3DNode getMassDensityModel()Provide org.web3d.x3d.sai.Core.X3DNode instance (using a properly typed node) with acceptable node types limited to Sphere|Box|Cone, from inputOutput SFNode field massDensityModel.
Tooltip: [Sphere,Box,Cone] The massDensityModel field is used to describe the geometry type and dimensions used to calculate the mass density in the physics model. It is not rendered, nor modified by the physics model. *- Returns:
- value of massDensityModel field
-
setMassDensityModel
Accessor method to assign org.web3d.x3d.sai.Core.X3DNode instance (using a properly typed node) to inputOutput SFNode field massDensityModel.
Tooltip: [Sphere,Box,Cone] The massDensityModel field is used to describe the geometry type and dimensions used to calculate the mass density in the physics model. It is not rendered, nor modified by the physics model. *- Parameters:
newValue
- is new value for the massDensityModel field.- Returns:
RigidBody
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
getMetadata
X3DMetadataObject getMetadata()Provide org.web3d.x3d.sai.Core.X3DMetadataObject instance (using a properly typed node) from inputOutput SFNode field metadata.
Tooltip: [X3DMetadataObject] Information about this node can be contained in a MetadataBoolean, MetadataDouble, MetadataFloat, MetadataInteger, MetadataString or MetadataSet node.- Hint: X3D Architecture 7.2.4 Metadata https://www.web3d.org/specifications/X3Dv4/ISO-IEC19775-1v4-IS /Part01/components/core.html#Metadata
- Specified by:
getMetadata
in interfaceX3DChildNode
- Specified by:
getMetadata
in interfaceX3DNode
- Returns:
- value of metadata field
- See Also:
-
setMetadata
Accessor method to assign org.web3d.x3d.sai.Core.X3DMetadataObject instance (using a properly typed node) to inputOutput SFNode field metadata.
Tooltip: [X3DMetadataObject] Information about this node can be contained in a MetadataBoolean, MetadataDouble, MetadataFloat, MetadataInteger, MetadataString or MetadataSet node.- Hint: X3D Architecture 7.2.4 Metadata https://www.web3d.org/specifications/X3Dv4/ISO-IEC19775-1v4-IS /Part01/components/core.html#Metadata
- Specified by:
setMetadata
in interfaceX3DChildNode
- Specified by:
setMetadata
in interfaceX3DNode
- Parameters:
newValue
- is new value for the metadata field.- Returns:
RigidBody
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).- See Also:
-
getOrientation
float[] getOrientation()Provide array of 4-tuple float results unit axis, angle (in radians) from inputOutput SFRotation field named orientation.
Tooltip: orientation sets body direction in world space, then reports physics updates. *- Returns:
- value of orientation field
-
setOrientation
Accessor method to assign 4-tuple float array unit axis, angle (in radians) to inputOutput SFRotation field named orientation.
Tooltip: orientation sets body direction in world space, then reports physics updates. *- Parameters:
newValue
- is new value for the orientation field.- Returns:
RigidBody
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
getPosition
float[] getPosition()Provide array of 3-tuple float results from inputOutput SFVec3f field named position.
Tooltip: position sets body location in world space, then reports physics updates. *- Returns:
- value of position field
-
setPosition
Accessor method to assign 3-tuple float array to inputOutput SFVec3f field named position.
Tooltip: position sets body location in world space, then reports physics updates. *- Parameters:
newValue
- is new value for the position field.- Returns:
RigidBody
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
getTorques
float[] getTorques()Provide array of 3-tuple float results from inputOutput MFVec3f field named torques.
Tooltip: torques defines rotational force values applied to the object every frame. *- Returns:
- value of torques field
-
setTorques
Accessor method to assign 3-tuple float array to inputOutput MFVec3f field named torques.
Tooltip: torques defines rotational force values applied to the object every frame. *- Parameters:
newValue
- is new value for the torques field.- Returns:
RigidBody
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
getUseFiniteRotation
boolean getUseFiniteRotation()Provide boolean value unit axis, angle (in radians) from inputOutput SFBool field named useFiniteRotation.
Tooltip: useFiniteRotation enables/disables higher-resolution, higher-cost computational method for calculating rotations. *- Returns:
- value of useFiniteRotation field
-
setUseFiniteRotation
Accessor method to assign boolean value unit axis, angle (in radians) to inputOutput SFBool field named useFiniteRotation.
Tooltip: useFiniteRotation enables/disables higher-resolution, higher-cost computational method for calculating rotations. *- Parameters:
newValue
- is new value for the useFiniteRotation field.- Returns:
RigidBody
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
getUseGlobalGravity
boolean getUseGlobalGravity()Provide boolean value from inputOutput SFBool field named useGlobalGravity.
Tooltip: useGlobalGravity indicates whether this particular body is influenced by parent RigidBodyCollection's gravity setting.- Hint: contained sub-bodies are not affected by this setting.
- Returns:
- value of useGlobalGravity field
-
setUseGlobalGravity
Accessor method to assign boolean value to inputOutput SFBool field named useGlobalGravity.
Tooltip: useGlobalGravity indicates whether this particular body is influenced by parent RigidBodyCollection's gravity setting.- Hint: contained sub-bodies are not affected by this setting.
- Parameters:
newValue
- is new value for the useGlobalGravity field.- Returns:
RigidBody
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
getVisible
boolean getVisible()Provide boolean value from inputOutput SFBool field named visible.
Tooltip: Whether or not renderable content within this node is visually displayed.- Hint: the visible field has no effect on animation behaviors, event passing or other non-visual characteristics.
- Hint: content must be visible to be collidable and to be pickable.
- Specified by:
getVisible
in interfaceX3DBoundedObject
- Returns:
- value of visible field
-
setVisible
Accessor method to assign boolean value to inputOutput SFBool field named visible.
Tooltip: Whether or not renderable content within this node is visually displayed.- Hint: the visible field has no effect on animation behaviors, event passing or other non-visual characteristics.
- Hint: content must be visible to be collidable and to be pickable.
- Specified by:
setVisible
in interfaceX3DBoundedObject
- Parameters:
newValue
- is new value for the visible field.- Returns:
RigidBody
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-