#include <libultraship/libultraship.h>
#include <libultra/gbi.h>
#include <libultra/types.h>
#include "../CoreMath.h"
#include <vector>
#include "GameObject.h"
#include <fast/Fast3dWindow.h>
#include <fast/interpreter.h>
#include "common_structs.h"
Go to the source code of this file.
|
| bool | IsInGameScreen () |
| |
| FVector | ScreenRayTrace () |
| |
| bool | QueryCollisionRayActor (Vec3f rayOrigin, Vec3f rayDir, Vec3f actorMin, Vec3f actorMax, float *t) |
| |
| FVector4 | MultiplyMatrixVector (float matrix[4][4], float vector[4]) |
| |
| static bool | InverseMatrix (const float m[16], float invOut[16]) |
| |
| void | Copy (MtxF *src, MtxF *dest) |
| |
| void | Clear (MtxF *mf) |
| |
| FVector | TransformVecByMatrix (const FVector &vec, const float mtx[4][4]) |
| |
| FVector | TransformVecDirection (const FVector &dir, const float mtx[4][4]) |
| |
| Ray | RayToLocalSpace (MtxF mtx, const Ray &ray) |
| |
| bool | IntersectRayTriangle (const Ray &ray, const Triangle &tri, float &t) |
| |
| bool | IntersectRayTriangleAndTransform (const Ray &ray, FVector pos, const Triangle &tri, float &t) |
| |
| bool | IntersectRaySphere (const Ray &ray, const FVector &sphereCenter, float radius, float &t) |
| |
| std::optional< FVector > | QueryHandleIntersection (MtxF mtx, Ray ray, const Triangle &tri) |
| |
| void | Editor_MatrixIdentity (Mat4 mtx) |
| |
| void | Editor_AddMatrix (Mat4 mtx, int32_t flags) |
| |
| float | CalculateAngle (const FVector &start, const FVector &end) |
| |
| void | SetDirectionFromRotator (IRotator rot, s8 direction[3]) |
| |
| void | SetRotatorFromDirection (FVector direction, IRotator *rot) |
| |
| FVector | GetPositionAheadOfCamera (f32 dist) |
| |
◆ CalculateAngle()
◆ Clear()
◆ Copy()
| void Copy |
( |
MtxF * | src, |
|
|
MtxF * | dest ) |
◆ Editor_AddMatrix()
| void Editor_AddMatrix |
( |
Mat4 | mtx, |
|
|
int32_t | flags ) |
◆ Editor_MatrixIdentity()
| void Editor_MatrixIdentity |
( |
Mat4 | mtx | ) |
|
◆ GetPositionAheadOfCamera()
| FVector GetPositionAheadOfCamera |
( |
f32 | dist | ) |
|
◆ IntersectRaySphere()
| bool IntersectRaySphere |
( |
const Ray & | ray, |
|
|
const FVector & | sphereCenter, |
|
|
float | radius, |
|
|
float & | t ) |
◆ IntersectRayTriangle()
| bool IntersectRayTriangle |
( |
const Ray & | ray, |
|
|
const Triangle & | tri, |
|
|
float & | t ) |
◆ IntersectRayTriangleAndTransform()
| bool IntersectRayTriangleAndTransform |
( |
const Ray & | ray, |
|
|
FVector | pos, |
|
|
const Triangle & | tri, |
|
|
float & | t ) |
◆ InverseMatrix()
| static bool InverseMatrix |
( |
const float | m[16], |
|
|
float | invOut[16] ) |
|
static |
◆ IsInGameScreen()
Projects 2D cursor into the game world
- Returns
- FVector ray direction
ray.x = camera->pos[0] + direction.x * length; ray.y = camera->pos[1] + direction.y * length; ray.z = camera->pos[2] + direction.z * length;
◆ MultiplyMatrixVector()
| FVector4 MultiplyMatrixVector |
( |
float | matrix[4][4], |
|
|
float | vector[4] ) |
◆ QueryCollisionRayActor()
| bool QueryCollisionRayActor |
( |
Vec3f | rayOrigin, |
|
|
Vec3f | rayDir, |
|
|
Vec3f | actorMin, |
|
|
Vec3f | actorMax, |
|
|
float * | t ) |
◆ QueryHandleIntersection()
| std::optional< FVector > QueryHandleIntersection |
( |
MtxF | mtx, |
|
|
Ray | ray, |
|
|
const Triangle & | tri ) |
optional used here so we can check for successful query and return the click position
◆ RayToLocalSpace()
| Ray RayToLocalSpace |
( |
MtxF | mtx, |
|
|
const Ray & | ray ) |
◆ ScreenRayTrace()
◆ SetDirectionFromRotator()
| void SetDirectionFromRotator |
( |
IRotator | rot, |
|
|
s8 | direction[3] ) |
- Warning
- dumb hack to align the light properly
◆ SetRotatorFromDirection()
◆ TransformVecByMatrix()
| FVector TransformVecByMatrix |
( |
const FVector & | vec, |
|
|
const float | mtx[4][4] ) |
◆ TransformVecDirection()
| FVector TransformVecDirection |
( |
const FVector & | dir, |
|
|
const float | mtx[4][4] ) |
◆ EditorMatrix
| std::vector<Mtx> EditorMatrix |
|
extern |