|
Caelum
|
Private caelum utilities. More...
#include <InternalUtilities.h>
Public Types | |
| enum | DomeType { DT_SKY_DOME, DT_IMAGE_STARFIELD } |
| Enumeration of types of sky domes. | |
Static Public Member Functions | |
| static Ogre::ColourValue | getInterpolatedColour (float fx, float fy, Ogre::Image *img, bool wrapX=true) |
| Gets the interpolated colour between two pixels from an image. More... | |
| static const Ogre::String | pointerToString (void *pointer) |
| Quickly format a pointer as a string; in hex. | |
| static Ogre::MaterialPtr | checkLoadMaterialClone (const Ogre::String &originalName, const Ogre::String &cloneName) |
| Creates a private clone of a material from a script. More... | |
| static Ogre::CompositorPtr | checkCompositorSupported (const Ogre::String &name) |
| Fetch a compositor by name and check it can be loaded properly. More... | |
| static void | generateSphericDome (const Ogre::String &name, int segments, DomeType domeType) |
| Creates a longitude-latitude sky dome. More... | |
Private caelum utilities.
This class constains various tiny utilities for caelum to use.
Definition at line 33 of file InternalUtilities.h.
|
static |
Gets the interpolated colour between two pixels from an image.
Interpolate a texture pixel by hand. (fx, fy) are in texture coordinates, ranging [0-1] across the entire texture. Smooth blending is only done on the x coordinate. Wrapping is only supported on X as well.
| fx | Horizontal coordinate. |
| fy | Vertical coordiate. |
| img | The lookup image. |
| wrapX | To wrap the x coordinate. |
Definition at line 28 of file InternalUtilities.cpp.
Referenced by Caelum::FlatCloudLayer::setCloudCover().
|
static |
Creates a private clone of a material from a script.
When a class wants to modify a material at runtime it must not modify the original material loaded from scripts. Instead it should create a clone and use that.
This method throws a Caelum::UnsupportedException on failure.
| originalName | Name of the original material. |
| cloneName | Name of the result clone. |
Definition at line 82 of file InternalUtilities.cpp.
Referenced by Caelum::GroundFog::GroundFog(), Caelum::ImageStarfield::ImageStarfield(), Caelum::Moon::Moon(), Caelum::SkyDome::SkyDome(), Caelum::SphereSun::SphereSun(), and Caelum::SpriteSun::SpriteSun().
|
static |
Fetch a compositor by name and check it can be loaded properly.
This method throws a Caelum::UnsupportedException on failure.
| name | Name of the compositor to check. |
Definition at line 107 of file InternalUtilities.cpp.
|
static |
Creates a longitude-latitude sky dome.
| name | The name of the mesh to be created. |
| segments | The number of sphere segments. |
| domeType | The type of dome to create. |
Definition at line 127 of file InternalUtilities.cpp.
References Caelum::RESOURCE_GROUP_NAME.
Referenced by Caelum::ImageStarfield::ImageStarfield(), and Caelum::SkyDome::SkyDome().
1.8.11