Collision Class (#1579)

* First Commit

* Make ScriptCollision class

* Fix typo

* Return correct types

* Use NO_HEIGHT

* Implement GetSurfaceMaterial

* Add enums

* Added death, climbable wall, monkeybar

* FIx angle

* Revise things

* Make "Collision" script module; add IsOutOfBounds() method

* Rename IsOutOfBounds()

* Allow getting floor or ceiling material type

* Don't need IsWall()

* Update Collision.cpp

* Restore IsWall()

* Rename class to "Probe"; start docs; make steepness inquirers return an optional

* Update Probe.cpp

* Update class name in doc

* Update Probe.cpp

* add GetRoomName

* UpdateEnums

* Update MaterialType enum; make room name getting more local

* Revise constructors; update doc

* Update Probe.cpp

* Generate html docs

* Slightly clearer doc comments

* Convert spaces to tabs

* Update Probe.cpp

* Update Probe.cpp

* Rename parameters

* Update Probe.cpp

* ScriptProbe -> Probe

* ExposeGetRoom

* Register Collision.MaterialType table; Enable ClimbWall again.

* Cleanup

* Docs revision

* Update CHANGELOG.md

* Moved names to script reserved names

* Fixed incorrect namespace for probe

* Use consistent names; cleanup

* Make argument optional; fix doc

* Update Probe.cpp

* Add missing includes

* Add Preview() method; update docs

* Add constant

---------

Co-authored-by: Sezz <sezzary@outlook.com>
Co-authored-by: Lwmte <3331699+Lwmte@users.noreply.github.com>
This commit is contained in:
TrainWrack 2025-03-05 03:13:48 -05:00 committed by GitHub
parent d3d885e78f
commit d19d56acee
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
72 changed files with 1563 additions and 4 deletions

View file

@ -29,6 +29,8 @@ TombEngine releases are located in this repository (alongside with Tomb Editor):
- You must use this version: https://github.com/TombEngine/Resources/raw/refs/heads/main/Wad2%20Objects/Interactables/TEN_Waterfall_Emitter.wad2
### Lua API changes
* Added Lerp() function to the Rotation object to allow linear interpolation between rotations.
* Added Collision.Probe class for basic collision detection.
* Added diary module.
* Added View.GetFlyByPosition() and View.GetFlyByRotation() functions to get flyby sequence parameters at a specified time point.
* Added Effects.EmitAirBubble() function to spawn air bubbles.

View file

@ -45,6 +45,7 @@
</ul>
<h2>2 Classes</h2>
<ul class="nowrap">
<li> <a href="../2 classes/Collision.Probe.html">Collision.Probe</a></li>
<li> <a href="../2 classes/Flow.Level.html">Flow.Level</a></li>
<li> <a href="../2 classes/Flow.Settings.html">Flow.Settings</a></li>
<li> <a href="../2 classes/Flow.Statistics.html">Flow.Statistics</a></li>
@ -75,6 +76,7 @@
</ul>
<h2>4 Enums</h2>
<ul class="nowrap">
<li> <a href="../4 enums/Collision.MaterialType.html">Collision.MaterialType</a></li>
<li> <a href="../4 enums/Effects.BlendID.html">Effects.BlendID</a></li>
<li> <a href="../4 enums/Effects.EffectID.html">Effects.EffectID</a></li>
<li> <a href="../4 enums/Flow.ErrorMode.html">Flow.ErrorMode</a></li>

View file

@ -45,6 +45,7 @@
</ul>
<h2>2 Classes</h2>
<ul class="nowrap">
<li> <a href="../2 classes/Collision.Probe.html">Collision.Probe</a></li>
<li> <a href="../2 classes/Flow.Level.html">Flow.Level</a></li>
<li> <a href="../2 classes/Flow.Settings.html">Flow.Settings</a></li>
<li> <a href="../2 classes/Flow.Statistics.html">Flow.Statistics</a></li>
@ -75,6 +76,7 @@
</ul>
<h2>4 Enums</h2>
<ul class="nowrap">
<li> <a href="../4 enums/Collision.MaterialType.html">Collision.MaterialType</a></li>
<li> <a href="../4 enums/Effects.BlendID.html">Effects.BlendID</a></li>
<li> <a href="../4 enums/Effects.EffectID.html">Effects.EffectID</a></li>
<li> <a href="../4 enums/Flow.ErrorMode.html">Flow.ErrorMode</a></li>

View file

@ -45,6 +45,7 @@
</ul>
<h2>2 Classes</h2>
<ul class="nowrap">
<li> <a href="../2 classes/Collision.Probe.html">Collision.Probe</a></li>
<li> <a href="../2 classes/Flow.Level.html">Flow.Level</a></li>
<li> <a href="../2 classes/Flow.Settings.html">Flow.Settings</a></li>
<li> <a href="../2 classes/Flow.Statistics.html">Flow.Statistics</a></li>
@ -75,6 +76,7 @@
</ul>
<h2>4 Enums</h2>
<ul class="nowrap">
<li> <a href="../4 enums/Collision.MaterialType.html">Collision.MaterialType</a></li>
<li> <a href="../4 enums/Effects.BlendID.html">Effects.BlendID</a></li>
<li> <a href="../4 enums/Effects.EffectID.html">Effects.EffectID</a></li>
<li> <a href="../4 enums/Flow.ErrorMode.html">Flow.ErrorMode</a></li>

View file

@ -45,6 +45,7 @@
</ul>
<h2>2 Classes</h2>
<ul class="nowrap">
<li> <a href="../2 classes/Collision.Probe.html">Collision.Probe</a></li>
<li> <a href="../2 classes/Flow.Level.html">Flow.Level</a></li>
<li> <a href="../2 classes/Flow.Settings.html">Flow.Settings</a></li>
<li> <a href="../2 classes/Flow.Statistics.html">Flow.Statistics</a></li>
@ -75,6 +76,7 @@
</ul>
<h2>4 Enums</h2>
<ul class="nowrap">
<li> <a href="../4 enums/Collision.MaterialType.html">Collision.MaterialType</a></li>
<li> <a href="../4 enums/Effects.BlendID.html">Effects.BlendID</a></li>
<li> <a href="../4 enums/Effects.EffectID.html">Effects.EffectID</a></li>
<li> <a href="../4 enums/Flow.ErrorMode.html">Flow.ErrorMode</a></li>

View file

@ -45,6 +45,7 @@
</ul>
<h2>2 Classes</h2>
<ul class="nowrap">
<li> <a href="../2 classes/Collision.Probe.html">Collision.Probe</a></li>
<li> <a href="../2 classes/Flow.Level.html">Flow.Level</a></li>
<li> <a href="../2 classes/Flow.Settings.html">Flow.Settings</a></li>
<li> <a href="../2 classes/Flow.Statistics.html">Flow.Statistics</a></li>
@ -75,6 +76,7 @@
</ul>
<h2>4 Enums</h2>
<ul class="nowrap">
<li> <a href="../4 enums/Collision.MaterialType.html">Collision.MaterialType</a></li>
<li> <a href="../4 enums/Effects.BlendID.html">Effects.BlendID</a></li>
<li> <a href="../4 enums/Effects.EffectID.html">Effects.EffectID</a></li>
<li> <a href="../4 enums/Flow.ErrorMode.html">Flow.ErrorMode</a></li>

View file

@ -45,6 +45,7 @@
</ul>
<h2>2 Classes</h2>
<ul class="nowrap">
<li> <a href="../2 classes/Collision.Probe.html">Collision.Probe</a></li>
<li> <a href="../2 classes/Flow.Level.html">Flow.Level</a></li>
<li> <a href="../2 classes/Flow.Settings.html">Flow.Settings</a></li>
<li> <a href="../2 classes/Flow.Statistics.html">Flow.Statistics</a></li>
@ -75,6 +76,7 @@
</ul>
<h2>4 Enums</h2>
<ul class="nowrap">
<li> <a href="../4 enums/Collision.MaterialType.html">Collision.MaterialType</a></li>
<li> <a href="../4 enums/Effects.BlendID.html">Effects.BlendID</a></li>
<li> <a href="../4 enums/Effects.EffectID.html">Effects.EffectID</a></li>
<li> <a href="../4 enums/Flow.ErrorMode.html">Flow.ErrorMode</a></li>

View file

@ -45,6 +45,7 @@
</ul>
<h2>2 Classes</h2>
<ul class="nowrap">
<li> <a href="../2 classes/Collision.Probe.html">Collision.Probe</a></li>
<li> <a href="../2 classes/Flow.Level.html">Flow.Level</a></li>
<li> <a href="../2 classes/Flow.Settings.html">Flow.Settings</a></li>
<li> <a href="../2 classes/Flow.Statistics.html">Flow.Statistics</a></li>
@ -75,6 +76,7 @@
</ul>
<h2>4 Enums</h2>
<ul class="nowrap">
<li> <a href="../4 enums/Collision.MaterialType.html">Collision.MaterialType</a></li>
<li> <a href="../4 enums/Effects.BlendID.html">Effects.BlendID</a></li>
<li> <a href="../4 enums/Effects.EffectID.html">Effects.EffectID</a></li>
<li> <a href="../4 enums/Flow.ErrorMode.html">Flow.ErrorMode</a></li>

View file

@ -45,6 +45,7 @@
</ul>
<h2>2 Classes</h2>
<ul class="nowrap">
<li> <a href="../2 classes/Collision.Probe.html">Collision.Probe</a></li>
<li> <a href="../2 classes/Flow.Level.html">Flow.Level</a></li>
<li> <a href="../2 classes/Flow.Settings.html">Flow.Settings</a></li>
<li> <a href="../2 classes/Flow.Statistics.html">Flow.Statistics</a></li>
@ -75,6 +76,7 @@
</ul>
<h2>4 Enums</h2>
<ul class="nowrap">
<li> <a href="../4 enums/Collision.MaterialType.html">Collision.MaterialType</a></li>
<li> <a href="../4 enums/Effects.BlendID.html">Effects.BlendID</a></li>
<li> <a href="../4 enums/Effects.EffectID.html">Effects.EffectID</a></li>
<li> <a href="../4 enums/Flow.ErrorMode.html">Flow.ErrorMode</a></li>

View file

@ -45,6 +45,7 @@
</ul>
<h2>2 Classes</h2>
<ul class="nowrap">
<li> <a href="../2 classes/Collision.Probe.html">Collision.Probe</a></li>
<li> <a href="../2 classes/Flow.Level.html">Flow.Level</a></li>
<li> <a href="../2 classes/Flow.Settings.html">Flow.Settings</a></li>
<li> <a href="../2 classes/Flow.Statistics.html">Flow.Statistics</a></li>
@ -75,6 +76,7 @@
</ul>
<h2>4 Enums</h2>
<ul class="nowrap">
<li> <a href="../4 enums/Collision.MaterialType.html">Collision.MaterialType</a></li>
<li> <a href="../4 enums/Effects.BlendID.html">Effects.BlendID</a></li>
<li> <a href="../4 enums/Effects.EffectID.html">Effects.EffectID</a></li>
<li> <a href="../4 enums/Flow.ErrorMode.html">Flow.ErrorMode</a></li>

View file

@ -45,6 +45,7 @@
</ul>
<h2>2 Classes</h2>
<ul class="nowrap">
<li> <a href="../2 classes/Collision.Probe.html">Collision.Probe</a></li>
<li> <a href="../2 classes/Flow.Level.html">Flow.Level</a></li>
<li> <a href="../2 classes/Flow.Settings.html">Flow.Settings</a></li>
<li> <a href="../2 classes/Flow.Statistics.html">Flow.Statistics</a></li>
@ -75,6 +76,7 @@
</ul>
<h2>4 Enums</h2>
<ul class="nowrap">
<li> <a href="../4 enums/Collision.MaterialType.html">Collision.MaterialType</a></li>
<li> <a href="../4 enums/Effects.BlendID.html">Effects.BlendID</a></li>
<li> <a href="../4 enums/Effects.EffectID.html">Effects.EffectID</a></li>
<li> <a href="../4 enums/Flow.ErrorMode.html">Flow.ErrorMode</a></li>

View file

@ -0,0 +1,694 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>TombEngine 1.7.2 (Developer) Lua API</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>
<div id="container">
<div id="product">
<div id="product_logo"></div>
<div id="product_name"><big><b></b></big></div>
<div id="product_description"></div>
</div> <!-- id="product" -->
<div id="main">
<!-- Menu -->
<div id="navigation">
<br/>
<h1>&nbsp;TombEngine</h1>
<ul>
<li><a href="../index.html">Index</a></li>
</ul>
<h2>1 Modules</h2>
<ul class="nowrap">
<li> <a href="../1 modules/Effects.html">Effects</a></li>
<li> <a href="../1 modules/Flow.html">Flow</a></li>
<li> <a href="../1 modules/Input.html">Input</a></li>
<li> <a href="../1 modules/Inventory.html">Inventory</a></li>
<li> <a href="../1 modules/Logic.html">Logic</a></li>
<li> <a href="../1 modules/Objects.html">Objects</a></li>
<li> <a href="../1 modules/Sound.html">Sound</a></li>
<li> <a href="../1 modules/Strings.html">Strings</a></li>
<li> <a href="../1 modules/Util.html">Util</a></li>
<li> <a href="../1 modules/View.html">View</a></li>
</ul>
<h2>2 Classes</h2>
<ul class="nowrap">
<li> <here>Collision.Probe</here></li>
<li> <a href="../2 classes/Flow.Level.html">Flow.Level</a></li>
<li> <a href="../2 classes/Flow.Settings.html">Flow.Settings</a></li>
<li> <a href="../2 classes/Flow.Statistics.html">Flow.Statistics</a></li>
<li> <a href="../2 classes/Objects.AIObject.html">Objects.AIObject</a></li>
<li> <a href="../2 classes/Objects.Camera.html">Objects.Camera</a></li>
<li> <a href="../2 classes/Objects.LaraObject.html">Objects.LaraObject</a></li>
<li> <a href="../2 classes/Objects.Moveable.html">Objects.Moveable</a></li>
<li> <a href="../2 classes/Objects.Room.html">Objects.Room</a></li>
<li> <a href="../2 classes/Objects.Sink.html">Objects.Sink</a></li>
<li> <a href="../2 classes/Objects.SoundSource.html">Objects.SoundSource</a></li>
<li> <a href="../2 classes/Objects.Static.html">Objects.Static</a></li>
<li> <a href="../2 classes/Objects.Volume.html">Objects.Volume</a></li>
<li> <a href="../2 classes/Strings.DisplayString.html">Strings.DisplayString</a></li>
<li> <a href="../2 classes/View.DisplaySprite.html">View.DisplaySprite</a></li>
</ul>
<h2>3 Primitive Classes</h2>
<ul class="nowrap">
<li> <a href="../3 primitive classes/Flow.Fog.html">Flow.Fog</a></li>
<li> <a href="../3 primitive classes/Flow.InventoryItem.html">Flow.InventoryItem</a></li>
<li> <a href="../3 primitive classes/Flow.LensFlare.html">Flow.LensFlare</a></li>
<li> <a href="../3 primitive classes/Flow.SkyLayer.html">Flow.SkyLayer</a></li>
<li> <a href="../3 primitive classes/Flow.Starfield.html">Flow.Starfield</a></li>
<li> <a href="../3 primitive classes/Color.html">Color</a></li>
<li> <a href="../3 primitive classes/Rotation.html">Rotation</a></li>
<li> <a href="../3 primitive classes/Time.html">Time</a></li>
<li> <a href="../3 primitive classes/Vec2.html">Vec2</a></li>
<li> <a href="../3 primitive classes/Vec3.html">Vec3</a></li>
</ul>
<h2>4 Enums</h2>
<ul class="nowrap">
<li> <a href="../4 enums/Collision.MaterialType.html">Collision.MaterialType</a></li>
<li> <a href="../4 enums/Effects.BlendID.html">Effects.BlendID</a></li>
<li> <a href="../4 enums/Effects.EffectID.html">Effects.EffectID</a></li>
<li> <a href="../4 enums/Flow.ErrorMode.html">Flow.ErrorMode</a></li>
<li> <a href="../4 enums/Flow.FreezeMode.html">Flow.FreezeMode</a></li>
<li> <a href="../4 enums/Flow.GameStatus.html">Flow.GameStatus</a></li>
<li> <a href="../4 enums/Input.ActionID.html">Input.ActionID</a></li>
<li> <a href="../4 enums/Objects.AmmoType.html">Objects.AmmoType</a></li>
<li> <a href="../4 enums/Objects.HandStatus.html">Objects.HandStatus</a></li>
<li> <a href="../4 enums/Objects.WeaponType.html">Objects.WeaponType</a></li>
<li> <a href="../4 enums/Objects.MoveableStatus.html">Objects.MoveableStatus</a></li>
<li> <a href="../4 enums/Objects.ObjID.html">Objects.ObjID</a></li>
<li> <a href="../4 enums/Objects.RoomFlagID.html">Objects.RoomFlagID</a></li>
<li> <a href="../4 enums/Objects.RoomReverb.html">Objects.RoomReverb</a></li>
<li> <a href="../4 enums/Sound.SoundTrackType.html">Sound.SoundTrackType</a></li>
<li> <a href="../4 enums/Strings.DisplayStringOption.html">Strings.DisplayStringOption</a></li>
<li> <a href="../4 enums/Util.LogLevel.html">Util.LogLevel</a></li>
<li> <a href="../4 enums/View.AlignMode.html">View.AlignMode</a></li>
<li> <a href="../4 enums/View.CameraType.html">View.CameraType</a></li>
<li> <a href="../4 enums/View.PostProcessMode.html">View.PostProcessMode</a></li>
<li> <a href="../4 enums/View.ScaleMode.html">View.ScaleMode</a></li>
</ul>
<h2>5 Lua utility modules</h2>
<ul class="nowrap">
<li> <a href="../5 lua utility modules/Diary.html">Diary</a></li>
<li> <a href="../5 lua utility modules/EventSequence.html">EventSequence</a></li>
<li> <a href="../5 lua utility modules/Timer.html">Timer</a></li>
<li> <a href="../5 lua utility modules/Type.html">Type</a></li>
</ul>
</div>
<div id="content">
<h1>Class <code>Collision.Probe</code></h1>
<p>Represents a collision probe in the game world.</p>
<p> Provides collision information from a reference world position.</p>
<p> pragma nostrip</p>
<h2><a href="#Functions">Functions</a></h2>
<table class="function_list">
<tr>
<td class="name" ><a href="#Probe">Probe(pos, roomNumber)</a></td>
<td class="summary">Create a Probe at a specified world position in a room.</td>
</tr>
<tr>
<td class="name" ><a href="#Probe">Probe(pos, originRoomNumber, dir, dist)</a></td>
<td class="summary">Create a Probe that casts from an origin world position in a room in a given direction for a specified distance.</td>
</tr>
<tr>
<td class="name" ><a href="#Probe">Probe(Origin, originRoomNumber, rot, dist)</a></td>
<td class="summary">Create a Probe that casts from an origin world position in a room in the direction of a given Rotation for a specified distance.</td>
</tr>
<tr>
<td class="name" ><a href="#Probe">Probe(Origin, originRoomNumber, rot, relOffset)</a></td>
<td class="summary">Create a Probe that casts from an origin world position, where a given relative offset is rotated according to a given Rotation.</td>
</tr>
<tr>
<td class="name" ><a href="#GetPosition">GetPosition()</a></td>
<td class="summary">Get the world position of this Probe.</td>
</tr>
<tr>
<td class="name" ><a href="#GetFloorHeight">GetFloorHeight()</a></td>
<td class="summary">Get the floor height at this Probe.</td>
</tr>
<tr>
<td class="name" ><a href="#GetCeilingHeight">GetCeilingHeight()</a></td>
<td class="summary">Get the ceiling height at this Probe.</td>
</tr>
<tr>
<td class="name" ><a href="#GetWaterSurfaceHeight">GetWaterSurfaceHeight()</a></td>
<td class="summary">Get the water surface height at this Probe.</td>
</tr>
<tr>
<td class="name" ><a href="#GetFloorNormal">GetFloorNormal()</a></td>
<td class="summary">Get the normal of the floor at this Probe.</td>
</tr>
<tr>
<td class="name" ><a href="#GetCeilingNormal">GetCeilingNormal()</a></td>
<td class="summary">Get the normal of the ceiling at this Probe.</td>
</tr>
<tr>
<td class="name" ><a href="#GetFloorMaterialType">GetFloorMaterialType()</a></td>
<td class="summary">Get the material type of the floor at this Probe.</td>
</tr>
<tr>
<td class="name" ><a href="#GetCeilingMaterialType">GetCeilingMaterialType()</a></td>
<td class="summary">Get the material type of the ceiling at this Probe.</td>
</tr>
<tr>
<td class="name" ><a href="#IsSteepFloor">IsSteepFloor()</a></td>
<td class="summary">Check if the floor at this Probe is steep.</td>
</tr>
<tr>
<td class="name" ><a href="#IsSteepCeiling">IsSteepCeiling()</a></td>
<td class="summary">Check if the ceiling at this Probe is steep.</td>
</tr>
<tr>
<td class="name" ><a href="#IsWall">IsWall()</a></td>
<td class="summary">Check if there is a wall at this Probe.</td>
</tr>
<tr>
<td class="name" ><a href="#IsInsideSolidGeometry">IsInsideSolidGeometry()</a></td>
<td class="summary">Check if this Probe is inside solid geometry, i.e.</td>
</tr>
<tr>
<td class="name" ><a href="#IsClimbableWall">IsClimbableWall(headingAngle)</a></td>
<td class="summary">Check if there is a climbable wall in the given heading angle at this Probe.</td>
</tr>
<tr>
<td class="name" ><a href="#IsMonkeySwing">IsMonkeySwing()</a></td>
<td class="summary">Check if there is a monkey swing at this Probe.</td>
</tr>
<tr>
<td class="name" ><a href="#IsDeath">IsDeath()</a></td>
<td class="summary">Check if there is a death tile at this Probe.</td>
</tr>
</table>
<br/>
<br/>
<h2 class="section-header "><a name="Functions"></a>Functions</h2>
<dl class="function">
<dt>
<a name = "Probe"></a>
<strong>Probe(pos, roomNumber)</strong>
</dt>
<dd>
Create a Probe at a specified world position in a room.
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">pos</span>
<span class="types"><a class="type" href="../3 primitive classes/Vec3.html#">Vec3</a></span>
World position.
</li>
<li><span class="parameter">roomNumber</span>
<span class="types"><span class="type">int</span></span>
Room number.
</li>
</ul>
<h3>Returns:</h3>
<ol>
<span class="types"><a class="type" href="../2 classes/Collision.Probe.html#Probe">Probe</a></span>
a new Probe.
</ol>
</dd>
<dt>
<a name = "Probe"></a>
<strong>Probe(pos, originRoomNumber, dir, dist)</strong>
</dt>
<dd>
Create a Probe that casts from an origin world position in a room in a given direction for a specified distance.
Required to correctly traverse between rooms.
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">pos</span>
<span class="types"><a class="type" href="../3 primitive classes/Vec3.html#">Vec3</a></span>
Origin world position to cast from.
</li>
<li><span class="parameter">originRoomNumber</span>
<span class="types"><span class="type">int</span></span>
Origin's room number.
</li>
<li><span class="parameter">dir</span>
<span class="types"><a class="type" href="../3 primitive classes/Vec3.html#">Vec3</a></span>
Direction in which to cast.
</li>
<li><span class="parameter">dist</span>
<span class="types"><span class="type">float</span></span>
Distance to cast.
</li>
</ul>
<h3>Returns:</h3>
<ol>
<span class="types"><a class="type" href="../2 classes/Collision.Probe.html#Probe">Probe</a></span>
a new Probe.
</ol>
</dd>
<dt>
<a name = "Probe"></a>
<strong>Probe(Origin, originRoomNumber, rot, dist)</strong>
</dt>
<dd>
Create a Probe that casts from an origin world position in a room in the direction of a given Rotation for a specified distance.
Required to correctly traverse between rooms.
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">Origin</span>
<span class="types"><a class="type" href="../3 primitive classes/Vec3.html#">Vec3</a></span>
world position to cast from.
</li>
<li><span class="parameter">originRoomNumber</span>
<span class="types"><span class="type">int</span></span>
Origin's room number.
</li>
<li><span class="parameter">rot</span>
<span class="types"><a class="type" href="../3 primitive classes/Rotation.html#">Rotation</a></span>
Rotation defining the direction in which to cast.
</li>
<li><span class="parameter">dist</span>
<span class="types"><span class="type">float</span></span>
Distance to cast.
</li>
</ul>
<h3>Returns:</h3>
<ol>
<span class="types"><a class="type" href="../2 classes/Collision.Probe.html#Probe">Probe</a></span>
a new Probe.
</ol>
</dd>
<dt>
<a name = "Probe"></a>
<strong>Probe(Origin, originRoomNumber, rot, relOffset)</strong>
</dt>
<dd>
Create a Probe that casts from an origin world position, where a given relative offset is rotated according to a given Rotation.
Required to correctly traverse between rooms.
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">Origin</span>
<span class="types"><a class="type" href="../3 primitive classes/Vec3.html#">Vec3</a></span>
world position to cast from.
</li>
<li><span class="parameter">originRoomNumber</span>
<span class="types"><span class="type">int</span></span>
Origin's room number.
</li>
<li><span class="parameter">rot</span>
<span class="types"><a class="type" href="../3 primitive classes/Rotation.html#">Rotation</a></span>
Rotation according to which the input relative offset is rotated.
</li>
<li><span class="parameter">relOffset</span>
<span class="types"><a class="type" href="../3 primitive classes/Vec3.html#">Vec3</a></span>
Relative offset to cast.
</li>
</ul>
<h3>Returns:</h3>
<ol>
<span class="types"><a class="type" href="../2 classes/Collision.Probe.html#Probe">Probe</a></span>
a new Probe.
</ol>
</dd>
<dt>
<a name = "GetPosition"></a>
<strong>GetPosition()</strong>
</dt>
<dd>
Get the world position of this Probe.
<h3>Returns:</h3>
<ol>
<span class="types"><a class="type" href="../3 primitive classes/Vec3.html#">Vec3</a></span>
World position.
</ol>
</dd>
<dt>
<a name = "GetFloorHeight"></a>
<strong>GetFloorHeight()</strong>
</dt>
<dd>
Get the floor height at this Probe.
<h3>Returns:</h3>
<ol>
<span class="types"><span class="type">int[opt]</span></span>
Floor height. <strong>nil: no floor exists.</strong>
</ol>
</dd>
<dt>
<a name = "GetCeilingHeight"></a>
<strong>GetCeilingHeight()</strong>
</dt>
<dd>
Get the ceiling height at this Probe.
<h3>Returns:</h3>
<ol>
<span class="types"><span class="type">int[opt]</span></span>
Ceiling height. <strong>nil: no ceiling exists.</strong>
</ol>
</dd>
<dt>
<a name = "GetWaterSurfaceHeight"></a>
<strong>GetWaterSurfaceHeight()</strong>
</dt>
<dd>
Get the water surface height at this Probe.
<h3>Returns:</h3>
<ol>
<span class="types"><span class="type">int[opt]</span></span>
Water surface height. <strong>nil: no water surface exists.</strong>
</ol>
</dd>
<dt>
<a name = "GetFloorNormal"></a>
<strong>GetFloorNormal()</strong>
</dt>
<dd>
Get the normal of the floor at this Probe.
<h3>Returns:</h3>
<ol>
<span class="types"><a class="type" href="../3 primitive classes/Vec3.html#">Vec3[opt]</a></span>
Floor normal. <strong>nil: no floor exists.</strong>
</ol>
</dd>
<dt>
<a name = "GetCeilingNormal"></a>
<strong>GetCeilingNormal()</strong>
</dt>
<dd>
Get the normal of the ceiling at this Probe.
<h3>Returns:</h3>
<ol>
<span class="types"><a class="type" href="../3 primitive classes/Vec3.html#">Vec3[opt]</a></span>
Ceiling normal. <strong>nil: no ceiling exists.</strong>
</ol>
</dd>
<dt>
<a name = "GetFloorMaterialType"></a>
<strong>GetFloorMaterialType()</strong>
</dt>
<dd>
Get the material type of the floor at this Probe.
<h3>Returns:</h3>
<ol>
<span class="types"><a class="type" href="../4 enums/Collision.MaterialType.html#">Collision.MaterialType[opt]</a></span>
Floor material type. <strong>nil: no floor exists.</strong>
</ol>
</dd>
<dt>
<a name = "GetCeilingMaterialType"></a>
<strong>GetCeilingMaterialType()</strong>
</dt>
<dd>
Get the material type of the ceiling at this Probe.
<h3>Returns:</h3>
<ol>
<span class="types"><a class="type" href="../4 enums/Collision.MaterialType.html#">Collision.MaterialType[opt]</a></span>
Ceiling material type. <strong>nil: no ceiling exists.</strong>
</ol>
</dd>
<dt>
<a name = "IsSteepFloor"></a>
<strong>IsSteepFloor()</strong>
</dt>
<dd>
Check if the floor at this Probe is steep.
<h3>Returns:</h3>
<ol>
<span class="types"><span class="type">bool[opt]</span></span>
Steep floor status. <strong>true: is a steep floor, false: isn't a steep floor, nil: no floor exists.</strong>
</ol>
</dd>
<dt>
<a name = "IsSteepCeiling"></a>
<strong>IsSteepCeiling()</strong>
</dt>
<dd>
Check if the ceiling at this Probe is steep.
<h3>Returns:</h3>
<ol>
<span class="types"><span class="type">bool[opt]</span></span>
Steep ceiling status. <strong>true: is a steep ceiling, false: isn't a steep ceiling, nil: no ceiling exists.</strong>
</ol>
</dd>
<dt>
<a name = "IsWall"></a>
<strong>IsWall()</strong>
</dt>
<dd>
Check if there is a wall at this Probe. Can be used to determine if a wall and ceiling exist.
<h3>Returns:</h3>
<ol>
<span class="types"><span class="type">bool</span></span>
Wall status. <strong>true: is a wall, false: isn't a wall</strong>
</ol>
</dd>
<dt>
<a name = "IsInsideSolidGeometry"></a>
<strong>IsInsideSolidGeometry()</strong>
</dt>
<dd>
Check if this Probe is inside solid geometry, i.e. below a floor, above a ceiling, or inside a wall.
<h3>Returns:</h3>
<ol>
<span class="types"><span class="type">bool</span></span>
Inside geometry status. <strong>true: is inside, false: is outside</strong>
</ol>
</dd>
<dt>
<a name = "IsClimbableWall"></a>
<strong>IsClimbableWall(headingAngle)</strong>
</dt>
<dd>
Check if there is a climbable wall in the given heading angle at this Probe.
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">headingAngle</span>
<span class="types"><span class="type">float</span></span>
Heading angle at which to check for a climbable wall.
</li>
</ul>
<h3>Returns:</h3>
<ol>
<span class="types"><span class="type">bool</span></span>
Climbable wall status. <strong>true: is climbable, false: isn't climbable</strong>
</ol>
</dd>
<dt>
<a name = "IsMonkeySwing"></a>
<strong>IsMonkeySwing()</strong>
</dt>
<dd>
Check if there is a monkey swing at this Probe.
<h3>Returns:</h3>
<ol>
<span class="types"><span class="type">bool</span></span>
Monkey swing status. <strong>true: is a monkey swing, false: isn't a monkey swing</strong>
</ol>
</dd>
<dt>
<a name = "IsDeath"></a>
<strong>IsDeath()</strong>
</dt>
<dd>
Check if there is a death tile at this Probe.
<h3>Returns:</h3>
<ol>
<span class="types"><span class="type">bool</span></span>
Death tile status. <strong>true: is a death tile, false: isn't a death tile</strong>
</ol>
</dd>
</dl>
</div> <!-- id="content" -->
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="https://github.com/hispidence/TEN-LDoc">TEN-LDoc</a> (a fork of <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a>)</i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>
</html>

View file

@ -45,6 +45,7 @@
</ul>
<h2>2 Classes</h2>
<ul class="nowrap">
<li> <a href="../2 classes/Collision.Probe.html">Collision.Probe</a></li>
<li> <here>Flow.Level</here></li>
<li> <a href="../2 classes/Flow.Settings.html">Flow.Settings</a></li>
<li> <a href="../2 classes/Flow.Statistics.html">Flow.Statistics</a></li>
@ -75,6 +76,7 @@
</ul>
<h2>4 Enums</h2>
<ul class="nowrap">
<li> <a href="../4 enums/Collision.MaterialType.html">Collision.MaterialType</a></li>
<li> <a href="../4 enums/Effects.BlendID.html">Effects.BlendID</a></li>
<li> <a href="../4 enums/Effects.EffectID.html">Effects.EffectID</a></li>
<li> <a href="../4 enums/Flow.ErrorMode.html">Flow.ErrorMode</a></li>

View file

@ -45,6 +45,7 @@
</ul>
<h2>2 Classes</h2>
<ul class="nowrap">
<li> <a href="../2 classes/Collision.Probe.html">Collision.Probe</a></li>
<li> <a href="../2 classes/Flow.Level.html">Flow.Level</a></li>
<li> <here>Flow.Settings</here></li>
<li> <a href="../2 classes/Flow.Statistics.html">Flow.Statistics</a></li>
@ -75,6 +76,7 @@
</ul>
<h2>4 Enums</h2>
<ul class="nowrap">
<li> <a href="../4 enums/Collision.MaterialType.html">Collision.MaterialType</a></li>
<li> <a href="../4 enums/Effects.BlendID.html">Effects.BlendID</a></li>
<li> <a href="../4 enums/Effects.EffectID.html">Effects.EffectID</a></li>
<li> <a href="../4 enums/Flow.ErrorMode.html">Flow.ErrorMode</a></li>

View file

@ -45,6 +45,7 @@
</ul>
<h2>2 Classes</h2>
<ul class="nowrap">
<li> <a href="../2 classes/Collision.Probe.html">Collision.Probe</a></li>
<li> <a href="../2 classes/Flow.Level.html">Flow.Level</a></li>
<li> <a href="../2 classes/Flow.Settings.html">Flow.Settings</a></li>
<li> <here>Flow.Statistics</here></li>
@ -75,6 +76,7 @@
</ul>
<h2>4 Enums</h2>
<ul class="nowrap">
<li> <a href="../4 enums/Collision.MaterialType.html">Collision.MaterialType</a></li>
<li> <a href="../4 enums/Effects.BlendID.html">Effects.BlendID</a></li>
<li> <a href="../4 enums/Effects.EffectID.html">Effects.EffectID</a></li>
<li> <a href="../4 enums/Flow.ErrorMode.html">Flow.ErrorMode</a></li>

View file

@ -45,6 +45,7 @@
</ul>
<h2>2 Classes</h2>
<ul class="nowrap">
<li> <a href="../2 classes/Collision.Probe.html">Collision.Probe</a></li>
<li> <a href="../2 classes/Flow.Level.html">Flow.Level</a></li>
<li> <a href="../2 classes/Flow.Settings.html">Flow.Settings</a></li>
<li> <a href="../2 classes/Flow.Statistics.html">Flow.Statistics</a></li>
@ -75,6 +76,7 @@
</ul>
<h2>4 Enums</h2>
<ul class="nowrap">
<li> <a href="../4 enums/Collision.MaterialType.html">Collision.MaterialType</a></li>
<li> <a href="../4 enums/Effects.BlendID.html">Effects.BlendID</a></li>
<li> <a href="../4 enums/Effects.EffectID.html">Effects.EffectID</a></li>
<li> <a href="../4 enums/Flow.ErrorMode.html">Flow.ErrorMode</a></li>

View file

@ -45,6 +45,7 @@
</ul>
<h2>2 Classes</h2>
<ul class="nowrap">
<li> <a href="../2 classes/Collision.Probe.html">Collision.Probe</a></li>
<li> <a href="../2 classes/Flow.Level.html">Flow.Level</a></li>
<li> <a href="../2 classes/Flow.Settings.html">Flow.Settings</a></li>
<li> <a href="../2 classes/Flow.Statistics.html">Flow.Statistics</a></li>
@ -75,6 +76,7 @@
</ul>
<h2>4 Enums</h2>
<ul class="nowrap">
<li> <a href="../4 enums/Collision.MaterialType.html">Collision.MaterialType</a></li>
<li> <a href="../4 enums/Effects.BlendID.html">Effects.BlendID</a></li>
<li> <a href="../4 enums/Effects.EffectID.html">Effects.EffectID</a></li>
<li> <a href="../4 enums/Flow.ErrorMode.html">Flow.ErrorMode</a></li>

View file

@ -45,6 +45,7 @@
</ul>
<h2>2 Classes</h2>
<ul class="nowrap">
<li> <a href="../2 classes/Collision.Probe.html">Collision.Probe</a></li>
<li> <a href="../2 classes/Flow.Level.html">Flow.Level</a></li>
<li> <a href="../2 classes/Flow.Settings.html">Flow.Settings</a></li>
<li> <a href="../2 classes/Flow.Statistics.html">Flow.Statistics</a></li>
@ -75,6 +76,7 @@
</ul>
<h2>4 Enums</h2>
<ul class="nowrap">
<li> <a href="../4 enums/Collision.MaterialType.html">Collision.MaterialType</a></li>
<li> <a href="../4 enums/Effects.BlendID.html">Effects.BlendID</a></li>
<li> <a href="../4 enums/Effects.EffectID.html">Effects.EffectID</a></li>
<li> <a href="../4 enums/Flow.ErrorMode.html">Flow.ErrorMode</a></li>

View file

@ -45,6 +45,7 @@
</ul>
<h2>2 Classes</h2>
<ul class="nowrap">
<li> <a href="../2 classes/Collision.Probe.html">Collision.Probe</a></li>
<li> <a href="../2 classes/Flow.Level.html">Flow.Level</a></li>
<li> <a href="../2 classes/Flow.Settings.html">Flow.Settings</a></li>
<li> <a href="../2 classes/Flow.Statistics.html">Flow.Statistics</a></li>
@ -75,6 +76,7 @@
</ul>
<h2>4 Enums</h2>
<ul class="nowrap">
<li> <a href="../4 enums/Collision.MaterialType.html">Collision.MaterialType</a></li>
<li> <a href="../4 enums/Effects.BlendID.html">Effects.BlendID</a></li>
<li> <a href="../4 enums/Effects.EffectID.html">Effects.EffectID</a></li>
<li> <a href="../4 enums/Flow.ErrorMode.html">Flow.ErrorMode</a></li>

View file

@ -45,6 +45,7 @@
</ul>
<h2>2 Classes</h2>
<ul class="nowrap">
<li> <a href="../2 classes/Collision.Probe.html">Collision.Probe</a></li>
<li> <a href="../2 classes/Flow.Level.html">Flow.Level</a></li>
<li> <a href="../2 classes/Flow.Settings.html">Flow.Settings</a></li>
<li> <a href="../2 classes/Flow.Statistics.html">Flow.Statistics</a></li>
@ -75,6 +76,7 @@
</ul>
<h2>4 Enums</h2>
<ul class="nowrap">
<li> <a href="../4 enums/Collision.MaterialType.html">Collision.MaterialType</a></li>
<li> <a href="../4 enums/Effects.BlendID.html">Effects.BlendID</a></li>
<li> <a href="../4 enums/Effects.EffectID.html">Effects.EffectID</a></li>
<li> <a href="../4 enums/Flow.ErrorMode.html">Flow.ErrorMode</a></li>

View file

@ -45,6 +45,7 @@
</ul>
<h2>2 Classes</h2>
<ul class="nowrap">
<li> <a href="../2 classes/Collision.Probe.html">Collision.Probe</a></li>
<li> <a href="../2 classes/Flow.Level.html">Flow.Level</a></li>
<li> <a href="../2 classes/Flow.Settings.html">Flow.Settings</a></li>
<li> <a href="../2 classes/Flow.Statistics.html">Flow.Statistics</a></li>
@ -75,6 +76,7 @@
</ul>
<h2>4 Enums</h2>
<ul class="nowrap">
<li> <a href="../4 enums/Collision.MaterialType.html">Collision.MaterialType</a></li>
<li> <a href="../4 enums/Effects.BlendID.html">Effects.BlendID</a></li>
<li> <a href="../4 enums/Effects.EffectID.html">Effects.EffectID</a></li>
<li> <a href="../4 enums/Flow.ErrorMode.html">Flow.ErrorMode</a></li>

View file

@ -45,6 +45,7 @@
</ul>
<h2>2 Classes</h2>
<ul class="nowrap">
<li> <a href="../2 classes/Collision.Probe.html">Collision.Probe</a></li>
<li> <a href="../2 classes/Flow.Level.html">Flow.Level</a></li>
<li> <a href="../2 classes/Flow.Settings.html">Flow.Settings</a></li>
<li> <a href="../2 classes/Flow.Statistics.html">Flow.Statistics</a></li>
@ -75,6 +76,7 @@
</ul>
<h2>4 Enums</h2>
<ul class="nowrap">
<li> <a href="../4 enums/Collision.MaterialType.html">Collision.MaterialType</a></li>
<li> <a href="../4 enums/Effects.BlendID.html">Effects.BlendID</a></li>
<li> <a href="../4 enums/Effects.EffectID.html">Effects.EffectID</a></li>
<li> <a href="../4 enums/Flow.ErrorMode.html">Flow.ErrorMode</a></li>

View file

@ -45,6 +45,7 @@
</ul>
<h2>2 Classes</h2>
<ul class="nowrap">
<li> <a href="../2 classes/Collision.Probe.html">Collision.Probe</a></li>
<li> <a href="../2 classes/Flow.Level.html">Flow.Level</a></li>
<li> <a href="../2 classes/Flow.Settings.html">Flow.Settings</a></li>
<li> <a href="../2 classes/Flow.Statistics.html">Flow.Statistics</a></li>
@ -75,6 +76,7 @@
</ul>
<h2>4 Enums</h2>
<ul class="nowrap">
<li> <a href="../4 enums/Collision.MaterialType.html">Collision.MaterialType</a></li>
<li> <a href="../4 enums/Effects.BlendID.html">Effects.BlendID</a></li>
<li> <a href="../4 enums/Effects.EffectID.html">Effects.EffectID</a></li>
<li> <a href="../4 enums/Flow.ErrorMode.html">Flow.ErrorMode</a></li>

View file

@ -45,6 +45,7 @@
</ul>
<h2>2 Classes</h2>
<ul class="nowrap">
<li> <a href="../2 classes/Collision.Probe.html">Collision.Probe</a></li>
<li> <a href="../2 classes/Flow.Level.html">Flow.Level</a></li>
<li> <a href="../2 classes/Flow.Settings.html">Flow.Settings</a></li>
<li> <a href="../2 classes/Flow.Statistics.html">Flow.Statistics</a></li>
@ -75,6 +76,7 @@
</ul>
<h2>4 Enums</h2>
<ul class="nowrap">
<li> <a href="../4 enums/Collision.MaterialType.html">Collision.MaterialType</a></li>
<li> <a href="../4 enums/Effects.BlendID.html">Effects.BlendID</a></li>
<li> <a href="../4 enums/Effects.EffectID.html">Effects.EffectID</a></li>
<li> <a href="../4 enums/Flow.ErrorMode.html">Flow.ErrorMode</a></li>

View file

@ -45,6 +45,7 @@
</ul>
<h2>2 Classes</h2>
<ul class="nowrap">
<li> <a href="../2 classes/Collision.Probe.html">Collision.Probe</a></li>
<li> <a href="../2 classes/Flow.Level.html">Flow.Level</a></li>
<li> <a href="../2 classes/Flow.Settings.html">Flow.Settings</a></li>
<li> <a href="../2 classes/Flow.Statistics.html">Flow.Statistics</a></li>
@ -75,6 +76,7 @@
</ul>
<h2>4 Enums</h2>
<ul class="nowrap">
<li> <a href="../4 enums/Collision.MaterialType.html">Collision.MaterialType</a></li>
<li> <a href="../4 enums/Effects.BlendID.html">Effects.BlendID</a></li>
<li> <a href="../4 enums/Effects.EffectID.html">Effects.EffectID</a></li>
<li> <a href="../4 enums/Flow.ErrorMode.html">Flow.ErrorMode</a></li>

View file

@ -45,6 +45,7 @@
</ul>
<h2>2 Classes</h2>
<ul class="nowrap">
<li> <a href="../2 classes/Collision.Probe.html">Collision.Probe</a></li>
<li> <a href="../2 classes/Flow.Level.html">Flow.Level</a></li>
<li> <a href="../2 classes/Flow.Settings.html">Flow.Settings</a></li>
<li> <a href="../2 classes/Flow.Statistics.html">Flow.Statistics</a></li>
@ -75,6 +76,7 @@
</ul>
<h2>4 Enums</h2>
<ul class="nowrap">
<li> <a href="../4 enums/Collision.MaterialType.html">Collision.MaterialType</a></li>
<li> <a href="../4 enums/Effects.BlendID.html">Effects.BlendID</a></li>
<li> <a href="../4 enums/Effects.EffectID.html">Effects.EffectID</a></li>
<li> <a href="../4 enums/Flow.ErrorMode.html">Flow.ErrorMode</a></li>

View file

@ -45,6 +45,7 @@
</ul>
<h2>2 Classes</h2>
<ul class="nowrap">
<li> <a href="../2 classes/Collision.Probe.html">Collision.Probe</a></li>
<li> <a href="../2 classes/Flow.Level.html">Flow.Level</a></li>
<li> <a href="../2 classes/Flow.Settings.html">Flow.Settings</a></li>
<li> <a href="../2 classes/Flow.Statistics.html">Flow.Statistics</a></li>
@ -75,6 +76,7 @@
</ul>
<h2>4 Enums</h2>
<ul class="nowrap">
<li> <a href="../4 enums/Collision.MaterialType.html">Collision.MaterialType</a></li>
<li> <a href="../4 enums/Effects.BlendID.html">Effects.BlendID</a></li>
<li> <a href="../4 enums/Effects.EffectID.html">Effects.EffectID</a></li>
<li> <a href="../4 enums/Flow.ErrorMode.html">Flow.ErrorMode</a></li>

View file

@ -45,6 +45,7 @@
</ul>
<h2>2 Classes</h2>
<ul class="nowrap">
<li> <a href="../2 classes/Collision.Probe.html">Collision.Probe</a></li>
<li> <a href="../2 classes/Flow.Level.html">Flow.Level</a></li>
<li> <a href="../2 classes/Flow.Settings.html">Flow.Settings</a></li>
<li> <a href="../2 classes/Flow.Statistics.html">Flow.Statistics</a></li>
@ -75,6 +76,7 @@
</ul>
<h2>4 Enums</h2>
<ul class="nowrap">
<li> <a href="../4 enums/Collision.MaterialType.html">Collision.MaterialType</a></li>
<li> <a href="../4 enums/Effects.BlendID.html">Effects.BlendID</a></li>
<li> <a href="../4 enums/Effects.EffectID.html">Effects.EffectID</a></li>
<li> <a href="../4 enums/Flow.ErrorMode.html">Flow.ErrorMode</a></li>

View file

@ -45,6 +45,7 @@
</ul>
<h2>2 Classes</h2>
<ul class="nowrap">
<li> <a href="../2 classes/Collision.Probe.html">Collision.Probe</a></li>
<li> <a href="../2 classes/Flow.Level.html">Flow.Level</a></li>
<li> <a href="../2 classes/Flow.Settings.html">Flow.Settings</a></li>
<li> <a href="../2 classes/Flow.Statistics.html">Flow.Statistics</a></li>
@ -75,6 +76,7 @@
</ul>
<h2>4 Enums</h2>
<ul class="nowrap">
<li> <a href="../4 enums/Collision.MaterialType.html">Collision.MaterialType</a></li>
<li> <a href="../4 enums/Effects.BlendID.html">Effects.BlendID</a></li>
<li> <a href="../4 enums/Effects.EffectID.html">Effects.EffectID</a></li>
<li> <a href="../4 enums/Flow.ErrorMode.html">Flow.ErrorMode</a></li>

View file

@ -45,6 +45,7 @@
</ul>
<h2>2 Classes</h2>
<ul class="nowrap">
<li> <a href="../2 classes/Collision.Probe.html">Collision.Probe</a></li>
<li> <a href="../2 classes/Flow.Level.html">Flow.Level</a></li>
<li> <a href="../2 classes/Flow.Settings.html">Flow.Settings</a></li>
<li> <a href="../2 classes/Flow.Statistics.html">Flow.Statistics</a></li>
@ -75,6 +76,7 @@
</ul>
<h2>4 Enums</h2>
<ul class="nowrap">
<li> <a href="../4 enums/Collision.MaterialType.html">Collision.MaterialType</a></li>
<li> <a href="../4 enums/Effects.BlendID.html">Effects.BlendID</a></li>
<li> <a href="../4 enums/Effects.EffectID.html">Effects.EffectID</a></li>
<li> <a href="../4 enums/Flow.ErrorMode.html">Flow.ErrorMode</a></li>

View file

@ -45,6 +45,7 @@
</ul>
<h2>2 Classes</h2>
<ul class="nowrap">
<li> <a href="../2 classes/Collision.Probe.html">Collision.Probe</a></li>
<li> <a href="../2 classes/Flow.Level.html">Flow.Level</a></li>
<li> <a href="../2 classes/Flow.Settings.html">Flow.Settings</a></li>
<li> <a href="../2 classes/Flow.Statistics.html">Flow.Statistics</a></li>
@ -75,6 +76,7 @@
</ul>
<h2>4 Enums</h2>
<ul class="nowrap">
<li> <a href="../4 enums/Collision.MaterialType.html">Collision.MaterialType</a></li>
<li> <a href="../4 enums/Effects.BlendID.html">Effects.BlendID</a></li>
<li> <a href="../4 enums/Effects.EffectID.html">Effects.EffectID</a></li>
<li> <a href="../4 enums/Flow.ErrorMode.html">Flow.ErrorMode</a></li>

View file

@ -45,6 +45,7 @@
</ul>
<h2>2 Classes</h2>
<ul class="nowrap">
<li> <a href="../2 classes/Collision.Probe.html">Collision.Probe</a></li>
<li> <a href="../2 classes/Flow.Level.html">Flow.Level</a></li>
<li> <a href="../2 classes/Flow.Settings.html">Flow.Settings</a></li>
<li> <a href="../2 classes/Flow.Statistics.html">Flow.Statistics</a></li>
@ -75,6 +76,7 @@
</ul>
<h2>4 Enums</h2>
<ul class="nowrap">
<li> <a href="../4 enums/Collision.MaterialType.html">Collision.MaterialType</a></li>
<li> <a href="../4 enums/Effects.BlendID.html">Effects.BlendID</a></li>
<li> <a href="../4 enums/Effects.EffectID.html">Effects.EffectID</a></li>
<li> <a href="../4 enums/Flow.ErrorMode.html">Flow.ErrorMode</a></li>

View file

@ -45,6 +45,7 @@
</ul>
<h2>2 Classes</h2>
<ul class="nowrap">
<li> <a href="../2 classes/Collision.Probe.html">Collision.Probe</a></li>
<li> <a href="../2 classes/Flow.Level.html">Flow.Level</a></li>
<li> <a href="../2 classes/Flow.Settings.html">Flow.Settings</a></li>
<li> <a href="../2 classes/Flow.Statistics.html">Flow.Statistics</a></li>
@ -75,6 +76,7 @@
</ul>
<h2>4 Enums</h2>
<ul class="nowrap">
<li> <a href="../4 enums/Collision.MaterialType.html">Collision.MaterialType</a></li>
<li> <a href="../4 enums/Effects.BlendID.html">Effects.BlendID</a></li>
<li> <a href="../4 enums/Effects.EffectID.html">Effects.EffectID</a></li>
<li> <a href="../4 enums/Flow.ErrorMode.html">Flow.ErrorMode</a></li>

View file

@ -45,6 +45,7 @@
</ul>
<h2>2 Classes</h2>
<ul class="nowrap">
<li> <a href="../2 classes/Collision.Probe.html">Collision.Probe</a></li>
<li> <a href="../2 classes/Flow.Level.html">Flow.Level</a></li>
<li> <a href="../2 classes/Flow.Settings.html">Flow.Settings</a></li>
<li> <a href="../2 classes/Flow.Statistics.html">Flow.Statistics</a></li>
@ -75,6 +76,7 @@
</ul>
<h2>4 Enums</h2>
<ul class="nowrap">
<li> <a href="../4 enums/Collision.MaterialType.html">Collision.MaterialType</a></li>
<li> <a href="../4 enums/Effects.BlendID.html">Effects.BlendID</a></li>
<li> <a href="../4 enums/Effects.EffectID.html">Effects.EffectID</a></li>
<li> <a href="../4 enums/Flow.ErrorMode.html">Flow.ErrorMode</a></li>

View file

@ -45,6 +45,7 @@
</ul>
<h2>2 Classes</h2>
<ul class="nowrap">
<li> <a href="../2 classes/Collision.Probe.html">Collision.Probe</a></li>
<li> <a href="../2 classes/Flow.Level.html">Flow.Level</a></li>
<li> <a href="../2 classes/Flow.Settings.html">Flow.Settings</a></li>
<li> <a href="../2 classes/Flow.Statistics.html">Flow.Statistics</a></li>
@ -75,6 +76,7 @@
</ul>
<h2>4 Enums</h2>
<ul class="nowrap">
<li> <a href="../4 enums/Collision.MaterialType.html">Collision.MaterialType</a></li>
<li> <a href="../4 enums/Effects.BlendID.html">Effects.BlendID</a></li>
<li> <a href="../4 enums/Effects.EffectID.html">Effects.EffectID</a></li>
<li> <a href="../4 enums/Flow.ErrorMode.html">Flow.ErrorMode</a></li>

View file

@ -45,6 +45,7 @@
</ul>
<h2>2 Classes</h2>
<ul class="nowrap">
<li> <a href="../2 classes/Collision.Probe.html">Collision.Probe</a></li>
<li> <a href="../2 classes/Flow.Level.html">Flow.Level</a></li>
<li> <a href="../2 classes/Flow.Settings.html">Flow.Settings</a></li>
<li> <a href="../2 classes/Flow.Statistics.html">Flow.Statistics</a></li>
@ -75,6 +76,7 @@
</ul>
<h2>4 Enums</h2>
<ul class="nowrap">
<li> <a href="../4 enums/Collision.MaterialType.html">Collision.MaterialType</a></li>
<li> <a href="../4 enums/Effects.BlendID.html">Effects.BlendID</a></li>
<li> <a href="../4 enums/Effects.EffectID.html">Effects.EffectID</a></li>
<li> <a href="../4 enums/Flow.ErrorMode.html">Flow.ErrorMode</a></li>

View file

@ -0,0 +1,189 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>TombEngine 1.7.2 (Developer) Lua API</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>
<div id="container">
<div id="product">
<div id="product_logo"></div>
<div id="product_name"><big><b></b></big></div>
<div id="product_description"></div>
</div> <!-- id="product" -->
<div id="main">
<!-- Menu -->
<div id="navigation">
<br/>
<h1>&nbsp;TombEngine</h1>
<ul>
<li><a href="../index.html">Index</a></li>
</ul>
<h2>1 Modules</h2>
<ul class="nowrap">
<li> <a href="../1 modules/Effects.html">Effects</a></li>
<li> <a href="../1 modules/Flow.html">Flow</a></li>
<li> <a href="../1 modules/Input.html">Input</a></li>
<li> <a href="../1 modules/Inventory.html">Inventory</a></li>
<li> <a href="../1 modules/Logic.html">Logic</a></li>
<li> <a href="../1 modules/Objects.html">Objects</a></li>
<li> <a href="../1 modules/Sound.html">Sound</a></li>
<li> <a href="../1 modules/Strings.html">Strings</a></li>
<li> <a href="../1 modules/Util.html">Util</a></li>
<li> <a href="../1 modules/View.html">View</a></li>
</ul>
<h2>2 Classes</h2>
<ul class="nowrap">
<li> <a href="../2 classes/Collision.Probe.html">Collision.Probe</a></li>
<li> <a href="../2 classes/Flow.Level.html">Flow.Level</a></li>
<li> <a href="../2 classes/Flow.Settings.html">Flow.Settings</a></li>
<li> <a href="../2 classes/Flow.Statistics.html">Flow.Statistics</a></li>
<li> <a href="../2 classes/Objects.AIObject.html">Objects.AIObject</a></li>
<li> <a href="../2 classes/Objects.Camera.html">Objects.Camera</a></li>
<li> <a href="../2 classes/Objects.LaraObject.html">Objects.LaraObject</a></li>
<li> <a href="../2 classes/Objects.Moveable.html">Objects.Moveable</a></li>
<li> <a href="../2 classes/Objects.Room.html">Objects.Room</a></li>
<li> <a href="../2 classes/Objects.Sink.html">Objects.Sink</a></li>
<li> <a href="../2 classes/Objects.SoundSource.html">Objects.SoundSource</a></li>
<li> <a href="../2 classes/Objects.Static.html">Objects.Static</a></li>
<li> <a href="../2 classes/Objects.Volume.html">Objects.Volume</a></li>
<li> <a href="../2 classes/Strings.DisplayString.html">Strings.DisplayString</a></li>
<li> <a href="../2 classes/View.DisplaySprite.html">View.DisplaySprite</a></li>
</ul>
<h2>3 Primitive Classes</h2>
<ul class="nowrap">
<li> <a href="../3 primitive classes/Flow.Fog.html">Flow.Fog</a></li>
<li> <a href="../3 primitive classes/Flow.InventoryItem.html">Flow.InventoryItem</a></li>
<li> <a href="../3 primitive classes/Flow.LensFlare.html">Flow.LensFlare</a></li>
<li> <a href="../3 primitive classes/Flow.SkyLayer.html">Flow.SkyLayer</a></li>
<li> <a href="../3 primitive classes/Flow.Starfield.html">Flow.Starfield</a></li>
<li> <a href="../3 primitive classes/Color.html">Color</a></li>
<li> <a href="../3 primitive classes/Rotation.html">Rotation</a></li>
<li> <a href="../3 primitive classes/Time.html">Time</a></li>
<li> <a href="../3 primitive classes/Vec2.html">Vec2</a></li>
<li> <a href="../3 primitive classes/Vec3.html">Vec3</a></li>
</ul>
<h2>4 Enums</h2>
<ul class="nowrap">
<li> <here>Collision.MaterialType</here></li>
<li> <a href="../4 enums/Effects.BlendID.html">Effects.BlendID</a></li>
<li> <a href="../4 enums/Effects.EffectID.html">Effects.EffectID</a></li>
<li> <a href="../4 enums/Flow.ErrorMode.html">Flow.ErrorMode</a></li>
<li> <a href="../4 enums/Flow.FreezeMode.html">Flow.FreezeMode</a></li>
<li> <a href="../4 enums/Flow.GameStatus.html">Flow.GameStatus</a></li>
<li> <a href="../4 enums/Input.ActionID.html">Input.ActionID</a></li>
<li> <a href="../4 enums/Objects.AmmoType.html">Objects.AmmoType</a></li>
<li> <a href="../4 enums/Objects.HandStatus.html">Objects.HandStatus</a></li>
<li> <a href="../4 enums/Objects.WeaponType.html">Objects.WeaponType</a></li>
<li> <a href="../4 enums/Objects.MoveableStatus.html">Objects.MoveableStatus</a></li>
<li> <a href="../4 enums/Objects.ObjID.html">Objects.ObjID</a></li>
<li> <a href="../4 enums/Objects.RoomFlagID.html">Objects.RoomFlagID</a></li>
<li> <a href="../4 enums/Objects.RoomReverb.html">Objects.RoomReverb</a></li>
<li> <a href="../4 enums/Sound.SoundTrackType.html">Sound.SoundTrackType</a></li>
<li> <a href="../4 enums/Strings.DisplayStringOption.html">Strings.DisplayStringOption</a></li>
<li> <a href="../4 enums/Util.LogLevel.html">Util.LogLevel</a></li>
<li> <a href="../4 enums/View.AlignMode.html">View.AlignMode</a></li>
<li> <a href="../4 enums/View.CameraType.html">View.CameraType</a></li>
<li> <a href="../4 enums/View.PostProcessMode.html">View.PostProcessMode</a></li>
<li> <a href="../4 enums/View.ScaleMode.html">View.ScaleMode</a></li>
</ul>
<h2>5 Lua utility modules</h2>
<ul class="nowrap">
<li> <a href="../5 lua utility modules/Diary.html">Diary</a></li>
<li> <a href="../5 lua utility modules/EventSequence.html">EventSequence</a></li>
<li> <a href="../5 lua utility modules/Timer.html">Timer</a></li>
<li> <a href="../5 lua utility modules/Type.html">Type</a></li>
</ul>
</div>
<div id="content">
<h1>Enum <code>Collision.MaterialType</code></h1>
<p>Constants for material types.</p>
<p>
</p>
<h2><a href="#Tables">Tables</a></h2>
<table class="function_list">
<tr>
<td class="name" ><a href="#Collision.MaterialType">Collision.MaterialType</a></td>
<td class="summary">Table of MaterialType constants.</td>
</tr>
</table>
<br/>
<br/>
<h2 class="section-header "><a name="Tables"></a>Tables</h2>
<dl class="function">
<dt>
<a name = "Collision.MaterialType"></a>
<strong>Collision.MaterialType</strong>
</dt>
<dd>
<p>Table of MaterialType constants. </p>
<ul>
<li><code>MUD</code></li>
<li><code>SNOW</code></li>
<li><code>SNOW</code></li>
<li><code>SAND</code></li>
<li><code>GRAVEL</code></li>
<li><code>ICE</code></li>
<li><code>WATER</code></li>
<li><code>STONE</code></li>
<li><code>WOOD</code></li>
<li><code>METAL</code></li>
<li><code>MARBLE</code></li>
<li><code>GRASS</code></li>
<li><code>CONCRETE</code></li>
<li><code>OLD_WOOD</code></li>
<li><code>OLD_METAL</code></li>
<li><code>CUSTOM_1</code></li>
<li><code>CUSTOM_2</code></li>
<li><code>CUSTOM_3</code></li>
<li><code>CUSTOM_4</code></li>
<li><code>CUSTOM_5</code></li>
<li><code>CUSTOM_6</code></li>
<li><code>CUSTOM_7</code></li>
<li><code>CUSTOM_8</code></li>
</ul>
</dd>
</dl>
</div> <!-- id="content" -->
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="https://github.com/hispidence/TEN-LDoc">TEN-LDoc</a> (a fork of <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a>)</i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>
</html>

View file

@ -45,6 +45,7 @@
</ul>
<h2>2 Classes</h2>
<ul class="nowrap">
<li> <a href="../2 classes/Collision.Probe.html">Collision.Probe</a></li>
<li> <a href="../2 classes/Flow.Level.html">Flow.Level</a></li>
<li> <a href="../2 classes/Flow.Settings.html">Flow.Settings</a></li>
<li> <a href="../2 classes/Flow.Statistics.html">Flow.Statistics</a></li>
@ -75,6 +76,7 @@
</ul>
<h2>4 Enums</h2>
<ul class="nowrap">
<li> <a href="../4 enums/Collision.MaterialType.html">Collision.MaterialType</a></li>
<li> <here>Effects.BlendID</here></li>
<li> <a href="../4 enums/Effects.EffectID.html">Effects.EffectID</a></li>
<li> <a href="../4 enums/Flow.ErrorMode.html">Flow.ErrorMode</a></li>

View file

@ -45,6 +45,7 @@
</ul>
<h2>2 Classes</h2>
<ul class="nowrap">
<li> <a href="../2 classes/Collision.Probe.html">Collision.Probe</a></li>
<li> <a href="../2 classes/Flow.Level.html">Flow.Level</a></li>
<li> <a href="../2 classes/Flow.Settings.html">Flow.Settings</a></li>
<li> <a href="../2 classes/Flow.Statistics.html">Flow.Statistics</a></li>
@ -75,6 +76,7 @@
</ul>
<h2>4 Enums</h2>
<ul class="nowrap">
<li> <a href="../4 enums/Collision.MaterialType.html">Collision.MaterialType</a></li>
<li> <a href="../4 enums/Effects.BlendID.html">Effects.BlendID</a></li>
<li> <here>Effects.EffectID</here></li>
<li> <a href="../4 enums/Flow.ErrorMode.html">Flow.ErrorMode</a></li>

View file

@ -45,6 +45,7 @@
</ul>
<h2>2 Classes</h2>
<ul class="nowrap">
<li> <a href="../2 classes/Collision.Probe.html">Collision.Probe</a></li>
<li> <a href="../2 classes/Flow.Level.html">Flow.Level</a></li>
<li> <a href="../2 classes/Flow.Settings.html">Flow.Settings</a></li>
<li> <a href="../2 classes/Flow.Statistics.html">Flow.Statistics</a></li>
@ -75,6 +76,7 @@
</ul>
<h2>4 Enums</h2>
<ul class="nowrap">
<li> <a href="../4 enums/Collision.MaterialType.html">Collision.MaterialType</a></li>
<li> <a href="../4 enums/Effects.BlendID.html">Effects.BlendID</a></li>
<li> <a href="../4 enums/Effects.EffectID.html">Effects.EffectID</a></li>
<li> <here>Flow.ErrorMode</here></li>

View file

@ -45,6 +45,7 @@
</ul>
<h2>2 Classes</h2>
<ul class="nowrap">
<li> <a href="../2 classes/Collision.Probe.html">Collision.Probe</a></li>
<li> <a href="../2 classes/Flow.Level.html">Flow.Level</a></li>
<li> <a href="../2 classes/Flow.Settings.html">Flow.Settings</a></li>
<li> <a href="../2 classes/Flow.Statistics.html">Flow.Statistics</a></li>
@ -75,6 +76,7 @@
</ul>
<h2>4 Enums</h2>
<ul class="nowrap">
<li> <a href="../4 enums/Collision.MaterialType.html">Collision.MaterialType</a></li>
<li> <a href="../4 enums/Effects.BlendID.html">Effects.BlendID</a></li>
<li> <a href="../4 enums/Effects.EffectID.html">Effects.EffectID</a></li>
<li> <a href="../4 enums/Flow.ErrorMode.html">Flow.ErrorMode</a></li>

View file

@ -45,6 +45,7 @@
</ul>
<h2>2 Classes</h2>
<ul class="nowrap">
<li> <a href="../2 classes/Collision.Probe.html">Collision.Probe</a></li>
<li> <a href="../2 classes/Flow.Level.html">Flow.Level</a></li>
<li> <a href="../2 classes/Flow.Settings.html">Flow.Settings</a></li>
<li> <a href="../2 classes/Flow.Statistics.html">Flow.Statistics</a></li>
@ -75,6 +76,7 @@
</ul>
<h2>4 Enums</h2>
<ul class="nowrap">
<li> <a href="../4 enums/Collision.MaterialType.html">Collision.MaterialType</a></li>
<li> <a href="../4 enums/Effects.BlendID.html">Effects.BlendID</a></li>
<li> <a href="../4 enums/Effects.EffectID.html">Effects.EffectID</a></li>
<li> <a href="../4 enums/Flow.ErrorMode.html">Flow.ErrorMode</a></li>

View file

@ -45,6 +45,7 @@
</ul>
<h2>2 Classes</h2>
<ul class="nowrap">
<li> <a href="../2 classes/Collision.Probe.html">Collision.Probe</a></li>
<li> <a href="../2 classes/Flow.Level.html">Flow.Level</a></li>
<li> <a href="../2 classes/Flow.Settings.html">Flow.Settings</a></li>
<li> <a href="../2 classes/Flow.Statistics.html">Flow.Statistics</a></li>
@ -75,6 +76,7 @@
</ul>
<h2>4 Enums</h2>
<ul class="nowrap">
<li> <a href="../4 enums/Collision.MaterialType.html">Collision.MaterialType</a></li>
<li> <a href="../4 enums/Effects.BlendID.html">Effects.BlendID</a></li>
<li> <a href="../4 enums/Effects.EffectID.html">Effects.EffectID</a></li>
<li> <a href="../4 enums/Flow.ErrorMode.html">Flow.ErrorMode</a></li>

View file

@ -45,6 +45,7 @@
</ul>
<h2>2 Classes</h2>
<ul class="nowrap">
<li> <a href="../2 classes/Collision.Probe.html">Collision.Probe</a></li>
<li> <a href="../2 classes/Flow.Level.html">Flow.Level</a></li>
<li> <a href="../2 classes/Flow.Settings.html">Flow.Settings</a></li>
<li> <a href="../2 classes/Flow.Statistics.html">Flow.Statistics</a></li>
@ -75,6 +76,7 @@
</ul>
<h2>4 Enums</h2>
<ul class="nowrap">
<li> <a href="../4 enums/Collision.MaterialType.html">Collision.MaterialType</a></li>
<li> <a href="../4 enums/Effects.BlendID.html">Effects.BlendID</a></li>
<li> <a href="../4 enums/Effects.EffectID.html">Effects.EffectID</a></li>
<li> <a href="../4 enums/Flow.ErrorMode.html">Flow.ErrorMode</a></li>

View file

@ -45,6 +45,7 @@
</ul>
<h2>2 Classes</h2>
<ul class="nowrap">
<li> <a href="../2 classes/Collision.Probe.html">Collision.Probe</a></li>
<li> <a href="../2 classes/Flow.Level.html">Flow.Level</a></li>
<li> <a href="../2 classes/Flow.Settings.html">Flow.Settings</a></li>
<li> <a href="../2 classes/Flow.Statistics.html">Flow.Statistics</a></li>
@ -75,6 +76,7 @@
</ul>
<h2>4 Enums</h2>
<ul class="nowrap">
<li> <a href="../4 enums/Collision.MaterialType.html">Collision.MaterialType</a></li>
<li> <a href="../4 enums/Effects.BlendID.html">Effects.BlendID</a></li>
<li> <a href="../4 enums/Effects.EffectID.html">Effects.EffectID</a></li>
<li> <a href="../4 enums/Flow.ErrorMode.html">Flow.ErrorMode</a></li>

View file

@ -45,6 +45,7 @@
</ul>
<h2>2 Classes</h2>
<ul class="nowrap">
<li> <a href="../2 classes/Collision.Probe.html">Collision.Probe</a></li>
<li> <a href="../2 classes/Flow.Level.html">Flow.Level</a></li>
<li> <a href="../2 classes/Flow.Settings.html">Flow.Settings</a></li>
<li> <a href="../2 classes/Flow.Statistics.html">Flow.Statistics</a></li>
@ -75,6 +76,7 @@
</ul>
<h2>4 Enums</h2>
<ul class="nowrap">
<li> <a href="../4 enums/Collision.MaterialType.html">Collision.MaterialType</a></li>
<li> <a href="../4 enums/Effects.BlendID.html">Effects.BlendID</a></li>
<li> <a href="../4 enums/Effects.EffectID.html">Effects.EffectID</a></li>
<li> <a href="../4 enums/Flow.ErrorMode.html">Flow.ErrorMode</a></li>

View file

@ -45,6 +45,7 @@
</ul>
<h2>2 Classes</h2>
<ul class="nowrap">
<li> <a href="../2 classes/Collision.Probe.html">Collision.Probe</a></li>
<li> <a href="../2 classes/Flow.Level.html">Flow.Level</a></li>
<li> <a href="../2 classes/Flow.Settings.html">Flow.Settings</a></li>
<li> <a href="../2 classes/Flow.Statistics.html">Flow.Statistics</a></li>
@ -75,6 +76,7 @@
</ul>
<h2>4 Enums</h2>
<ul class="nowrap">
<li> <a href="../4 enums/Collision.MaterialType.html">Collision.MaterialType</a></li>
<li> <a href="../4 enums/Effects.BlendID.html">Effects.BlendID</a></li>
<li> <a href="../4 enums/Effects.EffectID.html">Effects.EffectID</a></li>
<li> <a href="../4 enums/Flow.ErrorMode.html">Flow.ErrorMode</a></li>

View file

@ -45,6 +45,7 @@
</ul>
<h2>2 Classes</h2>
<ul class="nowrap">
<li> <a href="../2 classes/Collision.Probe.html">Collision.Probe</a></li>
<li> <a href="../2 classes/Flow.Level.html">Flow.Level</a></li>
<li> <a href="../2 classes/Flow.Settings.html">Flow.Settings</a></li>
<li> <a href="../2 classes/Flow.Statistics.html">Flow.Statistics</a></li>
@ -75,6 +76,7 @@
</ul>
<h2>4 Enums</h2>
<ul class="nowrap">
<li> <a href="../4 enums/Collision.MaterialType.html">Collision.MaterialType</a></li>
<li> <a href="../4 enums/Effects.BlendID.html">Effects.BlendID</a></li>
<li> <a href="../4 enums/Effects.EffectID.html">Effects.EffectID</a></li>
<li> <a href="../4 enums/Flow.ErrorMode.html">Flow.ErrorMode</a></li>

View file

@ -45,6 +45,7 @@
</ul>
<h2>2 Classes</h2>
<ul class="nowrap">
<li> <a href="../2 classes/Collision.Probe.html">Collision.Probe</a></li>
<li> <a href="../2 classes/Flow.Level.html">Flow.Level</a></li>
<li> <a href="../2 classes/Flow.Settings.html">Flow.Settings</a></li>
<li> <a href="../2 classes/Flow.Statistics.html">Flow.Statistics</a></li>
@ -75,6 +76,7 @@
</ul>
<h2>4 Enums</h2>
<ul class="nowrap">
<li> <a href="../4 enums/Collision.MaterialType.html">Collision.MaterialType</a></li>
<li> <a href="../4 enums/Effects.BlendID.html">Effects.BlendID</a></li>
<li> <a href="../4 enums/Effects.EffectID.html">Effects.EffectID</a></li>
<li> <a href="../4 enums/Flow.ErrorMode.html">Flow.ErrorMode</a></li>

View file

@ -45,6 +45,7 @@
</ul>
<h2>2 Classes</h2>
<ul class="nowrap">
<li> <a href="../2 classes/Collision.Probe.html">Collision.Probe</a></li>
<li> <a href="../2 classes/Flow.Level.html">Flow.Level</a></li>
<li> <a href="../2 classes/Flow.Settings.html">Flow.Settings</a></li>
<li> <a href="../2 classes/Flow.Statistics.html">Flow.Statistics</a></li>
@ -75,6 +76,7 @@
</ul>
<h2>4 Enums</h2>
<ul class="nowrap">
<li> <a href="../4 enums/Collision.MaterialType.html">Collision.MaterialType</a></li>
<li> <a href="../4 enums/Effects.BlendID.html">Effects.BlendID</a></li>
<li> <a href="../4 enums/Effects.EffectID.html">Effects.EffectID</a></li>
<li> <a href="../4 enums/Flow.ErrorMode.html">Flow.ErrorMode</a></li>

View file

@ -45,6 +45,7 @@
</ul>
<h2>2 Classes</h2>
<ul class="nowrap">
<li> <a href="../2 classes/Collision.Probe.html">Collision.Probe</a></li>
<li> <a href="../2 classes/Flow.Level.html">Flow.Level</a></li>
<li> <a href="../2 classes/Flow.Settings.html">Flow.Settings</a></li>
<li> <a href="../2 classes/Flow.Statistics.html">Flow.Statistics</a></li>
@ -75,6 +76,7 @@
</ul>
<h2>4 Enums</h2>
<ul class="nowrap">
<li> <a href="../4 enums/Collision.MaterialType.html">Collision.MaterialType</a></li>
<li> <a href="../4 enums/Effects.BlendID.html">Effects.BlendID</a></li>
<li> <a href="../4 enums/Effects.EffectID.html">Effects.EffectID</a></li>
<li> <a href="../4 enums/Flow.ErrorMode.html">Flow.ErrorMode</a></li>

View file

@ -45,6 +45,7 @@
</ul>
<h2>2 Classes</h2>
<ul class="nowrap">
<li> <a href="../2 classes/Collision.Probe.html">Collision.Probe</a></li>
<li> <a href="../2 classes/Flow.Level.html">Flow.Level</a></li>
<li> <a href="../2 classes/Flow.Settings.html">Flow.Settings</a></li>
<li> <a href="../2 classes/Flow.Statistics.html">Flow.Statistics</a></li>
@ -75,6 +76,7 @@
</ul>
<h2>4 Enums</h2>
<ul class="nowrap">
<li> <a href="../4 enums/Collision.MaterialType.html">Collision.MaterialType</a></li>
<li> <a href="../4 enums/Effects.BlendID.html">Effects.BlendID</a></li>
<li> <a href="../4 enums/Effects.EffectID.html">Effects.EffectID</a></li>
<li> <a href="../4 enums/Flow.ErrorMode.html">Flow.ErrorMode</a></li>

View file

@ -45,6 +45,7 @@
</ul>
<h2>2 Classes</h2>
<ul class="nowrap">
<li> <a href="../2 classes/Collision.Probe.html">Collision.Probe</a></li>
<li> <a href="../2 classes/Flow.Level.html">Flow.Level</a></li>
<li> <a href="../2 classes/Flow.Settings.html">Flow.Settings</a></li>
<li> <a href="../2 classes/Flow.Statistics.html">Flow.Statistics</a></li>
@ -75,6 +76,7 @@
</ul>
<h2>4 Enums</h2>
<ul class="nowrap">
<li> <a href="../4 enums/Collision.MaterialType.html">Collision.MaterialType</a></li>
<li> <a href="../4 enums/Effects.BlendID.html">Effects.BlendID</a></li>
<li> <a href="../4 enums/Effects.EffectID.html">Effects.EffectID</a></li>
<li> <a href="../4 enums/Flow.ErrorMode.html">Flow.ErrorMode</a></li>

View file

@ -45,6 +45,7 @@
</ul>
<h2>2 Classes</h2>
<ul class="nowrap">
<li> <a href="../2 classes/Collision.Probe.html">Collision.Probe</a></li>
<li> <a href="../2 classes/Flow.Level.html">Flow.Level</a></li>
<li> <a href="../2 classes/Flow.Settings.html">Flow.Settings</a></li>
<li> <a href="../2 classes/Flow.Statistics.html">Flow.Statistics</a></li>
@ -75,6 +76,7 @@
</ul>
<h2>4 Enums</h2>
<ul class="nowrap">
<li> <a href="../4 enums/Collision.MaterialType.html">Collision.MaterialType</a></li>
<li> <a href="../4 enums/Effects.BlendID.html">Effects.BlendID</a></li>
<li> <a href="../4 enums/Effects.EffectID.html">Effects.EffectID</a></li>
<li> <a href="../4 enums/Flow.ErrorMode.html">Flow.ErrorMode</a></li>

View file

@ -45,6 +45,7 @@
</ul>
<h2>2 Classes</h2>
<ul class="nowrap">
<li> <a href="../2 classes/Collision.Probe.html">Collision.Probe</a></li>
<li> <a href="../2 classes/Flow.Level.html">Flow.Level</a></li>
<li> <a href="../2 classes/Flow.Settings.html">Flow.Settings</a></li>
<li> <a href="../2 classes/Flow.Statistics.html">Flow.Statistics</a></li>
@ -75,6 +76,7 @@
</ul>
<h2>4 Enums</h2>
<ul class="nowrap">
<li> <a href="../4 enums/Collision.MaterialType.html">Collision.MaterialType</a></li>
<li> <a href="../4 enums/Effects.BlendID.html">Effects.BlendID</a></li>
<li> <a href="../4 enums/Effects.EffectID.html">Effects.EffectID</a></li>
<li> <a href="../4 enums/Flow.ErrorMode.html">Flow.ErrorMode</a></li>

View file

@ -45,6 +45,7 @@
</ul>
<h2>2 Classes</h2>
<ul class="nowrap">
<li> <a href="../2 classes/Collision.Probe.html">Collision.Probe</a></li>
<li> <a href="../2 classes/Flow.Level.html">Flow.Level</a></li>
<li> <a href="../2 classes/Flow.Settings.html">Flow.Settings</a></li>
<li> <a href="../2 classes/Flow.Statistics.html">Flow.Statistics</a></li>
@ -75,6 +76,7 @@
</ul>
<h2>4 Enums</h2>
<ul class="nowrap">
<li> <a href="../4 enums/Collision.MaterialType.html">Collision.MaterialType</a></li>
<li> <a href="../4 enums/Effects.BlendID.html">Effects.BlendID</a></li>
<li> <a href="../4 enums/Effects.EffectID.html">Effects.EffectID</a></li>
<li> <a href="../4 enums/Flow.ErrorMode.html">Flow.ErrorMode</a></li>

View file

@ -45,6 +45,7 @@
</ul>
<h2>2 Classes</h2>
<ul class="nowrap">
<li> <a href="../2 classes/Collision.Probe.html">Collision.Probe</a></li>
<li> <a href="../2 classes/Flow.Level.html">Flow.Level</a></li>
<li> <a href="../2 classes/Flow.Settings.html">Flow.Settings</a></li>
<li> <a href="../2 classes/Flow.Statistics.html">Flow.Statistics</a></li>
@ -75,6 +76,7 @@
</ul>
<h2>4 Enums</h2>
<ul class="nowrap">
<li> <a href="../4 enums/Collision.MaterialType.html">Collision.MaterialType</a></li>
<li> <a href="../4 enums/Effects.BlendID.html">Effects.BlendID</a></li>
<li> <a href="../4 enums/Effects.EffectID.html">Effects.EffectID</a></li>
<li> <a href="../4 enums/Flow.ErrorMode.html">Flow.ErrorMode</a></li>

View file

@ -45,6 +45,7 @@
</ul>
<h2>2 Classes</h2>
<ul class="nowrap">
<li> <a href="../2 classes/Collision.Probe.html">Collision.Probe</a></li>
<li> <a href="../2 classes/Flow.Level.html">Flow.Level</a></li>
<li> <a href="../2 classes/Flow.Settings.html">Flow.Settings</a></li>
<li> <a href="../2 classes/Flow.Statistics.html">Flow.Statistics</a></li>
@ -75,6 +76,7 @@
</ul>
<h2>4 Enums</h2>
<ul class="nowrap">
<li> <a href="../4 enums/Collision.MaterialType.html">Collision.MaterialType</a></li>
<li> <a href="../4 enums/Effects.BlendID.html">Effects.BlendID</a></li>
<li> <a href="../4 enums/Effects.EffectID.html">Effects.EffectID</a></li>
<li> <a href="../4 enums/Flow.ErrorMode.html">Flow.ErrorMode</a></li>

View file

@ -45,6 +45,7 @@
</ul>
<h2>2 Classes</h2>
<ul class="nowrap">
<li> <a href="../2 classes/Collision.Probe.html">Collision.Probe</a></li>
<li> <a href="../2 classes/Flow.Level.html">Flow.Level</a></li>
<li> <a href="../2 classes/Flow.Settings.html">Flow.Settings</a></li>
<li> <a href="../2 classes/Flow.Statistics.html">Flow.Statistics</a></li>
@ -75,6 +76,7 @@
</ul>
<h2>4 Enums</h2>
<ul class="nowrap">
<li> <a href="../4 enums/Collision.MaterialType.html">Collision.MaterialType</a></li>
<li> <a href="../4 enums/Effects.BlendID.html">Effects.BlendID</a></li>
<li> <a href="../4 enums/Effects.EffectID.html">Effects.EffectID</a></li>
<li> <a href="../4 enums/Flow.ErrorMode.html">Flow.ErrorMode</a></li>

View file

@ -45,6 +45,7 @@
</ul>
<h2>2 Classes</h2>
<ul class="nowrap">
<li> <a href="../2 classes/Collision.Probe.html">Collision.Probe</a></li>
<li> <a href="../2 classes/Flow.Level.html">Flow.Level</a></li>
<li> <a href="../2 classes/Flow.Settings.html">Flow.Settings</a></li>
<li> <a href="../2 classes/Flow.Statistics.html">Flow.Statistics</a></li>
@ -75,6 +76,7 @@
</ul>
<h2>4 Enums</h2>
<ul class="nowrap">
<li> <a href="../4 enums/Collision.MaterialType.html">Collision.MaterialType</a></li>
<li> <a href="../4 enums/Effects.BlendID.html">Effects.BlendID</a></li>
<li> <a href="../4 enums/Effects.EffectID.html">Effects.EffectID</a></li>
<li> <a href="../4 enums/Flow.ErrorMode.html">Flow.ErrorMode</a></li>

View file

@ -45,6 +45,7 @@
</ul>
<h2>2 Classes</h2>
<ul class="nowrap">
<li> <a href="../2 classes/Collision.Probe.html">Collision.Probe</a></li>
<li> <a href="../2 classes/Flow.Level.html">Flow.Level</a></li>
<li> <a href="../2 classes/Flow.Settings.html">Flow.Settings</a></li>
<li> <a href="../2 classes/Flow.Statistics.html">Flow.Statistics</a></li>
@ -75,6 +76,7 @@
</ul>
<h2>4 Enums</h2>
<ul class="nowrap">
<li> <a href="../4 enums/Collision.MaterialType.html">Collision.MaterialType</a></li>
<li> <a href="../4 enums/Effects.BlendID.html">Effects.BlendID</a></li>
<li> <a href="../4 enums/Effects.EffectID.html">Effects.EffectID</a></li>
<li> <a href="../4 enums/Flow.ErrorMode.html">Flow.ErrorMode</a></li>

View file

@ -45,6 +45,7 @@
</ul>
<h2>2 Classes</h2>
<ul class="nowrap">
<li> <a href="2 classes/Collision.Probe.html">Collision.Probe</a></li>
<li> <a href="2 classes/Flow.Level.html">Flow.Level</a></li>
<li> <a href="2 classes/Flow.Settings.html">Flow.Settings</a></li>
<li> <a href="2 classes/Flow.Statistics.html">Flow.Statistics</a></li>
@ -75,6 +76,7 @@
</ul>
<h2>4 Enums</h2>
<ul class="nowrap">
<li> <a href="4 enums/Collision.MaterialType.html">Collision.MaterialType</a></li>
<li> <a href="4 enums/Effects.BlendID.html">Effects.BlendID</a></li>
<li> <a href="4 enums/Effects.EffectID.html">Effects.EffectID</a></li>
<li> <a href="4 enums/Flow.ErrorMode.html">Flow.ErrorMode</a></li>
@ -176,6 +178,10 @@ local door = GetMoveableByName("door_type4_14")
</table>
<h2>2 Classes</h2>
<table class="module_list">
<tr>
<td class="name" ><a href="2 classes/Collision.Probe.html">Collision.Probe</a></td>
<td class="summary">Represents a collision probe in the game world.</td>
</tr>
<tr>
<td class="name" ><a href="2 classes/Flow.Level.html">Flow.Level</a></td>
<td class="summary">Stores level metadata.</td>
@ -278,6 +284,10 @@ local door = GetMoveableByName("door_type4_14")
</table>
<h2>4 Enums</h2>
<table class="module_list">
<tr>
<td class="name" ><a href="4 enums/Collision.MaterialType.html">Collision.MaterialType</a></td>
<td class="summary">Constants for material types.</td>
</tr>
<tr>
<td class="name" ><a href="4 enums/Effects.BlendID.html">Effects.BlendID</a></td>
<td class="summary">Constants for blend mode IDs.</td>

View file

@ -117,7 +117,7 @@ struct SectorFlagData
bool MinecartRight() { return MarkBeetle; }
bool MinecartStop() { return (MarkBeetle && MarkTriggerer); }
bool IsWallClimbable(ClimbDirectionFlags flag)
bool IsWallClimbable(ClimbDirectionFlags flag) const
{
switch (flag)
{

View file

@ -299,6 +299,7 @@ int FindRoomNumber(const Vector3i& pos, int startRoomNumber, bool onlyNeighbors)
if (!onlyNeighbors)
{
// TODO: Optimise search to O(log n) with BVH. -- Sezz 2025.03.01
for (int roomNumber = 0; roomNumber < g_Level.Rooms.size(); roomNumber++)
{
if (IsPointInRoom(pos, roomNumber))

View file

@ -67,6 +67,7 @@ static constexpr char ScriptReserved_EndReasonLoadGame[] = "LOAD_GAME";
static constexpr char ScriptReserved_EndReasonOther[] = "OTHER";
// Callback points
static constexpr char ScriptReserved_PreStart[] = "PRE_START";
static constexpr char ScriptReserved_PostStart[] = "POST_START";
static constexpr char ScriptReserved_PreEnd[] = "PRE_END";
@ -367,7 +368,6 @@ static constexpr char ScriptReserved_GetCursorDisplayPosition[] = "GetCursorDis
static constexpr char ScriptReserved_GetMouseDisplayPosition[] = "GetMouseDisplayPosition";
// Tables
static constexpr char ScriptReserved_ObjID[] = "ObjID";
static constexpr char ScriptReserved_BlendID[] = "BlendID";
static constexpr char ScriptReserved_EffectID[] = "EffectID";
@ -450,6 +450,35 @@ constexpr char ScriptReserved_StaticSetSlot[] = "SetSlot";
constexpr char ScriptReserved_StaticSetSolid[] = "SetSolid";
constexpr char ScriptReserved_StaticShatter[] = "Shatter";
// =========
// COLLISION
// =========
constexpr char ScriptReserved_Collision[] = "Collision";
constexpr char ScriptReserved_Probe[] = "Probe";
constexpr char ScriptReserved_ProbeGetCeilingHeight[] = "GetCeilingHeight";
constexpr char ScriptReserved_ProbeGetCeilingMaterialType[] = "GetCeilingMaterialType";
constexpr char ScriptReserved_ProbeGetCeilingNormal[] = "GetCeilingNormal";
constexpr char ScriptReserved_ProbeGetFloorHeight[] = "GetFloorHeight";
constexpr char ScriptReserved_ProbeGetFloorMaterialType[] = "GetFloorMaterialType";
constexpr char ScriptReserved_ProbeGetFloorNormal[] = "GetFloorNormal";
constexpr char ScriptReserved_ProbeGetPosition[] = "GetPosition";
constexpr char ScriptReserved_ProbeGetRoom[] = "GetRoom";
constexpr char ScriptReserved_ProbeGetRoomName[] = "GetRoomName";
constexpr char ScriptReserved_ProbeGetRoomNumber[] = "GetRoomNumber";
constexpr char ScriptReserved_ProbeGetWaterSurfaceHeight[] = "GetWaterSurfaceHeight";
constexpr char ScriptReserved_ProbeIsClimbableWall[] = "IsClimbableWall";
constexpr char ScriptReserved_ProbeIsDeathTile[] = "IsDeathTile";
constexpr char ScriptReserved_ProbeIsInsideSolidGeometry[] = "IsInsideSolidGeometry";
constexpr char ScriptReserved_ProbeIsMonkeySwing[] = "IsMonkeySwing";
constexpr char ScriptReserved_ProbeIsSteepCeiling[] = "IsSteepCeiling";
constexpr char ScriptReserved_ProbeIsSteepFloor[] = "IsSteepFloor";
constexpr char ScriptReserved_ProbeIsWall[] = "IsWall";
constexpr char ScriptReserved_ProbePreview[] = "Preview";
constexpr char ScriptReserved_MaterialType[] = "MaterialType";
// =====
// TYPES
// =====

View file

@ -2,6 +2,7 @@
#include "Scripting/Include/ScriptInterfaceState.h"
#include "Scripting/Internal/ReservedScriptNames.h"
#include "Scripting/Internal/TEN/Collision/Probe.h"
#include "Scripting/Internal/TEN/Effects/EffectsFunctions.h"
#include "Scripting/Internal/TEN/Flow/FlowHandler.h"
#include "Scripting/Internal/TEN/Input/InputHandler.h"
@ -55,6 +56,7 @@ void ScriptInterfaceState::Init(const std::string& assetsDir)
// Misc. handlers not assigned above.
TEN::Scripting::InventoryHandler::Register(&SolState, RootTable);
TEN::Scripting::Collision::Register(&SolState, RootTable);
TEN::Scripting::Effects::Register(&SolState, RootTable);
TEN::Scripting::Input::Register(&SolState, RootTable);
TEN::Scripting::Sound::Register(&SolState, RootTable);

View file

@ -0,0 +1,64 @@
#pragma once
#include "Game/collision/floordata.h"
/// Constants for material types.
// @enum Collision.MaterialType
// @pragma nostrip
/// Table of MaterialType constants.
//
// - `MUD`
// - `SNOW`
// - `SNOW`
// - `SAND`
// - `GRAVEL`
// - `ICE`
// - `WATER`
// - `STONE`
// - `WOOD`
// - `METAL`
// - `MARBLE`
// - `GRASS`
// - `CONCRETE`
// - `OLD_WOOD`
// - `OLD_METAL`
// - `CUSTOM_1`
// - `CUSTOM_2`
// - `CUSTOM_3`
// - `CUSTOM_4`
// - `CUSTOM_5`
// - `CUSTOM_6`
// - `CUSTOM_7`
// - `CUSTOM_8`
//
// @table Collision.MaterialType
namespace TEN::Scripting::Collision
{
static const auto MATERIAL_TYPES = std::unordered_map<std::string, MaterialType>
{
{ "MUD", MaterialType::Mud },
{ "SNOW", MaterialType::Snow },
{ "SAND", MaterialType::Sand },
{ "GRAVEL", MaterialType::Gravel },
{ "ICE", MaterialType::Ice },
{ "WATER", MaterialType::Water },
{ "STONE", MaterialType::Stone },
{ "WOOD", MaterialType::Wood },
{ "METAL", MaterialType::Metal },
{ "MARBLE", MaterialType::Marble },
{ "GRASS", MaterialType::Grass },
{ "CONCRETE", MaterialType::Concrete },
{ "OLD_WOOD", MaterialType::OldWood },
{ "OLD_METAL", MaterialType::OldMetal },
{ "CUSTOM_1", MaterialType::Custom1 },
{ "CUSTOM_2", MaterialType::Custom2 },
{ "CUSTOM_3", MaterialType::Custom3 },
{ "CUSTOM_4", MaterialType::Custom4 },
{ "CUSTOM_5", MaterialType::Custom5 },
{ "CUSTOM_6", MaterialType::Custom6 },
{ "CUSTOM_7", MaterialType::Custom7 },
{ "CUSTOM_8", MaterialType::Custom8 }
};
}

View file

@ -0,0 +1,376 @@
#include "framework.h"
#include "Scripting/Internal/TEN/Collision/Probe.h"
#include "Scripting/Internal/TEN/Collision/MaterialTypes.h"
#include "Game/collision/Point.h"
#include "Game/Lara/lara_climb.h"
#include "Scripting/Internal/LuaHandler.h"
#include "Scripting/Internal/ReservedScriptNames.h"
#include "Scripting/Internal/ScriptUtil.h"
#include "Scripting/Internal/TEN/Objects/Moveable/MoveableObject.h"
#include "Scripting/Internal/TEN/Objects/Room/RoomObject.h"
#include "Scripting/Internal/TEN/Types/Vec3/Vec3.h"
#include "Scripting/Internal/TEN/Types/Rotation/Rotation.h"
#include "Specific/level.h"
using namespace TEN::Collision::Point;
namespace TEN::Scripting::Collision
{
/// Represents a collision probe in the game world.
// Provides collision information from a reference world position.
//
// @tenclass Collision.Probe
// @pragma nostrip
void Probe::Register(sol::table& parent)
{
using ctors = sol::constructors<
Probe(const Vec3&, int),
Probe(const Vec3&, int, const Vec3&, float),
Probe(const Vec3&, int, const Rotation&, float),
Probe(const Vec3&, int, const Rotation&, const Vec3&)>;
// Register type.
parent.new_usertype<Probe>(
ScriptReserved_Probe,
ctors(), sol::call_constructor, ctors(),
// Getters
ScriptReserved_ProbeGetPosition, &Probe::GetPosition,
ScriptReserved_ProbeGetRoom, &Probe::GetRoom,
ScriptReserved_ProbeGetRoomName, &Probe::GetRoomName,
ScriptReserved_ProbeGetRoomNumber, &Probe::GetRoomNumber,
ScriptReserved_ProbeGetFloorHeight, &Probe::GetFloorHeight,
ScriptReserved_ProbeGetCeilingHeight, &Probe::GetCeilingHeight,
ScriptReserved_ProbeGetWaterSurfaceHeight, &Probe::GetWaterSurfaceHeight,
ScriptReserved_ProbeGetFloorNormal, &Probe::GetFloorNormal,
ScriptReserved_ProbeGetCeilingNormal, &Probe::GetCeilingNormal,
ScriptReserved_ProbeGetFloorMaterialType, &Probe::GetFloorMaterialType,
ScriptReserved_ProbeGetCeilingMaterialType, &Probe::GetCeilingMaterialType,
// Inquirers
ScriptReserved_ProbeIsSteepFloor, &Probe::IsSteepFloor,
ScriptReserved_ProbeIsSteepCeiling, &Probe::IsSteepCeiling,
ScriptReserved_ProbeIsWall, &Probe::IsWall,
ScriptReserved_ProbeIsInsideSolidGeometry, &Probe::IsInsideSolidGeometry,
ScriptReserved_ProbeIsClimbableWall, &Probe::IsClimbableWall,
ScriptReserved_ProbeIsMonkeySwing, &Probe::IsMonkeySwing,
ScriptReserved_ProbeIsDeathTile, &Probe::IsDeath,
// Utilities
ScriptReserved_ProbePreview, &Probe::Preview);
}
/// Create a Probe at a specified world position in a room.
// @function Probe
// @tparam Vec3 pos World position.
// @tparam int roomNumber[opt] Room number. Must be used if probing a position in an overlapping room.
// @treturn Probe A new Probe.
Probe::Probe(const Vec3& pos, TypeOrNil<int> roomNumber)
{
auto convertedPos = pos.ToVector3i();
int roomNumberValue = ValueOr<int>(roomNumber, FindRoomNumber(convertedPos));
_pointCollision = GetPointCollision(convertedPos, roomNumberValue);
}
/// Create a Probe that casts from an origin world position in a room in a given direction for a specified distance.
// Required to correctly traverse between rooms.
// @function Probe
// @tparam Vec3 pos Origin world position to cast from.
// @tparam int roomNumber Origin room number.
// @tparam Vec3 dir Direction in which to cast.
// @tparam float dist Distance to cast.
// @treturn Probe A new Probe.
Probe::Probe(const Vec3& pos, int roomNumber, const Vec3& dir, float dist)
{
_pointCollision = GetPointCollision(pos.ToVector3i(), roomNumber, dir.ToVector3(), dist);
}
/// Create a Probe that casts from an origin world position in a room in the direction of a given rotation for a specified distance.
// Required to correctly traverse between rooms.
// @function Probe
// @tparam Vec3 pos Origin world position to cast from.
// @tparam int roomNumber Origin room number.
// @tparam Rotation rot Rotation defining the direction in which to cast.
// @tparam float dist Distance to cast.
// @treturn Probe A new Probe.
Probe::Probe(const Vec3& pos, int roomNumber, const Rotation& rot, float dist)
{
auto dir = rot.ToEulerAngles().ToDirection();
_pointCollision = GetPointCollision(pos.ToVector3(), roomNumber, dir, dist);
}
/// Create a Probe that casts from an origin world position, where a given relative offset is rotated according to a given rotation.
// Required to correctly traverse between rooms.
// @function Probe
// @tparam Vec3 pos Origin world position to cast from.
// @tparam int roomNumber Origin room number.
// @tparam Rotation rot Rotation according to which the input relative offset is rotated.
// @tparam Vec3 relOffset Relative offset to cast.
// @treturn Probe A new Probe.
Probe::Probe(const Vec3& pos, int roomNumber, const Rotation& rot, const Vec3& relOffset)
{
auto target = Geometry::TranslatePoint(pos.ToVector3(), rot.ToEulerAngles(), relOffset.ToVector3());
float dist = Vector3::Distance(pos.ToVector3(), target);
auto dir = target - pos.ToVector3();
dir.Normalize();
_pointCollision = GetPointCollision(pos.ToVector3(), roomNumber, dir, dist);
}
/// Get the world position of this Probe.
// @function GetPosition
// @treturn Vec3 World position.
Vec3 Probe::GetPosition()
{
return Vec3(_pointCollision.GetPosition());
}
/// Get the Room object of this Probe.
// @function GetRoom
// @treturn Room Room object.
std::unique_ptr<Room> Probe::GetRoom()
{
int roomNumber = _pointCollision.GetRoomNumber();
return std::make_unique<Room>(g_Level.Rooms[roomNumber]);
}
/// Get the room name of this Probe.
// @function GetRoomName
// @treturn string Room name.
std::string Probe::GetRoomName()
{
int roomNumber = _pointCollision.GetRoomNumber();
const auto& room = g_Level.Rooms[roomNumber];
return room.Name;
}
/// Get the room number of this Probe.
// @treturn int Room number.
int Probe::GetRoomNumber()
{
return _pointCollision.GetRoomNumber();
}
/// Get the floor height at this Probe.
// @function GetFloorHeight
// @treturn int Floor height. __nil: no floor exists__
sol::optional<int> Probe::GetFloorHeight()
{
if (_pointCollision.IsWall())
return sol::nullopt;
int height = _pointCollision.GetFloorHeight();
if (height != NO_HEIGHT)
return height;
return sol::nullopt;
}
/// Get the ceiling height at this Probe.
// @function GetCeilingHeight
// @treturn int Ceiling height. __nil: no ceiling exists__
sol::optional<int> Probe::GetCeilingHeight()
{
if (_pointCollision.IsWall())
return sol::nullopt;
int height = _pointCollision.GetCeilingHeight();
if (height != NO_HEIGHT)
return height;
return sol::nullopt;
}
/// Get the water surface height at this Probe.
// @function GetWaterSurfaceHeight
// @treturn int Water surface height. __nil: no water surface exists__
sol::optional<int> Probe::GetWaterSurfaceHeight()
{
if (_pointCollision.IsWall())
return sol::nullopt;
int height = _pointCollision.GetWaterSurfaceHeight();
if (height != NO_HEIGHT)
return height;
return sol::nullopt;
}
/// Get the normal of the floor at this Probe.
// @function GetFloorNormal
// @treturn Vec3 Floor normal. __nil: no floor exists__
sol::optional<Vec3> Probe::GetFloorNormal()
{
if (_pointCollision.IsWall())
return sol::nullopt;
return Vec3(_pointCollision.GetFloorNormal());
}
/// Get the normal of the ceiling at this Probe.
// @function GetCeilingNormal
// @treturn Vec3 Ceiling normal. __nil: no ceiling exists__
sol::optional<Vec3> Probe::GetCeilingNormal()
{
if (_pointCollision.IsWall())
return sol::nullopt;
return Vec3(_pointCollision.GetCeilingNormal());
}
/// Get the material type of the floor at this Probe.
// @function GetFloorMaterialType
// @treturn Collision.MaterialType Floor material type. __nil: no floor exists__
sol::optional<MaterialType> Probe::GetFloorMaterialType()
{
if (_pointCollision.IsWall())
return sol::nullopt;
const auto& sector = _pointCollision.GetBottomSector();
auto material = sector.GetSurfaceMaterial(_pointCollision.GetPosition().x, _pointCollision.GetPosition().z, true);
return material;
}
/// Get the material type of the ceiling at this Probe.
// @function GetCeilingMaterialType
// @treturn Collision.MaterialType Ceiling material type. __nil: no ceiling exists__
sol::optional<MaterialType> Probe::GetCeilingMaterialType()
{
if (_pointCollision.IsWall())
return sol::nullopt;
const auto& sector = _pointCollision.GetTopSector();
auto material = sector.GetSurfaceMaterial(_pointCollision.GetPosition().x, _pointCollision.GetPosition().z, false);
return material;
}
/// Check if the floor at this Probe is steep.
// @function IsSteepFloor
// @treturn bool Steep floor status. __true: is a steep floor, false: isn't a steep floor, nil: no floor exists__
sol::optional<bool> Probe::IsSteepFloor()
{
if (_pointCollision.IsWall())
return false;
return _pointCollision.IsSteepFloor();
}
/// Check if the ceiling at this Probe is steep.
// @function IsSteepCeiling
// @treturn bool Steep ceiling status. __true: is a steep ceiling, false: isn't a steep ceiling, nil: no ceiling exists__
sol::optional<bool> Probe::IsSteepCeiling()
{
if (_pointCollision.IsWall())
return false;
return _pointCollision.IsSteepCeiling();
}
/// Check if the Probe is inside a wall. Can be used to determine if a wall and ceiling exist.
// @function IsWall
// @treturn bool Wall status. __true: is a wall, false: isn't a wall__
bool Probe::IsWall()
{
return _pointCollision.IsWall();
}
/// Check if this Probe is inside solid geometry (below a floor, above a ceiling, inside a bridge, or inside a wall).
// @function IsInsideSolidGeometry
// @treturn bool Inside geometry status. __true: is inside, false: is outside__
bool Probe::IsInsideSolidGeometry()
{
if (_pointCollision.IsWall() ||
_pointCollision.GetPosition().y > _pointCollision.GetFloorHeight() ||
_pointCollision.GetPosition().y < _pointCollision.GetCeilingHeight())
{
return true;
}
return false;
}
/// Check if there is a climbable wall in the given heading angle at this Probe.
// @function IsClimbableWall
// @tparam float headingAngle Heading angle at which to check for a climbable wall.
// @treturn bool Climbable wall status. __true: is climbable wall, false: isn't climbable__
bool Probe::IsClimbableWall(float headingAngle)
{
const auto& sector = _pointCollision.GetBottomSector();
auto dirFlag = GetClimbDirectionFlags(ANGLE(headingAngle));
return sector.Flags.IsWallClimbable(dirFlag);
}
/// Check if there is a monkey swing sector at this Probe.
// @function IsMonkeySwing
// @treturn bool Monkey swing sector status. __true: is a monkey swing, false: isn't a monkey swing__
bool Probe::IsMonkeySwing()
{
const auto& sector = _pointCollision.GetTopSector();
return sector.Flags.Monkeyswing;
}
/// Check if there is a death sector at this Probe.
// @function IsDeath
// @treturn bool Death sector status. __true: is a death sector, false: isn't a death sector__
bool Probe::IsDeath()
{
const auto& sector = _pointCollision.GetBottomSector();
return sector.Flags.Death;
}
/// Preview this Probe in the Collision Stats debug page.
// @function Preview
void Probe::Preview()
{
constexpr auto TARGET_RADIUS = 100.0f;
constexpr auto SPHERE_RADIUS = TARGET_RADIUS * 0.6f;
constexpr auto COLOR = Color(1.0f, 1.0f, 1.0f, 0.4f);
constexpr auto DEBUG_PAGE = RendererDebugPage::CollisionStats;
auto pos = _pointCollision.GetPosition().ToVector3();
// Preview probe position.
auto sphere = BoundingSphere(pos, SPHERE_RADIUS);
DrawDebugSphere(sphere, COLOR, DEBUG_PAGE, false);
DrawDebugTarget(pos, Quaternion::Identity, TARGET_RADIUS, COLOR, DEBUG_PAGE);
// Preview floor position.
if (_pointCollision.GetFloorHeight() != NO_HEIGHT);
{
auto floorPos = Vector3(pos.x, _pointCollision.GetFloorHeight(), pos.z);
DrawDebugTarget(floorPos, Quaternion::Identity, TARGET_RADIUS, COLOR, DEBUG_PAGE);
DrawDebugLine(pos, floorPos, COLOR, DEBUG_PAGE);
}
// Preview ceiling position.
if (_pointCollision.GetCeilingHeight() != NO_HEIGHT);
{
auto ceilPos = Vector3(pos.x, _pointCollision.GetCeilingHeight(), pos.z);
DrawDebugTarget(ceilPos, Quaternion::Identity, TARGET_RADIUS, COLOR, DEBUG_PAGE);
DrawDebugLine(pos, ceilPos, COLOR, DEBUG_PAGE);
}
// Preview water surface position.
if (_pointCollision.GetWaterSurfaceHeight() != NO_HEIGHT);
{
auto waterSurfacePos = Vector3(pos.x, _pointCollision.GetWaterSurfaceHeight(), pos.z);
DrawDebugTarget(waterSurfacePos, Quaternion::Identity, TARGET_RADIUS, COLOR, DEBUG_PAGE);
DrawDebugLine(pos, waterSurfacePos, COLOR, DEBUG_PAGE);
}
}
void Register(sol::state* state, sol::table& parent)
{
auto collTable = sol::table(state->lua_state(), sol::create);
parent.set(ScriptReserved_Collision, collTable);
Probe::Register(collTable);
auto handler = LuaHandler(state);
handler.MakeReadOnlyTable(collTable, ScriptReserved_MaterialType, MATERIAL_TYPES);
}
}

View file

@ -0,0 +1,70 @@
#pragma once
#include "Game/collision/Point.h"
#include "Scripting/Internal/ScriptUtil.h"
#include "Scripting/Internal/TEN/Objects/Room/RoomObject.h"
using namespace TEN::Collision::Point;
namespace sol { class state; };
namespace TEN::Scripting { class Rotation; }
class Moveable;
class Vec3;
namespace TEN::Scripting::Collision
{
// TODO:
// Integrate line of sight queries (LOS).
// Integrate moveable and static queries.
class Probe
{
public:
static void Register(sol::table& parent);
private:
// Fields
PointCollisionData _pointCollision = PointCollisionData();
public:
// Constructors
Probe() = default;
Probe(const Vec3& pos, TypeOrNil<int> roomNumber);
Probe(const Vec3& origin, int roomNumber, const Vec3& dir, float dist);
Probe(const Vec3& origin, int roomNumber, const Rotation& rot, float dist);
Probe(const Vec3& origin, int roomNumber, const Rotation& rot, const Vec3& relOffset);
// Getters
Vec3 GetPosition();
std::unique_ptr<Room> GetRoom();
std::string GetRoomName();
int GetRoomNumber();
sol::optional<int> GetFloorHeight();
sol::optional<int> GetCeilingHeight();
sol::optional<int> GetWaterSurfaceHeight();
sol::optional<Vec3> GetFloorNormal();
sol::optional<Vec3> GetCeilingNormal();
sol::optional<MaterialType> GetFloorMaterialType();
sol::optional<MaterialType> GetCeilingMaterialType();
// Inquirers
sol::optional<bool> IsSteepFloor();
sol::optional<bool> IsSteepCeiling();
bool IsWall();
bool IsInsideSolidGeometry();
bool IsClimbableWall(float headingAngle);
bool IsMonkeySwing();
bool IsDeath();
// Utilities
void Preview();
};
void Register(sol::state* lua, sol::table& parent);
}

View file

@ -11,6 +11,8 @@
#include "Scripting/Include/Objects/ScriptInterfaceObjectsHandler.h"
#include "Scripting/Include/Strings/ScriptInterfaceStringsHandler.h"
#include "Scripting/Internal/ReservedScriptNames.h"
#include "Scripting/Internal/TEN/Collision/MaterialTypes.h"
#include "Scripting/Internal/TEN/Collision/Probe.h"
#include "Scripting/Internal/TEN/Flow/Enums/ErrorModes.h"
#include "Scripting/Internal/TEN/Flow/Enums/FreezeModes.h"
#include "Scripting/Internal/TEN/Flow/Enums/GameStatuses.h"
@ -25,6 +27,7 @@
#include "Specific/trutils.h"
using namespace TEN::Scripting;
using namespace TEN::Scripting::Collision;
/***
Functions that (mostly) don't directly impact in-game mechanics. Used for setup
@ -302,7 +305,7 @@ Specify which translations in the strings table correspond to which languages.
@tparam tab table array-style table with language names
*/
tableFlow.set_function(ScriptReserved_SetLanguageNames, &FlowHandler::SetLanguageNames, this);
ScriptColor::Register(parent);
Rotation::Register(parent);
Statistics::Register(parent);

View file

@ -17,7 +17,7 @@
//
// @table Objects.MoveableStatus
static const std::unordered_map<std::string, ItemStatus> MOVEABLE_STATUSES
static const auto MOVEABLE_STATUSES = std::unordered_map<std::string, ItemStatus>
{
{ "INACTIVE", ItemStatus::ITEM_NOT_ACTIVE },
{ "ACTIVE", ItemStatus::ITEM_ACTIVE },

View file

@ -883,6 +883,8 @@ if not exist "%ScriptsDir%\Strings.lua" xcopy /Y "$(SolutionDir)Scripts\Strings.
<ClInclude Include="Scripting\Internal\ReservedScriptNames.h" />
<ClInclude Include="Scripting\Internal\ScriptAssert.h" />
<ClInclude Include="Scripting\Internal\ScriptUtil.h" />
<ClInclude Include="Scripting\Internal\TEN\Collision\MaterialTypes.h" />
<ClInclude Include="Scripting\Internal\TEN\Collision\Probe.h" />
<ClInclude Include="Scripting\Internal\TEN\Objects\Lara\HandStatuses.h" />
<ClInclude Include="Scripting\Internal\TEN\Objects\Lara\WeaponTypes.h" />
<ClInclude Include="Scripting\Internal\TEN\Flow\Enums\ErrorModes.h" />
@ -1332,6 +1334,7 @@ if not exist "%ScriptsDir%\Strings.lua" xcopy /Y "$(SolutionDir)Scripts\Strings.
<ClCompile Include="Scripting\Internal\ScriptAssert.cpp" />
<ClCompile Include="Scripting\Internal\ScriptInterfaceState.cpp" />
<ClCompile Include="Scripting\Internal\ScriptUtil.cpp" />
<ClCompile Include="Scripting\Internal\TEN\Collision\Probe.cpp" />
<ClCompile Include="Scripting\Internal\TEN\Flow\Statistics\Statistics.cpp" />
<ClCompile Include="Scripting\Internal\TEN\Types\Color\Color.cpp" />
<ClCompile Include="Scripting\Internal\TEN\Types\Time\Time.cpp" />