vrecko
virtual reality framework
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
PseudoRand2DPlacement Class Reference

Represents a class which pseudo-randomly scatters the clouds over the sky in form of the grid (for now) More...

#include <Cloud2DPlacement.h>

Public Member Functions

 PseudoRand2DPlacement ()
 
void SetGridUnitSizeXYZ (int x, int y, int z)
 
void GetRandPosition (int gridX, int gridY, int gridZ, int *posX, int *posY, int *posZ, int radius=0) const
 
float Noise1D (int x, int y) const
 

Public Attributes

int gridUnitSizeX
 
int gridUnitSizeY
 
int gridUnitSizeZ
 
int gridUnitHalfSizeX
 
int gridUnitHalfSizeZ
 

Detailed Description

Represents a class which pseudo-randomly scatters the clouds over the sky in form of the grid (for now)

Todo:
Add more variability and randomness, replace the grid for something else.

Constructor & Destructor Documentation

PseudoRand2DPlacement::PseudoRand2DPlacement ( )
inline

Member Function Documentation

void PseudoRand2DPlacement::GetRandPosition ( int  gridX,
int  gridY,
int  gridZ,
int *  posX,
int *  posY,
int *  posZ,
int  radius = 0 
) const

Computes a pseudo random location for a cloud of a given radius and coordinates in the grid of clouds

Parameters
[in]gridXX coordinate in cloud grid
[in]gridYY coordinate in cloud grid
[in]gridYY coordinate in cloud grid
[out]posXPseudo random X coordinate in cloud grid
[out]posYPseudo random Y coordinate in cloud grid
[out]posZPseudo random Z coordinate in cloud grid
[in]radiusRadius of the cloud (optional, default = 0)
float PseudoRand2DPlacement::Noise1D ( int  x,
int  y 
) const

Generates a noise value for the given x and y parameters

Parameters
[in]xThe x parameter
[in]yThe y parameter
Returns
Noise value for the given parameters
void PseudoRand2DPlacement::SetGridUnitSizeXYZ ( int  x,
int  y,
int  z 
)

Sets the grid unit size of all the axes

Parameters
[in]xThe x axis unit size
[in]yThe y axis unit size
[in]zThe z axis unit size

Member Data Documentation

int PseudoRand2DPlacement::gridUnitHalfSizeX
int PseudoRand2DPlacement::gridUnitHalfSizeZ
int PseudoRand2DPlacement::gridUnitSizeX
int PseudoRand2DPlacement::gridUnitSizeY
int PseudoRand2DPlacement::gridUnitSizeZ

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