<commit_before>// Copyright 2020 The Terasology Foundation
// SPDX-License-Identifier: Apache-2.0
package org.terasology.rendering.cameras;

import org.terasology.joml.geom.AABBf;
import org.joml.AxisAngle4f;
import org.joml.Matrix4f;
import org.joml.Quaternionf;
import org.joml.Quaternionfc;
import org.joml.Vector3f;
import org.joml.Vector3fc;
import org.lwjgl.BufferUtils;
import org.terasology.config.Config;
import org.terasology.joml.geom.AABBfc;
import org.terasology.math.AABB;
import org.terasology.math.Direction;
import org.terasology.math.JomlUtil;
import org.terasology.math.geom.Quat4f;
import org.terasology.registry.CoreRegistry;

/**
 * Camera base class.
 *
 */
public abstract class Camera {

    protected static final Vector3fc FORWARD = JomlUtil.from(Direction.FORWARD.getVector3f());

    /* CAMERA PARAMETERS */
    protected final Vector3f position = new Vector3f(0, 0, 0);
    protected final Vector3f up = JomlUtil.from(Direction.UP.getVector3f());
    protected final Vector3f viewingDirection = new Vector3f(FORWARD);
    protected final Vector3f viewingAxis = JomlUtil.from(Direction.LEFT.getVector3f());
    protected float viewingAngle;

    protected float zNear = 0.1f;
    // TODO: This is too large, but many properties have to be adjusted if it changes
    protected float zFar = 5000.0f;

    protected float targetFov = CoreRegistry.get(Config.class).getRendering().getFieldOfView();
    protected float activeFov = targetFov / 4f;

    /* VIEW FRUSTUM */
    protected final ViewFrustum viewFrustum = new ViewFrustum();
    protected final ViewFrustum viewFrustumReflected = new ViewFrustum();

    /* MATRICES */
    protected Matrix4f projectionMatrix = new Matrix4f();<commit_msg>feat(JOML): remove Direction JomlUtil (#4422)<commit_after>// Copyright 2020 The Terasology Foundation
// SPDX-License-Identifier: Apache-2.0
package org.terasology.rendering.cameras;

import org.terasology.joml.geom.AABBf;
import org.joml.AxisAngle4f;
import org.joml.Matrix4f;
import org.joml.Quaternionf;
import org.joml.Quaternionfc;
import org.joml.Vector3f;
import org.joml.Vector3fc;
import org.lwjgl.BufferUtils;
import org.terasology.config.Config;
import org.terasology.joml.geom.AABBfc;
import org.terasology.math.AABB;
import org.terasology.math.Direction;
import org.terasology.math.JomlUtil;
import org.terasology.math.geom.Quat4f;
import org.terasology.registry.CoreRegistry;

/**
 * Camera base class.
 *
 */
public abstract class Camera {

    protected static final Vector3fc FORWARD = Direction.FORWARD.asVector3f();

    /* CAMERA PARAMETERS */
    protected final Vector3f position = new Vector3f(0, 0, 0);
    protected final Vector3f up = new Vector3f(Direction.UP.asVector3f());
    protected final Vector3f viewingDirection = new Vector3f(FORWARD);
    protected final Vector3f viewingAxis = new Vector3f(Direction.LEFT.asVector3f());
    protected float viewingAngle;

    protected float zNear = 0.1f;
    // TODO: This is too large, but many properties have to be adjusted if it changes
    protected float zFar = 5000.0f;

    protected float targetFov = CoreRegistry.get(Config.class).getRendering().getFieldOfView();
    protected float activeFov = targetFov / 4f;

    /* VIEW FRUSTUM */
    protected final ViewFrustum viewFrustum = new ViewFrustum();
    protected final ViewFrustum viewFrustumReflected = new ViewFrustum();

    /* MATRICES */
    protected Matrix4f projectionMatrix = new Matrix4f();
{'fraction_non_alphanumeric': 0.09739884393063585, 'fraction_numerical': 0.02138728323699422, 'mean_word_length': 4.424764890282131, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4229960', 'n_tokens_mistral': 1187, 'n_tokens_neox': 1129, 'n_words': 273}