Urho.Physics.CollisionShape Class

Physics collision shape component.

See Also: CollisionShape

Syntax

public class CollisionShape : Component

Remarks

Use the collision shape component to configure the geometrical shape of the node.

You configure the CollisionShape by calling one of the Set methods to configure the shape, the supported shapes are:

Requirements

Namespace: Urho.Physics
Assembly: Urho (in Urho.dll)
Assembly Versions: 1.0.0.0

The members of Urho.Physics.CollisionShape are listed below.

See Also: Component

Public Constructors

Constructs a new instance of Urho.Physics.CollisionShape which is tied to the Application.CurrentContext.
Constructs a new instance of Urho.Physics.CollisionShape, given a raw pointer to an unmanaged object
Constructs a new instance of Urho.Physics.CollisionShape linked to a specific Context.

Protected Constructors

Empty constructor, chain to this constructor when you provide your own constructor that sets the handle field.

Public Properties

LodLevelUInt32. Return model LOD level. Or Set model LOD level.
MarginSingle. Return collision margin. Or Set collision margin.
ModelModel. Return triangle mesh / convex hull model. Or Set triangle mesh / convex hull model.
[read-only]
ModelAttrResourceRef. Return model attribute.
[read-only]
PhysicsWorldPhysicsWorld. Return physics world.
PositionVector3. Return offset position. Or Set offset position.
RotationQuaternion. Return offset rotation. Or Set offset rotation.
ShapeTypeShapeType. Return shape type. Or Set shape type.
SizeVector3. Return shape size. Or Set shape size.
[read-only]
override
TypeStringHash. Urho's type system type.
[read-only]
override
TypeNameString. Urho's low-level type name.
[read-only]
static
TypeNameStaticString. Urho's low-level type name, accessible as a static method.
[read-only]
static
TypeStaticStringHash. Urho's low-level type, accessible as a static method.
[read-only]
WorldBoundingBoxBoundingBox. Return world-space bounding box.

Public Methods

override
ApplyAttributes()
Apply attribute changes that can not be applied immediately. Called after scene load or a network update.
override
DrawDebugGeometry(DebugRenderer, Boolean)
Visualize the component as debug geometry.
NotifyRigidBody(Boolean)
Update the new collision shape to the RigidBody.
override
OnSetEnabled()
Handle enabled/disabled state change.
static
RegisterObject(Context)
Register object factory.
ReleaseShape()
Release the collision shape.
SetBox(Vector3, Vector3, Quaternion)
Set as a box.
SetCapsule(Single, Single, Vector3, Quaternion)
Set as a capsule.
SetCone(Single, Single, Vector3, Quaternion)
Set as a cone.
SetConvexHull(Model, UInt32, Vector3, Vector3, Quaternion)
Set as a convex hull from Model.
SetCustomConvexHull(CustomGeometry, Vector3, Vector3, Quaternion)
Set as a convex hull from CustomGeometry.
SetCustomTriangleMesh(CustomGeometry, Vector3, Vector3, Quaternion)
Set as a triangle mesh from CustomGeometry.
SetCylinder(Single, Single, Vector3, Quaternion)
Set as a cylinder.
SetSphere(Single, Vector3, Quaternion)
Set as a sphere.
SetStaticPlane(Vector3, Quaternion)
Set as a static plane.
SetTerrain(UInt32)
Set as a terrain. Only works if the same scene node contains a Terrain component.
SetTransform(Vector3, Quaternion)
Set offset transform.
SetTriangleMesh(Model, UInt32, Vector3, Vector3, Quaternion)
Set as a triangle mesh from Model. If you update a model's geometry and want to reapply the shape, call physicsWorld->RemoveCachedGeometry(model) first.