home dev games gallery work
Lewpen.com»Research & Development»3D Graphics»OpenGL»Reflective Sphere

Reflective Sphere

Analytical reflections in OpenGL

/ Source / common / 001 / vector.h

#ifndef __VECTOR_H__
#define __VECTOR_H__






//---- VECTOR FUNCTIONS

double vector_length( double x, double y, double z );

void vector_normalise(double *x, double *y, double *z);

void vector_normalise( double *x, double *y, double *z, double length );

void vector_cross
(
  double *x, double *y, double *z,
  double ax, double ay, double az,
  double bx, double by, double bz
);


void vector_rotate_x( double *x, double *y, double *z, double angle );
void vector_rotate_y( double *x, double *y, double *z, double angle );
void vector_rotate_z( double *x, double *y, double *z, double angle );





#endif
Related Articles

Procedural city block layout

Animated 4-dimensional objects mapped down to 3D

Simulating a cloth falling and slipping over objects

Windows C++ OpenGL example

Games

The Dodge Game
Flatspace

2-Player Games:

Quake 2D
Meteora

Puzzle Games:

Mini Tetris
Sudoku Solver

Development

3D Graphics:

3D Graphics Articles
WebGL Examples
OpenGL Examples
Flash 3D Engine
Java 3D Engine

Development:

Programming Articles
Game Development Examples

Work

Portfolio
Clients
Startups & Projects
Expertise

Links

CubeLogix Studios
PHP Charts & Graphs
Local Legends Football