# Home    # nevrax.com   
Nevrax
Nevrax.org
#News
#Mailing-list
#Documentation
#CVS
#Bugs
#License
Docs
 
Documentation  
Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages   Search  

NL3D::CCloud Class Reference

#include <cloud.h>

List of all members.

Public Methods

 CCloud (CCloudScape *pCloudScape)
 ~CCloud ()
void init (uint32 nVoxelW, uint32 nVoxelH, uint32 nVoxelD, float rBaseFreq, uint32 nNbOctave)
void generate (CNoise3d &noise)
void light ()
void reset (NL3D::CCamera *pViewer)
void anim (double dt, double dt2)
void disp ()
void dispXYZ (NL3D::CMaterial *pMat=NULL)
void genBill (NL3D::CCamera *pViewer, uint32 nBillSize=128)
void dispBill (NL3D::CCamera *pViewer)
float getX ()
float getLastX ()
float getY ()
float getZ ()
float getSizeX ()
float getSizeY ()
float getSizeZ ()
void setX (float x)
void setY (float y)
void setZ (float z)
void setSizeX (float x)
void setSizeY (float y)
void setSizeZ (float z)
void setTexClamp (SCloudTextureClamp &t)
void setTex3DTemp (SCloudTexture3D &t)
void setLooping ()
uint32 getBillSize ()
uint32 getMemSize ()

Public Attributes

double Time
double FuturTime
NLMISC::CRGBA CloudDiffuse
NLMISC::CRGBA CloudAmbient
uint8 CloudPower
uint8 CloudDistAtt
uint8 LastCloudPower

Private Methods

void setMode2D ()
void calcBill (const NLMISC::CVector &Viewer, const NLMISC::CVector &Center, const NLMISC::CVector &Size, NLMISC::CVector &I, NLMISC::CVector &J, NLMISC::CVector &K, float &Left, float &Right, float &Top, float &Bottom, float &Near, float &Far)

Private Attributes

uint32 _Width
uint32 _Height
uint32 _Depth
uint32 _NbW
uint32 _NbH
NLMISC::CVector _Size
NLMISC::CVector _Pos
float _LastX
float _BaseFreq
uint32 _NbOctave
double * _UStart
double * _VStart
double * _WStart
CCloudScape_CloudScape
SCloudTexture3D_CloudTexTmp
SCloudTextureClamp_CloudTexClamp
uint32 _BillSize
uint8_MemBill
NLMISC::CSmartPtr< NL3D::CTextureMem_TexBill
uint32 _OldBillSize
uint8_MemOldBill
NLMISC::CSmartPtr< NL3D::CTextureMem_TexOldBill
uint8 _WaitState
NLMISC::CVector _BillViewer
NLMISC::CVector _BillCenter
NLMISC::CVector _BillOldCenter
NL3D::IDriver_Driver


Constructor & Destructor Documentation

NL3D::CCloud::CCloud CCloudScape   pCloudScape
 

Definition at line 41 of file cloud.cpp.

References _BillSize, _CloudScape, _Driver, _OldBillSize, _UStart, _VStart, _WaitState, _WStart, CloudAmbient, CloudDiffuse, CloudDistAtt, CloudPower, and LastCloudPower.

NL3D::CCloud::~CCloud  
 

Definition at line 57 of file cloud.cpp.

References _UStart, _VStart, and _WStart.


Member Function Documentation

void NL3D::CCloud::anim double    dt,
double    dt2
 

Definition at line 315 of file cloud.cpp.

References _NbOctave, _UStart, _VStart, and _WStart.

void NL3D::CCloud::calcBill const NLMISC::CVector   Viewer,
const NLMISC::CVector   Center,
const NLMISC::CVector   Size,
NLMISC::CVector   I,
NLMISC::CVector   J,
NLMISC::CVector   K,
float &    Left,
float &    Right,
float &    Top,
float &    Bottom,
float &    Near,
float &    Far
[private]
 

Definition at line 437 of file cloud.cpp.

References v.

Referenced by dispBill, genBill, and reset.

void NL3D::CCloud::disp  
 

Definition at line 328 of file cloud.cpp.

References _CloudScape, _CloudTexTmp, _Driver, _Height, _NbH, _NbW, _Width, NL3D::IDriver::activeVertexBuffer, NL3D::IDriver::renderQuads, s, NL3D::IDriver::setFrustum, NL3D::IDriver::setupModelMatrix, NL3D::IDriver::setupScissor, NL3D::IDriver::setupViewMatrix, NL3D::IDriver::setupViewport, and w.

void NL3D::CCloud::dispBill NL3D::CCamera   pViewer
 

Definition at line 600 of file cloud.cpp.

References _BillCenter, _BillOldCenter, _BillViewer, _CloudScape, _Driver, _MemBill, _MemOldBill, _Pos, _Size, _TexBill, _TexOldBill, _WaitState, NL3D::IDriver::activeVertexBuffer, calcBill, FuturTime, NL3D::IDriver::renderQuads, NL3D::IDriver::setPolygonMode, Time, NLMISC::CVector::x, NLMISC::CVector::y, and NLMISC::CVector::z.

void NL3D::CCloud::dispXYZ NL3D::CMaterial   pMat = NULL
 

Definition at line 388 of file cloud.cpp.

References _CloudScape, _Driver, _NbH, _NbW, _Pos, _Size, NL3D::IDriver::activeVertexBuffer, NL3D::IDriver::renderQuads, NLMISC::CVector::x, NLMISC::CVector::y, and NLMISC::CVector::z.

Referenced by genBill.

void NL3D::CCloud::genBill NL3D::CCamera   pViewer,
uint32    nBillSize = 128
 

Definition at line 509 of file cloud.cpp.

References _BillCenter, _BillOldCenter, _BillSize, _BillViewer, _CloudScape, _CloudTexTmp, _Driver, _LastX, _MemBill, _MemOldBill, _OldBillSize, _Pos, _Size, _TexBill, _TexOldBill, _WaitState, NL3D::IDriver::activeVertexBuffer, calcBill, CloudAmbient, NL3D::IDriver::copyFrameBufferToTexture, dispXYZ, NL3D::IDriver::getWindowSize, NL3D::IDriver::renderQuads, NL3D::IDriver::setFrustum, NL3D::IDriver::setupModelMatrix, NL3D::IDriver::setupViewMatrix, NL3D::IDriver::setupViewport, NLMISC::CVector::x, NLMISC::CVector::y, and NLMISC::CVector::z.

void NL3D::CCloud::generate CNoise3d   noise
 

Definition at line 110 of file cloud.cpp.

References _BaseFreq, _CloudScape, _CloudTexClamp, _CloudTexTmp, _Depth, _Driver, _Height, _NbH, _NbOctave, _NbW, _UStart, _VStart, _Width, _WStart, NL3D::IDriver::activeVertexBuffer, CloudDistAtt, CloudPower, NL3D::IDriver::copyFrameBufferToTexture, NL3D::IDriver::renderQuads, and setMode2D.

uint32 NL3D::CCloud::getBillSize   [inline]
 

Definition at line 100 of file cloud.h.

References _BillSize.

float NL3D::CCloud::getLastX   [inline]
 

Definition at line 79 of file cloud.h.

References _LastX.

uint32 NL3D::CCloud::getMemSize   [inline]
 

Definition at line 102 of file cloud.h.

References _BillSize, and _OldBillSize.

float NL3D::CCloud::getSizeX   [inline]
 

Definition at line 83 of file cloud.h.

References _Size, and NLMISC::CVector::x.

float NL3D::CCloud::getSizeY   [inline]
 

Definition at line 84 of file cloud.h.

References _Size, and NLMISC::CVector::y.

float NL3D::CCloud::getSizeZ   [inline]
 

Definition at line 85 of file cloud.h.

References _Size, and NLMISC::CVector::z.

float NL3D::CCloud::getX   [inline]
 

Definition at line 78 of file cloud.h.

References _Pos, and NLMISC::CVector::x.

float NL3D::CCloud::getY   [inline]
 

Definition at line 80 of file cloud.h.

References _Pos, and NLMISC::CVector::y.

float NL3D::CCloud::getZ   [inline]
 

Definition at line 81 of file cloud.h.

References _Pos, and NLMISC::CVector::z.

void NL3D::CCloud::init uint32    nVoxelW,
uint32    nVoxelH,
uint32    nVoxelD,
float    rBaseFreq,
uint32    nNbOctave
 

Definition at line 65 of file cloud.cpp.

References _BaseFreq, _BillSize, _Depth, _Height, _MemBill, _MemOldBill, _NbH, _NbOctave, _NbW, _OldBillSize, _Size, _UStart, _VStart, _Width, _WStart, NLMISC::getPowerOf2, NLMISC::raiseToNextPowerOf2, NLMISC::CVector::x, NLMISC::CVector::y, and NLMISC::CVector::z.

void NL3D::CCloud::light  
 

Definition at line 182 of file cloud.cpp.

References _CloudScape, _CloudTexTmp, _Driver, _Height, _NbH, _NbW, _Width, NLMISC::CRGBA::A, NL3D::IDriver::activeVertexBuffer, CloudDiffuse, NL3D::IDriver::copyFrameBufferToTexture, NL3D::IDriver::renderQuads, NL3D::IDriver::setColorMask, and setMode2D.

void NL3D::CCloud::reset NL3D::CCamera   pViewer
 

Definition at line 251 of file cloud.cpp.

References _BillCenter, _BillOldCenter, _BillSize, _BillViewer, _CloudScape, _Driver, _MemBill, _MemOldBill, _OldBillSize, _Pos, _Size, _TexBill, _TexOldBill, NL3D::IDriver::activeVertexBuffer, calcBill, NL3D::IDriver::copyFrameBufferToTexture, NL3D::IDriver::renderQuads, setMode2D, NLMISC::CVector::x, NLMISC::CVector::y, and NLMISC::CVector::z.

void NL3D::CCloud::setLooping   [inline]
 

Definition at line 98 of file cloud.h.

References _WaitState.

void NL3D::CCloud::setMode2D   [private]
 

Definition at line 745 of file cloud.cpp.

References _Driver, NL3D::IDriver::getWindowSize, NL3D::IDriver::setFrustum, NL3D::IDriver::setupModelMatrix, NL3D::IDriver::setupScissor, NL3D::IDriver::setupViewMatrix, and NL3D::IDriver::setupViewport.

Referenced by generate, light, and reset.

void NL3D::CCloud::setSizeX float    x [inline]
 

Definition at line 91 of file cloud.h.

References _Size, NLMISC::CVector::x, and x.

void NL3D::CCloud::setSizeY float    y [inline]
 

Definition at line 92 of file cloud.h.

References _Size, NLMISC::CVector::y, and y.

void NL3D::CCloud::setSizeZ float    z [inline]
 

Definition at line 93 of file cloud.h.

References _Size, NLMISC::CVector::z, and z.

void NL3D::CCloud::setTex3DTemp SCloudTexture3D   t [inline]
 

Definition at line 96 of file cloud.h.

References _CloudTexTmp, and t.

void NL3D::CCloud::setTexClamp SCloudTextureClamp   t [inline]
 

Definition at line 95 of file cloud.h.

References _CloudTexClamp, and t.

void NL3D::CCloud::setX float    x [inline]
 

Definition at line 87 of file cloud.h.

References _LastX, _Pos, NLMISC::CVector::x, and x.

void NL3D::CCloud::setY float    y [inline]
 

Definition at line 88 of file cloud.h.

References _Pos, NLMISC::CVector::y, and y.

void NL3D::CCloud::setZ float    z [inline]
 

Definition at line 89 of file cloud.h.

References _Pos, NLMISC::CVector::z, and z.


Member Data Documentation

float NL3D::CCloud::_BaseFreq [private]
 

Definition at line 135 of file cloud.h.

Referenced by generate, and init.

NLMISC::CVector NL3D::CCloud::_BillCenter [private]
 

Definition at line 159 of file cloud.h.

Referenced by dispBill, genBill, and reset.

NLMISC::CVector NL3D::CCloud::_BillOldCenter [private]
 

Definition at line 159 of file cloud.h.

Referenced by dispBill, genBill, and reset.

uint32 NL3D::CCloud::_BillSize [private]
 

Definition at line 146 of file cloud.h.

Referenced by CCloud, genBill, getBillSize, getMemSize, init, and reset.

NLMISC::CVector NL3D::CCloud::_BillViewer [private]
 

Definition at line 159 of file cloud.h.

Referenced by dispBill, genBill, and reset.

CCloudScape* NL3D::CCloud::_CloudScape [private]
 

Definition at line 139 of file cloud.h.

Referenced by CCloud, disp, dispBill, dispXYZ, genBill, generate, light, and reset.

SCloudTextureClamp* NL3D::CCloud::_CloudTexClamp [private]
 

Definition at line 141 of file cloud.h.

Referenced by generate, and setTexClamp.

SCloudTexture3D* NL3D::CCloud::_CloudTexTmp [private]
 

Definition at line 140 of file cloud.h.

Referenced by disp, genBill, generate, light, and setTex3DTemp.

uint32 NL3D::CCloud::_Depth [private]
 

Definition at line 128 of file cloud.h.

Referenced by generate, and init.

NL3D::IDriver* NL3D::CCloud::_Driver [private]
 

Definition at line 163 of file cloud.h.

Referenced by CCloud, disp, dispBill, dispXYZ, genBill, generate, light, reset, and setMode2D.

uint32 NL3D::CCloud::_Height [private]
 

Definition at line 128 of file cloud.h.

Referenced by disp, generate, init, and light.

float NL3D::CCloud::_LastX [private]
 

Definition at line 133 of file cloud.h.

Referenced by genBill, getLastX, and setX.

uint8* NL3D::CCloud::_MemBill [private]
 

Definition at line 147 of file cloud.h.

Referenced by dispBill, genBill, init, and reset.

uint8* NL3D::CCloud::_MemOldBill [private]
 

Definition at line 152 of file cloud.h.

Referenced by dispBill, genBill, init, and reset.

uint32 NL3D::CCloud::_NbH [private]
 

Definition at line 129 of file cloud.h.

Referenced by disp, dispXYZ, generate, init, and light.

uint32 NL3D::CCloud::_NbOctave [private]
 

Definition at line 136 of file cloud.h.

Referenced by anim, generate, and init.

uint32 NL3D::CCloud::_NbW [private]
 

Definition at line 129 of file cloud.h.

Referenced by disp, dispXYZ, generate, init, and light.

uint32 NL3D::CCloud::_OldBillSize [private]
 

Definition at line 151 of file cloud.h.

Referenced by CCloud, genBill, getMemSize, init, and reset.

NLMISC::CVector NL3D::CCloud::_Pos [private]
 

Definition at line 132 of file cloud.h.

Referenced by dispBill, dispXYZ, genBill, getX, getY, getZ, reset, setX, setY, and setZ.

NLMISC::CVector NL3D::CCloud::_Size [private]
 

Definition at line 131 of file cloud.h.

Referenced by dispBill, dispXYZ, genBill, getSizeX, getSizeY, getSizeZ, init, reset, setSizeX, setSizeY, and setSizeZ.

NLMISC::CSmartPtr<NL3D::CTextureMem> NL3D::CCloud::_TexBill [private]
 

Definition at line 148 of file cloud.h.

Referenced by dispBill, genBill, and reset.

NLMISC::CSmartPtr<NL3D::CTextureMem> NL3D::CCloud::_TexOldBill [private]
 

Definition at line 153 of file cloud.h.

Referenced by dispBill, genBill, and reset.

double* NL3D::CCloud::_UStart [private]
 

Definition at line 137 of file cloud.h.

Referenced by anim, CCloud, generate, init, and ~CCloud.

double * NL3D::CCloud::_VStart [private]
 

Definition at line 137 of file cloud.h.

Referenced by anim, CCloud, generate, init, and ~CCloud.

uint8 NL3D::CCloud::_WaitState [private]
 

Definition at line 155 of file cloud.h.

Referenced by CCloud, dispBill, genBill, and setLooping.

uint32 NL3D::CCloud::_Width [private]
 

Definition at line 128 of file cloud.h.

Referenced by disp, generate, init, and light.

double * NL3D::CCloud::_WStart [private]
 

Definition at line 137 of file cloud.h.

Referenced by anim, CCloud, generate, init, and ~CCloud.

NLMISC::CRGBA NL3D::CCloud::CloudAmbient
 

Definition at line 111 of file cloud.h.

Referenced by CCloud, and genBill.

NLMISC::CRGBA NL3D::CCloud::CloudDiffuse
 

Definition at line 110 of file cloud.h.

Referenced by CCloud, and light.

uint8 NL3D::CCloud::CloudDistAtt
 

Definition at line 113 of file cloud.h.

Referenced by CCloud, and generate.

uint8 NL3D::CCloud::CloudPower
 

Definition at line 112 of file cloud.h.

Referenced by CCloud, and generate.

double NL3D::CCloud::FuturTime
 

Definition at line 108 of file cloud.h.

Referenced by dispBill.

uint8 NL3D::CCloud::LastCloudPower
 

Definition at line 115 of file cloud.h.

Referenced by CCloud.

double NL3D::CCloud::Time
 

Definition at line 108 of file cloud.h.

Referenced by dispBill.


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