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:
- Box shape, configure with CollisionShape.SetBox
- Capsule shape, configure with CollisionShape.SetCapsule
- Cone shape, configure with CollisionShape.SetCone
- Convex hull shape, configure with: CollisionShape.SetConvexHull or CollisionShape.SetCustomConvexHull
- Cylinder shape, configure with CollisionShape.SetCylinder
- Triangle mesh, configure with CollisionShape.SetTriangleMesh
- Sphere shape, configure with
- Cylinder shape, configure with CollisionShape.SetSphere
- Static plane, configure with CollisionShape.SetStaticPlane
- Heighfield terrain, configure with CollisionShape.SetTerrain (this requires a Terrain component on the same node).
Requirements
Namespace: Urho.Physics
Assembly: Urho (in Urho.dll)
Assembly Versions: 1.0.0.0
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
LodLevel | UInt32. Return model LOD level. Or Set model LOD level. | |
Margin | Single. Return collision margin. Or Set collision margin. | |
Model | Model. Return triangle mesh / convex hull model. Or Set triangle mesh / convex hull model. | |
[read-only] | ModelAttr | ResourceRef. Return model attribute. |
[read-only] | PhysicsWorld | PhysicsWorld. Return physics world. |
Position | Vector3. Return offset position. Or Set offset position. | |
Rotation | Quaternion. Return offset rotation. Or Set offset rotation. | |
ShapeType | ShapeType. Return shape type. Or Set shape type. | |
Size | Vector3. Return shape size. Or Set shape size. | |
[read-only] override | Type | StringHash. Urho's type system type. |
[read-only] override | TypeName | String. Urho's low-level type name. |
[read-only] static | TypeNameStatic | String. Urho's low-level type name, accessible as a static method. |
[read-only] static | TypeStatic | StringHash. Urho's low-level type, accessible as a static method. |
[read-only] | WorldBoundingBox | BoundingBox. 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. |