Refactor engine to support double-precision vectors
This commit is contained in:
@@ -22,19 +22,23 @@ namespace CSG
|
||||
class RawData
|
||||
{
|
||||
public:
|
||||
|
||||
struct Surface
|
||||
{
|
||||
float ScaleInLightmap;
|
||||
Rectangle LightmapUVsBox;
|
||||
Vector2 Size;
|
||||
Float2 Size;
|
||||
Rectangle UVsArea;
|
||||
Array<RawModelVertex> Vertices;
|
||||
};
|
||||
|
||||
struct SurfaceTriangle
|
||||
{
|
||||
Float3 V[3];
|
||||
};
|
||||
|
||||
struct SurfaceData
|
||||
{
|
||||
Array<Triangle> Triangles;
|
||||
Array<SurfaceTriangle> Triangles;
|
||||
};
|
||||
|
||||
struct BrushData
|
||||
@@ -45,12 +49,10 @@ namespace CSG
|
||||
class Slot
|
||||
{
|
||||
public:
|
||||
|
||||
Guid Material;
|
||||
Array<Surface> Surfaces;
|
||||
|
||||
public:
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="Slot"/> class.
|
||||
/// </summary>
|
||||
@@ -61,7 +63,6 @@ namespace CSG
|
||||
}
|
||||
|
||||
public:
|
||||
|
||||
bool IsEmpty() const
|
||||
{
|
||||
return Surfaces.IsEmpty();
|
||||
@@ -71,7 +72,6 @@ namespace CSG
|
||||
};
|
||||
|
||||
public:
|
||||
|
||||
/// <summary>
|
||||
/// The slots.
|
||||
/// </summary>
|
||||
@@ -83,7 +83,6 @@ namespace CSG
|
||||
Dictionary<Guid, BrushData> Brushes;
|
||||
|
||||
public:
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="RawData"/> class.
|
||||
/// </summary>
|
||||
@@ -100,7 +99,6 @@ namespace CSG
|
||||
}
|
||||
|
||||
public:
|
||||
|
||||
/// <summary>
|
||||
/// Gets or adds the slot for the given material.
|
||||
/// </summary>
|
||||
@@ -120,7 +118,6 @@ namespace CSG
|
||||
}
|
||||
|
||||
public:
|
||||
|
||||
void AddSurface(Brush* brush, int32 brushSurfaceIndex, const Guid& surfaceMaterial, float scaleInLightmap, const Rectangle& lightmapUVsBox, const RawModelVertex* firstVertex, int32 vertexCount);
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user