Table of Contents

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

bool

Properties

Billboard

How this PositionableRenderable shall be rotated towards the camera

public BillboardMode Billboard { get; set; }

Property Value

BillboardMode

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

bool

DrawBoundingSphere

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

public bool DrawBoundingSphere { get; set; }

Property Value

bool

Pickable

Shall this PositionableRenderable be pickable with the mouse?

public bool Pickable { get; set; }

Property Value

bool

Position

The body's position in world space

public DoubleVector3 Position { get; set; }

Property Value

DoubleVector3

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

ViewType

RequiredViews

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

[Browsable(false)]
public ICollection<View> RequiredViews { get; }

Property Value

ICollection<View>

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

SurfaceEffect

SurfaceShader

The SurfaceShader to apply to the surface of this PositionableRenderable

public SurfaceShader? SurfaceShader { get; set; }

Property Value

SurfaceShader

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 Ray

A ray in world space along which to check for intersections.

position DoubleVector3

Returns the position of the intersection in entity space.

Returns

bool

true if this PositionableRenderable was intersected by the ray.

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 Ray

A ray in world space along which to check for intersections.

distance float

Returns the distance along the ray at which the intersection took place.

Returns

bool

true if this PositionableRenderable was intersected by the ray.

See Also

IntersectsBounding(Ray)

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

protected virtual bool IntersectsBounding(Ray ray)

Parameters

ray Ray

A ray in world space along which to check for intersections.

Returns

bool

true if the bounding bodies were undefined or intersected by the ray.

IsVisible(Camera)

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

public bool IsVisible(Camera camera)

Parameters

camera Camera

The Camera used to look the object.

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 Action

A delegate that will be called once per rendering pass to display the actual content.

material XMaterial

The material to apply to everything rendered.

camera Camera

The currently effective Camera.

lights LightSource[]

The currently effective LightSources.

SetScale(float)

Scales this PositionableRenderable symmetrically

public void SetScale(float factor)

Parameters

factor float

The factor by which to scale

See Also