Popcorning Guinea Pig
Search Results for

    Show / Hide Table of Contents

    Class QuakeMapScene

    Base class for scenes that use Quake maps.

    Inheritance
    object
    Scene
    QuakeMapScene
    Implements
    IDisposable
    Inherited Members
    Scene.IsLoaded
    Scene.HidesOsCursor
    Scene.Host
    Scene.CommandHandler
    Scene.SceneLoader
    Scene.SceneFileElements
    Scene.SceneData
    Scene.SceneInputContext
    Scene.DynamicBindings
    Scene.HierarchyManager
    Scene.ResolveHost()
    Scene.GetSceneFilePath()
    Scene.Load()
    Scene.Dispose()
    Scene.ConfigureInputBindings()
    Scene.OnLoad()
    Scene.OnUnload()
    Scene.Update(double)
    Scene.ResolveBindingSource(BindingSource, object)
    Scene.UpdateBindings()
    Scene.AddBinding(DynamicBinding)
    Scene.Render(int, int)
    Scene.SetSceneData(SceneData)
    Scene.GetElement<T>(string)
    Scene.GetElementOrNull<T>(string)
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: PopcorningGuineaPig.Engine.Quake
    Assembly: PopcorningGuineaPig.Engine.dll
    Syntax
    public abstract class QuakeMapScene : Scene, IDisposable

    Constructors

    | Edit this page View Source

    QuakeMapScene()

    Creates a new QuakeMapScene.

    Declaration
    public QuakeMapScene()

    Properties

    | Edit this page View Source

    Camera

    The camera used for rendering the scene.

    Declaration
    protected object Camera { get; set; }
    Property Value
    Type Description
    object
    | Edit this page View Source

    DefaultSpawnPosition

    The default spawn position for the player.

    Declaration
    protected Vector3 DefaultSpawnPosition { get; set; }
    Property Value
    Type Description
    Vector3
    | Edit this page View Source

    DefaultSpawnRotation

    The default spawn rotation for the player (in degrees).

    Declaration
    protected float DefaultSpawnRotation { get; set; }
    Property Value
    Type Description
    float
    | Edit this page View Source

    Map

    The Quake map used by the scene.

    Declaration
    protected QuakeMap Map { get; }
    Property Value
    Type Description
    QuakeMap
    | Edit this page View Source

    PlayerSpawnEntityName

    The player spawn entity class name to look for in the map.

    Declaration
    protected string PlayerSpawnEntityName { get; set; }
    Property Value
    Type Description
    string

    Methods

    | Edit this page View Source

    CreateDefaultMap()

    Creates a default map if no map is loaded.

    Declaration
    protected virtual void CreateDefaultMap()
    | Edit this page View Source

    FindPlayerSpawn()

    Finds the player spawn position and rotation in the map.

    Declaration
    protected virtual void FindPlayerSpawn()
    | Edit this page View Source

    GetEntitiesByClassName(string)

    Gets all entities of a specific class name.

    Declaration
    public List<QuakeMapEntity> GetEntitiesByClassName(string className)
    Parameters
    Type Name Description
    string className

    The class name to search for.

    Returns
    Type Description
    List<QuakeMapEntity>

    A list of entities with the specified class name.

    | Edit this page View Source

    GetEntityByClassName(string)

    Gets the first entity of a specific class name.

    Declaration
    public QuakeMapEntity GetEntityByClassName(string className)
    Parameters
    Type Name Description
    string className

    The class name to search for.

    Returns
    Type Description
    QuakeMapEntity

    The first entity with the specified class name, or null if none is found.

    | Edit this page View Source

    GetPlayerSpawnPosition()

    Gets the player spawn position.

    Declaration
    public Vector3 GetPlayerSpawnPosition()
    Returns
    Type Description
    Vector3

    The player spawn position.

    | Edit this page View Source

    GetPlayerSpawnRotation()

    Gets the player spawn rotation.

    Declaration
    public float GetPlayerSpawnRotation()
    Returns
    Type Description
    float

    The player spawn rotation in degrees.

    | Edit this page View Source

    LoadMap(string)

    Loads a Quake map from the specified file path.

    Declaration
    public virtual bool LoadMap(string mapPath)
    Parameters
    Type Name Description
    string mapPath

    The path to the map file.

    Returns
    Type Description
    bool

    True if the map was loaded successfully, false otherwise.

    | Edit this page View Source

    RayCast(Vector3, Vector3, float, out Vector3, out Vector3, out QuakeMapEntity)

    Performs a ray cast against the map geometry.

    Declaration
    public bool RayCast(Vector3 origin, Vector3 direction, float maxDistance, out Vector3 hitPoint, out Vector3 hitNormal, out QuakeMapEntity hitEntity)
    Parameters
    Type Name Description
    Vector3 origin

    The origin of the ray.

    Vector3 direction

    The direction of the ray.

    float maxDistance

    The maximum distance to check.

    Vector3 hitPoint

    The point where the ray hits the map geometry, if any.

    Vector3 hitNormal

    The normal of the surface at the hit point, if any.

    QuakeMapEntity hitEntity

    The entity that was hit, if any.

    Returns
    Type Description
    bool

    True if the ray hits something, false otherwise.

    | Edit this page View Source

    RenderMap()

    Renders the map.

    Declaration
    protected virtual void RenderMap()
    | Edit this page View Source

    Unload()

    Unloads the scene and all associated resources.

    Declaration
    public override void Unload()
    Overrides
    Scene.Unload()
    | Edit this page View Source

    UnloadMap()

    Unloads the map and all associated resources.

    Declaration
    protected virtual void UnloadMap()

    Implements

    IDisposable
    • Edit this page
    • View Source
    In this article
    Back to top © 2024 Popcorning Guinea Pig Game Engine. A custom C# game engine for indie developers.