1
0
mirror of synced 2024-12-03 03:27:23 +01:00
Switch-Toolbox/Switch_Toolbox_Library/Rendering/RenderLib.cs
KillzXGaming e4722ed1af Alot of additions.
General
- Always allow multiple instances of the tool by default. (UseSingleInstance in config.XML)
- Yaz0 now uses a new library using c code. This improves compression times and is comparable to wzst's yaz0 compressor. Thanks to AboodXD for helping port the code.
- Add flat buffer templates for gfbmdl and gfbanm.
- Redid UV editor. Now using new 2D engine with some improvements. Should work better with mutliple file formats than just bfres.
- Auto compress bfres with .sbfres extension.

BFLYT:
-Add animation reference list to panes if they have any animations.
- Note the animation editor in it is not functional yet.

GFBMDL
- Progress on model importing. Currently crashes on many tests so saving is currently disabled till i figure out why.
- Add new texture map display with UV coordinates shown. Displays how transforms are handled.
- Add option to export materials and models entirely as .json files.

DAE
- improve bone/joint check.
2019-12-07 20:16:13 -05:00

62 lines
1.6 KiB
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using OpenTK;
using OpenTK.Graphics.OpenGL;
using Toolbox.Library;
using System.Windows.Forms;
namespace Toolbox.Library.Rendering
{
public enum STIndexFormat : uint
{
UnsignedByte = 0,
UInt16 = 1,
UInt32 = 2,
}
public class Vertex
{
public Vector3 pos = new Vector3(0);
public Vector3 nrm = new Vector3(0);
public Vector4 col = new Vector4(1);
public Vector4 col2 = new Vector4(1);
public Vector2 uv0 = new Vector2(0);
public Vector2 uv1 = new Vector2(0);
public Vector2 uv2 = new Vector2(0);
public Vector2 uv3 = new Vector2(0);
public Vector4 tan = new Vector4(0);
public Vector4 bitan = new Vector4(0);
public List<int> boneIds = new List<int>();
public List<float> boneWeights = new List<float>();
public float normalW;
public List<string> boneNames = new List<string>();
public List<Bone> boneList = new List<Bone>();
public class Bone
{
public string Name;
public int Index;
public bool HasWeights;
public List<BoneWeight> weights = new List<BoneWeight>();
}
public class BoneWeight
{
public float weight;
}
//For vertex morphing
public Vector3 pos1 = new Vector3();
public Vector3 pos2 = new Vector3();
public List<Vector4> Unknowns = new List<Vector4>();
}
}