Epok Engine

EPOK RUNTIME

epok::CollisionLibrary::raycast_segment

Method · 1 overload

Method

Performs `raycast segment` as part of the gameplay api module.

Belongs to
epok::CollisionLibrary
Header
gameplay_api.hpp
Overloads
1

Declaration

static
Declaration
static CollisionHitSample raycast_segment(GameplayVector3 origin,GameplayVector3 displacement,uint32_t mask,ObjectId ignore,bool triggers)

Performs `raycast segment` as part of the gameplay api module.

ParameterTypeMeaning
originGameplayVector3Value supplied for origin. Keep referenced or pointed-to data valid for the complete call.
displacementGameplayVector3Value supplied for displacement. Keep referenced or pointed-to data valid for the complete call.
maskuint32_tValue supplied for mask. Keep referenced or pointed-to data valid for the complete call.
ignoreObjectIdValue supplied for ignore. Keep referenced or pointed-to data valid for the complete call.
triggersboolValue supplied for triggers. Keep referenced or pointed-to data valid for the complete call.

Returns: CollisionHitSample. Check the value before continuing when it represents success, availability or a resource handle.

Example

C++ example
#include "gameplay_api.hpp"

// Assume these named values have been initialized with valid data:
// GameplayVector3 origin
// GameplayVector3 displacement
// uint32_t mask
// ObjectId ignore
// bool triggers

auto result = epok::CollisionLibrary::raycast_segment(origin, displacement, mask, ignore, triggers);

Why use it

It provides direct, allocation-conscious access to the gameplay api module. No exception-based error path is implied by the signature.

Trade-offs and warnings

Call it only in the lifecycle phase described by the module. Validate indices, capacities and object state before use.

Declared in runtime/gameplay_api.hpp:246

Related members