My Project
 All Classes Files Functions Variables Enumerations Pages
Public Member Functions | List of all members
RandomXYZSphereNormal Class Reference

Generates a random point on the surface of a unit-radius sphere. More...

#include <xyz.h>

Inheritance diagram for RandomXYZSphereNormal:
XYZ

Public Member Functions

 RandomXYZSphereNormal (Random01 &rng)
 
- Public Member Functions inherited from XYZ
 XYZ ()
 Null constructor. More...
 
 XYZ (const XYZ &v)
 Copy constructor.
 
 XYZ (float vx, float vy, float vz)
 Initialise from separate components.
 
 ~XYZ ()
 Destructor.
 
const float & element (uint e) const
 Access by number.
 
float & element (uint e)
 Access by number.
 
void operator*= (float k)
 Multiply by scalar.
 
void operator/= (float k)
 Divide by scalar. More...
 
void operator+= (const XYZ &v)
 Vector addition.
 
void operator-= (const XYZ &v)
 Vector subtraction.
 
void assign (const XYZ &v)
 Assignment.
 
const XYZ operator- () const
 Negation.
 
float magnitude2 () const
 Return the square of the magnitude.
 
float magnitude () const
 Return the magnitude.
 
const XYZ normalised () const
 Return the vector normalised. More...
 
void normalise ()
 Normalise this vector. More...
 
std::ostream & write (std::ostream &) const
 Write the vector (spaces as separators).
 
const std::string format_comma () const
 Alternate formatting.
 
const std::string format_blender () const
 Alternate formatting.
 
const std::string format_pov () const
 Alternate formatting. More...
 

Additional Inherited Members

- Public Types inherited from XYZ
typedef float XYZ::* ElementPtr
 
- Public Attributes inherited from XYZ
float x
 
float y
 
float z
 
- Static Public Attributes inherited from XYZ
static ElementPtr element_table [3] ={&XYZ::x,&XYZ::y,&XYZ::z}
 

Detailed Description

Generates a random point on the surface of a unit-radius sphere.


The documentation for this class was generated from the following files: