mirror of
https://github.com/raysan5/raylib.git
synced 2025-12-25 10:22:33 -05:00
Changes integration (some WIP, view details)
Corrected GetMouseWheelMove() Corrected camera system Reviewed cubicmap resolution (collision detection) Added QuaternionTransform() WIP: Raycast system (not working) WIP: Reviewing axis-angle rotations...
This commit is contained in:
15
src/raylib.h
15
src/raylib.h
@ -294,6 +294,12 @@ typedef struct Model {
|
||||
//Matrix transform;
|
||||
} Model;
|
||||
|
||||
// Ray type (useful for raycast)
|
||||
typedef struct Ray {
|
||||
Vector3 position;
|
||||
Vector3 direction;
|
||||
} Ray;
|
||||
|
||||
// Sound source type
|
||||
typedef struct Sound {
|
||||
unsigned int source;
|
||||
@ -355,7 +361,7 @@ int GetRandomValue(int min, int max); // Returns a random
|
||||
Color Fade(Color color, float alpha); // Color fade-in or fade-out, alpha goes from 0.0f to 1.0f
|
||||
|
||||
void SetCameraMode(int mode); // Multiple camera modes available
|
||||
void UpdateCamera(Vector3 *playerPosition); // Update camera with player position (when using internal camera)
|
||||
Camera UpdateCamera(Vector3 *position); // Update camera with position (when using internal camera)
|
||||
|
||||
void SetConfigFlags(char flags); // Enable some window configurations
|
||||
void ShowLogo(void); // Activates raylib logo at startup (can be done with flags)
|
||||
@ -363,6 +369,8 @@ void ShowLogo(void); // Activates raylib
|
||||
void InitPostShader(void); // Initialize fullscreen postproduction shaders system
|
||||
void SetPostShader(unsigned int shader); // Set fullscreen postproduction shader
|
||||
|
||||
Ray GetMouseRay(Vector2 mousePosition, Camera camera); // Gives the rayTrace from mouse position
|
||||
|
||||
//------------------------------------------------------------------------------------
|
||||
// Input Handling Functions (Module: core)
|
||||
//------------------------------------------------------------------------------------
|
||||
@ -485,6 +493,7 @@ void DrawCylinderWires(Vector3 position, float radiusTop, float radiusBottom, fl
|
||||
void DrawQuad(Vector3 vertices[4], Vector2 textcoords[4], Vector3 normals[4], Color colors[4]); // Draw a quad
|
||||
void DrawPlane(Vector3 centerPos, Vector2 size, Vector3 rotation, Color color); // Draw a plane
|
||||
void DrawPlaneEx(Vector3 centerPos, Vector2 size, Vector3 rotation, int slicesX, int slicesZ, Color color); // Draw a plane with divisions
|
||||
void DrawRay(Ray ray, Color color);
|
||||
void DrawGrid(int slices, float spacing); // Draw a grid (centered at (0, 0, 0))
|
||||
void DrawGizmo(Vector3 position); // Draw simple gizmo
|
||||
void DrawGizmoEx(Vector3 position, Vector3 rotation, float scale); // Draw gizmo with extended parameters
|
||||
@ -502,7 +511,7 @@ void SetModelTexture(Model *model, Texture2D texture);
|
||||
void SetModelShader(Model *model, Shader shader); // Link a shader to a model (not available on OpenGL 1.1)
|
||||
|
||||
void DrawModel(Model model, Vector3 position, float scale, Color tint); // Draw a model (with texture if set)
|
||||
void DrawModelEx(Model model, Vector3 position, Vector3 rotation, Vector3 scale, Color tint); // Draw a model with extended parameters
|
||||
void DrawModelEx(Model model, Vector3 position, float rotationAngle, Vector3 rotationAxis, Vector3 scale, Color tint); // Draw a model with extended parameters
|
||||
void DrawModelWires(Model model, Vector3 position, float scale, Color color); // Draw a model wires (with texture if set)
|
||||
|
||||
void DrawBillboard(Camera camera, Texture2D texture, Vector3 center, float size, Color tint); // Draw a billboard texture
|
||||
@ -513,7 +522,7 @@ Shader LoadShader(char *vsFileName, char *fsFileName);
|
||||
bool CheckCollisionSpheres(Vector3 centerA, float radiusA, Vector3 centerB, float radiusB);
|
||||
bool CheckCollisionBoxes(Vector3 minBBox1, Vector3 maxBBox1, Vector3 minBBox2, Vector3 maxBBox2);
|
||||
bool CheckCollisionBoxSphere(Vector3 minBBox, Vector3 maxBBox, Vector3 centerSphere, float radiusSphere);
|
||||
void ResolveCollisionCubicmap(Image cubicmap, Vector3 mapPosition, Vector3 *playerPosition);
|
||||
Vector3 ResolveCollisionCubicmap(Image cubicmap, Vector3 mapPosition, Vector3 *playerPosition, float radius); // Return the normal vector of the impacted surface
|
||||
|
||||
//------------------------------------------------------------------------------------
|
||||
// Audio Loading and Playing Functions (Module: audio)
|
||||
|
||||
Reference in New Issue
Block a user