Skip to content

TorratDev/CubicIntersection

Repository files navigation

CubicIntersection

Build and Test with Coverage Coverage Status

Web API in .NET 8 with DDD

This is a sample web API application built with .NET 6 using the Domain-Driven Design (DDD) pattern.

Web

Endpoints

Process

The endpoint calculates the cubic intersection of two cubic objects. It takes the following parameters:

  • first: the first cubic object

    • dimensions: the dimension of the object
    • center: the center point of the object
  • second: the second cubic object

    • dimensions: the dimension of the object
    • center: the center point of the object

The response will be a JSON object with the following fields:

  • AreTheyColliding: Flag that tell if the two object are collinding
  • IntersectedVolume: Value of the intersected volume between the two objects.
Request:
{ "first": { "dimensions": { "x": 2, "y": 2, "z": 2 }, "center": { "x": 0, "y": 0, "z": 0 } }, "second": { "dimensions": { "x": 2, "y": 2, "z": 2 }, "center": { "x": 0.5, "y": 0.5, "z": 0.5 } }
Response:
{ "AreTheyColliding": true, "IntersectedVolume": 3.375 }

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published