Merge remote-tracking branch 'origin/master' into gi
This commit is contained in:
@@ -26,7 +26,7 @@ class SceneRenderTask;
|
||||
/// </summary>
|
||||
API_CLASS(Abstract) class FLAXENGINE_API Actor : public SceneObject
|
||||
{
|
||||
DECLARE_SCENE_OBJECT(Actor);
|
||||
DECLARE_SCENE_OBJECT(Actor);
|
||||
friend Level;
|
||||
friend PrefabManager;
|
||||
friend Scene;
|
||||
@@ -35,7 +35,6 @@ DECLARE_SCENE_OBJECT(Actor);
|
||||
friend PrefabInstanceData;
|
||||
|
||||
protected:
|
||||
|
||||
int8 _isActive : 1;
|
||||
int8 _isActiveInHierarchy : 1;
|
||||
int8 _isPrefabRoot : 1;
|
||||
@@ -53,13 +52,11 @@ protected:
|
||||
PhysicsScene* _physicsScene;
|
||||
|
||||
private:
|
||||
|
||||
// Disable copying
|
||||
Actor(Actor const&) = delete;
|
||||
Actor& operator=(Actor const&) = delete;
|
||||
|
||||
public:
|
||||
|
||||
/// <summary>
|
||||
/// List with all child actors attached to the actor (readonly). All items are valid (not null).
|
||||
/// </summary>
|
||||
@@ -79,7 +76,6 @@ public:
|
||||
HideFlags HideFlags;
|
||||
|
||||
public:
|
||||
|
||||
/// <summary>
|
||||
/// Gets the object layer (index). Can be used for selective rendering or ignoring raycasts.
|
||||
/// </summary>
|
||||
@@ -164,7 +160,6 @@ public:
|
||||
API_PROPERTY() void SetName(const StringView& value);
|
||||
|
||||
public:
|
||||
|
||||
/// <summary>
|
||||
/// Gets the scene object which contains this actor.
|
||||
/// </summary>
|
||||
@@ -267,7 +262,6 @@ public:
|
||||
API_FUNCTION(Attributes="NoAnimate") void DestroyChildren(float timeLeft = 0.0f);
|
||||
|
||||
public:
|
||||
|
||||
/// <summary>
|
||||
/// Gets amount of scripts.
|
||||
/// </summary>
|
||||
@@ -324,7 +318,6 @@ public:
|
||||
}
|
||||
|
||||
public:
|
||||
|
||||
/// <summary>
|
||||
/// Gets value indicating if actor is active in the scene.
|
||||
/// </summary>
|
||||
@@ -417,7 +410,6 @@ public:
|
||||
}
|
||||
|
||||
public:
|
||||
|
||||
/// <summary>
|
||||
/// Gets the actor's world transformation.
|
||||
/// </summary>
|
||||
@@ -491,7 +483,6 @@ public:
|
||||
API_PROPERTY() void SetRotation(const Matrix& value);
|
||||
|
||||
public:
|
||||
|
||||
/// <summary>
|
||||
/// Gets the random per-instance value (normalized to range 0-1).
|
||||
/// </summary>
|
||||
@@ -517,7 +508,6 @@ public:
|
||||
API_PROPERTY() void SetDirection(const Float3& value);
|
||||
|
||||
public:
|
||||
|
||||
/// <summary>
|
||||
/// Resets the actor local transform.
|
||||
/// </summary>
|
||||
@@ -615,7 +605,6 @@ public:
|
||||
}
|
||||
|
||||
public:
|
||||
|
||||
/// <summary>
|
||||
/// Gets actor bounding sphere that defines 3D space intersecting with the actor (for determination of the visibility for actor).
|
||||
/// </summary>
|
||||
@@ -662,7 +651,6 @@ public:
|
||||
void UnregisterObjectHierarchy();
|
||||
|
||||
public:
|
||||
|
||||
/// <summary>
|
||||
/// Draws this actor. Called by Scene Rendering service. This call is more optimized than generic Draw (eg. geometry is rendered during all pass types but other actors are drawn only during GBufferFill pass).
|
||||
/// </summary>
|
||||
@@ -684,7 +672,6 @@ public:
|
||||
#endif
|
||||
|
||||
public:
|
||||
|
||||
/// <summary>
|
||||
/// Changes the script order.
|
||||
/// </summary>
|
||||
@@ -705,7 +692,6 @@ public:
|
||||
API_PROPERTY() bool IsPrefabRoot() const;
|
||||
|
||||
public:
|
||||
|
||||
/// <summary>
|
||||
/// Tries to find the actor with the given name in this actor hierarchy (checks this actor and all children hierarchy).
|
||||
/// </summary>
|
||||
@@ -806,7 +792,6 @@ public:
|
||||
API_FUNCTION() Quaternion LookingAt(const Vector3& worldPos, const Vector3& worldUp) const;
|
||||
|
||||
public:
|
||||
|
||||
/// <summary>
|
||||
/// Execute custom action on actors tree.
|
||||
/// Action should returns false to stop calling deeper.
|
||||
@@ -843,7 +828,6 @@ public:
|
||||
}
|
||||
|
||||
public:
|
||||
|
||||
/// <summary>
|
||||
/// Performs actors serialization to the raw bytes.
|
||||
/// </summary>
|
||||
@@ -903,7 +887,6 @@ public:
|
||||
API_FUNCTION() void FromJson(const StringAnsiView& json);
|
||||
|
||||
public:
|
||||
|
||||
/// <summary>
|
||||
/// Called when actor gets added to game systems. Occurs on BeginPlay event or when actor gets activated in hierarchy. Use this event to register object to other game system (eg. audio).
|
||||
/// </summary>
|
||||
@@ -985,10 +968,11 @@ public:
|
||||
API_PROPERTY(Attributes="HideInEditor") PhysicsScene* GetPhysicsScene() const;
|
||||
|
||||
protected:
|
||||
virtual void OnPhysicsSceneChanged(PhysicsScene* previous) {}
|
||||
virtual void OnPhysicsSceneChanged(PhysicsScene* previous)
|
||||
{
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
void SetSceneInHierarchy(Scene* scene);
|
||||
void OnEnableInHierarchy();
|
||||
void OnDisableInHierarchy();
|
||||
@@ -998,7 +982,6 @@ private:
|
||||
static bool IsSubClassOf(const Script* object, const MClass* klass);
|
||||
|
||||
public:
|
||||
|
||||
// [ScriptingObject]
|
||||
String ToString() const override;
|
||||
void OnDeleteObject() override;
|
||||
|
||||
@@ -693,9 +693,9 @@ void AnimatedModel::Update()
|
||||
void AnimatedModel::Draw(RenderContext& renderContext)
|
||||
{
|
||||
if (renderContext.View.Pass == DrawPass::GlobalSDF)
|
||||
return; // TODO: Animated Model rendering to Global SDF
|
||||
return; // TODO: Animated Model rendering to Global SDF
|
||||
if (renderContext.View.Pass == DrawPass::GlobalSurfaceAtlas)
|
||||
return; // No supported
|
||||
return; // No supported
|
||||
GEOMETRY_DRAW_STATE_EVENT_BEGIN(_drawState, _world);
|
||||
|
||||
const DrawPass drawModes = (DrawPass)(DrawModes & renderContext.View.Pass & (int32)renderContext.View.GetShadowsDrawPassMask(ShadowsMode));
|
||||
|
||||
@@ -14,10 +14,9 @@
|
||||
/// </summary>
|
||||
API_CLASS() class FLAXENGINE_API AnimatedModel : public ModelInstanceActor
|
||||
{
|
||||
DECLARE_SCENE_OBJECT(AnimatedModel);
|
||||
DECLARE_SCENE_OBJECT(AnimatedModel);
|
||||
friend class AnimationsSystem;
|
||||
public:
|
||||
|
||||
/// <summary>
|
||||
/// Describes the animation graph updates frequency for the animated model.
|
||||
/// </summary>
|
||||
@@ -55,7 +54,6 @@ public:
|
||||
};
|
||||
|
||||
private:
|
||||
|
||||
BoundingBox _boxLocal;
|
||||
Matrix _world;
|
||||
GeometryDrawStateData _drawState;
|
||||
@@ -68,7 +66,6 @@ private:
|
||||
ScriptingObjectReference<AnimatedModel> _masterPose;
|
||||
|
||||
public:
|
||||
|
||||
/// <summary>
|
||||
/// The skinned model asset used for rendering.
|
||||
/// </summary>
|
||||
@@ -154,7 +151,6 @@ public:
|
||||
ScriptingObjectReference<Actor> RootMotionTarget;
|
||||
|
||||
public:
|
||||
|
||||
/// <summary>
|
||||
/// The graph instance data container. For dynamic usage only at runtime, not serialized.
|
||||
/// </summary>
|
||||
@@ -238,7 +234,6 @@ public:
|
||||
API_FUNCTION() void SetMasterPoseModel(AnimatedModel* masterPose);
|
||||
|
||||
public:
|
||||
|
||||
/// <summary>
|
||||
/// Gets the anim graph instance parameters collection.
|
||||
/// </summary>
|
||||
@@ -283,7 +278,6 @@ public:
|
||||
API_FUNCTION() void SetParameterValue(const Guid& id, const Variant& value);
|
||||
|
||||
public:
|
||||
|
||||
/// <summary>
|
||||
/// Gets the weight of the blend shape.
|
||||
/// </summary>
|
||||
@@ -304,7 +298,6 @@ public:
|
||||
API_FUNCTION() void ClearBlendShapeWeights();
|
||||
|
||||
public:
|
||||
|
||||
/// <summary>
|
||||
/// Plays the animation on the slot in Anim Graph.
|
||||
/// </summary>
|
||||
@@ -353,7 +346,6 @@ public:
|
||||
API_FUNCTION() bool IsPlayingSlotAnimation(const StringView& slotName, Animation* anim);
|
||||
|
||||
private:
|
||||
|
||||
void ApplyRootMotion(const RootMotionData& rootMotionDelta);
|
||||
void SyncParameters();
|
||||
|
||||
@@ -372,7 +364,6 @@ private:
|
||||
void OnGraphLoaded();
|
||||
|
||||
public:
|
||||
|
||||
// [ModelInstanceActor]
|
||||
bool HasContentLoaded() const override;
|
||||
void Draw(RenderContext& renderContext) override;
|
||||
@@ -387,7 +378,6 @@ public:
|
||||
bool IntersectsEntry(const Ray& ray, Real& distance, Vector3& normal, int32& entryIndex) override;
|
||||
|
||||
protected:
|
||||
|
||||
// [ModelInstanceActor]
|
||||
void BeginPlay(SceneBeginData* data) override;
|
||||
void EndPlay() override;
|
||||
|
||||
@@ -104,7 +104,7 @@ void BoneSocket::OnParentChanged()
|
||||
{
|
||||
// Base
|
||||
Actor::OnParentChanged();
|
||||
|
||||
|
||||
if (!IsDuringPlay())
|
||||
return;
|
||||
|
||||
|
||||
@@ -9,16 +9,14 @@
|
||||
/// </summary>
|
||||
API_CLASS() class FLAXENGINE_API BoneSocket : public Actor
|
||||
{
|
||||
DECLARE_SCENE_OBJECT(BoneSocket);
|
||||
DECLARE_SCENE_OBJECT(BoneSocket);
|
||||
|
||||
private:
|
||||
|
||||
String _node;
|
||||
int32 _index;
|
||||
bool _useScale;
|
||||
|
||||
public:
|
||||
|
||||
/// <summary>
|
||||
/// Gets the target node name to link to it.
|
||||
/// </summary>
|
||||
@@ -54,7 +52,6 @@ public:
|
||||
void SetUseScale(bool value);
|
||||
|
||||
public:
|
||||
|
||||
/// <summary>
|
||||
/// Updates the actor transformation based on a skeleton node.
|
||||
/// </summary>
|
||||
@@ -62,7 +59,6 @@ public:
|
||||
void UpdateTransformation();
|
||||
|
||||
public:
|
||||
|
||||
// [Actor]
|
||||
#if USE_EDITOR
|
||||
void OnDebugDrawSelected() override;
|
||||
@@ -71,7 +67,6 @@ public:
|
||||
void Deserialize(DeserializeStream& stream, ISerializeModifier* modifier) override;
|
||||
|
||||
protected:
|
||||
|
||||
// [Actor]
|
||||
void OnTransformChanged() override;
|
||||
void OnParentChanged() override;
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
/// </summary>
|
||||
API_STRUCT() struct BrushSurface : ISerializable
|
||||
{
|
||||
DECLARE_SCRIPTING_TYPE_NO_SPAWN(BrushSurface);
|
||||
DECLARE_SCRIPTING_TYPE_NO_SPAWN(BrushSurface);
|
||||
|
||||
/// <summary>
|
||||
/// The parent brush.
|
||||
@@ -57,7 +57,6 @@ DECLARE_SCRIPTING_TYPE_NO_SPAWN(BrushSurface);
|
||||
float ScaleInLightmap = 1.0f;
|
||||
|
||||
public:
|
||||
|
||||
// [ISerializable]
|
||||
void Serialize(SerializeStream& stream, const void* otherObj) override;
|
||||
void Deserialize(DeserializeStream& stream, ISerializeModifier* modifier) override;
|
||||
@@ -68,16 +67,14 @@ public:
|
||||
/// </summary>
|
||||
API_CLASS() class FLAXENGINE_API BoxBrush : public Actor, public CSG::Brush
|
||||
{
|
||||
DECLARE_SCENE_OBJECT(BoxBrush);
|
||||
DECLARE_SCENE_OBJECT(BoxBrush);
|
||||
private:
|
||||
|
||||
Vector3 _center;
|
||||
Vector3 _size;
|
||||
OrientedBoundingBox _bounds;
|
||||
BrushMode _mode;
|
||||
|
||||
public:
|
||||
|
||||
/// <summary>
|
||||
/// Brush surfaces scale in lightmap
|
||||
/// </summary>
|
||||
@@ -161,7 +158,6 @@ public:
|
||||
API_FUNCTION() void SetMaterial(int32 surfaceIndex, MaterialBase* material);
|
||||
|
||||
public:
|
||||
|
||||
/// <summary>
|
||||
/// Gets the volume bounding box (oriented).
|
||||
/// </summary>
|
||||
@@ -191,7 +187,6 @@ public:
|
||||
API_FUNCTION() void GetVertices(int32 surfaceIndex, API_PARAM(Out) Array<Vector3>& outputData) const;
|
||||
|
||||
private:
|
||||
|
||||
FORCE_INLINE void UpdateBounds()
|
||||
{
|
||||
OrientedBoundingBox::CreateCentered(_center, _size, _bounds);
|
||||
@@ -201,7 +196,6 @@ private:
|
||||
}
|
||||
|
||||
public:
|
||||
|
||||
// [Actor]
|
||||
void Serialize(SerializeStream& stream, const void* otherObj) override;
|
||||
void Deserialize(DeserializeStream& stream, ISerializeModifier* modifier) override;
|
||||
@@ -219,7 +213,6 @@ public:
|
||||
int32 GetSurfacesCount() override;
|
||||
|
||||
protected:
|
||||
|
||||
// [Actor]
|
||||
void OnTransformChanged() override;
|
||||
void OnActiveInTreeChanged() override;
|
||||
|
||||
@@ -10,14 +10,12 @@
|
||||
/// </summary>
|
||||
API_CLASS(Abstract) class FLAXENGINE_API BoxVolume : public Actor
|
||||
{
|
||||
DECLARE_SCENE_OBJECT(BoxVolume);
|
||||
DECLARE_SCENE_OBJECT(BoxVolume);
|
||||
protected:
|
||||
|
||||
Vector3 _size;
|
||||
OrientedBoundingBox _bounds;
|
||||
|
||||
public:
|
||||
|
||||
/// <summary>
|
||||
/// Gets the size of the volume (in local space).
|
||||
/// </summary>
|
||||
@@ -41,7 +39,6 @@ public:
|
||||
}
|
||||
|
||||
protected:
|
||||
|
||||
virtual void OnBoundsChanged(const BoundingBox& prevBounds)
|
||||
{
|
||||
}
|
||||
@@ -51,7 +48,6 @@ protected:
|
||||
#endif
|
||||
|
||||
public:
|
||||
|
||||
// [Actor]
|
||||
#if USE_EDITOR
|
||||
void OnDebugDraw() override;
|
||||
@@ -61,7 +57,6 @@ public:
|
||||
void Deserialize(DeserializeStream& stream, ISerializeModifier* modifier) override;
|
||||
|
||||
protected:
|
||||
|
||||
// [Actor]
|
||||
void OnTransformChanged() override;
|
||||
};
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
/// </summary>
|
||||
API_CLASS(Sealed) class FLAXENGINE_API Camera : public Actor
|
||||
{
|
||||
DECLARE_SCENE_OBJECT(Camera);
|
||||
DECLARE_SCENE_OBJECT(Camera);
|
||||
|
||||
// List with all created cameras actors on the scene
|
||||
static Array<Camera*> Cameras;
|
||||
@@ -35,7 +35,6 @@ DECLARE_SCENE_OBJECT(Camera);
|
||||
API_PROPERTY() static Camera* GetMainCamera();
|
||||
|
||||
private:
|
||||
|
||||
Matrix _view, _projection;
|
||||
BoundingFrustum _frustum;
|
||||
|
||||
@@ -56,7 +55,6 @@ private:
|
||||
#endif
|
||||
|
||||
public:
|
||||
|
||||
/// <summary>
|
||||
/// Gets the view matrix.
|
||||
/// </summary>
|
||||
@@ -82,7 +80,6 @@ public:
|
||||
}
|
||||
|
||||
public:
|
||||
|
||||
/// <summary>
|
||||
/// Gets the value indicating if camera should use perspective rendering mode, otherwise it will use orthographic projection.
|
||||
/// </summary>
|
||||
@@ -174,7 +171,6 @@ public:
|
||||
LayersMask RenderLayersMask;
|
||||
|
||||
public:
|
||||
|
||||
/// <summary>
|
||||
/// Projects the point from 3D world-space to game window coordinates (in screen pixels for default viewport calculated from <see cref="Viewport"/>).
|
||||
/// </summary>
|
||||
@@ -231,14 +227,12 @@ public:
|
||||
#endif
|
||||
|
||||
private:
|
||||
|
||||
#if USE_EDITOR
|
||||
void OnPreviewModelLoaded();
|
||||
#endif
|
||||
void UpdateCache();
|
||||
|
||||
public:
|
||||
|
||||
// [Actor]
|
||||
#if USE_EDITOR
|
||||
BoundingBox GetEditorBox() const override;
|
||||
@@ -250,7 +244,6 @@ public:
|
||||
void Deserialize(DeserializeStream& stream, ISerializeModifier* modifier) override;
|
||||
|
||||
protected:
|
||||
|
||||
// [Actor]
|
||||
void OnEnable() override;
|
||||
void OnDisable() override;
|
||||
|
||||
@@ -12,16 +12,14 @@
|
||||
/// </summary>
|
||||
API_CLASS() class FLAXENGINE_API Decal : public Actor
|
||||
{
|
||||
DECLARE_SCENE_OBJECT(Decal);
|
||||
DECLARE_SCENE_OBJECT(Decal);
|
||||
private:
|
||||
|
||||
Vector3 _size;
|
||||
OrientedBoundingBox _bounds;
|
||||
Matrix _world;
|
||||
int32 _sceneRenderingKey = -1;
|
||||
|
||||
public:
|
||||
|
||||
/// <summary>
|
||||
/// The decal material. Must have domain mode to Decal type.
|
||||
/// </summary>
|
||||
@@ -56,7 +54,6 @@ public:
|
||||
API_PROPERTY() void SetSize(const Vector3& value);
|
||||
|
||||
public:
|
||||
|
||||
/// <summary>
|
||||
/// Utility to crate a new virtual Material Instance asset, set its parent to the currently applied material, and assign it to the decal. Can be used to modify the decal material parameters from code.
|
||||
/// </summary>
|
||||
@@ -73,7 +70,6 @@ public:
|
||||
}
|
||||
|
||||
public:
|
||||
|
||||
// [Actor]
|
||||
#if USE_EDITOR
|
||||
void OnDebugDrawSelected() override;
|
||||
@@ -86,7 +82,6 @@ public:
|
||||
bool IntersectsItself(const Ray& ray, Real& distance, Vector3& normal) override;
|
||||
|
||||
protected:
|
||||
|
||||
// [Actor]
|
||||
void OnEnable() override;
|
||||
void OnDisable() override;
|
||||
|
||||
@@ -9,16 +9,14 @@
|
||||
/// </summary>
|
||||
API_CLASS() class FLAXENGINE_API EmptyActor : public Actor
|
||||
{
|
||||
DECLARE_SCENE_OBJECT(EmptyActor);
|
||||
DECLARE_SCENE_OBJECT(EmptyActor);
|
||||
public:
|
||||
|
||||
// [Actor]
|
||||
#if USE_EDITOR
|
||||
BoundingBox GetEditorBox() const override;
|
||||
#endif
|
||||
|
||||
protected:
|
||||
|
||||
// [Actor]
|
||||
void OnTransformChanged() override;
|
||||
};
|
||||
|
||||
@@ -11,16 +11,14 @@
|
||||
/// </summary>
|
||||
API_CLASS() class FLAXENGINE_API EnvironmentProbe : public Actor
|
||||
{
|
||||
DECLARE_SCENE_OBJECT(EnvironmentProbe);
|
||||
DECLARE_SCENE_OBJECT(EnvironmentProbe);
|
||||
private:
|
||||
|
||||
float _radius;
|
||||
bool _isUsingCustomProbe;
|
||||
int32 _sceneRenderingKey = -1;
|
||||
AssetReference<CubeTexture> _probe;
|
||||
|
||||
public:
|
||||
|
||||
/// <summary>
|
||||
/// The reflections brightness.
|
||||
/// </summary>
|
||||
@@ -40,7 +38,6 @@ public:
|
||||
float CaptureNearPlane = 10.0f;
|
||||
|
||||
public:
|
||||
|
||||
/// <summary>
|
||||
/// Gets the probe radius.
|
||||
/// </summary>
|
||||
@@ -108,7 +105,6 @@ public:
|
||||
API_PROPERTY() void SetCustomProbe(CubeTexture* probe);
|
||||
|
||||
public:
|
||||
|
||||
/// <summary>
|
||||
/// Bakes that probe. It won't be performed now but on async graphics rendering task.
|
||||
/// </summary>
|
||||
@@ -122,11 +118,9 @@ public:
|
||||
void SetProbeData(TextureData& data);
|
||||
|
||||
private:
|
||||
|
||||
void UpdateBounds();
|
||||
|
||||
public:
|
||||
|
||||
// [Actor]
|
||||
#if USE_EDITOR
|
||||
BoundingBox GetEditorBox() const override
|
||||
@@ -146,7 +140,6 @@ public:
|
||||
bool IntersectsItself(const Ray& ray, Real& distance, Vector3& normal) override;
|
||||
|
||||
protected:
|
||||
|
||||
// [Actor]
|
||||
void OnEnable() override;
|
||||
void OnDisable() override;
|
||||
|
||||
@@ -33,10 +33,10 @@ void ExponentialHeightFog::Draw(RenderContext& renderContext)
|
||||
{
|
||||
// Render only when shader is valid and fog can be rendered
|
||||
// Do not render exponential fog in orthographic views
|
||||
if ((renderContext.View.Flags & ViewFlags::Fog) != 0
|
||||
if ((renderContext.View.Flags & ViewFlags::Fog) != 0
|
||||
&& renderContext.View.Pass & DrawPass::GBuffer
|
||||
&& _shader
|
||||
&& _shader->IsLoaded()
|
||||
&& _shader
|
||||
&& _shader->IsLoaded()
|
||||
&& renderContext.View.IsPerspectiveProjection())
|
||||
{
|
||||
// Prepare
|
||||
|
||||
@@ -11,9 +11,8 @@
|
||||
/// </summary>
|
||||
API_CLASS(Abstract) class FLAXENGINE_API Light : public Actor
|
||||
{
|
||||
DECLARE_SCENE_OBJECT_ABSTRACT(Light);
|
||||
DECLARE_SCENE_OBJECT_ABSTRACT(Light);
|
||||
public:
|
||||
|
||||
/// <summary>
|
||||
/// Color of the light
|
||||
/// </summary>
|
||||
@@ -51,12 +50,10 @@ public:
|
||||
bool CastVolumetricShadow = true;
|
||||
|
||||
protected:
|
||||
|
||||
// Adjust the light brightness used during rendering (called by light types inside SetupLightData callback)
|
||||
void AdjustBrightness(const RenderView& view, float& brightness) const;
|
||||
|
||||
public:
|
||||
|
||||
// [Actor]
|
||||
#if USE_EDITOR
|
||||
BoundingBox GetEditorBox() const override
|
||||
@@ -74,9 +71,8 @@ public:
|
||||
/// </summary>
|
||||
API_CLASS(Abstract) class FLAXENGINE_API LightWithShadow : public Light
|
||||
{
|
||||
DECLARE_SCENE_OBJECT_ABSTRACT(LightWithShadow);
|
||||
DECLARE_SCENE_OBJECT_ABSTRACT(LightWithShadow);
|
||||
public:
|
||||
|
||||
/// <summary>
|
||||
/// The minimum roughness value used to clamp material surface roughness during shading pixel.
|
||||
/// </summary>
|
||||
@@ -132,7 +128,6 @@ public:
|
||||
ShadowsCastingMode ShadowsMode = ShadowsCastingMode::All;
|
||||
|
||||
public:
|
||||
|
||||
// [Light]
|
||||
void Serialize(SerializeStream& stream, const void* otherObj) override;
|
||||
void Deserialize(DeserializeStream& stream, ISerializeModifier* modifier) override;
|
||||
|
||||
@@ -11,13 +11,11 @@
|
||||
/// <seealso cref="Actor" />
|
||||
API_CLASS(Abstract) class FLAXENGINE_API ModelInstanceActor : public Actor
|
||||
{
|
||||
DECLARE_SCENE_OBJECT_ABSTRACT(ModelInstanceActor);
|
||||
DECLARE_SCENE_OBJECT_ABSTRACT(ModelInstanceActor);
|
||||
protected:
|
||||
|
||||
int32 _sceneRenderingKey = -1;
|
||||
|
||||
public:
|
||||
|
||||
/// <summary>
|
||||
/// The model instance buffer.
|
||||
/// </summary>
|
||||
@@ -84,12 +82,10 @@ public:
|
||||
}
|
||||
|
||||
public:
|
||||
|
||||
// [Actor]
|
||||
void OnLayerChanged() override;
|
||||
|
||||
protected:
|
||||
|
||||
// [Actor]
|
||||
void OnEnable() override;
|
||||
void OnDisable() override;
|
||||
|
||||
@@ -11,16 +11,14 @@
|
||||
/// </summary>
|
||||
API_CLASS() class FLAXENGINE_API PostFxVolume : public BoxVolume, public IPostFxSettingsProvider
|
||||
{
|
||||
DECLARE_SCENE_OBJECT(PostFxVolume);
|
||||
DECLARE_SCENE_OBJECT(PostFxVolume);
|
||||
private:
|
||||
|
||||
int32 _priority;
|
||||
float _blendRadius;
|
||||
float _blendWeight;
|
||||
bool _isBounded;
|
||||
|
||||
public:
|
||||
|
||||
/// <summary>
|
||||
/// The ambient occlusion effect settings.
|
||||
/// </summary>
|
||||
@@ -100,7 +98,6 @@ public:
|
||||
PostFxMaterialsSettings PostFxMaterials;
|
||||
|
||||
public:
|
||||
|
||||
/// <summary>
|
||||
/// Gets the order in which multiple volumes are blended together.
|
||||
/// The volume with the highest priority takes precedence over all other overlapping volumes.
|
||||
@@ -184,7 +181,6 @@ public:
|
||||
}
|
||||
|
||||
public:
|
||||
|
||||
/// <summary>
|
||||
/// Adds the post fx material to the settings.
|
||||
/// </summary>
|
||||
@@ -198,7 +194,6 @@ public:
|
||||
API_FUNCTION() void RemovePostFxMaterial(MaterialBase* material);
|
||||
|
||||
public:
|
||||
|
||||
// [BoxVolume]
|
||||
bool HasContentLoaded() const override;
|
||||
void Serialize(SerializeStream& stream, const void* otherObj) override;
|
||||
@@ -209,7 +204,6 @@ public:
|
||||
void Blend(PostProcessSettings& other, float weight) override;
|
||||
|
||||
protected:
|
||||
|
||||
// [BoxVolume]
|
||||
void OnEnable() override;
|
||||
void OnDisable() override;
|
||||
|
||||
@@ -10,15 +10,13 @@
|
||||
/// </summary>
|
||||
API_CLASS() class FLAXENGINE_API Ragdoll : public Actor
|
||||
{
|
||||
DECLARE_SCENE_OBJECT(Ragdoll);
|
||||
API_AUTO_SERIALIZATION();
|
||||
DECLARE_SCENE_OBJECT(Ragdoll);
|
||||
API_AUTO_SERIALIZATION();
|
||||
private:
|
||||
|
||||
AnimatedModel* _animatedModel = nullptr;
|
||||
Dictionary<RigidBody*, Transform> _bonesOffsets;
|
||||
|
||||
public:
|
||||
|
||||
/// <summary>
|
||||
/// The default bones weight where 0 means fully animated bone and 1 means fully simulate bones. Can be used to control all bones simulation mode but is overriden by per-bone BonesWeights.
|
||||
/// </summary>
|
||||
@@ -53,7 +51,6 @@ public:
|
||||
float MaxDepenetrationVelocity = MAX_float;
|
||||
|
||||
public:
|
||||
|
||||
/// <summary>
|
||||
/// Calculates the total mass of all ragdoll bodies.
|
||||
/// </summary>
|
||||
@@ -70,13 +67,11 @@ public:
|
||||
API_FUNCTION() void SetAngularVelocity(const Vector3& value) const;
|
||||
|
||||
private:
|
||||
|
||||
float InitBone(RigidBody* rigidBody, int32& nodeIndex, Transform& localPose);
|
||||
void OnFixedUpdate();
|
||||
void OnAnimationUpdating(struct AnimGraphImpulse* localPose);
|
||||
|
||||
public:
|
||||
|
||||
// [Actor]
|
||||
void OnEnable() override;
|
||||
void OnDisable() override;
|
||||
|
||||
@@ -156,7 +156,7 @@ float Spline::GetSplineLength() const
|
||||
Vector3 prevPoint = Vector3::Zero;
|
||||
for (int32 i = 1; i < Curve.GetKeyframes().Count(); i++)
|
||||
{
|
||||
const auto& a = Curve[i = 1];
|
||||
const auto& a = Curve[i - 1];
|
||||
const auto& b = Curve[i];
|
||||
|
||||
const float length = Math::Abs(b.Time - a.Time);
|
||||
|
||||
@@ -10,15 +10,13 @@
|
||||
/// </summary>
|
||||
API_CLASS() class FLAXENGINE_API Spline : public Actor
|
||||
{
|
||||
DECLARE_SCENE_OBJECT(Spline);
|
||||
DECLARE_SCENE_OBJECT(Spline);
|
||||
typedef BezierCurveKeyframe<Transform> Keyframe;
|
||||
private:
|
||||
|
||||
bool _loop = false;
|
||||
BoundingBox _localBounds;
|
||||
|
||||
public:
|
||||
|
||||
/// <summary>
|
||||
/// The spline bezier curve points represented as series of transformations in 3D space (with tangents). Points are stored in local-space of the actor.
|
||||
/// </summary>
|
||||
@@ -37,7 +35,6 @@ public:
|
||||
API_PROPERTY() void SetIsLoop(bool value);
|
||||
|
||||
public:
|
||||
|
||||
/// <summary>
|
||||
/// Evaluates the spline curve at the given time and calculates the point location in 3D (world-space).
|
||||
/// </summary>
|
||||
@@ -215,7 +212,6 @@ public:
|
||||
API_FUNCTION() void GetSplineLocalPoints(API_PARAM(Out) Array<Transform>& points) const;
|
||||
|
||||
public:
|
||||
|
||||
/// <summary>
|
||||
/// Clears the spline to be empty.
|
||||
/// </summary>
|
||||
@@ -345,7 +341,6 @@ public:
|
||||
API_FUNCTION() void SetTangentsSmooth();
|
||||
|
||||
public:
|
||||
|
||||
/// <summary>
|
||||
/// Called when spline gets updated (eg. after curve modification).
|
||||
/// </summary>
|
||||
@@ -357,7 +352,6 @@ public:
|
||||
API_FUNCTION() virtual void UpdateSpline();
|
||||
|
||||
protected:
|
||||
|
||||
#if USE_EDITOR
|
||||
virtual Color GetSplineColor()
|
||||
{
|
||||
@@ -366,7 +360,6 @@ protected:
|
||||
#endif
|
||||
|
||||
private:
|
||||
|
||||
// Internal bindings
|
||||
#if !COMPILE_WITHOUT_CSHARP
|
||||
API_FUNCTION(NoProxy) void GetKeyframes(MonoArray* data);
|
||||
@@ -374,7 +367,6 @@ private:
|
||||
#endif
|
||||
|
||||
public:
|
||||
|
||||
// [Actor]
|
||||
#if USE_EDITOR
|
||||
void OnDebugDraw() override;
|
||||
|
||||
@@ -351,9 +351,9 @@ void SplineModel::Draw(RenderContext& renderContext)
|
||||
return;
|
||||
auto model = Model.Get();
|
||||
if (renderContext.View.Pass == DrawPass::GlobalSDF)
|
||||
return; // TODO: Spline Model rendering to Global SDF
|
||||
return; // TODO: Spline Model rendering to Global SDF
|
||||
if (renderContext.View.Pass == DrawPass::GlobalSurfaceAtlas)
|
||||
return; // TODO: Spline Model rendering to Global Surface Atlas
|
||||
return; // TODO: Spline Model rendering to Global Surface Atlas
|
||||
if (!Entries.IsValidFor(model))
|
||||
Entries.Setup(model);
|
||||
|
||||
|
||||
@@ -12,9 +12,8 @@ class Spline;
|
||||
/// </summary>
|
||||
API_CLASS() class FLAXENGINE_API SplineModel : public ModelInstanceActor
|
||||
{
|
||||
DECLARE_SCENE_OBJECT(SplineModel);
|
||||
DECLARE_SCENE_OBJECT(SplineModel);
|
||||
private:
|
||||
|
||||
struct Instance
|
||||
{
|
||||
BoundingSphere Sphere;
|
||||
@@ -33,7 +32,6 @@ private:
|
||||
float _chunksPerSegment, _meshMinZ, _meshMaxZ;
|
||||
|
||||
public:
|
||||
|
||||
~SplineModel();
|
||||
|
||||
/// <summary>
|
||||
@@ -104,14 +102,12 @@ public:
|
||||
API_PROPERTY() void SetForcedLOD(int32 value);
|
||||
|
||||
private:
|
||||
|
||||
void OnModelChanged();
|
||||
void OnModelLoaded();
|
||||
void OnSplineUpdated();
|
||||
void UpdateDeformationBuffer();
|
||||
|
||||
public:
|
||||
|
||||
// [ModelInstanceActor]
|
||||
bool HasContentLoaded() const override;
|
||||
void Draw(RenderContext& renderContext) override;
|
||||
@@ -121,7 +117,6 @@ public:
|
||||
void OnParentChanged() override;
|
||||
|
||||
protected:
|
||||
|
||||
// [ModelInstanceActor]
|
||||
void OnTransformChanged() override;
|
||||
void OnActiveInTreeChanged() override;
|
||||
|
||||
@@ -11,9 +11,8 @@
|
||||
/// </summary>
|
||||
API_CLASS() class FLAXENGINE_API SpotLight : public LightWithShadow
|
||||
{
|
||||
DECLARE_SCENE_OBJECT(SpotLight);
|
||||
DECLARE_SCENE_OBJECT(SpotLight);
|
||||
private:
|
||||
|
||||
Vector3 _direction;
|
||||
float _radius;
|
||||
float _outerConeAngle;
|
||||
@@ -24,7 +23,6 @@ private:
|
||||
int32 _sceneRenderingKey = -1;
|
||||
|
||||
public:
|
||||
|
||||
/// <summary>
|
||||
/// Light source bulb radius
|
||||
/// </summary>
|
||||
@@ -62,7 +60,6 @@ public:
|
||||
float IESBrightnessScale = 1.0f;
|
||||
|
||||
public:
|
||||
|
||||
/// <summary>
|
||||
/// Computes light brightness value
|
||||
/// </summary>
|
||||
@@ -122,11 +119,9 @@ public:
|
||||
API_PROPERTY() void SetInnerConeAngle(float value);
|
||||
|
||||
private:
|
||||
|
||||
void UpdateBounds();
|
||||
|
||||
public:
|
||||
|
||||
// [LightWithShadow]
|
||||
void Draw(RenderContext& renderContext) override;
|
||||
#if USE_EDITOR
|
||||
@@ -138,7 +133,6 @@ public:
|
||||
bool IntersectsItself(const Ray& ray, Real& distance, Vector3& normal) override;
|
||||
|
||||
protected:
|
||||
|
||||
// [LightWithShadow]
|
||||
void OnEnable() override;
|
||||
void OnDisable() override;
|
||||
|
||||
@@ -12,9 +12,8 @@
|
||||
/// </summary>
|
||||
API_CLASS() class FLAXENGINE_API StaticModel : public ModelInstanceActor
|
||||
{
|
||||
DECLARE_SCENE_OBJECT(StaticModel);
|
||||
DECLARE_SCENE_OBJECT(StaticModel);
|
||||
private:
|
||||
|
||||
Matrix _world;
|
||||
GeometryDrawStateData _drawState;
|
||||
float _scaleInLightmap;
|
||||
@@ -28,7 +27,6 @@ private:
|
||||
Model* _residencyChangedModel = nullptr;
|
||||
|
||||
public:
|
||||
|
||||
/// <summary>
|
||||
/// Finalizes an instance of the <see cref="StaticModel"/> class.
|
||||
/// </summary>
|
||||
@@ -52,7 +50,6 @@ public:
|
||||
LightmapEntry Lightmap;
|
||||
|
||||
public:
|
||||
|
||||
/// <summary>
|
||||
/// Gets the model world matrix transform.
|
||||
/// </summary>
|
||||
@@ -180,14 +177,12 @@ public:
|
||||
API_FUNCTION() void RemoveVertexColors();
|
||||
|
||||
private:
|
||||
|
||||
void OnModelChanged();
|
||||
void OnModelLoaded();
|
||||
void OnModelResidencyChanged();
|
||||
void UpdateBounds();
|
||||
|
||||
public:
|
||||
|
||||
// [ModelInstanceActor]
|
||||
bool HasContentLoaded() const override;
|
||||
void Draw(RenderContext& renderContext) override;
|
||||
@@ -198,7 +193,6 @@ public:
|
||||
bool IntersectsEntry(const Ray& ray, Real& distance, Vector3& normal, int32& entryIndex) override;
|
||||
|
||||
protected:
|
||||
|
||||
// [ModelInstanceActor]
|
||||
void OnTransformChanged() override;
|
||||
void OnEnable() override;
|
||||
|
||||
@@ -12,13 +12,11 @@
|
||||
class ActorsCache
|
||||
{
|
||||
public:
|
||||
|
||||
typedef ActorsLookup ActorsLookupType;
|
||||
typedef Array<Actor*> ActorsListType;
|
||||
typedef Array<SceneObject*> SceneObjectsListType;
|
||||
|
||||
public:
|
||||
|
||||
/// <summary>
|
||||
/// Gets the actors lookup cached. Safe allocation, per thread, uses caching.
|
||||
/// </summary>
|
||||
|
||||
@@ -59,7 +59,6 @@ enum class SceneEventType
|
||||
class SceneAction
|
||||
{
|
||||
public:
|
||||
|
||||
virtual ~SceneAction()
|
||||
{
|
||||
}
|
||||
@@ -113,7 +112,6 @@ using namespace LevelImpl;
|
||||
class LevelService : public EngineService
|
||||
{
|
||||
public:
|
||||
|
||||
LevelService()
|
||||
: EngineService(TEXT("Scene Manager"), 30)
|
||||
{
|
||||
@@ -401,7 +399,6 @@ void Level::CollectPostFxVolumes(RenderContext& renderContext)
|
||||
class LoadSceneAction : public SceneAction
|
||||
{
|
||||
public:
|
||||
|
||||
Guid SceneId;
|
||||
AssetReference<JsonAsset> SceneAsset;
|
||||
|
||||
@@ -444,7 +441,6 @@ public:
|
||||
class UnloadSceneAction : public SceneAction
|
||||
{
|
||||
public:
|
||||
|
||||
Guid TargetScene;
|
||||
|
||||
UnloadSceneAction(Scene* scene)
|
||||
@@ -464,7 +460,6 @@ public:
|
||||
class UnloadScenesAction : public SceneAction
|
||||
{
|
||||
public:
|
||||
|
||||
UnloadScenesAction()
|
||||
{
|
||||
}
|
||||
@@ -478,7 +473,6 @@ public:
|
||||
class SaveSceneAction : public SceneAction
|
||||
{
|
||||
public:
|
||||
|
||||
Scene* TargetScene;
|
||||
bool PrettyJson;
|
||||
|
||||
@@ -504,7 +498,6 @@ public:
|
||||
class ReloadScriptsAction : public SceneAction
|
||||
{
|
||||
public:
|
||||
|
||||
ReloadScriptsAction()
|
||||
{
|
||||
}
|
||||
@@ -655,7 +648,6 @@ void Level::ScriptsReloadRegisterObject(ScriptingObject*& obj)
|
||||
class SpawnActorAction : public SceneAction
|
||||
{
|
||||
public:
|
||||
|
||||
ScriptingObjectReference<Actor> TargetActor;
|
||||
ScriptingObjectReference<Actor> ParentActor;
|
||||
|
||||
@@ -674,7 +666,6 @@ public:
|
||||
class DeleteActorAction : public SceneAction
|
||||
{
|
||||
public:
|
||||
|
||||
ScriptingObjectReference<Actor> TargetActor;
|
||||
|
||||
DeleteActorAction(Actor* actor)
|
||||
|
||||
@@ -21,7 +21,7 @@ struct RenderContext;
|
||||
/// </summary>
|
||||
API_CLASS(Static) class FLAXENGINE_API Level
|
||||
{
|
||||
DECLARE_SCRIPTING_TYPE_NO_SPAWN(Level);
|
||||
DECLARE_SCRIPTING_TYPE_NO_SPAWN(Level);
|
||||
friend Engine;
|
||||
friend Actor;
|
||||
friend PrefabManager;
|
||||
@@ -33,7 +33,6 @@ DECLARE_SCRIPTING_TYPE_NO_SPAWN(Level);
|
||||
#endif
|
||||
|
||||
public:
|
||||
|
||||
/// <summary>
|
||||
/// The scenes collection lock.
|
||||
/// </summary>
|
||||
@@ -45,7 +44,6 @@ public:
|
||||
API_FIELD(ReadOnly) static Array<Scene*> Scenes;
|
||||
|
||||
public:
|
||||
|
||||
/// <summary>
|
||||
/// Occurs when new actor gets spawned to the game.
|
||||
/// </summary>
|
||||
@@ -77,7 +75,6 @@ public:
|
||||
API_EVENT() static Delegate<Actor*> ActorActiveChanged;
|
||||
|
||||
public:
|
||||
|
||||
/// <summary>
|
||||
/// Checks if any scene has been loaded. Loaded scene means deserialized and added to the scenes collection.
|
||||
/// </summary>
|
||||
@@ -124,7 +121,6 @@ public:
|
||||
}
|
||||
|
||||
public:
|
||||
|
||||
/// <summary>
|
||||
/// Spawn actor on the scene
|
||||
/// </summary>
|
||||
@@ -160,7 +156,6 @@ public:
|
||||
static void CallBeginPlay(Actor* obj);
|
||||
|
||||
public:
|
||||
|
||||
/// <summary>
|
||||
/// Draws all the actors.
|
||||
/// </summary>
|
||||
@@ -174,7 +169,6 @@ public:
|
||||
static void CollectPostFxVolumes(RenderContext& renderContext);
|
||||
|
||||
public:
|
||||
|
||||
/// <summary>
|
||||
/// Fired when scene starts saving.
|
||||
/// </summary>
|
||||
@@ -246,7 +240,6 @@ public:
|
||||
#endif
|
||||
|
||||
public:
|
||||
|
||||
/// <summary>
|
||||
/// Saves scene to the asset.
|
||||
/// </summary>
|
||||
@@ -342,7 +335,6 @@ public:
|
||||
#endif
|
||||
|
||||
public:
|
||||
|
||||
/// <summary>
|
||||
/// Tries to find actor with the given ID. It's very fast O(1) lookup.
|
||||
/// </summary>
|
||||
@@ -413,7 +405,6 @@ public:
|
||||
API_FUNCTION() static Scene* FindScene(const Guid& id);
|
||||
|
||||
public:
|
||||
|
||||
/// <summary>
|
||||
/// Gets the scenes.
|
||||
/// </summary>
|
||||
@@ -433,7 +424,6 @@ public:
|
||||
static void GetScenes(Array<Guid>& scenes);
|
||||
|
||||
public:
|
||||
|
||||
/// <summary>
|
||||
/// Construct valid and solid list with actors from input list with whole tree for them (valid for fast serialization)
|
||||
/// </summary>
|
||||
@@ -449,7 +439,6 @@ public:
|
||||
static void ConstructParentActorsTreeList(const Array<Actor*>& input, Array<Actor*>& output);
|
||||
|
||||
public:
|
||||
|
||||
/// <summary>
|
||||
/// The tags names.
|
||||
/// </summary>
|
||||
@@ -479,7 +468,6 @@ public:
|
||||
API_FUNCTION() static int32 GetLayerIndex(const StringView& layer);
|
||||
|
||||
private:
|
||||
|
||||
// Actor API
|
||||
enum class ActorEventType
|
||||
{
|
||||
|
||||
@@ -14,7 +14,6 @@ class SceneLightmapsData;
|
||||
class Lightmap
|
||||
{
|
||||
private:
|
||||
|
||||
SceneLightmapsData* _manager;
|
||||
int32 _index;
|
||||
#if USE_EDITOR
|
||||
@@ -23,7 +22,6 @@ private:
|
||||
AssetReference<Texture> _textures[3];
|
||||
|
||||
public:
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="Lightmap"/> class.
|
||||
/// </summary>
|
||||
@@ -33,7 +31,6 @@ public:
|
||||
Lightmap(SceneLightmapsData* manager, int32 index, const SavedLightmapInfo& info);
|
||||
|
||||
public:
|
||||
|
||||
/// <summary>
|
||||
/// Gets attached texture objects
|
||||
/// </summary>
|
||||
@@ -99,7 +96,6 @@ public:
|
||||
bool IsReady() const;
|
||||
|
||||
private:
|
||||
|
||||
#if USE_EDITOR
|
||||
bool OnInitLightmap(class TextureData& image);
|
||||
#endif
|
||||
|
||||
@@ -19,7 +19,7 @@ API_CLASS() class FLAXENGINE_API Scene : public Actor
|
||||
{
|
||||
friend class Level;
|
||||
friend class ReloadScriptsAction;
|
||||
DECLARE_SCENE_OBJECT(Scene);
|
||||
DECLARE_SCENE_OBJECT(Scene);
|
||||
|
||||
/// <summary>
|
||||
/// Finalizes an instance of the <see cref="Scene"/> class.
|
||||
@@ -27,7 +27,6 @@ DECLARE_SCENE_OBJECT(Scene);
|
||||
~Scene();
|
||||
|
||||
public:
|
||||
|
||||
/// <summary>
|
||||
/// The scene metadata.
|
||||
/// </summary>
|
||||
@@ -80,7 +79,6 @@ public:
|
||||
API_PROPERTY() void SetLightmapSettings(const LightmapSettings& value);
|
||||
|
||||
public:
|
||||
|
||||
/// <summary>
|
||||
/// Removes all baked lightmap textures from the scene.
|
||||
/// </summary>
|
||||
@@ -120,7 +118,6 @@ public:
|
||||
#endif
|
||||
|
||||
private:
|
||||
|
||||
MeshCollider* TryGetCsgCollider();
|
||||
StaticModel* TryGetCsgModel();
|
||||
void CreateCsgCollider();
|
||||
@@ -132,7 +129,6 @@ private:
|
||||
#endif
|
||||
|
||||
public:
|
||||
|
||||
// [Actor]
|
||||
void Serialize(SerializeStream& stream, const void* otherObj) override;
|
||||
void Deserialize(DeserializeStream& stream, ISerializeModifier* modifier) override;
|
||||
@@ -140,7 +136,6 @@ public:
|
||||
void EndPlay() override;
|
||||
|
||||
protected:
|
||||
|
||||
// [Actor]
|
||||
void PostLoad() override;
|
||||
void PostSpawn() override;
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
/// </summary>
|
||||
API_CLASS(NoSpawn) class SceneAsset : public JsonAsset
|
||||
{
|
||||
DECLARE_ASSET_HEADER(SceneAsset);
|
||||
DECLARE_ASSET_HEADER(SceneAsset);
|
||||
protected:
|
||||
bool IsInternalType() const override;
|
||||
};
|
||||
|
||||
@@ -20,11 +20,9 @@ namespace CSG
|
||||
class SceneCSGData : public ISerializable
|
||||
{
|
||||
private:
|
||||
|
||||
Scene* _scene;
|
||||
|
||||
public:
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="SceneCSGData"/> class.
|
||||
/// </summary>
|
||||
@@ -32,7 +30,6 @@ namespace CSG
|
||||
SceneCSGData(Scene* scene);
|
||||
|
||||
public:
|
||||
|
||||
/// <summary>
|
||||
/// CSG mesh building action time (registered by CSG::Builder, in UTC format). Invalid if not build by active engine instance.
|
||||
/// </summary>
|
||||
@@ -64,7 +61,6 @@ namespace CSG
|
||||
Action PostCSGBuild;
|
||||
|
||||
public:
|
||||
|
||||
/// <summary>
|
||||
/// Build CSG geometry for the given scene.
|
||||
/// </summary>
|
||||
@@ -77,7 +73,6 @@ namespace CSG
|
||||
bool HasData() const;
|
||||
|
||||
public:
|
||||
|
||||
struct SurfaceData
|
||||
{
|
||||
Array<Triangle> Triangles;
|
||||
@@ -95,11 +90,9 @@ namespace CSG
|
||||
bool TryGetSurfaceData(const Guid& brushId, int32 brushSurfaceIndex, SurfaceData& outData);
|
||||
|
||||
private:
|
||||
|
||||
void OnDataChanged();
|
||||
|
||||
public:
|
||||
|
||||
// [ISerializable]
|
||||
void Serialize(SerializeStream& stream, const void* otherObj) override;
|
||||
void Deserialize(DeserializeStream& stream, ISerializeModifier* modifier) override;
|
||||
|
||||
@@ -13,12 +13,10 @@ class Lightmap;
|
||||
class SceneLightmapsData
|
||||
{
|
||||
private:
|
||||
|
||||
Array<Lightmap*> _lightmaps;
|
||||
Scene* _scene;
|
||||
|
||||
public:
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="StaticLightManager"/> class.
|
||||
/// </summary>
|
||||
@@ -31,7 +29,6 @@ public:
|
||||
~SceneLightmapsData();
|
||||
|
||||
public:
|
||||
|
||||
FORCE_INLINE Scene* GetScene() const
|
||||
{
|
||||
return _scene;
|
||||
@@ -64,7 +61,6 @@ public:
|
||||
}
|
||||
|
||||
public:
|
||||
|
||||
#if USE_EDITOR
|
||||
|
||||
/// <summary>
|
||||
@@ -84,7 +80,6 @@ public:
|
||||
#endif
|
||||
|
||||
public:
|
||||
|
||||
/// <summary>
|
||||
/// Clear baked lightmaps data
|
||||
/// </summary>
|
||||
|
||||
@@ -13,7 +13,6 @@ class NavMeshBoundsVolume;
|
||||
class FLAXENGINE_API SceneNavigation
|
||||
{
|
||||
public:
|
||||
|
||||
/// <summary>
|
||||
/// The list of registered navigation bounds volumes (on the scene).
|
||||
/// </summary>
|
||||
|
||||
@@ -11,7 +11,6 @@
|
||||
class FLAXENGINE_API SceneTicking
|
||||
{
|
||||
public:
|
||||
|
||||
/// <summary>
|
||||
/// Tick function type.
|
||||
/// </summary>
|
||||
@@ -48,7 +47,6 @@ public:
|
||||
class FLAXENGINE_API TickData
|
||||
{
|
||||
public:
|
||||
|
||||
Array<Script*> Scripts;
|
||||
Array<Tick> Ticks;
|
||||
#if USE_EDITOR
|
||||
@@ -93,7 +91,6 @@ public:
|
||||
class FLAXENGINE_API FixedUpdateTickData : public TickData
|
||||
{
|
||||
public:
|
||||
|
||||
FixedUpdateTickData();
|
||||
void TickScripts(const Array<Script*>& scripts) override;
|
||||
};
|
||||
@@ -101,7 +98,6 @@ public:
|
||||
class FLAXENGINE_API UpdateTickData : public TickData
|
||||
{
|
||||
public:
|
||||
|
||||
UpdateTickData();
|
||||
void TickScripts(const Array<Script*>& scripts) override;
|
||||
};
|
||||
@@ -109,13 +105,11 @@ public:
|
||||
class FLAXENGINE_API LateUpdateTickData : public TickData
|
||||
{
|
||||
public:
|
||||
|
||||
LateUpdateTickData();
|
||||
void TickScripts(const Array<Script*>& scripts) override;
|
||||
};
|
||||
|
||||
public:
|
||||
|
||||
/// <summary>
|
||||
/// Adds the script to scene ticking system.
|
||||
/// </summary>
|
||||
@@ -134,7 +128,6 @@ public:
|
||||
void Clear();
|
||||
|
||||
public:
|
||||
|
||||
/// <summary>
|
||||
/// The fixed update tick function.
|
||||
/// </summary>
|
||||
|
||||
@@ -14,7 +14,6 @@
|
||||
class SceneInfo : public Object, public ISerializable
|
||||
{
|
||||
public:
|
||||
|
||||
/// <summary>
|
||||
/// Scene title
|
||||
/// </summary>
|
||||
@@ -31,7 +30,6 @@ public:
|
||||
String Copyright;
|
||||
|
||||
public:
|
||||
|
||||
/// <summary>
|
||||
/// Array with cached lightmaps ID for the scene
|
||||
/// </summary>
|
||||
@@ -43,7 +41,6 @@ public:
|
||||
LightmapSettings LightmapSettings;
|
||||
|
||||
public:
|
||||
|
||||
// [Object]
|
||||
String ToString() const override;
|
||||
|
||||
|
||||
@@ -24,7 +24,6 @@ class Level;
|
||||
class SceneBeginData
|
||||
{
|
||||
public:
|
||||
|
||||
/// <summary>
|
||||
/// The joints to create after setup.
|
||||
/// </summary>
|
||||
@@ -57,7 +56,7 @@ typedef Dictionary<Guid, Actor*, HeapAllocation> ActorsLookup;
|
||||
/// </summary>
|
||||
API_CLASS(Abstract, NoSpawn) class FLAXENGINE_API SceneObject : public ScriptingObject, public ISerializable
|
||||
{
|
||||
DECLARE_SCRIPTING_TYPE_NO_SPAWN(SceneObject);
|
||||
DECLARE_SCRIPTING_TYPE_NO_SPAWN(SceneObject);
|
||||
friend PrefabInstanceData;
|
||||
friend Actor;
|
||||
friend Level;
|
||||
@@ -78,7 +77,6 @@ public:
|
||||
// - Destroy
|
||||
|
||||
protected:
|
||||
|
||||
Actor* _parent;
|
||||
Guid _prefabID;
|
||||
Guid _prefabObjectID;
|
||||
@@ -90,14 +88,12 @@ protected:
|
||||
SceneObject(const SpawnParams& params);
|
||||
|
||||
public:
|
||||
|
||||
/// <summary>
|
||||
/// Finalizes an instance of the <see cref="SceneObject"/> class.
|
||||
/// </summary>
|
||||
~SceneObject();
|
||||
|
||||
public:
|
||||
|
||||
/// <summary>
|
||||
/// Determines whether object is during play (spawned/loaded and fully initialized).
|
||||
/// </summary>
|
||||
@@ -162,7 +158,6 @@ public:
|
||||
API_PROPERTY() virtual void SetOrderInParent(int32 index) = 0;
|
||||
|
||||
public:
|
||||
|
||||
/// <summary>
|
||||
/// Gets a value indicating whether this object has a valid linkage to the prefab asset.
|
||||
/// </summary>
|
||||
@@ -211,7 +206,6 @@ public:
|
||||
API_FUNCTION() String GetNamePath(Char separatorChar = '/') const;
|
||||
|
||||
public:
|
||||
|
||||
/// <summary>
|
||||
/// Called after whole scene or local group of scene objects deserialization.
|
||||
/// </summary>
|
||||
@@ -234,7 +228,6 @@ public:
|
||||
virtual void EndPlay() = 0;
|
||||
|
||||
public:
|
||||
|
||||
// [ISerializable]
|
||||
void Serialize(SerializeStream& stream, const void* otherObj) override;
|
||||
void Deserialize(DeserializeStream& stream, ISerializeModifier* modifier) override;
|
||||
|
||||
@@ -11,7 +11,6 @@
|
||||
class FLAXENGINE_API SceneObjectsFactory
|
||||
{
|
||||
public:
|
||||
|
||||
struct PrefabInstance
|
||||
{
|
||||
Guid RootId;
|
||||
@@ -60,7 +59,6 @@ public:
|
||||
static Actor* CreateActor(int32 typeId, const Guid& id);
|
||||
|
||||
public:
|
||||
|
||||
struct PrefabSyncData
|
||||
{
|
||||
friend SceneObjectsFactory;
|
||||
@@ -117,6 +115,5 @@ public:
|
||||
static void SynchronizePrefabInstances(Context& context, PrefabSyncData& data);
|
||||
|
||||
private:
|
||||
|
||||
static void SynchronizeNewPrefabInstance(Context& context, PrefabSyncData& data, Prefab* prefab, Actor* actor, const Guid& prefabObjectId);
|
||||
};
|
||||
|
||||
@@ -9,7 +9,7 @@ Actor* SceneQuery::RaycastScene(const Ray& ray)
|
||||
PROFILE_CPU();
|
||||
|
||||
#if SCENE_QUERIES_WITH_LOCK
|
||||
ScopeLock lock(Level::ScenesLock);
|
||||
ScopeLock lock(Level::ScenesLock);
|
||||
#endif
|
||||
|
||||
Actor* target;
|
||||
@@ -94,7 +94,7 @@ void SceneQuery::GetAllActors(Array<Actor*>& actors)
|
||||
PROFILE_CPU();
|
||||
|
||||
#if SCENE_QUERIES_WITH_LOCK
|
||||
ScopeLock lock(Level::ScenesLock);
|
||||
ScopeLock lock(Level::ScenesLock);
|
||||
#endif
|
||||
|
||||
for (int32 i = 0; i < Level::Scenes.Count(); i++)
|
||||
|
||||
@@ -17,7 +17,6 @@
|
||||
class FLAXENGINE_API SceneQuery
|
||||
{
|
||||
public:
|
||||
|
||||
/// <summary>
|
||||
/// Try to find actor hit by the given ray
|
||||
/// </summary>
|
||||
@@ -26,7 +25,6 @@ public:
|
||||
static Actor* RaycastScene(const Ray& ray);
|
||||
|
||||
public:
|
||||
|
||||
/// <summary>
|
||||
/// Gets all scene objects from the actor into linear list. Appends them (without the given actor).
|
||||
/// </summary>
|
||||
@@ -55,7 +53,6 @@ public:
|
||||
static void GetAllActors(Array<Actor*>& actors);
|
||||
|
||||
public:
|
||||
|
||||
/// <summary>
|
||||
/// Execute custom action on actors tree.
|
||||
/// Action should returns false to stop calling deeper.
|
||||
@@ -67,7 +64,7 @@ public:
|
||||
static void TreeExecute(Function<bool(Actor*, Params ...)>& action, Params ... args)
|
||||
{
|
||||
#if SCENE_QUERIES_WITH_LOCK
|
||||
ScopeLock lock(Level::ScenesLock);
|
||||
ScopeLock lock(Level::ScenesLock);
|
||||
#endif
|
||||
|
||||
for (int32 i = 0; i < Level::Scenes.Count(); i++)
|
||||
|
||||
Reference in New Issue
Block a user