Class BoxCollider
A box-shaped primitive collider.
Inherited Members
Assembly: FlaxEngine.dll
File: Engine/Physics/Colliders/BoxCollider.h
Syntax
public class BoxCollider : public Collider
Fields
ImplementPhysicsDebug
Declaration
protected ImplementPhysicsDebug
Methods
AutoResize(bool globalOrientation)
Resizes the collider based on the bounds of it's parent to contain it whole (including any siblings).
Declaration
public void AutoResize(bool globalOrientation)
Parameters
|
bool
globalOrientation
|
GetGeometry(CollisionShape& collision)
Gets the collider shape geometry.
Declaration
protected virtual void GetGeometry(CollisionShape& collision) override
Parameters
|
CollisionShape
collision
The output collision shape. |
Overrides
GetOrientedBox()
Gets the volume bounding box (oriented).
Declaration
public OrientedBoundingBox GetOrientedBox() const
Returns
|
OrientedBoundingBox
|
GetSize()
Gets the size of the box, measured in the object's local space.
The box size will be scaled by the actor's world scale.
Declaration
public Float3 GetSize() const
Returns
|
Float3
|
IntersectsItself(const Ray& ray, Real& distance, Vector3& normal)
Determines if there is an intersection between the current object and a ray.
Declaration
public virtual bool IntersectsItself(const Ray& ray, Real& distance, Vector3& normal) override
Parameters
|
Ray
ray
The ray to test. |
|
Real
distance
When the method completes, contains the distance of the intersection (if any valid). |
|
Vector3
normal
When the method completes, contains the intersection surface normal vector (if any valid). |
Returns
|
bool
True whether the two objects intersected, otherwise false. |
Overrides
OnDebugDraw()
Draws debug shapes for the actor and all child scripts.
Declaration
public virtual void OnDebugDraw() override
Overrides
OnDebugDrawSelected()
Draws debug shapes for the selected actor and all child scripts.
Declaration
public virtual void OnDebugDrawSelected() override
Overrides
OnDebugDrawSelf()
Declaration
public virtual void OnDebugDrawSelf() override
Overrides
SetSize(const Float3& value)
Sets the size of the box, measured in the object's local space.
The box size will be scaled by the actor's world scale.
Declaration
public void SetSize(const Float3& value)
Parameters
|
Float3
value
|
UpdateBounds()
Updates the bounding box of the shape.
Declaration
protected virtual void UpdateBounds() override