VCRA-SZCZERBACKI-PointBasedRendering/ssAdditional.hpp

00001 #ifndef __SSADDITIONAL_HPP
00002 #define __SSADDITIONAL_HPP
00003 
00004 #include "ssMatrix.hpp"
00005 #include "def.h"
00006 #include <stdlib.h>
00007 
00008 namespace SS
00009 {
00010 inline float degreeToRad(float degrees)                         { return degrees * (3.1415f / 180.0f);  }
00011 inline int extractSign( float a )                                       { return *((int *)&a) & 0x80000000; }
00012 inline float randMinusHalfHalf( )                                       { return (float)rand( ) / (float)(RAND_MAX / 2) - (float)1; }
00013 
00014 extern float norm_inf( const Matrix3x3 &m );
00015 extern float norm_1( const Matrix3x3 &m );
00016 extern int extractSign( float a );
00017 extern float randMinusHalfHalf( );
00018 extern Vector3 randInBox( );
00019 extern Vector3 randInBox( float edgeLength );
00020 extern Vector3 randOnSphere();
00021 extern Vector3 randOnSphere( float radius );
00022 extern Vector3 randInSphere( );
00023 extern Vector3 randInSphere( float radius );
00024 extern Vector2 randInCircle( );
00025 extern Vector3 perpendicular( const Vector3 &v );
00026 };
00027 
00028 #endif

Generated on Thu Feb 15 09:09:20 2007 for Surface Splating by  doxygen 1.5.1-p1