|
StevEngine
StevEngine is a customizable C++ game engine.
|
Sphere-shaped collider. More...
#include <physics/Colliders.hpp>
Public Member Functions | |
| SphereCollider (Utilities::Vector3 position=Utilities::Vector3(), Utilities::Quaternion rotation=Utilities::Quaternion(), Utilities::Vector3 scale=Utilities::Vector3(1, 1, 1)) | |
| Create sphere collider. | |
Public Member Functions inherited from StevEngine::Physics::Collider | |
| Collider (JPH::Ref< JPH::Shape > shape, Utilities::Vector3 position=Utilities::Vector3(), Utilities::Quaternion rotation=Utilities::Quaternion(), Utilities::Vector3 scale=Utilities::Vector3(1, 1, 1)) | |
| Create new collider. | |
| Collider (Utilities::Stream &stream) | |
| Create collider from text serialized data. | |
| std::string | GetType () const |
| Get component type. | |
| Utilities::Stream | Export (Utilities::StreamType type) const |
| Serialize component to a stream. | |
| Utilities::Vector3 | GetScale () const |
| Get local scale. | |
| Utilities::Quaternion | GetRotation () const |
| Get local rotation. | |
| Utilities::Vector3 | GetPosition () const |
| Get local position. | |
| void | SetScale (Utilities::Vector3 scale) |
| Set local scale. | |
| void | SetRotation (Utilities::Quaternion rotation) |
| Set local rotation. | |
| void | SetPosition (Utilities::Vector3 position) |
| Set local position. | |
| void | SetTransform (Utilities::Vector3 position, Utilities::Quaternion rotation, Utilities::Vector3 scale) |
| Set full local transform. | |
| Utilities::Range3 | GetBounds () const |
| Get axis-aligned bounds. | |
| Utilities::Vector3 | GetCenterOfMass () const |
| Get center of mass. | |
| JPH::Ref< JPH::Shape > | GetShape () const |
| Get physics shape. | |
Public Member Functions inherited from StevEngine::Component | |
| Component () | |
| Create new component. | |
| virtual | ~Component () |
| Clean up component resources. | |
| GameObject & | GetParent () const |
| Get parent GameObject. | |
| Scene & | GetScene () const |
| Get containing Scene. | |
| virtual void | Update (double deltaTime) |
| Update component logic. | |
| virtual void | Draw (const Utilities::Matrix4 &transform) |
| Draw component visuals. | |
Additional Inherited Members | |
Protected Attributes inherited from StevEngine::Physics::Collider | |
| Utilities::Vector3 | scale = Utilities::Vector3(1, 1, 1) |
| Local scale. | |
| Utilities::Vector3 | position = Utilities::Vector3() |
| Local position. | |
| Utilities::Quaternion | rotation = Utilities::Quaternion() |
| Local rotation. | |
| const JPH::Ref< JPH::Shape > | rawShape |
| Base physics shape. | |
| JPH::Ref< JPH::Shape > | shape |
| Transformed shape. | |
Protected Attributes inherited from StevEngine::Component | |
| std::vector< std::pair< Utilities::ID, std::string > > | handlers |
| Event handler registrations. | |
Sphere-shaped collider.
Represents a spherical collision shape. Uses Jolt's SphereShape internally.
| StevEngine::Physics::SphereCollider::SphereCollider | ( | Utilities::Vector3 | position = Utilities::Vector3(), |
| Utilities::Quaternion | rotation = Utilities::Quaternion(), | ||
| Utilities::Vector3 | scale = Utilities::Vector3(1,1,1) ) |
Create sphere collider.
| position | Local position |
| rotation | Local rotation |
| scale | Local scale |