vector element

This commit is contained in:
ikpil 2023-03-28 23:08:24 +09:00
parent dbed85ab17
commit f97242faea
2 changed files with 7 additions and 11 deletions

View File

@ -17,15 +17,14 @@ freely, subject to the following restrictions:
*/
using System;
using System.Numerics;
namespace DotRecast.Core
{
public struct Vector3f
{
public float x { get; set; }
public float y { get; set; }
public float z { get; set; }
public float x;
public float y;
public float z;
public Vector3f(float x, float y, float z)
{

View File

@ -29,8 +29,7 @@ namespace DotRecast.Recast
RecastConfig cfg = builderCfg.cfg;
// Allocate voxel heightfield where we rasterize our input data to.
Heightfield solid = new Heightfield(builderCfg.width, builderCfg.height, builderCfg.bmin, builderCfg.bmax, cfg.cs,
cfg.ch, cfg.borderSize);
Heightfield solid = new Heightfield(builderCfg.width, builderCfg.height, builderCfg.bmin, builderCfg.bmax, cfg.cs, cfg.ch, cfg.borderSize);
// Allocate array that can hold triangle area types.
// If you have multiple meshes you need to process, allocate
@ -58,8 +57,7 @@ namespace DotRecast.Recast
{
int[] tris = node.tris;
int ntris = tris.Length / 3;
int[] m_triareas = Recast.markWalkableTriangles(ctx, cfg.walkableSlopeAngle, verts, tris, ntris,
cfg.walkableAreaMod);
int[] m_triareas = Recast.markWalkableTriangles(ctx, cfg.walkableSlopeAngle, verts, tris, ntris, cfg.walkableAreaMod);
RecastRasterization.rasterizeTriangles(solid, verts, tris, m_triareas, ntris, cfg.walkableClimb, ctx);
}
}
@ -67,8 +65,7 @@ namespace DotRecast.Recast
{
int[] tris = geom.getTris();
int ntris = tris.Length / 3;
int[] m_triareas = Recast.markWalkableTriangles(ctx, cfg.walkableSlopeAngle, verts, tris, ntris,
cfg.walkableAreaMod);
int[] m_triareas = Recast.markWalkableTriangles(ctx, cfg.walkableSlopeAngle, verts, tris, ntris, cfg.walkableAreaMod);
RecastRasterization.rasterizeTriangles(solid, verts, tris, m_triareas, ntris, cfg.walkableClimb, ctx);
}
}