VISU - PHP Game Framework

Heightmap
in package

Table of Contents

Properties

$data  : FloatBuffer
$height  : int
$ppu  : float
$width  : int

Methods

__construct()  : mixed
castRay()  : Vec3|null
Casts a ray against the heightmap and returns the intersection point (binary search)
getHeightAt()  : float
Returns the height at the given world space x and z coordinates

Properties

Methods

__construct()

public __construct(FloatBuffer $data, int $width, int $height[, float $ppu = 1.0 ]) : mixed
Parameters
$data : FloatBuffer
$width : int
$height : int
$ppu : float = 1.0

castRay()

Casts a ray against the heightmap and returns the intersection point (binary search)

public castRay(Ray $ray[, float $maxDistance = 1000 ][, int $lookups = 16 ]) : Vec3|null
Parameters
$ray : Ray
$maxDistance : float = 1000
$lookups : int = 16
Return values
Vec3|null

getHeightAt()

Returns the height at the given world space x and z coordinates

public getHeightAt(float $x, float $y) : float
Parameters
$x : float
$y : float
Return values
float

        
On this page

Search results