Karma Engine
|
#include <SceneComponent.h>
Public Member Functions | |
const glm::vec3 & | GetRelativeRotation () const |
const glm::vec3 & | GetRelativeLocation () const |
const glm::vec3 & | GetRelativeScale3D () const |
void | SetWorldLocation (glm::vec3 newLocation) |
void | SetWorldTransform (const FTransform &NewTransform) |
std::shared_ptr< USceneComponent > | GetAttachParent () const |
virtual FTransform | GetSocketTransform (const std::string &InSocketName, ERelativeTransformSpace TransformSpace=RTS_World) const |
const FTransform & | GetComponentTransform () const |
virtual void | BeginDestroy () override |
Called before destroying the object. This is called immediately upon deciding to destroy the object, to allow the object to begin an asynchronous cleanup process. | |
bool | IsUsingAbsoluteLocation () const |
bool | IsUsingAbsoluteRotation () const |
bool | IsUsingAbsoluteScale () const |
void | SetRelativeTransform (const FTransform &NewTransform) |
FORCEINLINE const std::string & | GetAttachSocketName () const |
Public Member Functions inherited from Karma::UActorComponent | |
virtual void | TickComponent (float deltaTime) |
virtual void | BeginPlay () |
virtual void | EndPlay (const EEndPlayReason::Type EndPlayReason) |
AActor * | GetOwner () const |
bool | HasBeenCreated () const |
virtual void | OnComponentCreated () |
bool | IsRegistered () const |
bool | IsActive () const |
virtual void | Activate (bool bReset=false) |
void | SetActiveFlag (const bool bNewIsActive) |
bool | HasBeenInitialized () const |
virtual void | InitializeComponent () |
bool | HasBegunPlay () const |
virtual void | UninitializeComponent () |
virtual void | OnComponentDestroyed (bool bDestroyingHierarchy) |
Public Member Functions inherited from Karma::UObject | |
UObject () | |
virtual void | FinishDestroy () |
virtual const std::string & | GetDesc () |
Return a one line description of an object for viewing in the thumbnail view of the generic browser. | |
virtual class UWorld * | GetWorld () const |
Returns what UWorld this object is contained within. | |
bool | IsValidChecked (const UObject *Test) |
FORCEINLINE bool | Modify (bool bAlwaysMarkDirty=true) |
bool | IsSelected () const |
Test the selection state of a UObject. | |
Public Member Functions inherited from Karma::UObjectBase | |
UObjectBase (UClass *inClass, EObjectFlags inFlags, EInternalObjectFlags inInternalFlags, UObject *inOuter, const std::string &inName) | |
UPackage * | GetPackage () const |
UPackage * | GetExternalPackage () const |
bool | IsUnreachable () const |
FORCEINLINE void | SetInternalIndex (uint32_t StoreIndex) |
FORCEINLINE uint32_t | GetInterIndex () const |
void | MarkAsGarbage () |
void | ClearGarbage () |
FORCEINLINE const std::string & | GetName () const |
FORCEINLINE void | SetObjectName (const std::string &aName) |
FORCEINLINE UObject * | GetOuter () const |
UObject * | GetTypedOuter (UClass *Target) const |
template<typename T > | |
T * | GetTypedOuter () const |
bool | IsValidLowLevel () const |
template<typename OtherClassType > | |
FORCEINLINE bool | IsA (OtherClassType SomeBase) const |
FORCEINLINE UClass * | GetClass () const |
FORCEINLINE EObjectFlags | GetFlags () const |
FORCEINLINE void | SetFlags (EObjectFlags NewFlags) |
FORCEINLINE void | ClearFlags (EObjectFlags NewFlags) |
FORCEINLINE bool | HasAnyFlags (EObjectFlags FlagsToCheck) const |
FORCEINLINE bool | HasAnyInternalFlags (EInternalObjectFlags FlagsToCheck) const |
FORCEINLINE void | SetInternalFlags (EInternalObjectFlags FlagsToSet) const |
FORCEINLINE void | AddToRoot () |
Public Attributes | |
glm::vec3 | m_ComponentVelocity |
std::string | m_AttachSocketName |
std::vector< std::shared_ptr< USceneComponent > > | m_AttachChildren |
Public Attributes inherited from Karma::UActorComponent | |
EComponentCreationMethod | m_CreationMethod |
uint8_t | m_bAutoActivate: 1 |
uint8_t | m_bWantsInitializeComponent: 1 |
Additional Inherited Members | |
Static Public Member Functions inherited from Karma::UObject | |
static const char * | StaticConfigName () |
Static Public Member Functions inherited from Karma::UObjectBase | |
static FORCEINLINE EInternalObjectFlags | FixGarbageOrPendingKillInternalObjectFlags (const EInternalObjectFlags InFlags) |
Protected Member Functions inherited from Karma::UActorComponent | |
virtual bool | ShouldActivate () const |
Protected Member Functions inherited from Karma::UObjectBase | |
FORCEINLINE void | SetFlagsTo (EObjectFlags NewFlags) |
Protected Attributes inherited from Karma::UActorComponent | |
uint8_t | m_bRegistered: 1 |
A SceneComponent has a transform and supports attachment, but has no rendering or collision capabilities. Useful as a 'dummy' component in the hierarchy to offset others.
|
overridevirtual |
Called before destroying the object. This is called immediately upon deciding to destroy the object, to allow the object to begin an asynchronous cleanup process.
Reimplemented from Karma::UActorComponent.
Reimplemented in Karma::UChildActorComponent.
std::shared_ptr< USceneComponent > Karma::USceneComponent::GetAttachParent | ( | ) | const |
Get the SceneComponent we are attached to.
|
inline |
Get the current component-to-world transform for this component
|
inline |
Gets the literal value of RelativeLocation. Note, this may be an absolute location if this is a root component (not attached to anything) or when IsUsingAbsoluteLocation returns true.
This exists so subclasses don't need to have direct access to the RelativeLocation property so it can be made private later.
|
inline |
Gets the literal value of RelativeRotation. Note, this may be an absolute rotation if this is a root component (not attached to anything) or when GetAbsoluteRotation returns true.
This exists so subclasses don't need to have direct access to the RelativeRotation property so it can be made private later.
|
inline |
Gets the literal value of RelativeScale3D. Note, this may be an absolute scale if this is a root component (not attached to anything) or when GetAbsoluteScale3D returns true.
This exists so subclasses don't need to have direct access to the RelativeScale3D property so it can be made private later.
|
virtual |
Get world-space socket transform.
InSocketName | Name of the socket or the bone to get the transform |
|
inline |
Gets the literal value of bAbsoluteLocation.
This exists so subclasses don't need to have direct access to the bAbsoluteLocation property so it can be made private later.
|
inline |
Gets the literal value of bAbsoluteRotation.
This exists so subclasses don't need to have direct access to the bAbsoluteRotation property so it can be made private later.
|
inline |
Gets the literal value of bAbsoluteScale.
This exists so subclasses don't need to have direct access to the bReplicates property so it can be made private later.
void Karma::USceneComponent::SetRelativeTransform | ( | const FTransform & | NewTransform | ) |
Set the transform of the component relative to its parent
NewTransform | New transform of the component relative to its parent. |
To be active once physics is enabled
SweepHitResult | Hit result from any impact if sweep is true. |
bSweep | Whether we sweep to the destination (currently not supported for rotation). |
bTeleport | Whether we teleport the physics state (if physics collision is enabled for this object). If true, physics velocity for this object is unchanged (so ragdoll parts are not affected by change in location). If false, physics velocity is updated based on the change in position (affecting ragdoll parts). |
void Karma::USceneComponent::SetWorldLocation | ( | glm::vec3 | newLocation | ) |
Put this component at the specified location in world space. Updates relative location to achieve the final world location.
NewLocation | New location in world space for the component. |
These params shall be incorporated later in dev cycle.
SweepHitResult | Hit result from any impact if sweep is true. |
bSweep | Whether we sweep to the destination location, triggering overlaps along the way and stopping short of the target if blocked by something. Only the root component is swept and checked for blocking collision, child components move without sweeping. If collision is off, this has no effect. |
bTeleport | Whether we teleport the physics state (if physics collision is enabled for this object). If true, physics velocity for this object is unchanged (so ragdoll parts are not affected by change in location). If false, physics velocity is updated based on the change in position (affecting ragdoll parts). If CCD is on and not teleporting, this will affect objects along the entire sweep volume. |
void Karma::USceneComponent::SetWorldTransform | ( | const FTransform & | NewTransform | ) |
Set the transform of the component in world space.
NewTransform | New transform in world space for the component. |
Rest are physics related
SweepHitResult | Hit result from any impact if sweep is true. |
bSweep | Whether we sweep to the destination location, triggering overlaps along the way and stopping short of the target if blocked by something. Only the root component is swept and checked for blocking collision, child components move without sweeping. If collision is off, this has no effect. |
bTeleport | Whether we teleport the physics state (if physics collision is enabled for this object). If true, physics velocity for this object is unchanged (so ragdoll parts are not affected by change in location). If false, physics velocity is updated based on the change in position (affecting ragdoll parts). If CCD is on and not teleporting, this will affect objects along the entire sweep volume. |
std::vector<std::shared_ptr<USceneComponent> > Karma::USceneComponent::m_AttachChildren |
List of child SceneComponents that are attached to us.
std::string Karma::USceneComponent::m_AttachSocketName |
What we are currently attached to. If valid, RelativeLocation etc. are used relative to this object Optional socket name on AttachParent that we are attached to.
glm::vec3 Karma::USceneComponent::m_ComponentVelocity |
Velocity of the component.