Review spacing formatting
raylib uses spaces between '+' and '-' signs but not between '*' and '/' signs, it's a chosen convention
This commit is contained in:
parent
173f199313
commit
7f0880a735
7 changed files with 99 additions and 91 deletions
28
src/models.c
28
src/models.c
|
@ -577,22 +577,30 @@ void DrawLight(Light light)
|
|||
{
|
||||
case LIGHT_POINT:
|
||||
{
|
||||
DrawSphereWires(light->position, 0.3f*light->intensity, 4, 8, (light->enabled ? light->diffuse : BLACK));
|
||||
DrawCircle3D(light->position, light->radius, 0.0f, (Vector3){ 0, 0, 0 }, (light->enabled ? light->diffuse : BLACK));
|
||||
DrawCircle3D(light->position, light->radius, 90.0f, (Vector3){ 1, 0, 0 }, (light->enabled ? light->diffuse : BLACK));
|
||||
DrawCircle3D(light->position, light->radius, 90.0f, (Vector3){ 0, 1, 0 }, (light->enabled ? light->diffuse : BLACK));
|
||||
DrawSphereWires(light->position, 0.3f*light->intensity, 8, 8, (light->enabled ? light->diffuse : GRAY));
|
||||
|
||||
DrawCircle3D(light->position, light->radius, 0.0f, (Vector3){ 0, 0, 0 }, (light->enabled ? light->diffuse : GRAY));
|
||||
DrawCircle3D(light->position, light->radius, 90.0f, (Vector3){ 1, 0, 0 }, (light->enabled ? light->diffuse : GRAY));
|
||||
DrawCircle3D(light->position, light->radius, 90.0f, (Vector3){ 0, 1, 0 }, (light->enabled ? light->diffuse : GRAY));
|
||||
} break;
|
||||
case LIGHT_DIRECTIONAL:
|
||||
{
|
||||
DrawLine3D(light->position, light->target, (light->enabled ? light->diffuse : BLACK));
|
||||
DrawSphereWires(light->position, 0.3f*light->intensity, 4, 8, (light->enabled ? light->diffuse : BLACK));
|
||||
DrawCubeWires(light->target, 0.3f, 0.3f, 0.3f, (light->enabled ? light->diffuse : BLACK));
|
||||
DrawLine3D(light->position, light->target, (light->enabled ? light->diffuse : GRAY));
|
||||
|
||||
DrawSphereWires(light->position, 0.3f*light->intensity, 8, 8, (light->enabled ? light->diffuse : GRAY));
|
||||
DrawCubeWires(light->target, 0.3f, 0.3f, 0.3f, (light->enabled ? light->diffuse : GRAY));
|
||||
} break;
|
||||
case LIGHT_SPOT:
|
||||
{
|
||||
DrawLine3D(light->position, light->target, (light->enabled ? light->diffuse : BLACK));
|
||||
DrawCylinderWires(light->position, 0.0f, 0.3f*light->coneAngle/50, 0.6f, 5, (light->enabled ? light->diffuse : BLACK));
|
||||
DrawCubeWires(light->target, 0.3f, 0.3f, 0.3f, (light->enabled ? light->diffuse : BLACK));
|
||||
DrawLine3D(light->position, light->target, (light->enabled ? light->diffuse : GRAY));
|
||||
|
||||
Vector3 dir = VectorSubtract(light->target, light->position);
|
||||
VectorNormalize(&dir);
|
||||
|
||||
DrawCircle3D(light->position, 0.5f, 0.0f, dir, (light->enabled ? light->diffuse : GRAY));
|
||||
|
||||
//DrawCylinderWires(light->position, 0.0f, 0.3f*light->coneAngle/50, 0.6f, 5, (light->enabled ? light->diffuse : GRAY));
|
||||
DrawCubeWires(light->target, 0.3f, 0.3f, 0.3f, (light->enabled ? light->diffuse : GRAY));
|
||||
} break;
|
||||
default: break;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue