summaryrefslogtreecommitdiff
path: root/Source
diff options
context:
space:
mode:
Diffstat (limited to 'Source')
-rw-r--r--Source/Asura/GameObject.h2
-rw-r--r--Source/Asura/Graphics/Animation.h39
-rw-r--r--Source/Asura/Graphics/Camera.cpp0
-rw-r--r--Source/Asura/Graphics/Camera.h37
-rw-r--r--Source/Asura/Graphics/Image.h37
-rw-r--r--Source/Asura/Graphics/Material.h5
-rw-r--r--Source/Asura/Graphics/Mesh2D.cpp0
-rw-r--r--Source/Asura/Graphics/Mesh2D.h20
-rw-r--r--Source/Asura/Graphics/Mesh2DRenderer.cpp0
-rw-r--r--Source/Asura/Graphics/Mesh2DRenderer.h0
-rw-r--r--Source/Asura/Graphics/ParticleSystem.h2
-rw-r--r--Source/Asura/Graphics/RenderTarget.cpp0
-rw-r--r--Source/Asura/Graphics/RenderTarget.h22
-rw-r--r--Source/Asura/Graphics/Renderer.h12
-rw-r--r--Source/Asura/Graphics/Shader.h2
-rw-r--r--Source/Asura/Graphics/ShapeRenderer.cpp0
-rw-r--r--Source/Asura/Graphics/ShapeRenderer.h0
-rw-r--r--Source/Asura/Graphics/Sprite.h67
-rw-r--r--Source/Asura/Graphics/SpriteRenderer.cpp0
-rw-r--r--Source/Asura/Graphics/SpriteRenderer.h29
-rw-r--r--Source/Asura/Graphics/Texture.h7
-rw-r--r--Source/Asura/Math/Curve.cpp0
-rw-r--r--Source/Asura/Math/Curve.h0
-rw-r--r--Source/Asura/Math/RangedValue.cpp0
-rw-r--r--Source/Asura/Math/RangedValue.h0
-rw-r--r--Source/Asura/Physics/World.h0
-rw-r--r--Source/Asura/Transform.h6
27 files changed, 270 insertions, 17 deletions
diff --git a/Source/Asura/GameObject.h b/Source/Asura/GameObject.h
index fcef864..f4c4eb8 100644
--- a/Source/Asura/GameObject.h
+++ b/Source/Asura/GameObject.h
@@ -12,7 +12,7 @@ namespace AsuraEngine
{
///
- /// Ϸʵ
+ /// Ϸʵ壬
///
class GameObject final : public Object
{
diff --git a/Source/Asura/Graphics/Animation.h b/Source/Asura/Graphics/Animation.h
index e69de29..e3d82b7 100644
--- a/Source/Asura/Graphics/Animation.h
+++ b/Source/Asura/Graphics/Animation.h
@@ -0,0 +1,39 @@
+#ifndef __AE_ANIMATION_H__
+#define __AE_ANIMATION_H__
+
+#include "Sprite.h"
+#include "Component.h"
+
+namespace AsuraEngine
+{
+ namespace Graphics
+ {
+
+ ///
+ /// ؼ֡
+ ///
+ class AnimationKeyFrame
+ {
+
+ };
+
+ ///
+ /// SpriteԸıspriteĴСתšimage
+ ///
+ class Animation final : public Component
+ {
+ public:
+
+ private:
+
+ ///
+ ///
+ ///
+ Sprite* mSprite;
+
+ };
+
+ }
+}
+
+#endif \ No newline at end of file
diff --git a/Source/Asura/Graphics/Camera.cpp b/Source/Asura/Graphics/Camera.cpp
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/Source/Asura/Graphics/Camera.cpp
diff --git a/Source/Asura/Graphics/Camera.h b/Source/Asura/Graphics/Camera.h
new file mode 100644
index 0000000..9da6ab0
--- /dev/null
+++ b/Source/Asura/Graphics/Camera.h
@@ -0,0 +1,37 @@
+#ifndef __AE_CAMERA_H__
+#define __AE_CAMERA_H__
+
+#include "RenderTarget.h"
+#include "Component.h"
+
+namespace AsuraEngine
+{
+ namespace Graphics
+ {
+
+ ///
+ /// Orthographic Camera.
+ ///
+ class Camera : public Component
+ {
+ public:
+
+
+ private:
+
+ ///
+ /// ȾĿ
+ ///
+ RenderTarget* mRenderTarget;
+
+ ///
+ /// ǷȾĻ
+ ///
+ bool mIsOnScreen;
+
+ };
+
+ }
+}
+
+#endif
diff --git a/Source/Asura/Graphics/Image.h b/Source/Asura/Graphics/Image.h
index bd885eb..198ad9e 100644
--- a/Source/Asura/Graphics/Image.h
+++ b/Source/Asura/Graphics/Image.h
@@ -1,17 +1,36 @@
#ifndef __AE_IMAGE_H__
#define __AE_IMAGE_H__
-namespace AsuraEngine
+#include "Math/Vector2.h"
+#include "Object.h"
+
+namespace AsuraEngine
{
- namespace Graphics
- {
-
- class Image
- {
-
+ namespace Graphics
+ {
+
+ ///
+ /// ImageͼƬڴ󣬶ȡϷ󱣴ĽһImageڴ桢ԴֻᱣһݣҪ
+ /// imageêλãźתǶȣʹspriteһֻࡣ
+ ///
+ class Image final : public Object
+ {
+ public:
+
+ Math::Vector2 GetSize();
+ uint GetWidth();
+ uint GetHeight();
+
+ private:
+
+ ///
+ /// СΪλ
+ ///
+ uint mWidth, mHeight;
+
};
-
- }
+
+ }
}
#endif \ No newline at end of file
diff --git a/Source/Asura/Graphics/Material.h b/Source/Asura/Graphics/Material.h
index 16411a0..13c066a 100644
--- a/Source/Asura/Graphics/Material.h
+++ b/Source/Asura/Graphics/Material.h
@@ -22,7 +22,7 @@ namespace AsuraEngine
/// ͬͨļ(.mat)ʵ֣ڴáAsuraУShader޷ֱӦõȾ̶һ
/// ʹɲ޸shaderuniformsmaterial䵱shaderĴ
///
- class Material : public Object
+ class Material final : public Object
{
public:
@@ -116,6 +116,8 @@ namespace AsuraEngine
LUAX_DECL_FACTORY( Material );
+ LUAX_DECL_METHOD( l_Clone );
+
LUAX_DECL_METHOD( l_SetShader );
LUAX_DECL_METHOD( l_SetTexture );
@@ -126,7 +128,6 @@ namespace AsuraEngine
LUAX_DECL_METHOD( l_SetFloat );
LUAX_DECL_METHOD( l_SetInteger );
LUAX_DECL_METHOD( l_SetColor );
- LUAX_DECL_METHOD( l_SetVertexAttributes );
LUAX_DECL_METHOD( l_GetUniformInfo );
LUAX_DECL_METHOD( l_GetUniformInfof );
diff --git a/Source/Asura/Graphics/Mesh2D.cpp b/Source/Asura/Graphics/Mesh2D.cpp
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/Source/Asura/Graphics/Mesh2D.cpp
diff --git a/Source/Asura/Graphics/Mesh2D.h b/Source/Asura/Graphics/Mesh2D.h
new file mode 100644
index 0000000..a113f4c
--- /dev/null
+++ b/Source/Asura/Graphics/Mesh2D.h
@@ -0,0 +1,20 @@
+#ifndef __AE_MESH2D_H__
+#define __AE_MESH2D_H__
+
+namespace AsuraEngine
+{
+ namespace Graphics
+ {
+
+ ///
+ /// 2D meshһЩUV
+ ///
+ class Mesh2D
+ {
+
+ };
+
+ }
+}
+
+#endif \ No newline at end of file
diff --git a/Source/Asura/Graphics/Mesh2DRenderer.cpp b/Source/Asura/Graphics/Mesh2DRenderer.cpp
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/Source/Asura/Graphics/Mesh2DRenderer.cpp
diff --git a/Source/Asura/Graphics/Mesh2DRenderer.h b/Source/Asura/Graphics/Mesh2DRenderer.h
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/Source/Asura/Graphics/Mesh2DRenderer.h
diff --git a/Source/Asura/Graphics/ParticleSystem.h b/Source/Asura/Graphics/ParticleSystem.h
index 98aba49..2c22608 100644
--- a/Source/Asura/Graphics/ParticleSystem.h
+++ b/Source/Asura/Graphics/ParticleSystem.h
@@ -8,7 +8,7 @@ namespace AsuraEngine
namespace Graphics
{
- class ParticleSystem : public Component
+ class ParticleSystem final : public Component
{
};
diff --git a/Source/Asura/Graphics/RenderTarget.cpp b/Source/Asura/Graphics/RenderTarget.cpp
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/Source/Asura/Graphics/RenderTarget.cpp
diff --git a/Source/Asura/Graphics/RenderTarget.h b/Source/Asura/Graphics/RenderTarget.h
new file mode 100644
index 0000000..b3f90cd
--- /dev/null
+++ b/Source/Asura/Graphics/RenderTarget.h
@@ -0,0 +1,22 @@
+#ifndef __AE_RENDER_TARGET_H__
+#define __AE_RENDER_TARGET_H__
+
+#include "Texture.h"
+
+namespace AsuraEngine
+{
+ namespace Graphics
+ {
+
+ class RenderTarget : public Texture
+ {
+ public:
+
+
+
+ };
+
+ }
+}
+
+#endif \ No newline at end of file
diff --git a/Source/Asura/Graphics/Renderer.h b/Source/Asura/Graphics/Renderer.h
index 2efa391..c3677a7 100644
--- a/Source/Asura/Graphics/Renderer.h
+++ b/Source/Asura/Graphics/Renderer.h
@@ -9,16 +9,26 @@ namespace AsuraEngine
namespace Graphics
{
+ ///
+ /// ࣬ȾRendererദÿRenderer߱һʡ
+ ///
class Renderer : public Component
{
public:
+
///
/// һô˷ͻ´shared materialô˷ζҪmaterialý޸ģʱʹõIJ
/// shared materialҪһݣӰrenderer
///
Material* GetMaterial();
- private:
+ ///
+ /// Ⱦص
+ ///
+ virtual void OnRender() = 0;
+
+ protected:
+
Material* mMaterial;
};
diff --git a/Source/Asura/Graphics/Shader.h b/Source/Asura/Graphics/Shader.h
index 7c09139..ccd38af 100644
--- a/Source/Asura/Graphics/Shader.h
+++ b/Source/Asura/Graphics/Shader.h
@@ -18,7 +18,7 @@ namespace AsuraEngine
///
/// һshaderһڲʼ乲ijShaderuniformsͶݣֻuniforms location
///
- class Shader : public Object
+ class Shader final : public Object
{
public:
diff --git a/Source/Asura/Graphics/ShapeRenderer.cpp b/Source/Asura/Graphics/ShapeRenderer.cpp
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/Source/Asura/Graphics/ShapeRenderer.cpp
diff --git a/Source/Asura/Graphics/ShapeRenderer.h b/Source/Asura/Graphics/ShapeRenderer.h
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/Source/Asura/Graphics/ShapeRenderer.h
diff --git a/Source/Asura/Graphics/Sprite.h b/Source/Asura/Graphics/Sprite.h
index e69de29..b573c45 100644
--- a/Source/Asura/Graphics/Sprite.h
+++ b/Source/Asura/Graphics/Sprite.h
@@ -0,0 +1,67 @@
+#ifndef __AE_SPRITE_H__
+#define __AE_SPRITE_H__
+
+#include "Math/Vector2.h"
+#include "Transform.h"
+#include "Component.h"
+#include "Image.h"
+
+namespace AsuraEngine
+{
+ namespace Graphics
+ {
+
+ ///
+ /// SpriteǿimageĴimagesprite乲ݣsprite𻯴imageԣתŵȡ
+ ///
+ class Sprite final : public Object
+ {
+ public:
+
+ enum Type
+ {
+
+ };
+
+ ///
+ /// 뷽ʽ
+ ///
+ enum Align
+ {
+
+ };
+
+ void SetImage(Image* image);
+
+ private:
+
+ ///
+ /// ê
+ ///
+ Math::Vector2 mAnchor;
+
+ ///
+ /// С
+ ///
+ Math::Vector2 size;
+
+ ///
+ /// GameObjecttransform
+ ///
+ Transform mTransform;
+
+ ///
+ /// 󶨵image
+ ///
+ Image* mImage;
+
+ //----------------------------------------------------------------------------------------------------
+
+
+
+ };
+
+ }
+}
+
+#endif \ No newline at end of file
diff --git a/Source/Asura/Graphics/SpriteRenderer.cpp b/Source/Asura/Graphics/SpriteRenderer.cpp
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/Source/Asura/Graphics/SpriteRenderer.cpp
diff --git a/Source/Asura/Graphics/SpriteRenderer.h b/Source/Asura/Graphics/SpriteRenderer.h
new file mode 100644
index 0000000..4df932c
--- /dev/null
+++ b/Source/Asura/Graphics/SpriteRenderer.h
@@ -0,0 +1,29 @@
+#ifndef __AE_SPRITE_RENDERER_H__
+#define __AE_SPRITE_RENDERER_H__
+
+#include "Renderer.h"
+#include "Sprite.h"
+
+namespace AsuraEngine
+{
+ namespace Graphics
+ {
+
+ class SpriteRenderer final : public Renderer
+ {
+ public:
+ void OnRender() override;
+
+ private:
+
+ ///
+ /// Ⱦsprite
+ ///
+ Sprite* mSprite;
+
+ };
+
+ }
+}
+
+#endif \ No newline at end of file
diff --git a/Source/Asura/Graphics/Texture.h b/Source/Asura/Graphics/Texture.h
index 0b9af4c..cc015ef 100644
--- a/Source/Asura/Graphics/Texture.h
+++ b/Source/Asura/Graphics/Texture.h
@@ -1,12 +1,17 @@
#ifndef __AE_TEXTURE_H__
#define __AE_TEXTURE_H__
+#include "Component.h"
+
namespace AsuraEngine
{
namespace Graphics
{
- class Texture
+ ///
+ /// 2Dࣩ2d meshrender targetбʹ
+ ///
+ class Texture : public Component
{
};
diff --git a/Source/Asura/Math/Curve.cpp b/Source/Asura/Math/Curve.cpp
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/Source/Asura/Math/Curve.cpp
diff --git a/Source/Asura/Math/Curve.h b/Source/Asura/Math/Curve.h
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/Source/Asura/Math/Curve.h
diff --git a/Source/Asura/Math/RangedValue.cpp b/Source/Asura/Math/RangedValue.cpp
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/Source/Asura/Math/RangedValue.cpp
diff --git a/Source/Asura/Math/RangedValue.h b/Source/Asura/Math/RangedValue.h
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/Source/Asura/Math/RangedValue.h
diff --git a/Source/Asura/Physics/World.h b/Source/Asura/Physics/World.h
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/Source/Asura/Physics/World.h
diff --git a/Source/Asura/Transform.h b/Source/Asura/Transform.h
index 98a0c77..cca7575 100644
--- a/Source/Asura/Transform.h
+++ b/Source/Asura/Transform.h
@@ -1,12 +1,16 @@
#ifndef __AE_TRANSFORM_H__
#define __AE_TRANSFORM_H__
+#include "Object.h"
#include "Math/Vector2.h"
namespace AsuraEngine
{
- class Transform
+ ///
+ /// TransformΪԣΪ
+ ///
+ class Transform final : public Object
{
private:
Math::Vector2 position;