Class PositionableRenderable
- Namespace
- OmegaEngine.Graphics.Renderables
- Assembly
- OmegaEngine.dll
An object that can be Render(Camera, GetLights)ed at a specific Position in a Scene.
public abstract class PositionableRenderable : Renderable, IDisposable, IPositionable
- Inheritance
-
PositionableRenderable
- Implements
- Derived
- Inherited Members
- Extension Methods
Fields
WorldTransformDirty
Does the world transform need to be recalculated?
protected bool WorldTransformDirty
Field Value
Properties
Billboard
How this PositionableRenderable shall be rotated towards the camera
public BillboardMode Billboard { get; set; }
Property Value
BoundingBox
A axis-aligned box that completely encompasses the body (in entity space, even before apply PreTransform).
[Browsable(false)]
public BoundingBox? BoundingBox { get; protected set; }
Property Value
- BoundingBox?
BoundingSphere
A sphere that completely encompasses the body (in entity space, even before apply PreTransform).
[Browsable(false)]
public BoundingSphere? BoundingSphere { get; protected set; }
Property Value
- BoundingSphere?
DrawBoundingBox
Shall the bounding box used to cull this object be drawn/visualized? (used for debugging)
public bool DrawBoundingBox { get; set; }
Property Value
DrawBoundingSphere
Shall the bounding sphere used to cull this object be drawn/visualized? (used for debugging)
public bool DrawBoundingSphere { get; set; }
Property Value
Pickable
Shall this PositionableRenderable be pickable with the mouse?
public bool Pickable { get; set; }
Property Value
Position
The body's position in world space
public DoubleVector3 Position { get; set; }
Property Value
PreTransform
A transformation matrix that is to be applied before the normal world transform occurs - useful for correcting off-center meshes
[Browsable(false)]
public Matrix PreTransform { get; set; }
Property Value
- Matrix
RenderIn
In what kind of Views shall this body be rendered?
public ViewType RenderIn { get; set; }
Property Value
RequiredViews
A list of Views that must be rendered before this PositionableRenderable can be rendered
[Browsable(false)]
public ICollection<View> RequiredViews { get; }
Property Value
Rotation
The body's rotation quaternion
[Browsable(false)]
public Quaternion Rotation { get; set; }
Property Value
- Quaternion
Scale
Scaling to be performed before rendering
public Vector3 Scale { get; set; }
Property Value
- Vector3
SurfaceEffect
What kinds of surface effects (e.g. lighting) to apply to this PositionableRenderable
public SurfaceEffect SurfaceEffect { get; set; }
Property Value
SurfaceShader
The SurfaceShader to apply to the surface of this PositionableRenderable
public SurfaceShader? SurfaceShader { get; set; }
Property Value
Remarks
Will NOT be disposed when Dispose() is called.
- See Also
WorldBoundingBox
An axis-aligned box that completely encompasses the body (in world space, used for culling tests).
[Browsable(false)]
public BoundingBox? WorldBoundingBox { get; }
Property Value
- BoundingBox?
WorldBoundingSphere
A sphere that completely encompasses the body (in world space, used for culling tests).
[Browsable(false)]
public BoundingSphere? WorldBoundingSphere { get; }
Property Value
- BoundingSphere?
Methods
Intersects(Ray, out DoubleVector3)
Determine whether this PositionableRenderable is intersected by a ray.
public bool Intersects(Ray ray, out DoubleVector3 position)
Parameters
ray
RayA ray in world space along which to check for intersections.
position
DoubleVector3Returns the position of the intersection in entity space.
Returns
- bool
true
if this PositionableRenderable was intersected by theray
.
- See Also
Intersects(Ray, out float)
Determine whether this PositionableRenderable is intersected by a ray.
public virtual bool Intersects(Ray ray, out float distance)
Parameters
ray
RayA ray in world space along which to check for intersections.
distance
floatReturns the distance along the
ray
at which the intersection took place.
Returns
- bool
true
if this PositionableRenderable was intersected by theray
.
- See Also
IntersectsBounding(Ray)
Determine whether WorldBoundingBox and WorldBoundingSphere (if defined) are intersected by a ray.
protected virtual bool IntersectsBounding(Ray ray)
Parameters
ray
RayA ray in world space along which to check for intersections.
Returns
- bool
true
if the bounding bodies were undefined or intersected by theray
.
IsVisible(Camera)
Checks whether this object is visible at the moment (includes Frustum Culling and other filtering criteria).
public bool IsVisible(Camera camera)
Parameters
Returns
- bool
true
if the object is visible.
- See Also
-
InFrustum(BoundingSphere)InFrustum(BoundingBox)
OnEngineSet()
Hook that is called when Engine is set for the first time.
protected override void OnEngineSet()
RecalcWorldTransform()
Called to generate/update transformation matrices and related values
protected virtual void RecalcWorldTransform()
RenderHelper(Action, XMaterial, Camera, params LightSource[])
Provides an automatic rendering framework that handles things like setting textures, materials, lighting and shaders.
protected void RenderHelper(Action render, XMaterial material, Camera camera, params LightSource[] lights)
Parameters
render
ActionA delegate that will be called once per rendering pass to display the actual content.
material
XMaterialThe material to apply to everything rendered.
camera
CameraThe currently effective Camera.
lights
LightSource[]The currently effective LightSources.
SetScale(float)
Scales this PositionableRenderable symmetrically
public void SetScale(float factor)
Parameters
factor
floatThe factor by which to scale