Cellular Cloud Node¶
-
class CellularCloudNode : public simul::clouds::CellularCloudGrid¶
A basic cloud class Don’t create a CellularCloudNode directly, instead, use the derived class FastCloudNode.
Public Functions
-
virtual const float *GetTransformToLightspaceMatrix(unsigned axis, const platform::math::Vector3 &dir, const platform::math::Vector3 &origin, const platform::math::Vector3 &scales) const¶
Get a 4x4 matrix to transform from real space to lightspace.
-
virtual const float *GetTransformLightspaceToCloudspaceMatrix(unsigned axis, const platform::math::Vector3 &dir, const platform::math::Vector3 &origin, const platform::math::Vector3 &scales, float cloud_base_z, float w, float h) const¶
Get a 4x4 matrix to transform from lightspace to cloudspace.
-
platform::math::NoiseInterface *GetNoiseInterface()¶
Get a pointer to the noise memory interface.
-
inline void SetRecalculate(bool r)¶
Recalculate and reinitialise the cloud grid with updated values.
-
void SetRelight()¶
Force relighting of the volume. Usually unnecessary.
-
inline virtual bool NeedsRelight() const¶
Have properties changed that cause relighting to be necessary - either the light has moved or the cloud density grid has changed.
-
virtual int GetGenerationNumber() const¶
A number that is changed every time the clouds are regenerated.
-
virtual void GetExtents(platform::math::Vector3 &X1, platform::math::Vector3 &X2, float cloud_base_z, float w, float h) const¶
Get the physical extents of the cloud volume in the x, y and z directions.
-
virtual platform::math::Vector3 GetOrigin(platform::math::Vector3 windOffset, float cloud_base_z, float w) const¶
Get the effective origin in world co-ordinates, including wind offsets:
-
std::ostream &StreamOut(std::ostream &os) const¶
Stream/save to the std::osteam os.
-
std::istream &StreamIn(std::istream &is)¶
Stream/load from the std::isteam is.
-
std::ostream &StateStreamOut(std::ostream &os) const¶
Stream/save to the std::osteam os.
-
std::istream &StateStreamIn(std::istream &is)¶
Stream/load from the std::isteam is.
-
virtual unsigned GetMemoryUsage() const¶
Get the amount of memory used by this class instance, in bytes.
-
virtual const float *GetTransformToLightspaceMatrix(unsigned axis, const platform::math::Vector3 &dir, const platform::math::Vector3 &origin, const platform::math::Vector3 &scales) const¶