OmegaEngine API  1.0.3
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties Events
Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | Package Functions | Properties | List of all members
OmegaEngine.Graphics.Renderables.PositionableRenderable Class Reference

An object that can be Rendered at a specific Position in a Scene. More...

Inheritance diagram for OmegaEngine.Graphics.Renderables.PositionableRenderable:
OmegaEngine.Graphics.Renderables.Renderable OmegaEngine.IPositionableOffset OmegaEngine.EngineElement OmegaEngine.IResetable OmegaEngine.IPositionable OmegaEngine.Graphics.Renderables.AnimatedModel OmegaEngine.Graphics.Renderables.CpuParticleSystem OmegaEngine.Graphics.Renderables.GpuParticleSystem OmegaEngine.Graphics.Renderables.Model OmegaEngine.Graphics.Renderables.VertexGroup OmegaEngine.Graphics.Renderables.FloatingModel OmegaEngine.Graphics.Renderables.Terrain OmegaEngine.Graphics.Renderables.Water

Public Member Functions

void SetScale (float factor)
 Scales this PositionableRenderable symmetrically More...
 
bool IsVisible (Camera camera)
 Checks whether this object is visible at the moment (includes Frustum Culling and other filtering criteria). More...
 
virtual bool Intersects (Ray ray, out float distance)
 Determine whether this PositionableRenderable is intersected by a ray. More...
 
bool Intersects (Ray ray, out DoubleVector3 position)
 Determine whether this PositionableRenderable is intersected by a ray. More...
 
- Public Member Functions inherited from OmegaEngine.Graphics.Renderables.Renderable
override string ToString ()
 
- Public Member Functions inherited from OmegaEngine.EngineElement
void Dispose ()
 

Public Attributes

ICollection< ViewRequiredViews => _requiredViews
 A list of Views that must be rendered before this PositionableRenderable can be rendered More...
 
- Public Attributes inherited from OmegaEngine.EngineElement
bool IsEngineSet => _engine != null
 true if the Engine has been set. More...
 

Protected Member Functions

virtual void RecalcWorldTransform ()
 Called to generate/update transformation matrices and related values More...
 
void RenderHelper (Action render, XMaterial material, Camera camera, params LightSource[] lights)
 Provides an automatic rendering framework that handles things like setting textures, materials, lighting and shaders. More...
 
virtual bool IntersectsBounding (Ray ray)
 Determine whether PositionableRenderable.WorldBoundingBox and PositionableRenderable.WorldBoundingSphere (if defined) are intersected by a ray. More...
 
override void OnEngineSet ()
 Hook that is calld when Engine is set for the first time.
 
- Protected Member Functions inherited from OmegaEngine.Graphics.Renderables.Renderable
virtual void OnPreRender ()
 
void PrepareRender ()
 Should be called before rendering anything - usually called by base constructor More...
 
- Protected Member Functions inherited from OmegaEngine.EngineElement
void RegisterChild (EngineElement element, bool autoDispose=true)
 Registers a child EngineElement for automatic Engine setting and Dispose calling. More...
 
void UnregisterChild (EngineElement element)
 Unregisters a child EngineElement (opposite of RegisterChild). More...
 
virtual void OnDispose ()
 Hook that is called when the object needs to dispose its internal resources. More...
 

Protected Attributes

bool WorldTransformDirty = true
 Does the world transform need to be recalculated? More...
 

Package Functions

override void Render (Camera camera, GetLights getLights=null)
 To be called when this object ist to be rendered.
Parameters
cameraSupplies information for the view transformation.
getLightsA delegate that will be called to get lighting information.

 

Properties

bool Pickable [get, set]
 Shall this PositionableRenderable be pickable with the mouse? More...
 
ViewType RenderIn = true [get, set]
 In what kind of Views shall this body be rendered? More...
 
SurfaceEffect SurfaceEffect [get, set]
 What kinds of surface effects (e.g. lighting) to apply to this PositionableRenderable More...
 
SurfaceShader SurfaceShader [get, set]
 The SurfaceShader to apply to the surface of this PositionableRenderable More...
 
BillboardMode Billboard [get, set]
 How this PositionableRenderable shall be rotated towards the camera More...
 
Matrix PreTransform [get, set]
 A transformation matrix that is to be applied before the normal world transform occurs - useful for correcting off-center meshes More...
 
Vector3 Scale [get, set]
 Scaling to be performed before rendering More...
 
Quaternion Rotation [get, set]
 The body's rotation quaternion More...
 
DoubleVector3 Position [get, set]
 The body's position in world space More...
 
Matrix WorldTransform [get]
 The world transformation matrix for this entity More...
 
Matrix InverseWorldTransform [get]
 The world transformation matrix for this entity More...
 
double CurrentCameraDistance [get]
 The body's current distance to View.Camera calculated from IPositionableOffset.EffectivePosition More...
 
BoundingSphere BoundingSphere [get, set]
 A sphere that completely encompasses the body (in entity space, even before apply PreTransform). More...
 
BoundingSphere WorldBoundingSphere [get]
 A sphere that completely encompasses the body (in world space, used for culling tests). More...
 
bool DrawBoundingSphere [get, set]
 Shall the bounding sphere used to cull this object be drawn/visualized? (used for debugging) More...
 
BoundingBox BoundingBox [get, set]
 A axis-aligned box that completely encompasses the body (in entity space, even before apply PreTransform). More...
 
BoundingBox WorldBoundingBox [get]
 An axis-aligned box that completely encompasses the body (in world space, used for culling tests). More...
 
bool DrawBoundingBox [get, set]
 Shall the bounding box used to cull this object be drawn/visualized? (used for debugging) More...
 
- Properties inherited from OmegaEngine.Graphics.Renderables.Renderable
int RenderCount [get, set]
 How many times has this entity been rendered in this frame? More...
 
string Name [get, set]
 Text value to make it easier to identify a particular render entity More...
 
bool Visible [get, set]
 Shall the entity be rendered? More...
 
bool Wireframe = true [get, set]
 Shall this entity be drawn in wireframe-mode? (used for debugging) More...
 
float VisibilityDistance [get, set]
 The maximum distance from which the entity is visible - 0 for infinite More...
 
int Alpha [get, set]
 The level of transparency from 0 (solid) to 255 (invisible), OmegaEngine.EngineState.AlphaChannel, OmegaEngine.EngineState.BinaryAlphaChannel or OmegaEngine.EngineState.AdditivBlending More...
 
- Properties inherited from OmegaEngine.EngineElement
Engine Engine [get, set]
 The Engine instance used by this object. Must be set before using the object. May not be changed once it has been set! More...
 
bool IsDisposed [get, set]
 Indicates whether this object has been disposed and can therefore no longer be used. More...
 
- Properties inherited from OmegaEngine.IPositionableOffset
DoubleVector3 Offset [get, set]
 A value to be subtracted from IPositionable.Position in order gain IPositionableOffset.EffectivePosition More...
 
Vector3 EffectivePosition [get]
 The sum of IPositionable.Position and IPositionableOffset.EffectivePosition More...
 
- Properties inherited from OmegaEngine.IPositionable
DoubleVector3 Position [get, set]
 The object's position More...
 

Additional Inherited Members

- Events inherited from OmegaEngine.Graphics.Renderables.Renderable
Action PreRender
 Occurs once per frame before rendering the entity. Will not be executed if the entity is excluded by a culling test. More...
 

Detailed Description

An object that can be Rendered at a specific Position in a Scene.

See Also
Scene.Positionables

Member Function Documentation

virtual bool OmegaEngine.Graphics.Renderables.PositionableRenderable.Intersects ( Ray  ray,
out float  distance 
)
inlinevirtual

Determine whether this PositionableRenderable is intersected by a ray.

Parameters
rayA ray in world space along which to check for intersections.
distanceReturns the distance along the ray at which the intersection took place.
Returns
true if this PositionableRenderable was intersected by the ray .
See Also
View.Pick

Reimplemented in OmegaEngine.Graphics.Renderables.Model.

bool OmegaEngine.Graphics.Renderables.PositionableRenderable.Intersects ( Ray  ray,
out DoubleVector3  position 
)
inline

Determine whether this PositionableRenderable is intersected by a ray.

Parameters
rayA ray in world space along which to check for intersections.
positionReturns the position of the intersection in entity space.
Returns
true if this PositionableRenderable was intersected by the ray .
See Also
View.Pick
virtual bool OmegaEngine.Graphics.Renderables.PositionableRenderable.IntersectsBounding ( Ray  ray)
inlineprotectedvirtual

Determine whether PositionableRenderable.WorldBoundingBox and PositionableRenderable.WorldBoundingSphere (if defined) are intersected by a ray.

Parameters
rayA ray in world space along which to check for intersections.
Returns
true if the bounding bodies were undefined or intersected by the ray .

Reimplemented in OmegaEngine.Graphics.Renderables.Terrain.

bool OmegaEngine.Graphics.Renderables.PositionableRenderable.IsVisible ( Camera  camera)
inline

Checks whether this object is visible at the moment (includes Frustum Culling and other filtering criteria).

Parameters
cameraThe Camera used to look the object.
Returns
true if the object is visible.
See Also
Cameras.Camera.InFrustum(SlimDX.BoundingSphere), Cameras.Camera.InFrustum(SlimDX.BoundingBox)
virtual void OmegaEngine.Graphics.Renderables.PositionableRenderable.RecalcWorldTransform ( )
inlineprotectedvirtual

Called to generate/update transformation matrices and related values

Reimplemented in OmegaEngine.Graphics.Renderables.Terrain.

void OmegaEngine.Graphics.Renderables.PositionableRenderable.RenderHelper ( Action  render,
XMaterial  material,
Camera  camera,
params LightSource[]  lights 
)
inlineprotected

Provides an automatic rendering framework that handles things like setting textures, materials, lighting and shaders.

Parameters
renderA delegate that will be called once per rendering pass to display the actual content.
materialThe material to apply to everything rendered.
cameraThe currently effective Camera.
lightsThe currently effective LightSources.
void OmegaEngine.Graphics.Renderables.PositionableRenderable.SetScale ( float  factor)
inline

Scales this PositionableRenderable symmetrically

Parameters
factorThe factor by which to scale

Member Data Documentation

ICollection<View> OmegaEngine.Graphics.Renderables.PositionableRenderable.RequiredViews => _requiredViews

A list of Views that must be rendered before this PositionableRenderable can be rendered

bool OmegaEngine.Graphics.Renderables.PositionableRenderable.WorldTransformDirty = true
protected

Does the world transform need to be recalculated?

Property Documentation

BillboardMode OmegaEngine.Graphics.Renderables.PositionableRenderable.Billboard
getset

How this PositionableRenderable shall be rotated towards the camera

BoundingBox OmegaEngine.Graphics.Renderables.PositionableRenderable.BoundingBox
getset

A axis-aligned box that completely encompasses the body (in entity space, even before apply PreTransform).

BoundingSphere OmegaEngine.Graphics.Renderables.PositionableRenderable.BoundingSphere
getset

A sphere that completely encompasses the body (in entity space, even before apply PreTransform).

double OmegaEngine.Graphics.Renderables.PositionableRenderable.CurrentCameraDistance
getpackage

The body's current distance to View.Camera calculated from IPositionableOffset.EffectivePosition

Constantly changes based on the values set for IPositionableOffset.EffectivePosition

bool OmegaEngine.Graphics.Renderables.PositionableRenderable.DrawBoundingBox
getset

Shall the bounding box used to cull this object be drawn/visualized? (used for debugging)

bool OmegaEngine.Graphics.Renderables.PositionableRenderable.DrawBoundingSphere
getset

Shall the bounding sphere used to cull this object be drawn/visualized? (used for debugging)

Matrix OmegaEngine.Graphics.Renderables.PositionableRenderable.InverseWorldTransform
getpackage

The world transformation matrix for this entity

Constantly changes based on the values set for IPositionableOffset.EffectivePosition

bool OmegaEngine.Graphics.Renderables.PositionableRenderable.Pickable
getset

Shall this PositionableRenderable be pickable with the mouse?

DoubleVector3 OmegaEngine.Graphics.Renderables.PositionableRenderable.Position
getset

The body's position in world space

Matrix OmegaEngine.Graphics.Renderables.PositionableRenderable.PreTransform
getset

A transformation matrix that is to be applied before the normal world transform occurs - useful for correcting off-center meshes

ViewType OmegaEngine.Graphics.Renderables.PositionableRenderable.RenderIn = true
getset

In what kind of Views shall this body be rendered?

Quaternion OmegaEngine.Graphics.Renderables.PositionableRenderable.Rotation
getset

The body's rotation quaternion

Vector3 OmegaEngine.Graphics.Renderables.PositionableRenderable.Scale
getset

Scaling to be performed before rendering

SurfaceEffect OmegaEngine.Graphics.Renderables.PositionableRenderable.SurfaceEffect
getset

What kinds of surface effects (e.g. lighting) to apply to this PositionableRenderable

SurfaceShader OmegaEngine.Graphics.Renderables.PositionableRenderable.SurfaceShader
getset

The SurfaceShader to apply to the surface of this PositionableRenderable

See Also
SurfaceEffect

Will NOT be disposed when EngineElement.Dispose is called.

BoundingBox OmegaEngine.Graphics.Renderables.PositionableRenderable.WorldBoundingBox
get

An axis-aligned box that completely encompasses the body (in world space, used for culling tests).

BoundingSphere OmegaEngine.Graphics.Renderables.PositionableRenderable.WorldBoundingSphere
get

A sphere that completely encompasses the body (in world space, used for culling tests).

Matrix OmegaEngine.Graphics.Renderables.PositionableRenderable.WorldTransform
getpackage

The world transformation matrix for this entity

Constantly changes based on the values set for IPositionableOffset.EffectivePosition


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