Пример #1
0
 public virtual IEnumerable <Vector3> GetVertices(IExplicitShape <GridPoint3> shape, GridMap <GridPoint3> map)
 {
     throw new NotSupportedException();
 }
Пример #2
0
 public virtual void MakeCells <TPoint>(
     IGrid <TPoint, TCell> grid,
     GridMap <TPoint> map)
 {
     throw new NotImplementedByException(GetType());
 }
Пример #3
0
 public abstract void SetMap <TPoint>(GridMap <TPoint> map);
Пример #4
0
 /// <inheritdoc/>
 public override IEnumerable <Vector3> GetVertices(IExplicitShape <GridPoint3> shape, GridMap <GridPoint3> map)
 {
     return(shape
            .Points
            .SelectMany(p => vertices[p.GetColor(colorFunction3)]
                        .Select(q => map.GridToWorld(q + map.DeRound(p)))));
 }
Пример #5
0
 /// <inheritdoc/>
 public override IEnumerable <Vector3> GetNormals(IExplicitShape <GridPoint3> explicitShape, GridMap <GridPoint3> gridMap, bool flip)
 {
     return(explicitShape
            .Points
            .SelectMany(p => vertices[p.GetColor(colorFunction3)]
                        .Select((q, i) => gridMap.GridToWorld(q + gridMap.DeRound(p) + (flip ? -normals[p.GetColor(colorFunction3)][i] : normals[p.GetColor(colorFunction3)][i])).normalized)));
 }
Пример #6
0
 /// <inheritdoc/>
 public override IEnumerable <Vector3> GetNormals(IExplicitShape <int> shape, GridMap <int> map, bool flip)
 {
     return(shape.Points.SelectMany(p => vertices.Select((q, i) => map.GridToWorld(q + map.DeRound(p) + (flip ? -normals[i] : normals[i])).normalized)));
 }
Пример #7
0
 /// <inheritdoc/>
 public override IEnumerable <Vector3> GetVertices(IExplicitShape <int> shape, GridMap <int> map)
 {
     return(shape.Points.SelectMany(p => vertices.Select(q => map.GridToWorld(q + map.DeRound(p)))));
 }
Пример #8
0
 public abstract void __InitPrivateFields <TPoint>(
     GridBuilder <TCell> gridBuilder,
     IGrid <TPoint, TCell> grid,
     GridMap <TPoint> map);