SAE-Institute-Geneva / GPR5204_919

MIT License
0 stars 6 forks source link

AABB/OBB/Ray/Frustum/Circle/Sphere #3

Open marvinschrd opened 3 years ago

marvinschrd commented 3 years ago

Introduction

Our task is to work on AABB, OBB, Ray, Frustum and Circle/Sphere implementation for the GPR5204 module.

AABB

GetCenter

Method to get the center of the AABB

GetExtent

Method to get the extent of the AABB

Overlap

Method to detect if two AABB are overlapping

Contains

Method to detect if a AABB is contained inside another

OBB (still searching and getting more informations)

GetCenter

Method that return the center position of this OBB

GetSize

Method that return the size of the OBB

... (more or less when we are sure)

Ray

Origin

Method that return the origin of the ray (vector3)

Direction

Method that return the direction of the ray (vector3)

SetOrigin

Method to set the origin of the ray

SetDirection

Method to set the direction of the ray

GetPointInRay

Method that get the position of a point “t” along the ray vector3 {origin + ( t * direction)}

Frustum (still searching and getting informations)

CalculateFrustum

Method that will calculate the frustum and its planes (Still searching informations)

IsPointInFrustum

Method that takes a vec3 and return if the point is inside the frustum or not

IsSphereInFrsutum

Method that takes a vec3 and a radius and return if the sphere is inside the frustum or not

...(more when we are sure)

Circle/Sphere

SetRadius

Method that will set the radius of the circle or sphere

GetRadius

Method that will return the radius of the circle or sphere

SetPosition

Method that will set the position of the circle or sphere

GetArea ( for circle)

Method that will return the area of the circle {MPI * (radius * radius_)}

GetArea (for sphere)

Method that will return the area of the sphere { 4 M_PI (radius_ * radius)}

Questions

We still have a lot of information to find and, most importantly, we don’t know for each of these implementations to what extent we need to implement them. We don’t really know what the minimal function expected for them are and we are a bit lost in knowing what amount of work we have to do.

Question are the following :

EliasFarhan commented 3 years ago

Thanks for the features' list, here are some little details and answer to your questions: