Fix old api usage for #4185
This commit is contained in:
@@ -394,8 +394,8 @@ void BehaviorTreeMoveToNode::GetAgentSize(Actor* agent, float& outRadius, float&
|
||||
}
|
||||
|
||||
// Estimate actor bounds to extract capsule information
|
||||
const BoundingBox box = agent->GetBox();
|
||||
const BoundingSphere sphere = agent->GetSphere();
|
||||
const BoundingBox box = agent->GetBoundingBox();
|
||||
const BoundingSphere sphere = agent->GetBoundingSphere();
|
||||
outRadius = (float)sphere.Radius;
|
||||
outHeight = (float)box.GetSize().Y;
|
||||
}
|
||||
|
||||
@@ -221,7 +221,7 @@ public:
|
||||
void Serialize(SerializeStream& stream, const void* otherObj) override;
|
||||
void Deserialize(DeserializeStream& stream, ISerializeModifier* modifier) override;
|
||||
#if USE_EDITOR
|
||||
BoundingBox GetEditorBox() const override
|
||||
BoundingBox GetEditorBoundingBox() const override
|
||||
{
|
||||
const Vector3 size(50);
|
||||
return BoundingBox(_transform.Translation - size, _transform.Translation + size);
|
||||
|
||||
@@ -30,7 +30,7 @@ private:
|
||||
public:
|
||||
// [Actor]
|
||||
#if USE_EDITOR
|
||||
BoundingBox GetEditorBox() const override
|
||||
BoundingBox GetEditorBoundingBox() const override
|
||||
{
|
||||
const Vector3 size(50);
|
||||
return BoundingBox(_transform.Translation - size, _transform.Translation + size);
|
||||
|
||||
@@ -318,7 +318,7 @@ private:
|
||||
public:
|
||||
// [Actor]
|
||||
#if USE_EDITOR
|
||||
BoundingBox GetEditorBox() const override
|
||||
BoundingBox GetEditorBoundingBox() const override
|
||||
{
|
||||
const Vector3 size(50);
|
||||
return BoundingBox(_transform.Translation - size, _transform.Translation + size);
|
||||
|
||||
@@ -689,7 +689,7 @@ public:
|
||||
public:
|
||||
/// <summary>
|
||||
/// Gets actor bounding sphere that defines 3D space intersecting with the actor (for determination of the visibility for actor).
|
||||
/// [DEPRECATED IN 1.13]
|
||||
/// [Deprecated in 1.13]
|
||||
/// </summary>
|
||||
API_PROPERTY() DEPRECATED("Use GetBoundingSphere instead.") FORCE_INLINE const BoundingSphere& GetSphere() const
|
||||
{
|
||||
@@ -706,7 +706,7 @@ public:
|
||||
|
||||
/// <summary>
|
||||
/// Gets actor bounding box that defines 3D space intersecting with the actor (for determination of the visibility for actor).
|
||||
/// [DEPRECATED IN 1.13]
|
||||
/// [Deprecated in 1.13]
|
||||
/// </summary>
|
||||
API_PROPERTY() DEPRECATED("Use GetBoundingBox instead.") FORCE_INLINE const BoundingBox& GetBox() const
|
||||
{
|
||||
@@ -723,7 +723,7 @@ public:
|
||||
|
||||
/// <summary>
|
||||
/// Gets actor bounding box of the actor including all child actors (children included in recursive way)
|
||||
/// [DEPRECATED IN 1.13]
|
||||
/// [Deprecated in 1.13]
|
||||
/// </summary>
|
||||
API_PROPERTY() DEPRECATED("Use GetBoundingBoxWithChildren instead.") BoundingBox GetBoxWithChildren() const;
|
||||
|
||||
@@ -735,7 +735,7 @@ public:
|
||||
#if USE_EDITOR
|
||||
/// <summary>
|
||||
/// Gets actor bounding box (single actor, no children included) for editor tools.
|
||||
/// [DEPRECATED IN 1.13]
|
||||
/// [Deprecated in 1.13]
|
||||
/// </summary>
|
||||
API_PROPERTY() DEPRECATED("Use GetEditorBoundingBox instead.") virtual BoundingBox GetEditorBox() const;
|
||||
|
||||
@@ -746,7 +746,7 @@ public:
|
||||
|
||||
/// <summary>
|
||||
/// Gets actor bounding box of the actor including all child actors for editor tools.
|
||||
/// [DEPRECATED IN 1.13]
|
||||
/// [Deprecated in 1.13]
|
||||
/// </summary>
|
||||
API_PROPERTY() DEPRECATED("Use GetEditorBoundingBoxWithChildren instead.") BoundingBox GetEditorBoxChildren() const;
|
||||
|
||||
|
||||
@@ -1216,7 +1216,7 @@ void AnimatedModel::OnDebugDraw()
|
||||
ModelInstanceActor::OnDebugDraw();
|
||||
}
|
||||
|
||||
BoundingBox AnimatedModel::GetEditorBox() const
|
||||
BoundingBox AnimatedModel::GetEditorBoundingBox() const
|
||||
{
|
||||
if (SkinnedModel)
|
||||
SkinnedModel->WaitForLoaded(100);
|
||||
|
||||
@@ -479,7 +479,7 @@ public:
|
||||
#if USE_EDITOR
|
||||
void OnDebugDrawSelected() override;
|
||||
void OnDebugDraw() override;
|
||||
BoundingBox GetEditorBox() const override;
|
||||
BoundingBox GetEditorBoundingBox() const override;
|
||||
#endif
|
||||
bool IntersectsItself(const Ray& ray, Real& distance, Vector3& normal) override;
|
||||
void Serialize(SerializeStream& stream, const void* otherObj) override;
|
||||
|
||||
@@ -333,7 +333,7 @@ void Camera::BeginPlay(SceneBeginData* data)
|
||||
Actor::BeginPlay(data);
|
||||
}
|
||||
|
||||
BoundingBox Camera::GetEditorBox() const
|
||||
BoundingBox Camera::GetEditorBoundingBox() const
|
||||
{
|
||||
const Vector3 size(100);
|
||||
const Vector3 pos = _transform.Translation + _transform.Orientation * Vector3::Forward * 30.0f;
|
||||
|
||||
@@ -257,7 +257,7 @@ private:
|
||||
public:
|
||||
// [Actor]
|
||||
#if USE_EDITOR
|
||||
BoundingBox GetEditorBox() const override;
|
||||
BoundingBox GetEditorBoundingBox() const override;
|
||||
bool HasContentLoaded() const override;
|
||||
void Draw(RenderContext& renderContext) override;
|
||||
void OnDebugDrawSelected() override;
|
||||
|
||||
@@ -53,7 +53,7 @@ void Decal::OnDebugDrawSelected()
|
||||
Actor::OnDebugDrawSelected();
|
||||
}
|
||||
|
||||
BoundingBox Decal::GetEditorBox() const
|
||||
BoundingBox Decal::GetEditorBoundingBox() const
|
||||
{
|
||||
const Vector3 size(10.0f);
|
||||
return BoundingBox(_transform.Translation - size, _transform.Translation + size);
|
||||
|
||||
@@ -71,7 +71,7 @@ public:
|
||||
// [Actor]
|
||||
#if USE_EDITOR
|
||||
void OnDebugDrawSelected() override;
|
||||
BoundingBox GetEditorBox() const override;
|
||||
BoundingBox GetEditorBoundingBox() const override;
|
||||
#endif
|
||||
void OnLayerChanged() override;
|
||||
void Draw(RenderContext& renderContext) override;
|
||||
|
||||
@@ -9,7 +9,7 @@ EmptyActor::EmptyActor(const SpawnParams& params)
|
||||
|
||||
#if USE_EDITOR
|
||||
|
||||
BoundingBox EmptyActor::GetEditorBox() const
|
||||
BoundingBox EmptyActor::GetEditorBoundingBox() const
|
||||
{
|
||||
const Vector3 size(50);
|
||||
return BoundingBox(_transform.Translation - size, _transform.Translation + size);
|
||||
|
||||
@@ -14,7 +14,7 @@ class FLAXENGINE_API EmptyActor : public Actor
|
||||
public:
|
||||
// [Actor]
|
||||
#if USE_EDITOR
|
||||
BoundingBox GetEditorBox() const override;
|
||||
BoundingBox GetEditorBoundingBox() const override;
|
||||
#endif
|
||||
|
||||
protected:
|
||||
|
||||
@@ -152,7 +152,7 @@ private:
|
||||
public:
|
||||
// [Actor]
|
||||
#if USE_EDITOR
|
||||
BoundingBox GetEditorBox() const override
|
||||
BoundingBox GetEditorBoundingBox() const override
|
||||
{
|
||||
const Vector3 size(50);
|
||||
return BoundingBox(_transform.Translation - size, _transform.Translation + size);
|
||||
|
||||
@@ -141,7 +141,7 @@ private:
|
||||
public:
|
||||
// [Actor]
|
||||
#if USE_EDITOR
|
||||
BoundingBox GetEditorBox() const override
|
||||
BoundingBox GetEditorBoundingBox() const override
|
||||
{
|
||||
const Vector3 size(50);
|
||||
return BoundingBox(_transform.Translation - size, _transform.Translation + size);
|
||||
|
||||
@@ -75,7 +75,7 @@ public:
|
||||
void OnEnable() override;
|
||||
void OnDisable() override;
|
||||
#if USE_EDITOR
|
||||
BoundingBox GetEditorBox() const override
|
||||
BoundingBox GetEditorBoundingBox() const override
|
||||
{
|
||||
const Vector3 size(50);
|
||||
return BoundingBox(_transform.Translation - size, _transform.Translation + size);
|
||||
|
||||
@@ -63,7 +63,7 @@ private:
|
||||
public:
|
||||
// [Actor]
|
||||
#if USE_EDITOR
|
||||
BoundingBox GetEditorBox() const override
|
||||
BoundingBox GetEditorBoundingBox() const override
|
||||
{
|
||||
const Vector3 size(50);
|
||||
return BoundingBox(_transform.Translation - size, _transform.Translation + size);
|
||||
|
||||
@@ -57,7 +57,7 @@ private:
|
||||
public:
|
||||
// [Actor]
|
||||
#if USE_EDITOR
|
||||
BoundingBox GetEditorBox() const override
|
||||
BoundingBox GetEditorBoundingBox() const override
|
||||
{
|
||||
const Vector3 size(50);
|
||||
return BoundingBox(_transform.Translation - size, _transform.Translation + size);
|
||||
|
||||
@@ -44,9 +44,9 @@ BoundingBox SceneNavigation::GetNavigationBounds()
|
||||
if (Volumes.IsEmpty())
|
||||
return BoundingBox::Empty;
|
||||
PROFILE_CPU_NAMED("GetNavigationBounds");
|
||||
auto box = Volumes[0]->GetBox();
|
||||
auto box = Volumes[0]->GetBoundingBox();
|
||||
for (int32 i = 1; i < Volumes.Count(); i++)
|
||||
BoundingBox::Merge(box, Volumes[i]->GetBox(), box);
|
||||
BoundingBox::Merge(box, Volumes[i]->GetBoundingBox(), box);
|
||||
return box;
|
||||
}
|
||||
|
||||
@@ -55,7 +55,7 @@ NavMeshBoundsVolume* SceneNavigation::FindNavigationBoundsOverlap(const Bounding
|
||||
NavMeshBoundsVolume* result = nullptr;
|
||||
for (int32 i = 0; i < Volumes.Count(); i++)
|
||||
{
|
||||
if (Volumes[i]->GetBox().Intersects(bounds))
|
||||
if (Volumes[i]->GetBoundingBox().Intersects(bounds))
|
||||
{
|
||||
result = Volumes[i];
|
||||
break;
|
||||
|
||||
@@ -184,7 +184,7 @@ void SceneRendering::AddActor(Actor* a, int32& key)
|
||||
auto& e = list[key];
|
||||
e.Actor = a;
|
||||
e.LayerMask = a->GetLayerMask();
|
||||
e.Bounds = a->GetSphere();
|
||||
e.Bounds = a->GetBoundingSphere();
|
||||
e.NoCulling = a->_drawNoCulling;
|
||||
for (auto* listener : _listeners)
|
||||
listener->OnSceneRenderingAddActor(a);
|
||||
@@ -207,7 +207,7 @@ void SceneRendering::UpdateActor(Actor* a, int32& key, ISceneRenderingListener::
|
||||
if (flags & ISceneRenderingListener::Layer)
|
||||
e.LayerMask = a->GetLayerMask();
|
||||
if (flags & ISceneRenderingListener::Bounds)
|
||||
e.Bounds = a->GetSphere();
|
||||
e.Bounds = a->GetBoundingSphere();
|
||||
}
|
||||
}
|
||||
if (lock)
|
||||
|
||||
@@ -251,7 +251,7 @@ struct NavSceneRasterizer
|
||||
return;
|
||||
PROFILE_CPU_NAMED("SphereCollider");
|
||||
|
||||
const BoundingSphere sphere = sphereCollider->GetSphere();
|
||||
const BoundingSphere sphere = sphereCollider->GetBoundingSphere();
|
||||
TriangulateSphere(VertexBuffer, IndexBuffer, sphere);
|
||||
RasterizeTriangles();
|
||||
}
|
||||
@@ -261,7 +261,7 @@ struct NavSceneRasterizer
|
||||
return;
|
||||
PROFILE_CPU_NAMED("CapsuleCollider");
|
||||
|
||||
const BoundingBox box = capsuleCollider->GetBox();
|
||||
const BoundingBox box = capsuleCollider->GetBoundingBox();
|
||||
TriangulateBox(VertexBuffer, IndexBuffer, box);
|
||||
RasterizeTriangles();
|
||||
}
|
||||
@@ -411,7 +411,7 @@ bool GenerateTile(NavMesh* navMesh, NavMeshRuntime* runtime, int32 x, int32 y, B
|
||||
for (Actor* actor : scene->Navigation.Actors)
|
||||
{
|
||||
BoundingBox actorBoxNavMesh;
|
||||
BoundingBox::Transform(actor->GetBox(), rasterizer.WorldToNavMesh, actorBoxNavMesh);
|
||||
BoundingBox::Transform(actor->GetBoundingBox(), rasterizer.WorldToNavMesh, actorBoxNavMesh);
|
||||
if (actorBoxNavMesh.Intersects(rasterizer.TileBoundsNavMesh) &&
|
||||
actor->IsActiveInHierarchy() &&
|
||||
EnumHasAllFlags(actor->GetStaticFlags(), StaticFlags::Navigation))
|
||||
@@ -963,10 +963,10 @@ void BuildDirtyBounds(Scene* scene, NavMesh* navMesh, const BoundingBox& dirtyBo
|
||||
for (const NavMeshBoundsVolume* volume : scene->Navigation.Volumes)
|
||||
{
|
||||
if (!volume->AgentsMask.IsNavMeshSupported(navMesh->Properties) ||
|
||||
!volume->GetBox().Intersects(dirtyBoundsNavMesh))
|
||||
!volume->GetBoundingBox().Intersects(dirtyBoundsNavMesh))
|
||||
continue;
|
||||
auto& bounds = volumes.AddOne();
|
||||
BoundingBox::Transform(volume->GetBox(), worldToNavMesh, bounds);
|
||||
BoundingBox::Transform(volume->GetBoundingBox(), worldToNavMesh, bounds);
|
||||
}
|
||||
|
||||
Array<TileId> unusedTiles;
|
||||
|
||||
@@ -424,7 +424,7 @@ public:
|
||||
void Serialize(SerializeStream& stream, const void* otherObj) override;
|
||||
void Deserialize(DeserializeStream& stream, ISerializeModifier* modifier) override;
|
||||
#if USE_EDITOR
|
||||
BoundingBox GetEditorBox() const override
|
||||
BoundingBox GetEditorBoundingBox() const override
|
||||
{
|
||||
const Vector3 size(50);
|
||||
return BoundingBox(_transform.Translation - size, _transform.Translation + size);
|
||||
|
||||
@@ -1141,7 +1141,7 @@ void Particles::DrawParticles(RenderContextBatch& renderContextBatch, ParticleEf
|
||||
|
||||
// Drawing assumes that all views within a batch have the same Origin
|
||||
const Vector3& viewOrigin = renderContextBatch.GetMainContext().View.Origin;
|
||||
BoundingSphere bounds = effect->GetSphere();
|
||||
BoundingSphere bounds = effect->GetBoundingSphere();
|
||||
bounds.Center -= viewOrigin;
|
||||
|
||||
// Cull particles against all views
|
||||
|
||||
@@ -34,13 +34,13 @@ void BoxCollider::AutoResize(bool globalOrientation = true)
|
||||
// Hacky way to get unrotated bounded box of parent
|
||||
const Quaternion parentOrientation = parent->GetOrientation();
|
||||
parent->SetOrientation(Quaternion::Identity);
|
||||
BoundingBox parentBox = parent->GetBox();
|
||||
BoundingBox parentBox = parent->GetBoundingBox();
|
||||
parent->SetOrientation(parentOrientation);
|
||||
|
||||
for (const Actor* sibling : parent->Children)
|
||||
{
|
||||
if (sibling != this)
|
||||
BoundingBox::Merge(parentBox, sibling->GetBoxWithChildren(), parentBox);
|
||||
BoundingBox::Merge(parentBox, sibling->GetBoundingBoxWithChildren(), parentBox);
|
||||
}
|
||||
const Vector3 parentSize = parentBox.GetSize();
|
||||
const Vector3 parentCenter = parentBox.GetCenter() - parent->GetPosition();
|
||||
|
||||
@@ -216,8 +216,8 @@ struct ClothSettings
|
||||
clothTrans.LocalToWorld(c, c);
|
||||
|
||||
// Setup bounds
|
||||
BoundingBox::FromPoints(boundsCorners, 8, const_cast<BoundingBox&>(Actor->GetBox()));
|
||||
BoundingSphere::FromBox(Actor->GetBox(), const_cast<BoundingSphere&>(Actor->GetSphere()));
|
||||
BoundingBox::FromPoints(boundsCorners, 8, const_cast<BoundingBox&>(Actor->GetBoundingBox()));
|
||||
BoundingSphere::FromBox(Actor->GetBoundingBox(), const_cast<BoundingSphere&>(Actor->GetBoundingSphere()));
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -399,7 +399,7 @@ public:
|
||||
if (GLOBAL_SDF_ACTOR_IS_STATIC(a) && ObjectTypes.Contains(a->GetTypeHandle()))
|
||||
{
|
||||
ScopeWriteLock lock(Locker);
|
||||
OnSceneRenderingDirty(a->GetBox());
|
||||
OnSceneRenderingDirty(a->GetBoundingBox());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -410,7 +410,7 @@ public:
|
||||
ScopeWriteLock lock(Locker);
|
||||
if (flags != DrawModes && flags != Layer && flags != StaticFlags)
|
||||
OnSceneRenderingDirty(BoundingBox::FromSphere(prevBounds));
|
||||
OnSceneRenderingDirty(a->GetBox());
|
||||
OnSceneRenderingDirty(a->GetBoundingBox());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -419,7 +419,7 @@ public:
|
||||
if (GLOBAL_SDF_ACTOR_IS_STATIC(a) && ObjectTypes.Contains(a->GetTypeHandle()))
|
||||
{
|
||||
ScopeWriteLock lock(Locker);
|
||||
OnSceneRenderingDirty(a->GetBox());
|
||||
OnSceneRenderingDirty(a->GetBoundingBox());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -450,7 +450,7 @@ void ProbesRendererService::OnRender(RenderTask* task, GPUContext* context)
|
||||
{
|
||||
auto envProbe = (EnvironmentProbe*)_current.Actor.Get();
|
||||
Vector3 position = envProbe->GetTransform().LocalToWorld(envProbe->CaptureOffset);
|
||||
float radius = (float)envProbe->GetSphere().Radius;
|
||||
float radius = (float)envProbe->GetBoundingSphere().Radius;
|
||||
float nearPlane = Math::Max(METERS_TO_UNITS(0.001f), envProbe->CaptureNearPlane);
|
||||
|
||||
// Adjust far plane distance
|
||||
|
||||
@@ -396,7 +396,7 @@ public:
|
||||
void OnSceneRenderingAddActor(Actor* a) override
|
||||
{
|
||||
if (a->HasStaticFlag(StaticFlags::Shadow))
|
||||
DirtyStaticBounds(a->GetSphere());
|
||||
DirtyStaticBounds(a->GetBoundingSphere());
|
||||
}
|
||||
|
||||
void OnSceneRenderingUpdateActor(Actor* a, const BoundingSphere& prevBounds, UpdateFlags flags) override
|
||||
@@ -405,7 +405,7 @@ public:
|
||||
if (a->HasStaticFlag(StaticFlags::Shadow))
|
||||
{
|
||||
// TODO: skip actors that don't cast shadows (eg. particles)
|
||||
BoundingSphere bounds = a->GetSphere();
|
||||
BoundingSphere bounds = a->GetBoundingSphere();
|
||||
if (bounds != prevBounds)
|
||||
{
|
||||
// Avoid dirtying twice when bounds are close to each other
|
||||
@@ -418,14 +418,14 @@ public:
|
||||
}
|
||||
else if (flags & StaticFlags)
|
||||
{
|
||||
DirtyStaticBounds(a->GetSphere());
|
||||
DirtyStaticBounds(a->GetBoundingSphere());
|
||||
}
|
||||
}
|
||||
|
||||
void OnSceneRenderingRemoveActor(Actor* a) override
|
||||
{
|
||||
if (a->HasStaticFlag(StaticFlags::Shadow))
|
||||
DirtyStaticBounds(a->GetSphere());
|
||||
DirtyStaticBounds(a->GetBoundingSphere());
|
||||
}
|
||||
|
||||
void OnSceneRenderingClear(SceneRendering* scene) override
|
||||
|
||||
@@ -63,7 +63,7 @@ UICanvas::UICanvas(const SpawnParams& params)
|
||||
|
||||
#if USE_EDITOR
|
||||
|
||||
BoundingBox UICanvas::GetEditorBox() const
|
||||
BoundingBox UICanvas::GetEditorBoundingBox() const
|
||||
{
|
||||
const Vector3 size(50);
|
||||
return BoundingBox(_transform.Translation - size, _transform.Translation + size);
|
||||
|
||||
@@ -14,7 +14,7 @@ class FLAXENGINE_API UICanvas : public Actor
|
||||
public:
|
||||
// [Actor]
|
||||
#if USE_EDITOR
|
||||
BoundingBox GetEditorBox() const override;
|
||||
BoundingBox GetEditorBoundingBox() const override;
|
||||
#endif
|
||||
void Serialize(SerializeStream& stream, const void* otherObj) override;
|
||||
void Deserialize(DeserializeStream& stream, ISerializeModifier* modifier) override;
|
||||
|
||||
@@ -60,7 +60,7 @@ UIControl::UIControl(const SpawnParams& params)
|
||||
|
||||
#if USE_EDITOR
|
||||
|
||||
BoundingBox UIControl::GetEditorBox() const
|
||||
BoundingBox UIControl::GetEditorBoundingBox() const
|
||||
{
|
||||
const Vector3 size(50);
|
||||
return BoundingBox(_transform.Translation - size, _transform.Translation + size);
|
||||
|
||||
@@ -18,7 +18,7 @@ private:
|
||||
public:
|
||||
// [Actor]
|
||||
#if USE_EDITOR
|
||||
BoundingBox GetEditorBox() const override;
|
||||
BoundingBox GetEditorBoundingBox() const override;
|
||||
#endif
|
||||
void Serialize(SerializeStream& stream, const void* otherObj) override;
|
||||
void Deserialize(DeserializeStream& stream, ISerializeModifier* modifier) override;
|
||||
|
||||
@@ -241,12 +241,11 @@ private:
|
||||
public:
|
||||
// [Actor]
|
||||
#if USE_EDITOR
|
||||
BoundingBox GetEditorBox() const override
|
||||
BoundingBox GetEditorBoundingBox() const override
|
||||
{
|
||||
const Vector3 size(50);
|
||||
return BoundingBox(_transform.Translation - size, _transform.Translation + size);
|
||||
}
|
||||
|
||||
void OnDebugDrawSelected() override;
|
||||
#endif
|
||||
bool IntersectsItself(const Ray& ray, Real& distance, Vector3& normal) override;
|
||||
|
||||
Reference in New Issue
Block a user