 |
OGRE
1.12.2
Object-Oriented Graphics Rendering Engine
|
- Getting Started
- Components
- In Depth
A list of triangles, 3 vertices per triangle.
Definition: OgreRenderOperation.h:56
void clearTray(TrayLocation trayLoc)
Removes all widgets from a widget tray.
virtual SceneNode * createChildSceneNode(const Vector3 &translate=Vector3::ZERO, const Quaternion &rotate=Quaternion::IDENTITY)
Creates an unnamed new SceneNode as a child of this node.
Common subclass of DataStream for handling data from chunks of memory.
Definition: OgreDataStream.h:312
Vector< 2, Real > Vector2
Definition: OgrePrerequisites.h:251
void setShadowTechnique(ShadowTechnique technique)
Sets the general shadow technique to be used in this scene.
const WidgetList & getWidgets(TrayLocation trayLoc) const
Gets all the widgets of a specific tray.
Definition: OgreTrays.h:978
Vector< 3, Real > Vector3
Definition: OgrePrerequisites.h:254
SubMesh * createSubMesh(void)
Creates a new SubMesh.
Stencil shadow technique which renders all shadow volumes as a modulation after all the non-transpare...
Definition: OgreCommon.h:239
Ogre::Ray getCursorRay(Ogre::Camera *cam)
Returns a 3D ray into the scene that is directly underneath the cursor.
Builds the union between two sources.
Definition: OgreVolumeCSGSource.h:251
void destroyAllWidgets()
Destroys all widgets.
void setTimer(Timer *t)
Sets the timer for the profiler.
Definition: OgreTrays.h:56
Class for managing Material settings for Ogre.
Definition: OgreMaterialManager.h:70
SceneManager * sceneManager
The scenemanager to construct the entity with.
Definition: OgreVolumeChunk.h:58
void setCastShadows(bool enabled)
Sets whether or not this object will cast shadows.
Definition: OgreMovableObject.h:528
Vector3 updateFrom
If an existing chunktree is to be partially updated, set this to the back lower left point of the (su...
Definition: OgreVolumeChunk.h:91
HashedVector< Light * > LightList
Definition: OgreCommon.h:579
virtual void setActiveScheme(const String &schemeName)
Sets the name of the active material scheme.
Defines a plane in 3D space.
Definition: OgrePlane.h:62
Real worldSize
The world size of the terrain.
Definition: OgreTerrain.h:355
Texture-based shadow technique which involves a render-to-texture of the shadow caster and a projecti...
Definition: OgreCommon.h:262
virtual Camera * createCamera(const String &name)
Creates a camera to be managed by this scene manager.
Definition: OgreTrays.h:59
Defines an instance of a discrete, movable object based on a Mesh.
Definition: OgreEntity.h:79
Entity * createEntity(const String &entityName, const String &meshName, const String &groupName=ResourceGroupManager::AUTODETECT_RESOURCE_GROUP_NAME)
Create an Entity (instance of a discrete mesh).
virtual void position(const Vector3 &pos)
Add a vertex position, starting a new vertex at the same time.
Real inputScale
How to scale the input values provided (if any)
Definition: OgreTerrain.h:385
Technique * getBestTechnique(unsigned short lodIndex=0, const Renderable *rend=0)
Gets the best supported technique.
A volume source from a 3D texture.
Definition: OgreVolumeTextureSource.h:44
Real errorMultiplicator
The error multiplicator per LOD level with 1.0 as default.
Definition: OgreVolumeChunk.h:67
void setTrayPadding(Ogre::Real padding)
void setSpecularColour(float red, float green, float blue)
Sets the colour of the specular light given off by this source.
void clearAllTrays()
Removes all widgets from all widget trays.
_StringBase String
Definition: OgreCommon.h:37
Representation of a dynamic light source in the scene.
Definition: OgreLight.h:70
size_t vertexCount
The number of vertices used in this operation.
Definition: OgreVertexIndexData.h:90
static Profiler & getSingleton(void)
Get the singleton instance.
static Ogre::Vector2 sceneToScreen(Ogre::Camera *cam, const Ogre::Vector3 &pt)
Converts a 3D scene position to a 2D screen position (in relative screen size, 0.0-1....
void setWidgetSpacing(Ogre::Real spacing)
Class providing a much simplified interface to generating manual objects with custom geometry.
Definition: OgreManualObject.h:106
Parameters for loading the volume.
Definition: OgreVolumeChunk.h:55
virtual void textureCoord(float u)
Add a texture coordinate to the current vertex.
void setDirection(Real x, Real y, Real z)
Class representing colour.
Definition: OgreColourValue.h:57
Definition: OgreAdvancedRenderControls.h:41
SharedPtr< HardwareVertexBuffer > HardwareVertexBufferSharedPtr
Definition: OgrePrerequisites.h:293
static MeshManager & getSingleton(void)
Get the singleton instance.
void setNearClipDistance(Real nearDist)
Sets the position of the near clipping plane.
Fog density increases linearly between the start and end distances.
Definition: OgreCommon.h:153
SharedPtr< Texture > TexturePtr
Definition: OgrePrerequisites.h:303
void update()
Publish any changes you made to the blend data back to the blend map.
Manages the organisation and rendering of a 'scene' i.e.
Definition: OgreSceneManager.h:157
void setAmbientLight(const ColourValue &colour)
Sets the ambient light level to be used for the scene.
The root class of the Ogre system.
Definition: OgreRoot.h:65
static Ogre::Ray screenToScene(Ogre::Camera *cam, const Ogre::Vector2 &pt)
Converts a 2D screen coordinate (in pixels) to a 3D ray into the scene.
Normal, 3 reals per vertex.
Definition: OgreHardwareVertexBuffer.h:97
int locateWidgetInTray(Widget *widget)
Gets a widget's position in its tray.
std::vector< Vertex > VecVertex
To hold vertices.
Definition: OgreVolumeMeshBuilder.h:103
void moveWidgetToTray(Widget *widget, TrayLocation trayLoc, size_t place=-1)
Adds a widget to a specified tray at given position, or at the end if unspecified or invalid.
void addSceneManager(SceneManager *sceneMgr)
Add a scene manager to the shader generator scene managers list.
Real maxScreenSpaceError
The maximum accepted screen space error when choosing the LOD levels to render.
Definition: OgreVolumeChunk.h:85
virtual void load(bool backgroundThread=false)
Loads the resource, if it is not already.
void setListener(TrayListener *listener)
Definition: OgreTrays.h:775
std::vector< size_t > VecIndices
To hold indices.
Definition: OgreVolumeMeshBuilder.h:107
Definition: OgreHardwareVertexBuffer.h:123
Definition: OgreOverlayElement.h:70
void lookAt(const Vector3 &targetPoint, TransformSpace relativeTo, const Vector3 &localDirectionVector=Vector3::NEGATIVE_UNIT_Z)
Points the local -Z direction of this node at a point in space.
32-bit pixel format, 32 bits (float) for red
Definition: OgrePixelFormat.h:122
void setAutoAspectRatio(bool autoratio)
If set to true a viewport that owns this frustum will be able to recalculate the aspect ratio wheneve...
float * getBlendPointer()
Get a pointer to the whole blend data.
virtual void load(SceneNode *parent, const Vector3 &from, const Vector3 &to, size_t level, const ChunkParameters *parameters)
Loads the volume mesh with all LODs.
Keysym keysym
Definition: OgreInput.h:52
void push_back(const T &t)
Definition: OgreCommon.h:486
24-bit pixel format, 8 bits for blue, green and red.
Definition: OgrePixelFormat.h:286
float Real
Software floating point type.
Definition: OgrePrerequisites.h:52
Vector3 normal
Definition: OgrePlane.h:65
virtual const String & getActiveScheme(void) const
Returns the name of the active material scheme.
VertexData * sharedVertexData
Shared vertex data.
Definition: OgreMesh.h:309
LayerInstanceList layerList
List of layer structures, one for each layer required.
Definition: OgreTerrain.h:398
Class exposing an interface to a blend map for a given layer.
Definition: OgreTerrainLayerBlendMap.h:60
bool watchForLimit(const String &profileName, Real limit, bool greaterThan=true)
Returns true if the specified profile goes over or under the given limit frame time.
The profiler allows you to measure the performance of your code.
Definition: OgreProfiler.h:233
Definition: OgreInput.h:91
Shader generator system main interface.
Definition: OgreShaderGenerator.h:61
Transform is relative to the space of the parent node.
Definition: OgreNode.h:66
Texture coordinates.
Definition: OgreHardwareVertexBuffer.h:103
Base class responsible for setting up a common context for applications.
Definition: OgreApplicationContextBase.h:85
void destroyAllWidgetsInTray(TrayLocation trayLoc)
Destroys all widgets in a tray.
void setType(LightTypes type)
Sets the type of light - see LightTypes for more info.
unsigned int getNumWidgets()
Gets the number of widgets in total.
const MaterialPtr & getMaterial(void) const override
Retrieves a weak reference to the material this renderable object uses.
virtual Light * createLight(const String &name)
Creates a light for use in the scene.
Real d
Definition: OgrePlane.h:66
virtual void writeData(size_t offset, size_t length, const void *pSource, bool discardWholeBuffer=false)=0
Writes data to the buffer from an area of system memory; note that you must ensure that your buffer i...
MeshBuilderCallback * lodCallback
Callback for a specific LOD level.
Definition: OgreVolumeChunk.h:79
Real scale
The scale of the volume with 1.0 as default.
Definition: OgreVolumeChunk.h:82
void setDiffuseColour(float red, float green, float blue)
Sets the colour of the diffuse light given off by this source.
void setEnabled(bool enabled)
Sets whether this profiler is enabled.
#define OGRE_NEW
Definition: OgreMemoryAllocatorConfig.h:201
Definition: OgreInput.h:50
static TextureManager & getSingleton(void)
Get the singleton instance.
Pass * getPass(unsigned short index) const
Retrieves the Pass with the given index.
Source * src
The volume source.
Definition: OgreVolumeChunk.h:61
void disableProfile(const String &profileName)
Disables a profile.
void setUpdateDisplayFrequency(uint freq)
Sets the Profiler so the display of results are updated every n frames.
const ColourValue & getDiffuseColour(void) const
Returns the colour of the diffuse light given off by this light source (see setDiffuseColour for more...
virtual void attachObject(MovableObject *obj)
Adds an instance of a scene object to this node.
Position, 3 reals per vertex.
Definition: OgreHardwareVertexBuffer.h:91
Definition: OgreTrays.h:61
Allows the rendering of a simple 2D rectangle This class renders a simple 2D rectangle; this rectangl...
Definition: OgreRectangle2D.h:49
Widget * getWidget(TrayLocation trayLoc, const Ogre::String &name)
Gets a widget from a tray by name.
Keycode sym
Definition: OgreInput.h:46
virtual void setup()
Sets up the context after configuration.
void convertImageToTerrainSpace(size_t x, size_t y, Real *outX, Real *outY)
Convert image space (0, imageSize) to terrain space values (0,1).
A single volume chunk mesh.
Definition: OgreVolumeChunk.h:146
const _OgreExport char *const RGN_DEFAULT
Default resource group name.
#define OgreProfileBegin(a)
Definition: OgreProfiler.h:60
Supports infinite far plane projection.
Definition: OgreRenderSystemCapabilities.h:114
Main class to manage a cursor, backdrop, trays and widgets.
Definition: OgreTrays.h:741
Class representing an image file.
Definition: OgreImage.h:60
bool watchForMax(const String &profileName)
Returns true if the specified profile reaches a new frame time maximum.
static MaterialManager & getSingleton(void)
Get the singleton instance.
VertexDeclaration * vertexDeclaration
Declaration of the vertex to be used in this operation.
Definition: OgreVertexIndexData.h:80
Definition: OgreTrays.h:65
Definition: OgreTrays.h:57
Fog density increases exponentially from the camera (fog = 1/e^(distance * density))
Definition: OgreCommon.h:149
void removeWidgetFromTray(Widget *widget)
Removes a widget from its tray.
Definition: OgreTrays.h:1042
uint16 terrainSize
Terrain size (along one edge) in vertices; must be 2^n+1.
Definition: OgreTerrain.h:329
virtual void normal(const Vector3 &norm)
Add a vertex normal to the current vertex.
A primitive describing a volume (3D), image (2D) or line (1D) of pixels in memory.
Definition: OgrePixelFormat.h:339
bool useSharedVertices
Indicates if this submesh shares vertex data with other meshes or whether it has it's own vertices.
Definition: OgreSubMesh.h:72
virtual void quad(uint32 i1, uint32 i2, uint32 i3, uint32 i4)
Add a set of 4 vertex indices to construct a quad (out of 2 triangles); this is a shortcut to calling...
A sphere.
Definition: OgreVolumeCSGSource.h:47
void enableProfile(const String &profileName)
Enables a previously disabled profile.
void _setBounds(const AxisAlignedBox &bounds, bool pad=true)
Manually set the bounding box for this Mesh.
#define OgreProfile(a)
Definition: OgreProfiler.h:59
static float saturate(float t)
Simulate the shader function saturate that clamps a parameter value between 0 and 1.
Definition: OgreMath.h:385
32-bit pixel format, 8 bits for blue, green, red and alpha.
Definition: OgrePixelFormat.h:292
uint16 maxBatchSize
Maximum batch size (along one edge) in vertices; must be 2^n+1 and <= 65.
Definition: OgreTerrain.h:335
Label * createLabel(TrayLocation trayLoc, const Ogre::String &name, const Ogre::DisplayString &caption, Ogre::Real width=0)
A 3D box aligned with the x/y/z axes.
Definition: OgreAxisAlignedBox.h:55
Options class which just stores default options for the terrain.
Definition: OgreTerrain.h:1877
struct _OgreVolumeExport Ogre::Volume::Vertex Vertex
Lightweight struct to represent a mesh vertex.
SceneNode * getRootSceneNode(void)
Gets the SceneNode at the root of the scene hierarchy.
void setTrayWidgetAlignment(TrayLocation trayLoc, Ogre::GuiHorizontalAlignment gha)
Sets horizontal alignment of a tray's contents.
Vector3 updateTo
If an existing chunktree is to be partially updated, set this to the front upper right point of the (...
Definition: OgreVolumeChunk.h:94
void setPosition(const Vector3 &pos)
Sets the position of the node relative to it's parent.
unsigned short uint16
Definition: OgrePlatform.h:255
Definition: OgreAlignedAllocator.h:34
const Vector3 & getDerivedDirection(void) const
Retrieves the direction of the light including any transform from nodes it is attached to.
Fog density increases at the square of FOG_EXP, i.e. even quicker (fog = 1/e^(distance * density)^2)
Definition: OgreCommon.h:151
void dirty()
Indicate that all of the blend data is dirty and needs updating.
struct Ogre::Volume::ChunkParameters ChunkParameters
Parameters for loading the volume.
Terrain is in the X/Z plane.
Definition: OgreTerrain.h:314
TrayLocation
enumerator values for widget tray anchoring locations
Definition: OgreTrays.h:54
#define OgreProfileEnd(a)
Definition: OgreProfiler.h:61
Basic label widget.
Definition: OgreTrays.h:458
Structure encapsulating import data that you may use to bootstrap the terrain without loading from a ...
Definition: OgreTerrain.h:324
MeshPtr createManual(const String &name, const String &groupName, ManualResourceLoader *loader=0)
Creates a new Mesh specifically for manual definition rather than loading from an object file.
Class representing a node in the scene graph.
Definition: OgreSceneNode.h:57
void setCaption(const Ogre::DisplayString &caption)
Definition: OgreTrays.h:470
Real skirtFactor
Factor for the skirt length generation.
Definition: OgreVolumeChunk.h:76
virtual void begin(const String &materialName, RenderOperation::OperationType opType=RenderOperation::OT_TRIANGLE_LIST, const String &groupName=ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME)
Start defining a part of the object.
Helper class to assist you in managing multiple terrain instances that are connected to each other.
Definition: OgreTerrainGroup.h:72
SceneManager * createSceneManager()
create a default scene manager
Definition: OgreRoot.h:373
VertexBufferBinding * vertexBufferBinding
The vertex buffer bindings to be used.
Definition: OgreVertexIndexData.h:84
static ShaderGenerator * getSingletonPtr()
Get the singleton instance.
Real baseError
The smallest allowed geometric error of the highest LOD.
Definition: OgreVolumeChunk.h:64
Button * createButton(TrayLocation trayLoc, const Ogre::String &name, const Ogre::String &caption, Ogre::Real width=0)
void destroyWidget(Widget *widget)
Destroys a widget.
bool watchForMin(const String &profileName)
Returns true if the specified profile reaches a new frame time minimum.
64-bit pixel format, 16 bits (float) for red, 16 bits (float) for green, 16 bits (float) for blue,...
Definition: OgrePixelFormat.h:99
ApplicationContextBase ApplicationContext
Definition: OgreApplicationContext.h:99
void logResults()
Outputs current profile statistics to the log.
void setMaterial(const MaterialPtr &mat)
Overridden from SimpleRenderable.
ChunkParameters * getChunkParameters(void)
Gets the parameters with which the chunktree got loaded.
A viewpoint from which the scene will be rendered.
Definition: OgreCamera.h:80
Technique * getTechnique(unsigned short index) const
Gets the indexed technique.
virtual ManualObjectSection * end(void)
Finish defining the object and compile the final renderable version.
SharedPtr< HardwareIndexBuffer > HardwareIndexBufferSharedPtr
Definition: OgrePrerequisites.h:290
Definition: OgreHardwareVertexBuffer.h:122
void setWidgetPadding(Ogre::Real padding)
uint16 minBatchSize
Minimum batch size (along one edge) in vertices; must be 2^n+1.
Definition: OgreTerrain.h:346
Implements the plane optimal shadow camera algorithm.
Definition: OgreShadowCameraSetupPlaneOptimal.h:62
Definition: OgreTrays.h:63