-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5c06449
commit cdb6e99
Showing
25 changed files
with
640 additions
and
54 deletions.
There are no files selected for viewing
Binary file not shown.
Empty file.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
namespace SoftRender.Render | ||
{ | ||
class Clip | ||
{ | ||
private Device m_Device; | ||
private List<Vertex> m_OutputList; | ||
|
||
public Device Device | ||
{ | ||
get { return m_Device; } | ||
} | ||
|
||
public List<Vertex> OutputList | ||
{ | ||
get { return m_OutputList; } | ||
} | ||
|
||
public Clip(Device device) | ||
{ | ||
m_Device = device; | ||
m_OutputList = new List<Vertex>(); | ||
} | ||
|
||
|
||
|
||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
namespace SoftRender.Render | ||
{ | ||
public enum FaceType | ||
{ | ||
LEFT = 1, | ||
RIGHT, | ||
BUTTOM, | ||
NEAR, | ||
FAR, | ||
NONE, | ||
} | ||
|
||
class Face | ||
{ | ||
public int A; | ||
public int B; | ||
public int C; | ||
public FaceType FaceType; | ||
|
||
public Face(int a,int b,int c) | ||
{ | ||
A = a; | ||
B = b; | ||
C = c; | ||
} | ||
|
||
public Face(int a,int b,int c,FaceType faceType) | ||
{ | ||
A = a; | ||
B = b; | ||
C = c; | ||
FaceType = faceType; | ||
} | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
namespace SoftRender.Render | ||
{ | ||
class Light | ||
{ | ||
|
||
private Vector4 m_Position; | ||
private Color m_Color; | ||
|
||
public Vector4 Position | ||
{ | ||
get { return m_Position; } | ||
set { m_Position = value; } | ||
} | ||
|
||
public Color Color | ||
{ | ||
get { return m_Color; } | ||
set { m_Color = value; } | ||
} | ||
|
||
public Light(Vector4 pos,Color col) | ||
{ | ||
m_Color = col; | ||
m_Position = pos; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
namespace SoftRender.Render | ||
{ | ||
class Material | ||
{ | ||
|
||
private float m_AmbientStrength; | ||
private Color m_Diffuse; | ||
|
||
public float AmbientStrength | ||
{ | ||
get { return m_AmbientStrength; } | ||
set { m_AmbientStrength = value; } | ||
} | ||
|
||
public Color Diffuse | ||
{ | ||
get { return m_Diffuse; } | ||
set { m_Diffuse = value; } | ||
} | ||
|
||
public Material(float ambient,Color color) | ||
{ | ||
m_AmbientStrength = ambient; | ||
m_Diffuse = color; | ||
} | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.