====== cCuboid ======
cCuboid offers some native support for cuboids. A cuboid simply consists of two [[api:vector3i]]'s. It offers some extra functions for sorting and checking if a point is inside the cuboid.

===== Class Definition =====
^ Field ^ Variable type ^
| p1 | [[Vector3i]] |
| p2 | [[Vector3i]] |

^ Function ^ Return type ^
| Sort() | void |
| IsInside( [[Vector3d]] Point ) | bool |
| IsInside( [[Vector3i]] Point ) | bool |
===== Functions =====
==== Sort() ====
The ''Sort()'' function simply sorts all the coordinates. It puts all the lower scalars in p1 and the higher in p2. This is exactly what the function does:
<code cpp>
void cCuboid::Sort()
{
	if( p1.x > p2.x ) std::swap( p1.x, p2.x );
	if( p1.y > p2.y ) std::swap( p1.y, p2.y );
	if( p1.z > p2.z ) std::swap( p1.z, p2.z );
}
</code>
==== IsInside() ====
The ''IsInside()'' functions return true if the given parameter is inside the cuboid, and false if not.